1 |
commit: 1255c53cc64cb280bff21ad7ae82ab91ec595123 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 8 00:25:18 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 8 09:53:52 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1255c53c |
7 |
|
8 |
sci-libs/avogadrolibs: Unbundle jsoncpp, fix USE=vtk |
9 |
|
10 |
Bug: https://bugs.gentoo.org/649860 |
11 |
Closes: https://bugs.gentoo.org/624242 |
12 |
Package-Manager: Portage-2.3.28, Repoman-2.3.9 |
13 |
|
14 |
sci-libs/avogadrolibs/Manifest | 1 + |
15 |
.../avogadrolibs-1.91.0_pre20180406.ebuild | 29 +++-- |
16 |
...-1.91.0_pre20180406-bundled-genxrdpattern.patch | 44 +++++++ |
17 |
...olibs-1.91.0_pre20180406-unbundle-jsoncpp.patch | 143 +++++++++++++++++++++ |
18 |
4 files changed, 208 insertions(+), 9 deletions(-) |
19 |
|
20 |
diff --git a/sci-libs/avogadrolibs/Manifest b/sci-libs/avogadrolibs/Manifest |
21 |
index bbf158508b8..1a7ac4c9fe8 100644 |
22 |
--- a/sci-libs/avogadrolibs/Manifest |
23 |
+++ b/sci-libs/avogadrolibs/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST avogadrolibs-0.9.0.tar.gz 742370 BLAKE2B cd104cea48b82a1ac86fdb9e93717e2647f57a0d713673d8b340d259f73d6d9985decf0c4e4d83f13d54d12ae2aefee8e75b5d04861f8ab67b9b42690c3c74f7 SHA512 7cb000cd6399f33483c38b4f8a9c4a4688f5054cba35e101bed0f2371cea614ace6b3fc65c3ed1418976afef4462a09be868500435a5ae9c98a7ac496c10c36f |
26 |
DIST avogadrolibs-1.91.0_pre20180406.tar.gz 857345 BLAKE2B 8e5c6b0a838a2a6b7dc925c1b544ab4d4de8b7769b1fe8d787127a1014b1243da89a2a6f6cfc871181f81a443c3ee63d758369f003afaf591c9373c9d5122ee3 SHA512 1814b2105615aabc1df78b14c581e78fea20a1e4ace8979bb2ad123ab0994d90c3935e37f0cc58b60d3307ffe682599a93d8cadddc22b4ba524caaec1a2c5319 |
27 |
+DIST linux64-genXrdPattern 7480152 BLAKE2B dca8285c41aadfaa20c72f337e0f02db8ee07ce30c11ae84bf3aa7bd0b2220273d33f484d63f761d41a8946c6a0b77a0fb27906c480bcae01ae49b1531ae5cbb SHA512 538bde12e1e52600a21640d5907f43fcc853c6f3c111880f39eb238093e3d1358ccdfa1f45e944ec8b8e5ee3c2dff269cefe5334db5d73300e6ca327c95520b8 |
28 |
|
29 |
diff --git a/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild |
30 |
index 6671ed518ff..f7417ab49bf 100644 |
31 |
--- a/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild |
32 |
+++ b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild |
33 |
@@ -8,17 +8,21 @@ inherit cmake-utils |
34 |
|
35 |
DESCRIPTION="Advanced molecule editor and visualizer 2 - libraries" |
36 |
HOMEPAGE="https://www.openchemistry.org/" |
37 |
-SRC_URI="https://github.com/OpenChemistry/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" |
38 |
+SRC_URI="https://github.com/OpenChemistry/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz |
39 |
+ vtk? ( https://github.com/psavery/genXrdPattern/releases/download/1.0-static/linux64-genXrdPattern )" |
40 |
|
41 |
SLOT="0" |
42 |
LICENSE="BSD GPL-2+" |
43 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
IUSE="archive doc hdf5 qt5 static-plugins test vtk" |
45 |
|
46 |
+REQUIRED_USE="vtk? ( qt5 )" |
47 |
+ |
48 |
# TODO: Not yet packaged: |
49 |
# sci-libs/libmsym (https://github.com/mcodev31/libmsym) |
50 |
# sci-libs/spglib (https://atztogo.github.io/spglib/) |
51 |
RDEPEND=" |
52 |
+ dev-libs/jsoncpp:= |
53 |
>=sci-chemistry/molequeue-0.7 |
54 |
archive? ( app-arch/libarchive ) |
55 |
hdf5? ( sci-libs/hdf5:= ) |
56 |
@@ -29,8 +33,9 @@ RDEPEND=" |
57 |
dev-qt/qtnetwork:5 |
58 |
dev-qt/qtwidgets:5 |
59 |
media-libs/glew:0= |
60 |
+ virtual/opengl |
61 |
) |
62 |
- vtk? ( sci-libs/vtk ) |
63 |
+ vtk? ( sci-libs/vtk[qt5] ) |
64 |
" |
65 |
DEPEND="${RDEPEND} |
66 |
dev-cpp/eigen:3 |
67 |
@@ -41,8 +46,17 @@ S="${WORKDIR}/${PN}-${COMMIT}" |
68 |
PATCHES=( |
69 |
"${FILESDIR}"/${PN}-0.7.2-6464.patch |
70 |
"${FILESDIR}/"${P}-underlinking.patch |
71 |
+ "${FILESDIR}/"${P}-unbundle-jsoncpp.patch |
72 |
+ "${FILESDIR}/"${P}-bundled-genxrdpattern.patch |
73 |
) |
74 |
|
75 |
+src_unpack() { |
76 |
+ unpack ${P}.tar.gz |
77 |
+ if use vtk; then |
78 |
+ cp "${DISTDIR}"/linux64-genXrdPattern "${WORKDIR}/genXrdPattern" || die |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
src_configure() { |
83 |
local mycmakeargs=( |
84 |
-DUSE_PROTOCALL=OFF |
85 |
@@ -60,12 +74,9 @@ src_configure() { |
86 |
-DENABLE_TESTING=$(usex test) |
87 |
-DUSE_VTK=$(usex vtk) |
88 |
) |
89 |
- cmake-utils_src_configure |
90 |
-} |
91 |
- |
92 |
-src_install() { |
93 |
- cmake-utils_src_install |
94 |
+ use vtk && mycmakeargs+=( |
95 |
+ -DBUNDLED_GENXRDPATTERN="${WORKDIR}/genXrdPattern" |
96 |
+ ) |
97 |
|
98 |
- # TODO: bundles jsoncpp |
99 |
- rm "${ED%/}"/usr/lib64/libjsoncpp.a || die |
100 |
+ cmake-utils_src_configure |
101 |
} |
102 |
|
103 |
diff --git a/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-bundled-genxrdpattern.patch b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-bundled-genxrdpattern.patch |
104 |
new file mode 100644 |
105 |
index 00000000000..2072b8fa9b6 |
106 |
--- /dev/null |
107 |
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-bundled-genxrdpattern.patch |
108 |
@@ -0,0 +1,44 @@ |
109 |
+From 0287e83eb8706f5237d66873cb6a1b3730891c07 Mon Sep 17 00:00:00 2001 |
110 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
111 |
+Date: Sun, 8 Apr 2018 11:21:17 +0200 |
112 |
+Subject: [PATCH] Provide overrideable BUNDLED_GENXRDPATTERN location |
113 |
+ |
114 |
+--- |
115 |
+ cmake/DownloadGenXrdPattern.cmake | 10 +++++++--- |
116 |
+ 1 file changed, 7 insertions(+), 3 deletions(-) |
117 |
+ |
118 |
+diff --git a/cmake/DownloadGenXrdPattern.cmake b/cmake/DownloadGenXrdPattern.cmake |
119 |
+index ab5c5f0..7d4ecb4 100644 |
120 |
+--- a/cmake/DownloadGenXrdPattern.cmake |
121 |
++++ b/cmake/DownloadGenXrdPattern.cmake |
122 |
+@@ -10,8 +10,12 @@ macro(DownloadGenXrdPattern) |
123 |
+ set(GENXRDPATTERN_NAME "genXrdPattern") |
124 |
+ endif(WIN32) |
125 |
+ |
126 |
++ if(NOT BUNDLED_GENXRDPATTERN) |
127 |
++ set(BUNDLED_GENXRDPATTERN "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}") |
128 |
++ endif() |
129 |
++ |
130 |
+ # If it already exists, don't download it again |
131 |
+- if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}") |
132 |
++ if(NOT EXISTS "${BUNDLED_GENXRDPATTERN}") |
133 |
+ set(GENXRDPATTERN_V "1.0-static") |
134 |
+ # Linux |
135 |
+ if(UNIX AND NOT APPLE) |
136 |
+@@ -52,11 +56,11 @@ macro(DownloadGenXrdPattern) |
137 |
+ # Now remove the temporary directory |
138 |
+ file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/tmp") |
139 |
+ |
140 |
+- endif(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}") |
141 |
++ endif(NOT EXISTS "${BUNDLED_GENXRDPATTERN}") |
142 |
+ |
143 |
+ set(GENXRDPATTERN_DESTINATION "bin") |
144 |
+ |
145 |
+- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}" |
146 |
++ install(FILES "${BUNDLED_GENXRDPATTERN}" |
147 |
+ DESTINATION "${GENXRDPATTERN_DESTINATION}" |
148 |
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE |
149 |
+ GROUP_READ GROUP_EXECUTE |
150 |
+-- |
151 |
+2.17.0 |
152 |
+ |
153 |
|
154 |
diff --git a/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-unbundle-jsoncpp.patch b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-unbundle-jsoncpp.patch |
155 |
new file mode 100644 |
156 |
index 00000000000..3b5280cdc47 |
157 |
--- /dev/null |
158 |
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-unbundle-jsoncpp.patch |
159 |
@@ -0,0 +1,143 @@ |
160 |
+From 7e01a11dde25af75b21090fdaa2ca574ef703e53 Mon Sep 17 00:00:00 2001 |
161 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
162 |
+Date: Sun, 8 Apr 2018 01:48:27 +0200 |
163 |
+Subject: [PATCH 1/2] Drop bogus jsoncpp.cpp include from spectra.cpp |
164 |
+ |
165 |
+--- |
166 |
+ avogadro/qtplugins/spectra/spectra.cpp | 2 -- |
167 |
+ 1 file changed, 2 deletions(-) |
168 |
+ |
169 |
+diff --git a/avogadro/qtplugins/spectra/spectra.cpp b/avogadro/qtplugins/spectra/spectra.cpp |
170 |
+index 043b52e..aa9c641 100644 |
171 |
+--- a/avogadro/qtplugins/spectra/spectra.cpp |
172 |
++++ b/avogadro/qtplugins/spectra/spectra.cpp |
173 |
+@@ -26,8 +26,6 @@ |
174 |
+ #include <QtWidgets/QFileDialog> |
175 |
+ #include <avogadro/qtgui/molecule.h> |
176 |
+ |
177 |
+-#include <jsoncpp.cpp> |
178 |
+- |
179 |
+ namespace Avogadro { |
180 |
+ namespace QtPlugins { |
181 |
+ |
182 |
+-- |
183 |
+2.17.0 |
184 |
+ |
185 |
+ |
186 |
+From 52cd35662aa2094db77ab4002b7c44f3dab2802d Mon Sep 17 00:00:00 2001 |
187 |
+From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com> |
188 |
+Date: Sun, 8 Apr 2018 02:00:30 +0200 |
189 |
+Subject: [PATCH 2/2] Use pkgconfig to find system-jsoncpp |
190 |
+ |
191 |
+--- |
192 |
+ CMakeLists.txt | 5 ++++- |
193 |
+ avogadro/io/CMakeLists.txt | 4 ++-- |
194 |
+ avogadro/qtplugins/importpqr/CMakeLists.txt | 4 ++-- |
195 |
+ avogadro/qtplugins/plugindownloader/CMakeLists.txt | 4 ++-- |
196 |
+ avogadro/qtplugins/spectra/CMakeLists.txt | 2 +- |
197 |
+ avogadro/quantumio/CMakeLists.txt | 4 ++-- |
198 |
+ 6 files changed, 13 insertions(+), 10 deletions(-) |
199 |
+ |
200 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
201 |
+index 7574fa0..7ce80b0 100644 |
202 |
+--- a/CMakeLists.txt |
203 |
++++ b/CMakeLists.txt |
204 |
+@@ -52,8 +52,11 @@ option(USE_PROTOCALL "Enable libraries that use ProtoCall" OFF) |
205 |
+ option(USE_MOLEQUEUE "Enable the MoleQueue dependent functionality" ON) |
206 |
+ option(USE_PYTHON "Use Python to wrap some of our API" OFF) |
207 |
+ |
208 |
++find_package(PkgConfig REQUIRED) |
209 |
++pkg_check_modules(JSONCPP jsoncpp) |
210 |
++ |
211 |
+ add_subdirectory(utilities) |
212 |
+-add_subdirectory(thirdparty) |
213 |
++# add_subdirectory(thirdparty) |
214 |
+ add_subdirectory(avogadro) |
215 |
+ |
216 |
+ if(ENABLE_TESTING) |
217 |
+diff --git a/avogadro/io/CMakeLists.txt b/avogadro/io/CMakeLists.txt |
218 |
+index 1dd7967..10ddbb6 100644 |
219 |
+--- a/avogadro/io/CMakeLists.txt |
220 |
++++ b/avogadro/io/CMakeLists.txt |
221 |
+@@ -15,7 +15,7 @@ endif() |
222 |
+ # compilers that support that notion. |
223 |
+ include_directories(SYSTEM "${EIGEN3_INCLUDE_DIR}" |
224 |
+ "${AvogadroLibs_SOURCE_DIR}/thirdparty/pugixml" |
225 |
+- "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp") |
226 |
++ "${JSONCPP_INCLUDE_DIRS}") |
227 |
+ |
228 |
+ if(DEFINED AvogadroLibs_MEMORY_INCLUDE_DIRS) |
229 |
+ # The smart pointer classes just require headers. |
230 |
+@@ -51,7 +51,7 @@ endif() |
231 |
+ |
232 |
+ avogadro_add_library(AvogadroIO ${HEADERS} ${SOURCES}) |
233 |
+ |
234 |
+-target_link_libraries(AvogadroIO LINK_PUBLIC AvogadroCore LINK_PRIVATE jsoncpp) |
235 |
++target_link_libraries(AvogadroIO LINK_PUBLIC AvogadroCore LINK_PRIVATE ${JSONCPP_LIBRARIES}) |
236 |
+ if(USE_HDF5) |
237 |
+ target_link_libraries(AvogadroIO LINK_PRIVATE ${HDF5_LIBRARIES}) |
238 |
+ endif() |
239 |
+diff --git a/avogadro/qtplugins/importpqr/CMakeLists.txt b/avogadro/qtplugins/importpqr/CMakeLists.txt |
240 |
+index ee27da9..365c51a 100644 |
241 |
+--- a/avogadro/qtplugins/importpqr/CMakeLists.txt |
242 |
++++ b/avogadro/qtplugins/importpqr/CMakeLists.txt |
243 |
+@@ -1,4 +1,4 @@ |
244 |
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp") |
245 |
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS}) |
246 |
+ |
247 |
+ # Extension |
248 |
+ set(importpqr_srcs |
249 |
+@@ -17,4 +17,4 @@ avogadro_plugin(ImportPQR |
250 |
+ "" |
251 |
+ ) |
252 |
+ |
253 |
+-target_link_libraries(ImportPQR LINK_PRIVATE ${Qt5Network_LIBRARIES} jsoncpp) |
254 |
++target_link_libraries(ImportPQR LINK_PRIVATE ${Qt5Network_LIBRARIES} ${JSONCPP_LIBRARIES}) |
255 |
+diff --git a/avogadro/qtplugins/plugindownloader/CMakeLists.txt b/avogadro/qtplugins/plugindownloader/CMakeLists.txt |
256 |
+index 4b07a53..ab4c661 100644 |
257 |
+--- a/avogadro/qtplugins/plugindownloader/CMakeLists.txt |
258 |
++++ b/avogadro/qtplugins/plugindownloader/CMakeLists.txt |
259 |
+@@ -1,4 +1,4 @@ |
260 |
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp") |
261 |
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS}) |
262 |
+ |
263 |
+ find_package(LibArchive REQUIRED) |
264 |
+ include_directories(SYSTEM ${LIBARCHIVE_INCLUDE_DIRS}) |
265 |
+@@ -20,4 +20,4 @@ avogadro_plugin(PluginDownloader |
266 |
+ ) |
267 |
+ |
268 |
+ target_link_libraries(PluginDownloader LINK_PRIVATE ${Qt5Network_LIBRARIES} |
269 |
+- ${LIBARCHIVE_LIBRARIES} jsoncpp) |
270 |
++ ${LIBARCHIVE_LIBRARIES} ${JSONCPP_LIBRARIES}) |
271 |
+diff --git a/avogadro/qtplugins/spectra/CMakeLists.txt b/avogadro/qtplugins/spectra/CMakeLists.txt |
272 |
+index a2216b8..09d8fc9 100644 |
273 |
+--- a/avogadro/qtplugins/spectra/CMakeLists.txt |
274 |
++++ b/avogadro/qtplugins/spectra/CMakeLists.txt |
275 |
+@@ -1,4 +1,4 @@ |
276 |
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp") |
277 |
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS}) |
278 |
+ |
279 |
+ set(plugin_srcs |
280 |
+ vibrationdialog.cpp |
281 |
+diff --git a/avogadro/quantumio/CMakeLists.txt b/avogadro/quantumio/CMakeLists.txt |
282 |
+index 15073e8..35fc766 100644 |
283 |
+--- a/avogadro/quantumio/CMakeLists.txt |
284 |
++++ b/avogadro/quantumio/CMakeLists.txt |
285 |
+@@ -2,7 +2,7 @@ find_package(Eigen3 REQUIRED) |
286 |
+ # Add as "system headers" to avoid warnings generated by them with |
287 |
+ # compilers that support that notion. |
288 |
+ include_directories(SYSTEM "${EIGEN3_INCLUDE_DIR}" |
289 |
+- "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp") |
290 |
++ ${JSONCPP_INCLUDE_DIRS}) |
291 |
+ |
292 |
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
293 |
+ |
294 |
+@@ -30,4 +30,4 @@ set(SOURCES |
295 |
+ ) |
296 |
+ |
297 |
+ avogadro_add_library(AvogadroQuantumIO ${HEADERS} ${SOURCES}) |
298 |
+-target_link_libraries(AvogadroQuantumIO LINK_PUBLIC AvogadroIO LINK_PRIVATE jsoncpp) |
299 |
++target_link_libraries(AvogadroQuantumIO LINK_PUBLIC AvogadroIO LINK_PRIVATE ${JSONCPP_LIBRARIES}) |
300 |
+-- |
301 |
+2.17.0 |
302 |
+ |