commit:     0cb71b86d816655ae1818edd48e072dbbfa28e5a
Author:     Chris Mayo <aklhfex <AT> gmail <DOT> com>
AuthorDate: Thu Oct 24 18:27:01 2024 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Fri Jan 10 16:43:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cb71b86

sci-libs/ondselsolver: new package, add 1.0.1_p20241024

Signed-off-by: David Moreno <ydmorenoc <AT> unal.edu.co>
Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 sci-libs/ondselsolver/Manifest                     |  1 +
 ...ondselsolver-1.0.1_p20241024-system-gtest.patch | 26 ++++++++++++++
 sci-libs/ondselsolver/metadata.xml                 | 15 ++++++++
 .../ondselsolver-1.0.1_p20241024.ebuild            | 42 ++++++++++++++++++++++
 4 files changed, 84 insertions(+)

diff --git a/sci-libs/ondselsolver/Manifest b/sci-libs/ondselsolver/Manifest
new file mode 100644
index 000000000000..8d120dd3e5d5
--- /dev/null
+++ b/sci-libs/ondselsolver/Manifest
@@ -0,0 +1 @@
+DIST ondselsolver-1.0.1_p20241024.tar.gz 4668075 BLAKE2B 
82e13168b2f6d988e411613584d9bb943afd9df73716a467d2681658d530e71173abcb31e432075dce8ebc1f0276ecb2b7b837bf057fb68f654c972e2d77f5b5
 SHA512 
918542fca4bfcb952d6d9500a0f3721549810dd2cde9adfb352d9301e0e1bf0fe1100a301316f15a6dcd18e36d371c58ba4a41b8f8e0878a77db4cbf054a095a

diff --git 
a/sci-libs/ondselsolver/files/ondselsolver-1.0.1_p20241024-system-gtest.patch 
b/sci-libs/ondselsolver/files/ondselsolver-1.0.1_p20241024-system-gtest.patch
new file mode 100644
index 000000000000..16258763011a
--- /dev/null
+++ 
b/sci-libs/ondselsolver/files/ondselsolver-1.0.1_p20241024-system-gtest.patch
@@ -0,0 +1,26 @@
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,11 +1,4 @@
+-include(FetchContent)
+-FetchContent_Declare(
+-  googletest
+-  URL 
https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
+-)
+-# For Windows: Prevent overriding the parent project's compiler/linker 
settings
+-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+-FetchContent_MakeAvailable(googletest)
++find_package(GTest QUIET)
+ 
+ if(MSVC)
+     add_compile_options(/wd4251)
+@@ -54,8 +47,8 @@
+               ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp
+ )
+ target_link_libraries(test_run
+-    gtest_main
+-    gmock_main
++    GTest::gtest
++    GTest::gmock_main
+     ${Google_Tests_LIBS}
+     OndselSolver
+ )

diff --git a/sci-libs/ondselsolver/metadata.xml 
b/sci-libs/ondselsolver/metadata.xml
new file mode 100644
index 000000000000..a6feb57a7762
--- /dev/null
+++ b/sci-libs/ondselsolver/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>David Moreno</name>
+       </maintainer>
+       <maintainer type="person" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Nowa Ammerlaan</name>
+       </maintainer>
+       <upstream>
+               <remote-id 
type="github">Ondsel-Development/OndselSolver</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241024.ebuild 
b/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241024.ebuild
new file mode 100644
index 000000000000..92cf9be4b96c
--- /dev/null
+++ b/sci-libs/ondselsolver/ondselsolver-1.0.1_p20241024.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+COMMIT=9e44ac50b84dbce0e04907999ff0f33e69f583bc
+
+DESCRIPTION="Assembly Constraints and Multibody Dynamics code"
+HOMEPAGE="https://github.com/Ondsel-Development/OndselSolver/";
+SRC_URI="https://github.com/Ondsel-Development/OndselSolver/archive/${COMMIT}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/OndselSolver-${COMMIT}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+# These tests result in "Subprocess aborted"
+CMAKE_SKIP_TESTS=(
+       OndselSolver.Gears
+       OndselSolver.anglejoint
+       OndselSolver.constvel
+       OndselSolver.rackscrew
+       OndselSolver.planarbug
+       OndselSolver.piston
+)
+
+PATCHES=( "${FILESDIR}/${P}-system-gtest.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               -DONDSELSOLVER_BUILD_TESTS=$(usex test)
+       )
+
+       cmake_src_configure
+}

Reply via email to