diff options
Diffstat (limited to 'dev-cpp')
| -rw-r--r-- | dev-cpp/sol2/Manifest | 1 | ||||
| -rw-r--r-- | dev-cpp/sol2/files/sol2-3.5.0-catch-depend.patch | 16 | ||||
| -rw-r--r-- | dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch | 17 | ||||
| -rw-r--r-- | dev-cpp/sol2/sol2-3.5.0.ebuild | 66 |
4 files changed, 100 insertions, 0 deletions
diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest index ca4b7ec7ad33..998600ce8981 100644 --- a/dev-cpp/sol2/Manifest +++ b/dev-cpp/sol2/Manifest @@ -1 +1,2 @@ DIST sol2-3.3.1.tar.gz 8453954 BLAKE2B f9fced4f001a5f681598e45bf74cdf064f655c950be5b91789d2bf66c0180b5048610d3d4416c024a07db11d41fceaee786800c5ca1412811cbc1a449a894a9e SHA512 4404b124a4f331d77459c01a92cd73895301e7d3ef829a0285980f0138b9cc66782de3713d54f017d5aad7d8a11d23eeffbc5f3b39ccb4d4306a955711d385dd +DIST sol2-3.5.0.tar.gz 8461779 BLAKE2B a86fe9313457d097bc078407d5e00e08ba9f6f9b898779a0c50891b3313db5a4a3fb22c660f79e8d419a4f020ff8d914e10144f2fbb2ede27b695ad697f4c8ff SHA512 5a6ec7e16dae05ad6abea02842f62db8f64935eda438d67b2c264cbee80cee6d82200bd060387c6df837fe9f212dbe22b2772af34df1ce8bd43296dd9429558d diff --git a/dev-cpp/sol2/files/sol2-3.5.0-catch-depend.patch b/dev-cpp/sol2/files/sol2-3.5.0-catch-depend.patch new file mode 100644 index 000000000000..1b5c4f1de1af --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.5.0-catch-depend.patch @@ -0,0 +1,16 @@ +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -23,12 +23,7 @@ + # # # # sol2 tests + + # # Dependencies +-FetchContent_Declare( +- Catch2 +- GIT_REPOSITORY https://github.com/catchorg/Catch2.git +- GIT_TAG devel +-) +-FetchContent_MakeAvailable(Catch2) ++find_package(Catch2 REQUIRED) + + function(sol2_add_test_properties target-name) + target_link_libraries(${target-name} diff --git a/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch b/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch new file mode 100644 index 000000000000..2422d29a90fc --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch @@ -0,0 +1,17 @@ +Use the lua version selected by lua eclass + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,7 +188,11 @@ if (SOL2_IS_TOP_LEVEL AND (SOL2_DO_TESTS OR SOL2_DO_EXAMPLES)) + + string(TOLOWER ${SOL2_LUA_VERSION} NORMALIZED_LUA_VERSION) + # Find way to get Lua: build if requested, or attempt to build if no matching version is found +- if (SOL2_BUILD_LUA) ++ if (TRUE) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(LUA REQUIRED lua IMPORTED_TARGET) ++ add_library(Lua::Lua ALIAS PkgConfig::LUA) ++ elseif (SOL2_BUILD_LUA) + find_package(LuaBuild REQUIRED COMPONENTS ${SOL2_LUA_VERSION}) + elseif (NOT SOL2_LUA_VERSION) + find_package(LuaBuild REQUIRED) diff --git a/dev-cpp/sol2/sol2-3.5.0.ebuild b/dev-cpp/sol2/sol2-3.5.0.ebuild new file mode 100644 index 000000000000..3d483db70d0e --- /dev/null +++ b/dev-cpp/sol2/sol2-3.5.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 2021-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) +inherit cmake lua + +DESCRIPTION="Header-only C++ <-> Lua API wrapper" +HOMEPAGE="https://github.com/ThePhD/sol2" +SRC_URI="https://github.com/ThePhD/sol2/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="test" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +DEPEND=" + ${LUA_DEPS} + test? ( + >=dev-cpp/catch-3 + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/sol2-3.3.0-werror.patch + "${FILESDIR}"/sol2-3.5.0-luajit-pkgconf.patch + "${FILESDIR}"/sol2-3.5.0-catch-depend.patch + "${FILESDIR}"/sol2-3.3.0-dont-install-tests.patch +) + +src_configure() { + sol2_configure_wrapper() { + local mycmakeargs=( + -DSOL2_BUILD_LUA=no + -DSOL2_TESTS=$(usex test) + -DSOL2_LUA_VERSION="${ELUA}" + ) + cmake_src_configure + } + lua_foreach_impl sol2_configure_wrapper +} + +src_compile() { + lua_foreach_impl cmake_src_compile +} + +src_test() { + sol2_test_wrapper() { + if [[ ${ELUA} == luajit ]]; then + einfo "Skipping test due to https://github.com/ThePhD/sol2/issues/1221" + else + cmake_src_test + fi + } + lua_foreach_impl sol2_test_wrapper +} + +src_install() { + lua_foreach_impl cmake_src_install +} |
