summaryrefslogtreecommitdiff
path: root/dev-cpp/sol2/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-17 19:04:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-17 19:04:28 +0100
commit514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (patch)
tree555c194dbeb0fb2ac4ad3cde7c0f6a80fd330ce2 /dev-cpp/sol2/files
parent4df3bf9762850b34cd1ead5c80374d1a0fc3362e (diff)
gentoo resync : 17.07.2021
Diffstat (limited to 'dev-cpp/sol2/files')
-rw-r--r--dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch27
-rw-r--r--dev-cpp/sol2/files/sol2-3.2.2-gcc11.patch10
-rw-r--r--dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch17
3 files changed, 54 insertions, 0 deletions
diff --git a/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch b/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch
new file mode 100644
index 000000000000..2da3c00c1612
--- /dev/null
+++ b/dev-cpp/sol2/files/sol2-3.2.2-catch-depend.patch
@@ -0,0 +1,27 @@
+Use catch library from system
+
+--- a/tests/runtime_tests/CMakeLists.txt
++++ b/tests/runtime_tests/CMakeLists.txt
+@@ -22,12 +22,6 @@
+
+ # # # # sol3 tests - runtime tests
+
+-if (CMAKE_GENERATOR MATCHES "Visual Studio 14 2015")
+- find_package(Catch 1.12.1 REQUIRED)
+-else()
+- find_package(Catch REQUIRED)
+-endif()
+-
+ file(GLOB SOL2_RUNTIME_TEST_SOURCES source/*.cpp)
+ source_group(test_sources FILES ${SOL2_RUNTIME_TEST_SOURCES})
+
+@@ -38,7 +32,8 @@ function(CREATE_TEST test_target_name test_name target_sol)
+ OUTPUT_NAME ${test_name}
+ EXPORT_NAME sol2::${test_name})
+ target_link_libraries(${test_target_name}
+- PUBLIC Threads::Threads ${LUA_LIBRARIES} ${CATCH_LIBRARIES} ${target_sol})
++ PUBLIC Threads::Threads ${LUA_LIBRARIES} ${target_sol})
++ target_include_directories(${test_target_name} PRIVATE ${CATCH_INC_DIR})
+
+ if (MSVC)
+ if (NOT CMAKE_COMPILER_ID MATCHES "Clang")
diff --git a/dev-cpp/sol2/files/sol2-3.2.2-gcc11.patch b/dev-cpp/sol2/files/sol2-3.2.2-gcc11.patch
new file mode 100644
index 000000000000..cc8c6bb1b4f7
--- /dev/null
+++ b/dev-cpp/sol2/files/sol2-3.2.2-gcc11.patch
@@ -0,0 +1,10 @@
+Add missing include needed for tests (and possibly consumers) with gcc11.
+
+Fixed upstream in:
+https://github.com/ThePhD/sol2/commit/e5e6466e09b632677d24a8f204d6a0ea0a8862b1
+--- a/include/sol/stack_core.hpp
++++ b/include/sol/stack_core.hpp
+@@ -42,2 +42,3 @@
+ #include <string>
++#include <limits>
+ #include <algorithm>
diff --git a/dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch b/dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch
new file mode 100644
index 000000000000..9b9c9f101769
--- /dev/null
+++ b/dev-cpp/sol2/files/sol2-3.2.2-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)
++ set(LUA_LIBRARIES PkgConfig::LUA)
++ elseif (SOL2_BUILD_LUA)
+ find_package(LuaBuild REQUIRED COMPONENTS ${SOL2_LUA_VERSION})
+ elseif (NOT SOL2_LUA_VERSION)
+ find_package(LuaBuild REQUIRED)