summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2016-11-13 23:31:33 +0100
committerAvatar Heiko Becker <heirecka@exherbo.org> 2016-12-13 22:45:00 +0100
commit09dc4b9a34a1b7eb9df46f713dc8bef8117a27fa (patch)
treedd313bb7ccc33a241e19c77992b909bc60bd4a24
parentd8794152272bf7a23a263f786a7fa05cea733e4c (diff)
downloadscientific-09dc4b9a34a1b7eb9df46f713dc8bef8117a27fa.tar.gz
scientific-09dc4b9a34a1b7eb9df46f713dc8bef8117a27fa.tar.xz
avogadrolibs: Initial exheres
It is a new dependency for kde/kalzium[>=16.12.0]. Change-Id: Ie830bf5c77b46020995a1df3404bbe8e5c5e0d49 Reviewed-on: https://galileo.mailstation.de/gerrit/7780 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Heiko Becker <heirecka@exherbo.org>
-rw-r--r--packages/sci-chemistry/avogadrolibs/avogadrolibs-0.9.0.exheres-012
-rw-r--r--packages/sci-chemistry/avogadrolibs/avogadrolibs.exlib87
-rw-r--r--packages/sci-chemistry/avogadrolibs/files/avogadrolibs-0.9.0-Fix-minor-issue-with-GCC-6.patch27
-rw-r--r--packages/sci-chemistry/avogadrolibs/files/avogadrolibs-Don-t-install-bundled-jsoncpp-lib.patch31
4 files changed, 157 insertions, 0 deletions
diff --git a/packages/sci-chemistry/avogadrolibs/avogadrolibs-0.9.0.exheres-0 b/packages/sci-chemistry/avogadrolibs/avogadrolibs-0.9.0.exheres-0
new file mode 100644
index 0000000..4220385
--- /dev/null
+++ b/packages/sci-chemistry/avogadrolibs/avogadrolibs-0.9.0.exheres-0
@@ -0,0 +1,12 @@
+# Copyright 2016 Heiko Becker <heirecka@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require avogadrolibs
+
+PLATFORMS="~amd64"
+
+DEFAULT_SRC_PREPARE_PATCHES+=(
+ "${FILES}"/${PNV}-Fix-minor-issue-with-GCC-6.patch
+ "${FILES}"/${PN}-Don-t-install-bundled-jsoncpp-lib.patch
+)
+
diff --git a/packages/sci-chemistry/avogadrolibs/avogadrolibs.exlib b/packages/sci-chemistry/avogadrolibs/avogadrolibs.exlib
new file mode 100644
index 0000000..66c995b
--- /dev/null
+++ b/packages/sci-chemistry/avogadrolibs/avogadrolibs.exlib
@@ -0,0 +1,87 @@
+# Copyright 2016 Heiko Becker <heirecka@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require github [ user=OpenChemistry ] cmake [ api=2 cmake_minimum_version=2.8.8 ]
+
+export_exlib_phases src_compile src_install
+
+SUMMARY="A chemical editor and visualization application"
+DESCRIPTION="
+Avogadro libraries provide 3D rendering, visualization, analysis and data
+processing useful in computational chemistry, molecular modeling,
+bioinformatics, materials science, and related areas."
+
+HOMEPAGE+=" https://github.com/OpenChemistry/avogadrolibs"
+
+LICENCES="BSD-3"
+SLOT="0"
+
+MYOPTIONS="
+ doc
+ hdf5 [[ description = [ Read and write large data in an HDF5 file store ] ]]
+ qt5
+ vtk [[ description = [ Visualize molecules with the help of VTK ] ]]
+"
+
+DEPENDENCIES="
+ build:
+ sci-libs/eigen:3
+ doc? ( app-doc/doxygen )
+ qt5? ( dev-lang/python:2.7 )
+ build+run:
+ media-libs/glew
+ sci-libs/molequeue
+ x11-dri/mesa
+ hdf5? ( sci-libs/hdf5 )
+ qt5? ( x11-libs/qtbase:5[gui] )
+ vtk? (
+ sci-libs/vtk
+ x11-libs/qtbase:5
+ )
+ test:
+ dev-cpp/gtest
+ run:
+ dev-lang/python:*
+"
+
+BUGS_TO="heirecka@exherbo.org"
+
+# Test fails to build due to cmake and threads...
+RESTRICT="test"
+
+CMAKE_SRC_CONFIGURE_PARAMS+=(
+ # If set to false, boost would be required
+ -DBUILD_SHARED_LIBS:BOOL=TRUE
+ # I have very litte interest in this, but feel free to add support for it.
+ -DUSE_BOOST_PYTHON:BOOL=FALSE
+ # I assume this needs https://github.com/OpenChemistry/protocall - unwritten.
+ # It would also pull in Qt4 for a single plugin.
+ -DUSE_PROTOCALL:BOOL=FALSE
+)
+CMAKE_SRC_CONFIGURE_OPTION_BUILDS+=( 'doc DOCUMENTATION' )
+CMAKE_SRC_CONFIGURE_OPTION_USES+=(
+ HDF5
+ 'qt5 QT'
+ 'qt5 OPENGL'
+ VTK
+)
+CMAKE_SRC_CONFIGURE_TESTS=(
+ '-DENABLE_TESTING:BOOL=TRUE -DENABLE_TESTING:BOOL=FALSE'
+)
+
+avogadrolibs_src_compile() {
+ default
+
+ option doc && emake documentation
+}
+
+avogadrolibs_src_install() {
+ cmake_src_install
+
+ if option doc ; then
+ pushd "${WORK}"/docs
+ dodoc -r html
+ popd
+ fi
+}
+
diff --git a/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-0.9.0-Fix-minor-issue-with-GCC-6.patch b/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-0.9.0-Fix-minor-issue-with-GCC-6.patch
new file mode 100644
index 0000000..4ae0d38
--- /dev/null
+++ b/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-0.9.0-Fix-minor-issue-with-GCC-6.patch
@@ -0,0 +1,27 @@
+Upstream: yes
+
+From c5e722d2f567b8de5015e396ddb156a70b7c6f9c Mon Sep 17 00:00:00 2001
+From: Barry Moore <moore0557@gmail.com>
+Date: Tue, 22 Nov 2016 12:46:53 -0500
+Subject: [PATCH] Fix minor issue with GCC 6
+
+---
+ cmake/GenerateExportHeader.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/GenerateExportHeader.cmake b/cmake/GenerateExportHeader.cmake
+index a91da06..2406354 100644
+--- a/cmake/GenerateExportHeader.cmake
++++ b/cmake/GenerateExportHeader.cmake
+@@ -164,7 +164,7 @@ macro(_test_compiler_hidden_visibility)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ exec_program(${CMAKE_C_COMPILER} ARGS --version
+ OUTPUT_VARIABLE _gcc_version_info)
+- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
++ string(REGEX MATCH "[3456]\\.[0-9]\\.[0-9]"
+ _gcc_version "${_gcc_version_info}")
+ # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+ # patch level, handle this here:
+--
+2.11.0
+
diff --git a/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-Don-t-install-bundled-jsoncpp-lib.patch b/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-Don-t-install-bundled-jsoncpp-lib.patch
new file mode 100644
index 0000000..5dcb65b
--- /dev/null
+++ b/packages/sci-chemistry/avogadrolibs/files/avogadrolibs-Don-t-install-bundled-jsoncpp-lib.patch
@@ -0,0 +1,31 @@
+Upstream: no
+
+From aeac1e84f4a1446bfc6af4e46cf4084e0b84e6e8 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Mon, 12 Dec 2016 21:39:17 +0100
+Subject: [PATCH] Don't install bundled jsoncpp lib
+
+---
+ thirdparty/jsoncpp/CMakeLists.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/thirdparty/jsoncpp/CMakeLists.txt b/thirdparty/jsoncpp/CMakeLists.txt
+index 916b32d..426b205 100644
+--- a/thirdparty/jsoncpp/CMakeLists.txt
++++ b/thirdparty/jsoncpp/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ add_library(jsoncpp STATIC jsoncpp.cpp)
+ set_target_properties(jsoncpp PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+-install(TARGETS jsoncpp
+- EXPORT "AvogadroLibsTargets"
+- RUNTIME DESTINATION "${INSTALL_RUNTIME_DIR}"
+- LIBRARY DESTINATION "${INSTALL_LIBRARY_DIR}"
+- ARCHIVE DESTINATION "${INSTALL_ARCHIVE_DIR}")
++#install(TARGETS jsoncpp
++# EXPORT "AvogadroLibsTargets"
++# RUNTIME DESTINATION "${INSTALL_RUNTIME_DIR}"
++# LIBRARY DESTINATION "${INSTALL_LIBRARY_DIR}"
++# ARCHIVE DESTINATION "${INSTALL_ARCHIVE_DIR}")
+--
+2.11.0
+