1 |
commit: 9a6d9c1ece3205412ae0e6f3f36777ce7e203138 |
2 |
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> |
3 |
AuthorDate: Sun Sep 25 21:30:27 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 26 09:34:09 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a6d9c1e |
7 |
|
8 |
dev-cpp/sol2: add 3.3.0 |
9 |
|
10 |
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> |
11 |
Closes: https://bugs.gentoo.org/864169 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27456 |
13 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
14 |
|
15 |
dev-cpp/sol2/Manifest | 1 + |
16 |
dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch | 16 +++++ |
17 |
dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch | 31 ++++++++++ |
18 |
.../sol2/files/sol2-3.3.0-dont-install-tests.patch | 10 +++ |
19 |
dev-cpp/sol2/files/sol2-3.3.0-werror.patch | 21 +++++++ |
20 |
dev-cpp/sol2/sol2-3.3.0.ebuild | 71 ++++++++++++++++++++++ |
21 |
6 files changed, 150 insertions(+) |
22 |
|
23 |
diff --git a/dev-cpp/sol2/Manifest b/dev-cpp/sol2/Manifest |
24 |
index 88055ed75b0e..1c68bf805c6d 100644 |
25 |
--- a/dev-cpp/sol2/Manifest |
26 |
+++ b/dev-cpp/sol2/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
DIST sol2-3.2.2.tar.gz 8531029 BLAKE2B 65fd220f5109e4917d06d5ef906ceccb7e292276f69bd49dfd826089a77e566af1811fdf660ffbfbd2437dca4b86ef5c4790dace9029805926e1ee0445b2e965 SHA512 e5a739b37aea7150f141f6a003c2689dd33155feed5bb3cf2569abbfe9f0062eacdaaf346be523d627f0e491b35e68822c80e1117fa09ece8c9d8d5af09fdbec |
29 |
+DIST sol2-3.3.0.tar.gz 8453838 BLAKE2B dd4ae6471913a8e5de51c248d22b2b30a0ef29a597c5181026ac175d789836b9ea4c278db6860a360b1b2d59a2063a7538dfb06044cd89cfdf6612a7f60ecd63 SHA512 f1eba8f9ea270a3a3fff9c7a036d130ec848d065e54a8aefd2a19ad7f17dcb6b5744d979fac54c765e8317a4cdcf72e1b9d622d114f48c6502cf2db900c8d4a3 |
30 |
|
31 |
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 |
32 |
new file mode 100644 |
33 |
index 000000000000..8f53144ad37c |
34 |
--- /dev/null |
35 |
+++ b/dev-cpp/sol2/files/sol2-3.3.0-catch-depend.patch |
36 |
@@ -0,0 +1,16 @@ |
37 |
+--- a/tests/CMakeLists.txt |
38 |
++++ b/tests/CMakeLists.txt |
39 |
+@@ -23,12 +23,7 @@ |
40 |
+ # # # # sol2 tests |
41 |
+ |
42 |
+ # # Dependencies |
43 |
+-FetchContent_Declare( |
44 |
+- catch2 |
45 |
+- GIT_REPOSITORY https://github.com/catchorg/Catch2.git |
46 |
+- GIT_TAG devel |
47 |
+-) |
48 |
+-FetchContent_MakeAvailable(catch2) |
49 |
++find_package(Catch2 REQUIRED) |
50 |
+ |
51 |
+ function(sol2_add_test_properties target-name) |
52 |
+ target_link_libraries(${target-name} |
53 |
|
54 |
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 |
55 |
new file mode 100644 |
56 |
index 000000000000..6782b05abf78 |
57 |
--- /dev/null |
58 |
+++ b/dev-cpp/sol2/files/sol2-3.3.0-cmake-dir.patch |
59 |
@@ -0,0 +1,31 @@ |
60 |
+Install to share, it's header-only |
61 |
+ |
62 |
+--- a/CMakeLists.txt |
63 |
++++ b/CMakeLists.txt |
64 |
+@@ -105,7 +105,7 @@ target_include_directories(sol2 ${sol2-system-include} |
65 |
+ configure_package_config_file( |
66 |
+ cmake/sol2-config.cmake.in |
67 |
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake" |
68 |
+- INSTALL_DESTINATION lib/cmake/sol2 |
69 |
++ INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/sol2 |
70 |
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO) |
71 |
+ |
72 |
+ write_basic_package_version_file( |
73 |
+@@ -121,7 +121,7 @@ if(SOL2_ENABLE_INSTALL) |
74 |
+ |
75 |
+ install(EXPORT sol2 |
76 |
+ FILE sol2-targets.cmake |
77 |
+- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2") |
78 |
++ DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2") |
79 |
+ |
80 |
+ install(DIRECTORY include/sol |
81 |
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") |
82 |
+@@ -129,7 +129,7 @@ if(SOL2_ENABLE_INSTALL) |
83 |
+ install(FILES |
84 |
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake" |
85 |
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config-version.cmake" |
86 |
+- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2") |
87 |
++ DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2") |
88 |
+ endif() |
89 |
+ |
90 |
+ # # # sol2 Library - Single header target |
91 |
|
92 |
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 |
93 |
new file mode 100644 |
94 |
index 000000000000..e1186958973a |
95 |
--- /dev/null |
96 |
+++ b/dev-cpp/sol2/files/sol2-3.3.0-dont-install-tests.patch |
97 |
@@ -0,0 +1,10 @@ |
98 |
+--- a/tests/CMakeLists.txt |
99 |
++++ b/tests/CMakeLists.txt |
100 |
+@@ -60,7 +60,6 @@ function(sol2_add_test_properties target-name) |
101 |
+ |
102 |
+ add_test(NAME ${target-name} COMMAND ${target-name}) |
103 |
+ if(SOL2_ENABLE_INSTALL) |
104 |
+- install(TARGETS ${target-name} RUNTIME DESTINATION bin) |
105 |
+ endif() |
106 |
+ endfunction() |
107 |
+ |
108 |
|
109 |
diff --git a/dev-cpp/sol2/files/sol2-3.3.0-werror.patch b/dev-cpp/sol2/files/sol2-3.3.0-werror.patch |
110 |
new file mode 100644 |
111 |
index 000000000000..27118f38cafd |
112 |
--- /dev/null |
113 |
+++ b/dev-cpp/sol2/files/sol2-3.3.0-werror.patch |
114 |
@@ -0,0 +1,21 @@ |
115 |
+--- a/CMakeLists.txt |
116 |
++++ b/CMakeLists.txt |
117 |
+@@ -208,7 +208,6 @@ if (sol2-is-top-level-project) |
118 |
+ check_compiler_flag(warn-pedantic GCC -Wpedantic) |
119 |
+ check_compiler_flag(warn-all MSVC /W4 GCC -Wall) |
120 |
+ check_compiler_flag(warn-extra GCC -Wextra) |
121 |
+- check_compiler_flag(warn-errors MSVC /WX GCC -Werror) |
122 |
+ # Individual warnings/errors |
123 |
+ check_compiler_diagnostic(unknown-warning) |
124 |
+ check_compiler_diagnostic(unknown-warning-option) |
125 |
+--- a/examples/customization/CMakeLists.txt |
126 |
++++ b/examples/customization/CMakeLists.txt |
127 |
+@@ -45,7 +45,7 @@ function (MAKE_CUSTOMIZATION_EXAMPLE example_suffix target_sol) |
128 |
+ PRIVATE -std=c++1z |
129 |
+ -ftemplate-backtrace-limit=0 |
130 |
+ -Wno-unknown-warning -Wno-unknown-warning-option |
131 |
+- -Wall -Wpedantic -Werror -pedantic -pedantic-errors |
132 |
++ -Wall -Wpedantic -pedantic -pedantic-errors |
133 |
+ -Wno-noexcept-type) |
134 |
+ endif() |
135 |
+ |
136 |
|
137 |
diff --git a/dev-cpp/sol2/sol2-3.3.0.ebuild b/dev-cpp/sol2/sol2-3.3.0.ebuild |
138 |
new file mode 100644 |
139 |
index 000000000000..7ee94fefcfe3 |
140 |
--- /dev/null |
141 |
+++ b/dev-cpp/sol2/sol2-3.3.0.ebuild |
142 |
@@ -0,0 +1,71 @@ |
143 |
+# Copyright 2021-2022 Gentoo Authors |
144 |
+# Distributed under the terms of the GNU General Public License v2 |
145 |
+ |
146 |
+EAPI=8 |
147 |
+ |
148 |
+LUA_COMPAT=( lua5-{1,3,4} luajit ) |
149 |
+inherit cmake lua |
150 |
+ |
151 |
+DESCRIPTION="Header-only C++ <-> Lua API wrapper" |
152 |
+HOMEPAGE="https://github.com/ThePhD/sol2" |
153 |
+SRC_URI="https://github.com/ThePhD/sol2/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
154 |
+ |
155 |
+LICENSE="MIT" |
156 |
+SLOT="0" |
157 |
+KEYWORDS="~amd64 ~x86" |
158 |
+IUSE="test" |
159 |
+REQUIRED_USE="${LUA_REQUIRED_USE}" |
160 |
+RESTRICT="!test? ( test )" |
161 |
+ |
162 |
+DEPEND=" |
163 |
+ ${LUA_DEPS} |
164 |
+ test? ( |
165 |
+ >=dev-cpp/catch-3 |
166 |
+ ) |
167 |
+" |
168 |
+BDEPEND=" |
169 |
+ virtual/pkgconfig |
170 |
+" |
171 |
+ |
172 |
+PATCHES=( |
173 |
+ "${FILESDIR}"/sol2-3.3.0-werror.patch |
174 |
+ "${FILESDIR}"/sol2-3.2.2-luajit-pkgconf.patch |
175 |
+ "${FILESDIR}"/sol2-3.3.0-catch-depend.patch |
176 |
+ "${FILESDIR}"/sol2-3.3.0-cmake-dir.patch |
177 |
+ "${FILESDIR}"/sol2-3.3.0-dont-install-tests.patch |
178 |
+) |
179 |
+ |
180 |
+src_prepare() { |
181 |
+ cmake_src_prepare |
182 |
+} |
183 |
+ |
184 |
+src_configure() { |
185 |
+ sol2_configure_wrapper() { |
186 |
+ local mycmakeargs=( |
187 |
+ -DSOL2_BUILD_LUA=no |
188 |
+ -DSOL2_TESTS=$(usex test) |
189 |
+ -DSOL2_LUA_VERSION="${ELUA}" |
190 |
+ ) |
191 |
+ cmake_src_configure |
192 |
+ } |
193 |
+ lua_foreach_impl sol2_configure_wrapper |
194 |
+} |
195 |
+ |
196 |
+src_compile() { |
197 |
+ lua_foreach_impl cmake_src_compile |
198 |
+} |
199 |
+ |
200 |
+src_test() { |
201 |
+ sol2_test_wrapper() { |
202 |
+ if [[ ${ELUA} == luajit ]]; then |
203 |
+ einfo "Skipping test due to https://github.com/ThePhD/sol2/issues/1221" |
204 |
+ else |
205 |
+ cmake_src_test |
206 |
+ fi |
207 |
+ } |
208 |
+ lua_foreach_impl sol2_test_wrapper |
209 |
+} |
210 |
+ |
211 |
+src_install() { |
212 |
+ lua_foreach_impl cmake_src_install |
213 |
+} |