diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-cpp/sol2 | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-cpp/sol2')
| -rw-r--r-- | dev-cpp/sol2/Manifest | 1 | ||||
| -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/files/sol2-3.5.0-catch-depend.patch | 16 | ||||
| -rw-r--r-- | dev-cpp/sol2/files/sol2-3.5.0-iterend.patch | 58 | ||||
| -rw-r--r-- | dev-cpp/sol2/files/sol2-3.5.0-luajit-pkgconf.patch | 17 | ||||
| -rw-r--r-- | dev-cpp/sol2/metadata.xml | 17 | ||||
| -rw-r--r-- | dev-cpp/sol2/sol2-3.5.0-r1.ebuild | 67 |
8 files changed, 207 insertions, 0 deletions
diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest new file mode 100644 index 000000000000..c28ffabc1c2d --- /dev/null +++ b/dev-cpp/sol2/Manifest @@ -0,0 +1 @@ +DIST sol2-3.5.0.tar.gz 8461779 BLAKE2B a86fe9313457d097bc078407d5e00e08ba9f6f9b898779a0c50891b3313db5a4a3fb22c660f79e8d419a4f020ff8d914e10144f2fbb2ede27b695ad697f4c8ff SHA512 5a6ec7e16dae05ad6abea02842f62db8f64935eda438d67b2c264cbee80cee6d82200bd060387c6df837fe9f212dbe22b2772af34df1ce8bd43296dd9429558d 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/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-iterend.patch b/dev-cpp/sol2/files/sol2-3.5.0-iterend.patch new file mode 100644 index 000000000000..b7e8a1c4fcbf --- /dev/null +++ b/dev-cpp/sol2/files/sol2-3.5.0-iterend.patch @@ -0,0 +1,58 @@ +https://github.com/ThePhD/sol2/pull/1676 +https://bugs.gentoo.org/955999 + +From 8f80cd79f60613b96c877cec2bba3efee2a78225 Mon Sep 17 00:00:00 2001 +From: martin nylin <martin.nylin@gmail.com> +Date: Tue, 11 Mar 2025 20:58:43 +0100 +Subject: [PATCH 1/2] Change end() to sen() in usertype_container.hpp + +--- + include/sol/usertype_container.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/sol/usertype_container.hpp b/include/sol/usertype_container.hpp +index 6d25d2a8..3ff81724 100644 +--- a/include/sol/usertype_container.hpp ++++ b/include/sol/usertype_container.hpp +@@ -1189,7 +1189,7 @@ namespace sol { + static int next_associative(std::true_type, lua_State* L_) { + iter& i = stack::unqualified_get<user<iter>>(L_, 1); + auto& it = i.it(); +- auto& end = i.end(); ++ auto& end = i.sen(); + if (it == end) { + return stack::push(L_, lua_nil); + } + +From a6872ef46b08704b9069ebf83161f4637459ce63 Mon Sep 17 00:00:00 2001 +From: martin nylin <martin.nylin@gmail.com> +Date: Tue, 11 Mar 2025 21:28:44 +0100 +Subject: [PATCH 2/2] Fix array index out of bounds in stack_field.hpp + +--- + include/sol/stack_field.hpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/include/sol/stack_field.hpp b/include/sol/stack_field.hpp +index 9dd66e2e..3b815225 100644 +--- a/include/sol/stack_field.hpp ++++ b/include/sol/stack_field.hpp +@@ -113,7 +113,17 @@ namespace sol { namespace stack { + lua_getglobal(L, &key[0]); + } + else { +- lua_getfield(L, tableindex, &key[0]); ++ if constexpr (std::is_same_v<std::decay_t<Key>, const char*>) { ++ // Handle const char* case ++ if (key != nullptr) { ++ lua_getfield(L, tableindex, key); ++ } else { ++ push(L, lua_nil); ++ } ++ } else { ++ // Handle std::string case ++ lua_getfield(L, tableindex, key.c_str()); ++ } + } + } + else if constexpr (std::is_same_v<T, meta_function>) { 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/metadata.xml b/dev-cpp/sol2/metadata.xml new file mode 100644 index 000000000000..1deba45ab96e --- /dev/null +++ b/dev-cpp/sol2/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>alexey+gentoo@asokolov.org</email> + <name>Alexey Sokolov</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-cpp/sol2/sol2-3.5.0-r1.ebuild b/dev-cpp/sol2/sol2-3.5.0-r1.ebuild new file mode 100644 index 000000000000..131485c7116f --- /dev/null +++ b/dev-cpp/sol2/sol2-3.5.0-r1.ebuild @@ -0,0 +1,67 @@ +# 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 + "${FILESDIR}"/sol2-3.5.0-iterend.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 +} |
