summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/avogadrolibs')
-rw-r--r--sci-libs/avogadrolibs/Manifest1
-rw-r--r--sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180415.ebuild88
-rw-r--r--sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180415-qt-5.11b3.patch100
3 files changed, 189 insertions, 0 deletions
diff --git a/sci-libs/avogadrolibs/Manifest b/sci-libs/avogadrolibs/Manifest
index 1651cd867a2f..e748fcaf3560 100644
--- a/sci-libs/avogadrolibs/Manifest
+++ b/sci-libs/avogadrolibs/Manifest
@@ -1,2 +1,3 @@
DIST avogadrolibs-1.91.0_pre20180406.tar.gz 857345 BLAKE2B 8e5c6b0a838a2a6b7dc925c1b544ab4d4de8b7769b1fe8d787127a1014b1243da89a2a6f6cfc871181f81a443c3ee63d758369f003afaf591c9373c9d5122ee3 SHA512 1814b2105615aabc1df78b14c581e78fea20a1e4ace8979bb2ad123ab0994d90c3935e37f0cc58b60d3307ffe682599a93d8cadddc22b4ba524caaec1a2c5319
+DIST avogadrolibs-1.91.0_pre20180415.tar.gz 2541101 BLAKE2B 526d2135af123d31220c8dd87351a35464e3dfd6b8d411d6dc9a6b3e74693090adfa3b61198a6a296eac99e6bbd67623f7aeda6a1752a09e3e3bcaa3df4d5008 SHA512 1cc646368f70523fcf20c6cf598025234162e0c81da64a3b5375c1691a6743f2aceb1f13230937bf9da045e725a23c1c89c8121e07b31ef9e2c7987b1feafccc
DIST linux64-genXrdPattern 7480152 BLAKE2B dca8285c41aadfaa20c72f337e0f02db8ee07ce30c11ae84bf3aa7bd0b2220273d33f484d63f761d41a8946c6a0b77a0fb27906c480bcae01ae49b1531ae5cbb SHA512 538bde12e1e52600a21640d5907f43fcc853c6f3c111880f39eb238093e3d1358ccdfa1f45e944ec8b8e5ee3c2dff269cefe5334db5d73300e6ca327c95520b8
diff --git a/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180415.ebuild b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180415.ebuild
new file mode 100644
index 000000000000..df8f4182395d
--- /dev/null
+++ b/sci-libs/avogadrolibs/avogadrolibs-1.91.0_pre20180415.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+COMMIT=606debb5d7c2c4020478264c609f895584fc5e38
+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
+ 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:= )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ media-libs/glew:0=
+ virtual/opengl
+ )
+ vtk? ( sci-libs/vtk[qt5,views] )
+"
+DEPEND="${RDEPEND}
+ dev-cpp/eigen:3
+ qt5? (
+ dev-qt/linguist-tools:5
+ dev-qt/qtopengl:5
+ )
+ test? ( dev-cpp/gtest )"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.2-6464.patch
+ "${FILESDIR}/"${PN}-1.91.0_pre20180406-underlinking.patch
+ "${FILESDIR}/"${PN}-1.91.0_pre20180406-unbundle-jsoncpp.patch
+ "${FILESDIR}/"${PN}-1.91.0_pre20180406-bundled-genxrdpattern.patch
+ "${FILESDIR}/"${P}-qt-5.11b3.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
+ -DBUILD_GPL_PLUGINS=ON
+ -DUSE_MOLEQUEUE=ON
+ -DUSE_LIBMSYM=OFF
+ -DUSE_LIBSPG=OFF
+ -DUSE_PYTHON=OFF
+ -DUSE_LIBARCHIVE=$(usex archive)
+ -DBUILD_DOCUMENTATION=$(usex doc)
+ -DUSE_HDF5=$(usex hdf5)
+ -DENABLE_TRANSLATIONS=$(usex qt5)
+ -DUSE_OPENGL=$(usex qt5)
+ -DUSE_QT=$(usex qt5)
+ -DBUILD_STATIC_PLUGINS=$(usex static-plugins)
+ -DENABLE_TESTING=$(usex test)
+ -DUSE_VTK=$(usex vtk)
+ )
+ use vtk && mycmakeargs+=(
+ -DBUNDLED_GENXRDPATTERN="${WORKDIR}/genXrdPattern"
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180415-qt-5.11b3.patch b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180415-qt-5.11b3.patch
new file mode 100644
index 000000000000..2aacee8e5b75
--- /dev/null
+++ b/sci-libs/avogadrolibs/files/avogadrolibs-1.91.0_pre20180415-qt-5.11b3.patch
@@ -0,0 +1,100 @@
+From fdac6931c24986d377e06d77dbc607bb3c1654dd Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 17 Apr 2018 11:31:22 +0200
+Subject: [PATCH] Fix build with Qt 5.11_beta3 (dropping qt5_use_modules)
+
+---
+ avogadro/molequeue/CMakeLists.txt | 3 +--
+ avogadro/qtgui/CMakeLists.txt | 3 +--
+ avogadro/qtopengl/CMakeLists.txt | 3 +--
+ avogadro/vtk/CMakeLists.txt | 3 +--
+ tests/qtgui/CMakeLists.txt | 3 +--
+ tests/qtopengl/CMakeLists.txt | 5 ++---
+ 6 files changed, 7 insertions(+), 13 deletions(-)
+
+diff --git a/avogadro/molequeue/CMakeLists.txt b/avogadro/molequeue/CMakeLists.txt
+index 43a9195..37431cd 100644
+--- a/avogadro/molequeue/CMakeLists.txt
++++ b/avogadro/molequeue/CMakeLists.txt
+@@ -41,6 +41,5 @@ qt5_wrap_ui(UI_SOURCES ${UIS})
+ list(APPEND SOURCES ${UI_SOURCES})
+
+ avogadro_add_library(AvogadroMoleQueue ${HEADERS} ${SOURCES})
+-qt5_use_modules(AvogadroMoleQueue Widgets Network)
+ set_target_properties(AvogadroMoleQueue PROPERTIES AUTOMOC TRUE)
+-target_link_libraries(AvogadroMoleQueue AvogadroQtGui MoleQueueClient)
++target_link_libraries(AvogadroMoleQueue AvogadroQtGui MoleQueueClient Qt5::Widgets Qt5::Network)
+diff --git a/avogadro/qtgui/CMakeLists.txt b/avogadro/qtgui/CMakeLists.txt
+index e6cf8d3..3365261 100644
+--- a/avogadro/qtgui/CMakeLists.txt
++++ b/avogadro/qtgui/CMakeLists.txt
+@@ -99,5 +99,4 @@ qt5_add_resources(RC_SOURCES ${RCS})
+ list(APPEND SOURCES ${RC_SOURCES})
+
+ avogadro_add_library(AvogadroQtGui ${HEADERS} ${SOURCES})
+-qt5_use_modules(AvogadroQtGui Widgets)
+-target_link_libraries(AvogadroQtGui AvogadroIO)
++target_link_libraries(AvogadroQtGui AvogadroIO Qt5::Widgets)
+diff --git a/avogadro/qtopengl/CMakeLists.txt b/avogadro/qtopengl/CMakeLists.txt
+index 354638c..28a473e 100644
+--- a/avogadro/qtopengl/CMakeLists.txt
++++ b/avogadro/qtopengl/CMakeLists.txt
+@@ -16,5 +16,4 @@ set(SOURCES
+ )
+
+ avogadro_add_library(AvogadroQtOpenGL ${HEADERS} ${SOURCES})
+-qt5_use_modules(AvogadroQtOpenGL Widgets)
+-target_link_libraries(AvogadroQtOpenGL AvogadroRendering AvogadroQtGui)
++target_link_libraries(AvogadroQtOpenGL AvogadroRendering AvogadroQtGui Qt5::Widgets)
+diff --git a/avogadro/vtk/CMakeLists.txt b/avogadro/vtk/CMakeLists.txt
+index abac5a1..498529c 100644
+--- a/avogadro/vtk/CMakeLists.txt
++++ b/avogadro/vtk/CMakeLists.txt
+@@ -30,8 +30,7 @@ set(SOURCES
+ )
+
+ avogadro_add_library(AvogadroVtk ${HEADERS} ${SOURCES})
+-qt5_use_modules(AvogadroVtk Widgets)
+ set_target_properties(AvogadroVtk PROPERTIES AUTOMOC TRUE)
+ target_link_libraries(AvogadroVtk AvogadroRendering AvogadroQtGui
+ vtkRenderingOpenGL2 vtkGUISupportQt vtkRenderingVolumeOpenGL2
+- vtkRenderingFreeType vtkInteractionStyle)
++ vtkRenderingFreeType vtkInteractionStyle Qt5::Widgets)
+diff --git a/tests/qtgui/CMakeLists.txt b/tests/qtgui/CMakeLists.txt
+index 1cfd51a..da08078 100644
+--- a/tests/qtgui/CMakeLists.txt
++++ b/tests/qtgui/CMakeLists.txt
+@@ -49,9 +49,8 @@ endforeach()
+
+ # Add a single executable for all of our tests.
+ add_executable(AvogadroQtGuiTests ${testSrcs})
+-qt5_use_modules(AvogadroQtGuiTests Widgets Test)
+ target_link_libraries(AvogadroQtGuiTests AvogadroQtGui AvogadroMoleQueue
+- MoleQueueClient ${GTEST_BOTH_LIBRARIES} ${EXTRA_LINK_LIB})
++ MoleQueueClient ${GTEST_BOTH_LIBRARIES} ${EXTRA_LINK_LIB} Qt5::Widgets Qt5::Test)
+
+ # Now add all of the tests, using the gtest_filter argument so that only those
+ # cases are run in each test invocation.
+diff --git a/tests/qtopengl/CMakeLists.txt b/tests/qtopengl/CMakeLists.txt
+index 370f28f..5843a38 100644
+--- a/tests/qtopengl/CMakeLists.txt
++++ b/tests/qtopengl/CMakeLists.txt
+@@ -44,13 +44,12 @@ create_test_sourcelist(testDriver qtopengltests.cpp ${testSrcs})
+
+ add_executable(AvogadroQtOpenGLTests ${testDriver})
+
+-qt5_use_modules(AvogadroQtOpenGLTests OpenGL)
+-
+ target_link_libraries(AvogadroQtOpenGLTests
+ AvogadroQtOpenGL
+ vtkImagingCore
+ vtkIOImage
+- vtkRenderingQt)
++ vtkRenderingQt
++ Qt5::OpenGL)
+
+ foreach(test ${tests})
+ string(TOLOWER ${test} testname)
+--
+2.17.0
+