diff options
Diffstat (limited to 'dev-cpp/sol2')
-rw-r--r-- | dev-cpp/sol2/Manifest | 6 | ||||
-rw-r--r-- | dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch | 16 | ||||
-rw-r--r-- | dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch | 31 | ||||
-rw-r--r-- | dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch | 10 | ||||
-rw-r--r-- | dev-cpp/sol2/files/sol2-3.3.0-werror.patch | 21 | ||||
-rw-r--r-- | dev-cpp/sol2/sol2-3.3.0.ebuild | 67 |
6 files changed, 151 insertions, 0 deletions
diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest index 6e82b744fa84..777fdba4828e 100644 --- a/dev-cpp/sol2/Manifest +++ b/dev-cpp/sol2/Manifest @@ -1,6 +1,12 @@ AUX sol2-3.2.2-catch-depend.patch 910 BLAKE2B 2f4dc2a173500be6a0822f6e6e4a581facebc9f15d8a8b04151c9ec330c5c0962c5f521108fdc3681af9b74e0209505dfc9eb560076922998fc97ebc700d2c8e SHA512 a908179c944fed61cf22c5f14fb9670bf2cf2c63dd9d00ac6f5121c7058012d8dc551ad1f335d96d203152371ed98df4f18933aca7c96150b8402df2eff568bf AUX sol2-3.2.2-gcc11.patch 317 BLAKE2B 882fbef1e17414d81994896294aeb0e08304e310fec50f99f855391c02571117fbbb8debf9b07975a1c98063fc06560b559f75d11911ef7bf2f07d07830b810f SHA512 7936714263cccf67283afeba2d7a1ebdf3fb39cac45e3c82fd39a75b17c2f9fcb50424f476c486756a13c3235d63816a29f2e5aacebfda435cb21af07f2c51ef AUX sol2-3.2.2-luajit-pkgconf.patch 651 BLAKE2B 87460b8bca3281ed2d82a359225d5af072524a8b0dc1bb3d51dc17325d3863623579da25f6ffd9e696acf953ddd48525677a9b4367518b9c259cfe91a9cd7672 SHA512 bca0b431f7c63512e75aa3806a940062991077be58b7227cd042d686c0ae7446dd82adbf856d0824668ff35b86f90521e266b7738e13b4654e25c4bd0e3d2539 +AUX sol2-3.3.0-catch-depend.patch 376 BLAKE2B 7db0a0697e42a6045319636157f31ecf4757f0d9fcde3a82a5a76498c5d52d70cf7a7c2920df363367056adf8afd2bebfdf70f3c42692ef5b2173c6298f1845e SHA512 1fb33773ef4e35c6768d848c6b7f981085a872a547d8b75cd24912fd411da00ce12fc288496c710a10d7161236e5ac82eb090dd145c1a4d0e00c1977d6d4c1ff +AUX sol2-3.3.0-cmake-dir.patch 1065 BLAKE2B 906ea8df35dfb8908bf114ac9fc6fbcfae9de6e3168a3d8eff437248ed071cb58a4d6c6a28430a5d4a9e4cf01080a13a62c30f37120339eabf0da2d58aabc9a2 SHA512 10a850a5376838217686ce748d6d99b85d1859c0d8a8bb7fc0d24f5158c3456d8774ad739eb881d58e7396199df8873877e4bc9a1143b3a4b9c568906b86c293 +AUX sol2-3.3.0-dont-install-tests.patch 289 BLAKE2B fc82c80a6b5fcc651b43308d1604414249ee462c406554b9b61aece253983c76cce1ee691d404e6486bbd566e521953ce076206053e2bf4bee9ee7f2944434d2 SHA512 bd43744581315bab42b603a3b1e163a86f36936bc444eb1c67504a710323978b53d00bb5b9fb8865e4d5831c80f713a52cc4bd4e02c2dd054840dd47153461c6 +AUX sol2-3.3.0-werror.patch 854 BLAKE2B 4ba8febe3e225a904501a61d0bf7bb5a8539b1c8dca65e67ce5b335116851549ab31321126eecc3b8b9c9439491fd8c097430b15fce17c42a8ddc73f50a4fd0d SHA512 00b267ab451cfa9210db5a3ce5de67b33c58438a46be8178cce4dcf1ffd31ca2e5bde0015ccb72e2e641b7a0a59996d88154acc765b6eb3891bb092bec0bf46b DIST sol2-3.2.2.tar.gz 8531029 BLAKE2B 65fd220f5109e4917d06d5ef906ceccb7e292276f69bd49dfd826089a77e566af1811fdf660ffbfbd2437dca4b86ef5c4790dace9029805926e1ee0445b2e965 SHA512 e5a739b37aea7150f141f6a003c2689dd33155feed5bb3cf2569abbfe9f0062eacdaaf346be523d627f0e491b35e68822c80e1117fa09ece8c9d8d5af09fdbec +DIST sol2-3.3.0.tar.gz 8453838 BLAKE2B dd4ae6471913a8e5de51c248d22b2b30a0ef29a597c5181026ac175d789836b9ea4c278db6860a360b1b2d59a2063a7538dfb06044cd89cfdf6612a7f60ecd63 SHA512 f1eba8f9ea270a3a3fff9c7a036d130ec848d065e54a8aefd2a19ad7f17dcb6b5744d979fac54c765e8317a4cdcf72e1b9d622d114f48c6502cf2db900c8d4a3 EBUILD sol2-3.2.2.ebuild 1627 BLAKE2B 3614d7bfe8302da7716432d8a685e7837284863f672bde0c69e38e0eef41100cefa6c55951269eb248b70630dee89439d8d5ba0a79a71c6e950798d4238a9cfe SHA512 90ec2722fee65395d562039aed8609df9c5b17c60b3f8331bf5e177c996b6ff83ef1097b0405357ea243701b2aca09f41058c3099e3f48301e6eaa495cdc8b6e +EBUILD sol2-3.3.0.ebuild 1346 BLAKE2B c928b9e9b67022bb8918fbccf892796208fe34c21c7cc68b7e85b4d23944cdc8bbde066d4f066c6509c283ba49e57ba6123b3a369f44d7dc35afbb95c4e0d829 SHA512 ed399831baeae89a88b0aaef5bead02d4fa23f9e24ff8b2de7ca08fcd28eea689a00b3657b0842da27dcdeaa26cbc85f153a63c81e39611925828c21f52859b0 MISC metadata.xml 594 BLAKE2B 911a1123a653118d9c19c3ff1a42a979a696d034500eda29a18c72e6f89bcc2f7c4d28977c76a40f61b79649c3f4aa63439cda96311e2cdd2bc9495ad1a85db1 SHA512 5c8252373ee8bdefe9b2863df048616beec0d00dcf1cd7845302721f78158db48729d9ab412dbcf4bed49130518acd2071ca3e5880488a882117ec5728e26b9a diff --git a/dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch b/dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch new file mode 100644 index 000000000000..8f53144ad37c --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.3.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.3.0-cmake-dir.patch b/dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch new file mode 100644 index 000000000000..6782b05abf78 --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch @@ -0,0 +1,31 @@ +Install to share, it's header-only + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -105,7 +105,7 @@ target_include_directories(sol2 ${sol2-system-include} + configure_package_config_file( + cmake/sol2-config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake" +- INSTALL_DESTINATION lib/cmake/sol2 ++ INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/sol2 + NO_CHECK_REQUIRED_COMPONENTS_MACRO) + + write_basic_package_version_file( +@@ -121,7 +121,7 @@ if(SOL2_ENABLE_INSTALL) + + install(EXPORT sol2 + FILE sol2-targets.cmake +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2") ++ DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2") + + install(DIRECTORY include/sol + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +@@ -129,7 +129,7 @@ if(SOL2_ENABLE_INSTALL) + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config-version.cmake" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2") ++ DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2") + endif() + + # # # sol2 Library - Single header target diff --git a/dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch b/dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch new file mode 100644 index 000000000000..e1186958973a --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch @@ -0,0 +1,10 @@ +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -60,7 +60,6 @@ function(sol2_add_test_properties target-name) + + add_test(NAME ${target-name} COMMAND ${target-name}) + if(SOL2_ENABLE_INSTALL) +- install(TARGETS ${target-name} RUNTIME DESTINATION bin) + endif() + endfunction() + diff --git a/dev-cpp/sol2/files/sol2-3.3.0-werror.patch b/dev-cpp/sol2/files/sol2-3.3.0-werror.patch new file mode 100644 index 000000000000..27118f38cafd --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.3.0-werror.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -208,7 +208,6 @@ if (sol2-is-top-level-project) + check_compiler_flag(warn-pedantic GCC -Wpedantic) + check_compiler_flag(warn-all MSVC /W4 GCC -Wall) + check_compiler_flag(warn-extra GCC -Wextra) +- check_compiler_flag(warn-errors MSVC /WX GCC -Werror) + # Individual warnings/errors + check_compiler_diagnostic(unknown-warning) + check_compiler_diagnostic(unknown-warning-option) +--- a/examples/customization/CMakeLists.txt ++++ b/examples/customization/CMakeLists.txt +@@ -45,7 +45,7 @@ function (MAKE_CUSTOMIZATION_EXAMPLE example_suffix target_sol) + PRIVATE -std=c++1z
+ -ftemplate-backtrace-limit=0
+ -Wno-unknown-warning -Wno-unknown-warning-option
+- -Wall -Wpedantic -Werror -pedantic -pedantic-errors
++ -Wall -Wpedantic -pedantic -pedantic-errors
+ -Wno-noexcept-type)
+ endif()
+
diff --git a/dev-cpp/sol2/sol2-3.3.0.ebuild b/dev-cpp/sol2/sol2-3.3.0.ebuild new file mode 100644 index 000000000000..50d295903f95 --- /dev/null +++ b/dev-cpp/sol2/sol2-3.3.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 2021-2022 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 ~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.2.2-luajit-pkgconf.patch + "${FILESDIR}"/sol2-3.3.0-catch-depend.patch + "${FILESDIR}"/sol2-3.3.0-cmake-dir.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 +} |