summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/sol2/files')
-rw-r--r--dev-cpp/sol2/files/sol2-3.2.2-luajit-pkgconf.patch17
-rw-r--r--dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch16
-rw-r--r--dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch31
-rw-r--r--dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch10
-rw-r--r--dev-cpp/sol2/files/sol2-3.3.0-werror.patch21
5 files changed, 95 insertions, 0 deletions
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)
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()
+