commit:     3f3f7cba814edf0af075a6fa791dc4932810d286
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sat Jan 14 13:15:59 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 22:16:41 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f3f7cba

dev-games/recastnavigation: add 1.5.1_p20230102

Closes: https://bugs.gentoo.org/864358
Closes: https://github.com/gentoo/gentoo/pull/29103
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 dev-games/recastnavigation/Manifest                |  1 +
 .../recastnavigation-1.5.1_p20230102-catch.patch   | 10 ++++++
 .../recastnavigation-1.5.1_p20230102.ebuild        | 41 ++++++++++++++++++++++
 3 files changed, 52 insertions(+)

diff --git a/dev-games/recastnavigation/Manifest 
b/dev-games/recastnavigation/Manifest
index 9efaf58806dc..b44ad11b4c36 100644
--- a/dev-games/recastnavigation/Manifest
+++ b/dev-games/recastnavigation/Manifest
@@ -1 +1,2 @@
 DIST recastnavigation-1.5.1_p20210305.tar.gz 1542880 BLAKE2B 
f1066a48c7269fe67deba17768187522db9c0ece11293a3ff54311a6400cd38f32340985729bb38109bc1262099b44b7bf92974dfeb80c47953e58e6eeab73ea
 SHA512 
7c3a8ce3e38de81eeb31332584896af9f234826c7f7f831eccb36972746c8b528ffde7ae4ee0d25baf814ece030a4b029101e07ea89aacc33c6d44f1ae2cf265
+DIST recastnavigation-1.5.1_p20230102.tar.gz 1276864 BLAKE2B 
0958fd76c1855dee0d4d4ee8b0e31cfac3c1bdee1f5f767c4dec0bec75b3c919760d9201ba27d772602200e9416e08955b7ef326603ec21fb9594f2d40c079bc
 SHA512 
4820e473735b08920bca7032851b258e8748c093bae331b11c0c9f630e9973264d9ca6277f7d92818b0a8c0864ce2601f129b708ec7976c9baead88d7b844f76

diff --git 
a/dev-games/recastnavigation/files/recastnavigation-1.5.1_p20230102-catch.patch 
b/dev-games/recastnavigation/files/recastnavigation-1.5.1_p20230102-catch.patch
new file mode 100644
index 000000000000..5b0ff9bc6017
--- /dev/null
+++ 
b/dev-games/recastnavigation/files/recastnavigation-1.5.1_p20230102-catch.patch
@@ -0,0 +1,10 @@
+--- a/Tests/CMakeLists.txt
++++ b/Tests/CMakeLists.txt
+@@ -10,5 +10,6 @@ add_executable(Tests ${TESTS_SOURCES})
+ set_property(TARGET Tests PROPERTY CXX_STANDARD 17)
+ 
+ add_dependencies(Tests Recast Detour)
+-target_link_libraries(Tests Recast Detour)
++find_package(Catch2 REQUIRED)
++target_link_libraries(Tests Recast Detour Catch2::Catch2WithMain)
+ add_test(Tests Tests)

diff --git a/dev-games/recastnavigation/recastnavigation-1.5.1_p20230102.ebuild 
b/dev-games/recastnavigation/recastnavigation-1.5.1_p20230102.ebuild
new file mode 100644
index 000000000000..d62785277e49
--- /dev/null
+++ b/dev-games/recastnavigation/recastnavigation-1.5.1_p20230102.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Navigation mesh construction toolset for games"
+HOMEPAGE="https://github.com/recastnavigation/recastnavigation";
+MY_COMMIT="405cc095ab3a2df976a298421974a2af83843baf"
+SRC_URI="https://github.com/recastnavigation/recastnavigation/archive/${MY_COMMIT}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="ZLIB"
+SLOT="0/1.5.1"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/catch:0 )"
+
+PATCHES=(
+       "${FILESDIR}/${P}-catch.patch"
+)
+
+src_prepare() {
+       rm Tests/Contrib/Catch/* || die
+       echo "#include <catch2/catch_all.hpp>" > 
Tests/Contrib/Catch/catch_amalgamated.hpp || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DRECASTNAVIGATION_DEMO=OFF
+               -DRECASTNAVIGATION_EXAMPLES=OFF
+               -DRECASTNAVIGATION_TESTS=$(usex test)
+       )
+
+       cmake_src_configure
+}

Reply via email to