summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-04-08 02:25:18 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-04-08 11:53:52 +0200
commit1255c53cc64cb280bff21ad7ae82ab91ec595123 (patch)
treeb241f002257a954b1b9fe44f1bfbac5cbeccdb1e /sci-libs
parentsci-libs/avogadrolibs: Add 1.91.0_p20180406 snapshot (diff)
downloadgentoo-1255c53cc64cb280bff21ad7ae82ab91ec595123.tar.gz
gentoo-1255c53cc64cb280bff21ad7ae82ab91ec595123.tar.bz2
gentoo-1255c53cc64cb280bff21ad7ae82ab91ec595123.zip
sci-libs/avogadrolibs: Unbundle jsoncpp, fix USE=vtk
Bug: https://bugs.gentoo.org/649860 Closes: https://bugs.gentoo.org/624242 Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/avogadrolibs/Manifest1
-rw-r--r--sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild29
-rw-r--r--sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-bundled-genxrdpattern.patch44
-rw-r--r--sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-unbundle-jsoncpp.patch143
4 files changed, 208 insertions, 9 deletions
diff --git a/sci-libs/avogadrolibs/Manifest b/sci-libs/avogadrolibs/Manifest
index bbf158508b85..1a7ac4c9fe85 100644
--- a/sci-libs/avogadrolibs/Manifest
+++ b/sci-libs/avogadrolibs/Manifest
@@ -1,2 +1,3 @@
DIST avogadrolibs-0.9.0.tar.gz 742370 BLAKE2B cd104cea48b82a1ac86fdb9e93717e2647f57a0d713673d8b340d259f73d6d9985decf0c4e4d83f13d54d12ae2aefee8e75b5d04861f8ab67b9b42690c3c74f7 SHA512 7cb000cd6399f33483c38b4f8a9c4a4688f5054cba35e101bed0f2371cea614ace6b3fc65c3ed1418976afef4462a09be868500435a5ae9c98a7ac496c10c36f
DIST avogadrolibs-1.91.0_pre20180406.tar.gz 857345 BLAKE2B 8e5c6b0a838a2a6b7dc925c1b544ab4d4de8b7769b1fe8d787127a1014b1243da89a2a6f6cfc871181f81a443c3ee63d758369f003afaf591c9373c9d5122ee3 SHA512 1814b2105615aabc1df78b14c581e78fea20a1e4ace8979bb2ad123ab0994d90c3935e37f0cc58b60d3307ffe682599a93d8cadddc22b4ba524caaec1a2c5319
+DIST linux64-genXrdPattern 7480152 BLAKE2B dca8285c41aadfaa20c72f337e0f02db8ee07ce30c11ae84bf3aa7bd0b2220273d33f484d63f761d41a8946c6a0b77a0fb27906c480bcae01ae49b1531ae5cbb SHA512 538bde12e1e52600a21640d5907f43fcc853c6f3c111880f39eb238093e3d1358ccdfa1f45e944ec8b8e5ee3c2dff269cefe5334db5d73300e6ca327c95520b8
diff --git a/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild
index 6671ed518fff..f7417ab49bf5 100644
--- a/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild
+++ b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180406.ebuild
@@ -8,17 +8,21 @@ inherit cmake-utils
DESCRIPTION="Advanced molecule editor and visualizer 2 - libraries"
HOMEPAGE="https://www.openchemistry.org/"
-SRC_URI="https://github.com/OpenChemistry/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/OpenChemistry/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
+ vtk? ( https://github.com/psavery/genXrdPattern/releases/download/1.0-static/linux64-genXrdPattern )"
SLOT="0"
LICENSE="BSD GPL-2+"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="archive doc hdf5 qt5 static-plugins test vtk"
+REQUIRED_USE="vtk? ( qt5 )"
+
# TODO: Not yet packaged:
# sci-libs/libmsym (https://github.com/mcodev31/libmsym)
# sci-libs/spglib (https://atztogo.github.io/spglib/)
RDEPEND="
+ dev-libs/jsoncpp:=
>=sci-chemistry/molequeue-0.7
archive? ( app-arch/libarchive )
hdf5? ( sci-libs/hdf5:= )
@@ -29,8 +33,9 @@ RDEPEND="
dev-qt/qtnetwork:5
dev-qt/qtwidgets:5
media-libs/glew:0=
+ virtual/opengl
)
- vtk? ( sci-libs/vtk )
+ vtk? ( sci-libs/vtk[qt5] )
"
DEPEND="${RDEPEND}
dev-cpp/eigen:3
@@ -41,8 +46,17 @@ S="${WORKDIR}/${PN}-${COMMIT}"
PATCHES=(
"${FILESDIR}"/${PN}-0.7.2-6464.patch
"${FILESDIR}/"${P}-underlinking.patch
+ "${FILESDIR}/"${P}-unbundle-jsoncpp.patch
+ "${FILESDIR}/"${P}-bundled-genxrdpattern.patch
)
+src_unpack() {
+ unpack ${P}.tar.gz
+ if use vtk; then
+ cp "${DISTDIR}"/linux64-genXrdPattern "${WORKDIR}/genXrdPattern" || die
+ fi
+}
+
src_configure() {
local mycmakeargs=(
-DUSE_PROTOCALL=OFF
@@ -60,12 +74,9 @@ src_configure() {
-DENABLE_TESTING=$(usex test)
-DUSE_VTK=$(usex vtk)
)
- cmake-utils_src_configure
-}
-
-src_install() {
- cmake-utils_src_install
+ use vtk && mycmakeargs+=(
+ -DBUNDLED_GENXRDPATTERN="${WORKDIR}/genXrdPattern"
+ )
- # TODO: bundles jsoncpp
- rm "${ED%/}"/usr/lib64/libjsoncpp.a || die
+ cmake-utils_src_configure
}
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
new file mode 100644
index 000000000000..2072b8fa9b66
--- /dev/null
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-bundled-genxrdpattern.patch
@@ -0,0 +1,44 @@
+From 0287e83eb8706f5237d66873cb6a1b3730891c07 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 8 Apr 2018 11:21:17 +0200
+Subject: [PATCH] Provide overrideable BUNDLED_GENXRDPATTERN location
+
+---
+ cmake/DownloadGenXrdPattern.cmake | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/DownloadGenXrdPattern.cmake b/cmake/DownloadGenXrdPattern.cmake
+index ab5c5f0..7d4ecb4 100644
+--- a/cmake/DownloadGenXrdPattern.cmake
++++ b/cmake/DownloadGenXrdPattern.cmake
+@@ -10,8 +10,12 @@ macro(DownloadGenXrdPattern)
+ set(GENXRDPATTERN_NAME "genXrdPattern")
+ endif(WIN32)
+
++ if(NOT BUNDLED_GENXRDPATTERN)
++ set(BUNDLED_GENXRDPATTERN "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}")
++ endif()
++
+ # If it already exists, don't download it again
+- if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}")
++ if(NOT EXISTS "${BUNDLED_GENXRDPATTERN}")
+ set(GENXRDPATTERN_V "1.0-static")
+ # Linux
+ if(UNIX AND NOT APPLE)
+@@ -52,11 +56,11 @@ macro(DownloadGenXrdPattern)
+ # Now remove the temporary directory
+ file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/tmp")
+
+- endif(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}")
++ endif(NOT EXISTS "${BUNDLED_GENXRDPATTERN}")
+
+ set(GENXRDPATTERN_DESTINATION "bin")
+
+- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bin/${GENXRDPATTERN_NAME}"
++ install(FILES "${BUNDLED_GENXRDPATTERN}"
+ DESTINATION "${GENXRDPATTERN_DESTINATION}"
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+--
+2.17.0
+
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
new file mode 100644
index 000000000000..3b5280cdc47e
--- /dev/null
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180406-unbundle-jsoncpp.patch
@@ -0,0 +1,143 @@
+From 7e01a11dde25af75b21090fdaa2ca574ef703e53 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 8 Apr 2018 01:48:27 +0200
+Subject: [PATCH 1/2] Drop bogus jsoncpp.cpp include from spectra.cpp
+
+---
+ avogadro/qtplugins/spectra/spectra.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/avogadro/qtplugins/spectra/spectra.cpp b/avogadro/qtplugins/spectra/spectra.cpp
+index 043b52e..aa9c641 100644
+--- a/avogadro/qtplugins/spectra/spectra.cpp
++++ b/avogadro/qtplugins/spectra/spectra.cpp
+@@ -26,8 +26,6 @@
+ #include <QtWidgets/QFileDialog>
+ #include <avogadro/qtgui/molecule.h>
+
+-#include <jsoncpp.cpp>
+-
+ namespace Avogadro {
+ namespace QtPlugins {
+
+--
+2.17.0
+
+
+From 52cd35662aa2094db77ab4002b7c44f3dab2802d Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 8 Apr 2018 02:00:30 +0200
+Subject: [PATCH 2/2] Use pkgconfig to find system-jsoncpp
+
+---
+ CMakeLists.txt | 5 ++++-
+ avogadro/io/CMakeLists.txt | 4 ++--
+ avogadro/qtplugins/importpqr/CMakeLists.txt | 4 ++--
+ avogadro/qtplugins/plugindownloader/CMakeLists.txt | 4 ++--
+ avogadro/qtplugins/spectra/CMakeLists.txt | 2 +-
+ avogadro/quantumio/CMakeLists.txt | 4 ++--
+ 6 files changed, 13 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7574fa0..7ce80b0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,8 +52,11 @@ option(USE_PROTOCALL "Enable libraries that use ProtoCall" OFF)
+ option(USE_MOLEQUEUE "Enable the MoleQueue dependent functionality" ON)
+ option(USE_PYTHON "Use Python to wrap some of our API" OFF)
+
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(JSONCPP jsoncpp)
++
+ add_subdirectory(utilities)
+-add_subdirectory(thirdparty)
++# add_subdirectory(thirdparty)
+ add_subdirectory(avogadro)
+
+ if(ENABLE_TESTING)
+diff --git a/avogadro/io/CMakeLists.txt b/avogadro/io/CMakeLists.txt
+index 1dd7967..10ddbb6 100644
+--- a/avogadro/io/CMakeLists.txt
++++ b/avogadro/io/CMakeLists.txt
+@@ -15,7 +15,7 @@ endif()
+ # compilers that support that notion.
+ include_directories(SYSTEM "${EIGEN3_INCLUDE_DIR}"
+ "${AvogadroLibs_SOURCE_DIR}/thirdparty/pugixml"
+- "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp")
++ "${JSONCPP_INCLUDE_DIRS}")
+
+ if(DEFINED AvogadroLibs_MEMORY_INCLUDE_DIRS)
+ # The smart pointer classes just require headers.
+@@ -51,7 +51,7 @@ endif()
+
+ avogadro_add_library(AvogadroIO ${HEADERS} ${SOURCES})
+
+-target_link_libraries(AvogadroIO LINK_PUBLIC AvogadroCore LINK_PRIVATE jsoncpp)
++target_link_libraries(AvogadroIO LINK_PUBLIC AvogadroCore LINK_PRIVATE ${JSONCPP_LIBRARIES})
+ if(USE_HDF5)
+ target_link_libraries(AvogadroIO LINK_PRIVATE ${HDF5_LIBRARIES})
+ endif()
+diff --git a/avogadro/qtplugins/importpqr/CMakeLists.txt b/avogadro/qtplugins/importpqr/CMakeLists.txt
+index ee27da9..365c51a 100644
+--- a/avogadro/qtplugins/importpqr/CMakeLists.txt
++++ b/avogadro/qtplugins/importpqr/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp")
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS})
+
+ # Extension
+ set(importpqr_srcs
+@@ -17,4 +17,4 @@ avogadro_plugin(ImportPQR
+ ""
+ )
+
+-target_link_libraries(ImportPQR LINK_PRIVATE ${Qt5Network_LIBRARIES} jsoncpp)
++target_link_libraries(ImportPQR LINK_PRIVATE ${Qt5Network_LIBRARIES} ${JSONCPP_LIBRARIES})
+diff --git a/avogadro/qtplugins/plugindownloader/CMakeLists.txt b/avogadro/qtplugins/plugindownloader/CMakeLists.txt
+index 4b07a53..ab4c661 100644
+--- a/avogadro/qtplugins/plugindownloader/CMakeLists.txt
++++ b/avogadro/qtplugins/plugindownloader/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp")
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS})
+
+ find_package(LibArchive REQUIRED)
+ include_directories(SYSTEM ${LIBARCHIVE_INCLUDE_DIRS})
+@@ -20,4 +20,4 @@ avogadro_plugin(PluginDownloader
+ )
+
+ target_link_libraries(PluginDownloader LINK_PRIVATE ${Qt5Network_LIBRARIES}
+- ${LIBARCHIVE_LIBRARIES} jsoncpp)
++ ${LIBARCHIVE_LIBRARIES} ${JSONCPP_LIBRARIES})
+diff --git a/avogadro/qtplugins/spectra/CMakeLists.txt b/avogadro/qtplugins/spectra/CMakeLists.txt
+index a2216b8..09d8fc9 100644
+--- a/avogadro/qtplugins/spectra/CMakeLists.txt
++++ b/avogadro/qtplugins/spectra/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp")
++include_directories(SYSTEM ${JSONCPP_INCLUDE_DIRS})
+
+ set(plugin_srcs
+ vibrationdialog.cpp
+diff --git a/avogadro/quantumio/CMakeLists.txt b/avogadro/quantumio/CMakeLists.txt
+index 15073e8..35fc766 100644
+--- a/avogadro/quantumio/CMakeLists.txt
++++ b/avogadro/quantumio/CMakeLists.txt
+@@ -2,7 +2,7 @@ find_package(Eigen3 REQUIRED)
+ # Add as "system headers" to avoid warnings generated by them with
+ # compilers that support that notion.
+ include_directories(SYSTEM "${EIGEN3_INCLUDE_DIR}"
+- "${AvogadroLibs_SOURCE_DIR}/thirdparty/jsoncpp")
++ ${JSONCPP_INCLUDE_DIRS})
+
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+@@ -30,4 +30,4 @@ set(SOURCES
+ )
+
+ avogadro_add_library(AvogadroQuantumIO ${HEADERS} ${SOURCES})
+-target_link_libraries(AvogadroQuantumIO LINK_PUBLIC AvogadroIO LINK_PRIVATE jsoncpp)
++target_link_libraries(AvogadroQuantumIO LINK_PUBLIC AvogadroIO LINK_PRIVATE ${JSONCPP_LIBRARIES})
+--
+2.17.0
+