1 |
commit: b2133a7953adc75091a716288b4ee827bce678b3 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 12 12:41:32 2019 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 12 12:42:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2133a79 |
7 |
|
8 |
dev-libs/rttr: new package |
9 |
|
10 |
Closes: https://bugs.gentoo.org/681324 |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org> |
13 |
|
14 |
dev-libs/rttr/Manifest | 1 + |
15 |
dev-libs/rttr/files/rttr-0.9.6-cmake.patch | 25 ++++++++++++++++++ |
16 |
dev-libs/rttr/files/rttr-0.9.6-permission.patch | 13 ++++++++++ |
17 |
dev-libs/rttr/files/rttr-0.9.6-tests.patch | 30 ++++++++++++++++++++++ |
18 |
dev-libs/rttr/files/rttr-0.9.6-werror.patch | 18 +++++++++++++ |
19 |
dev-libs/rttr/metadata.xml | 10 ++++++++ |
20 |
dev-libs/rttr/rttr-0.9.6.ebuild | 34 +++++++++++++++++++++++++ |
21 |
7 files changed, 131 insertions(+) |
22 |
|
23 |
diff --git a/dev-libs/rttr/Manifest b/dev-libs/rttr/Manifest |
24 |
new file mode 100644 |
25 |
index 00000000000..88fa670091c |
26 |
--- /dev/null |
27 |
+++ b/dev-libs/rttr/Manifest |
28 |
@@ -0,0 +1 @@ |
29 |
+DIST rttr-0.9.6-src.tar.gz 1137269 BLAKE2B 53bb4ed75e20a82d2bd2e6c5667efe1ba6b6f2d8a83a3bd486870daeae57a36cdcb9f2acb6d47a6d1b2f36f00a262170efa4e321f6e7faf8d2c35c431bf47133 SHA512 7e0d4fa87f83feda0b926d4d0e52aaf0f369f25fe7e23e5ffe86c0bba159e8353cef44eed37611a81e8ccc8d6facb36942f940d0d0b965f873177d7078f91cf4 |
30 |
|
31 |
diff --git a/dev-libs/rttr/files/rttr-0.9.6-cmake.patch b/dev-libs/rttr/files/rttr-0.9.6-cmake.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..e313014d70a |
34 |
--- /dev/null |
35 |
+++ b/dev-libs/rttr/files/rttr-0.9.6-cmake.patch |
36 |
@@ -0,0 +1,25 @@ |
37 |
+Install cmake files to the correct directory. |
38 |
+ |
39 |
+Avoid installing docs to the wrong directory (will be installed by the ebuild instead). |
40 |
+ |
41 |
+--- a/CMake/config.cmake |
42 |
++++ b/CMake/config.cmake |
43 |
+@@ -69,7 +69,7 @@ |
44 |
+ |
45 |
+ set(RTTR_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") |
46 |
+ |
47 |
+- set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr/cmake") |
48 |
++ set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/rttr") |
49 |
+ set(RTTR_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr") |
50 |
+ |
51 |
+ elseif(WIN32) |
52 |
+@@ -169,8 +169,4 @@ |
53 |
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/CMake/rttr-config-version.cmake" |
54 |
+ DESTINATION ${RTTR_CMAKE_CONFIG_INSTALL_DIR} |
55 |
+ COMPONENT Devel) |
56 |
+- |
57 |
+- install(FILES "${LICENSE_FILE}" "${README_FILE}" |
58 |
+- DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR} |
59 |
+- PERMISSIONS OWNER_READ) |
60 |
+ endif() |
61 |
+ |
62 |
|
63 |
diff --git a/dev-libs/rttr/files/rttr-0.9.6-permission.patch b/dev-libs/rttr/files/rttr-0.9.6-permission.patch |
64 |
new file mode 100644 |
65 |
index 00000000000..bec7ac36bfc |
66 |
--- /dev/null |
67 |
+++ b/dev-libs/rttr/files/rttr-0.9.6-permission.patch |
68 |
@@ -0,0 +1,13 @@ |
69 |
+Avoid installing headers with mode 700. |
70 |
+ |
71 |
+--- a/CMake/utility.cmake |
72 |
++++ b/CMake/utility.cmake |
73 |
+@@ -165,7 +165,7 @@ |
74 |
+ getNameOfDir(CMAKE_CURRENT_SOURCE_DIR DIRNAME) |
75 |
+ if (${shouldInstall}) |
76 |
+ if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") # we don't want to install header files which are marked as private |
77 |
+- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) |
78 |
++ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}") |
79 |
+ endif() |
80 |
+ endif() |
81 |
+ endforeach() |
82 |
|
83 |
diff --git a/dev-libs/rttr/files/rttr-0.9.6-tests.patch b/dev-libs/rttr/files/rttr-0.9.6-tests.patch |
84 |
new file mode 100644 |
85 |
index 00000000000..bd966c3d327 |
86 |
--- /dev/null |
87 |
+++ b/dev-libs/rttr/files/rttr-0.9.6-tests.patch |
88 |
@@ -0,0 +1,30 @@ |
89 |
+Avoid running a custom testsuite unconditionally. |
90 |
+ |
91 |
+--- a/src/unit_tests/CMakeLists.txt |
92 |
++++ b/src/unit_tests/CMakeLists.txt |
93 |
+@@ -54,17 +54,17 @@ |
94 |
+ endif() |
95 |
+ |
96 |
+ # run tests |
97 |
+-add_custom_target(run_tests ALL |
98 |
+- COMMAND "$<TARGET_FILE:unit_tests>" |
99 |
+- DEPENDS unit_tests |
100 |
+- COMMENT "Running unit_tests") |
101 |
++#add_custom_target(run_tests ALL |
102 |
++# COMMAND "$<TARGET_FILE:unit_tests>" |
103 |
++# DEPENDS unit_tests |
104 |
++# COMMENT "Running unit_tests") |
105 |
+ |
106 |
+-set_target_properties(run_tests PROPERTIES |
107 |
+- FOLDER "Testing") |
108 |
++#set_target_properties(run_tests PROPERTIES |
109 |
++# FOLDER "Testing") |
110 |
+ |
111 |
+ add_subdirectory(plugin) |
112 |
+ |
113 |
+ add_dependencies(unit_tests unit_test_plugin) |
114 |
+ |
115 |
+ message(STATUS "Scanning " ${PROJECT_NAME} " module finished!") |
116 |
+-message(STATUS "") |
117 |
+\ No newline at end of file |
118 |
++message(STATUS "") |
119 |
|
120 |
diff --git a/dev-libs/rttr/files/rttr-0.9.6-werror.patch b/dev-libs/rttr/files/rttr-0.9.6-werror.patch |
121 |
new file mode 100644 |
122 |
index 00000000000..04c65203ac9 |
123 |
--- /dev/null |
124 |
+++ b/dev-libs/rttr/files/rttr-0.9.6-werror.patch |
125 |
@@ -0,0 +1,18 @@ |
126 |
+This causes build failures with modern GCC, and is against Gentoo policy in any case. |
127 |
+ |
128 |
+--- a/CMake/utility.cmake |
129 |
++++ b/CMake/utility.cmake |
130 |
+@@ -392,11 +392,9 @@ |
131 |
+ #################################################################################### |
132 |
+ function( set_compiler_warnings target) |
133 |
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
134 |
+- set(WARNINGS "-Werror" |
135 |
+- "-Wall") |
136 |
++ set(WARNINGS "-Wall") |
137 |
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") |
138 |
+- set(WARNINGS "-Werror" |
139 |
+- "-Wall") |
140 |
++ set(WARNINGS "-Wall") |
141 |
+ elseif(MSVC) |
142 |
+ set(WARNINGS "/WX" |
143 |
+ "/W4") |
144 |
|
145 |
diff --git a/dev-libs/rttr/metadata.xml b/dev-libs/rttr/metadata.xml |
146 |
new file mode 100644 |
147 |
index 00000000000..2fb187146ee |
148 |
--- /dev/null |
149 |
+++ b/dev-libs/rttr/metadata.xml |
150 |
@@ -0,0 +1,10 @@ |
151 |
+<?xml version="1.0" encoding="UTF-8"?> |
152 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
153 |
+<pkgmetadata> |
154 |
+ <maintainer type="project"> |
155 |
+ <email>kde@g.o</email> |
156 |
+ </maintainer> |
157 |
+ <upstream> |
158 |
+ <remote-id type="github">rttrorg/rttr</remote-id> |
159 |
+ </upstream> |
160 |
+</pkgmetadata> |
161 |
|
162 |
diff --git a/dev-libs/rttr/rttr-0.9.6.ebuild b/dev-libs/rttr/rttr-0.9.6.ebuild |
163 |
new file mode 100644 |
164 |
index 00000000000..f8a4cddbf34 |
165 |
--- /dev/null |
166 |
+++ b/dev-libs/rttr/rttr-0.9.6.ebuild |
167 |
@@ -0,0 +1,34 @@ |
168 |
+# Copyright 1999-2019 Gentoo Authors |
169 |
+# Distributed under the terms of the GNU General Public License v2 |
170 |
+ |
171 |
+EAPI=7 |
172 |
+ |
173 |
+inherit cmake-utils |
174 |
+ |
175 |
+DESCRIPTION="Run Time Type Reflection - library adding reflection to C++" |
176 |
+HOMEPAGE="https://www.rttr.org/" |
177 |
+SRC_URI="https://github.com/rttrorg/${PN}/releases/download/v${PV}/${P}-src.tar.gz" |
178 |
+ |
179 |
+LICENSE="MIT" |
180 |
+SLOT="0" |
181 |
+KEYWORDS="~amd64" |
182 |
+IUSE="" |
183 |
+ |
184 |
+PATCHES=( |
185 |
+ "${FILESDIR}/${P}-cmake.patch" |
186 |
+ "${FILESDIR}/${P}-permission.patch" |
187 |
+ "${FILESDIR}/${P}-tests.patch" |
188 |
+ "${FILESDIR}/${P}-werror.patch" |
189 |
+) |
190 |
+ |
191 |
+src_configure() { |
192 |
+ local mycmakeargs=( |
193 |
+ -DBUILD_DOCUMENTATION=off #broken |
194 |
+ ) |
195 |
+ |
196 |
+ cmake-utils_src_configure |
197 |
+} |
198 |
+ |
199 |
+src_test() { |
200 |
+ "${S}"/bin/unit_tests || die |
201 |
+} |