diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-12-28 14:33:02 +0100 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-12-28 14:34:28 +0100 |
commit | 093f23a979872f8e794498c24cdf121e32cec879 (patch) | |
tree | d2db84cb31edded4ef3bb63e85c4872459e38a6d /sci-chemistry/avogadro | |
parent | dev-python/pip: Update shell completion generation (diff) | |
download | gentoo-093f23a979872f8e794498c24cdf121e32cec879.tar.gz gentoo-093f23a979872f8e794498c24cdf121e32cec879.tar.bz2 gentoo-093f23a979872f8e794498c24cdf121e32cec879.zip |
sci-chemistry/avogadro: Version Bump & fix linking problems with openbabel
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=569896
Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sci-chemistry/avogadro')
8 files changed, 175 insertions, 0 deletions
diff --git a/sci-chemistry/avogadro/Manifest b/sci-chemistry/avogadro/Manifest index b9a9c4d47e3a..9dbb71c30de7 100644 --- a/sci-chemistry/avogadro/Manifest +++ b/sci-chemistry/avogadro/Manifest @@ -1 +1,2 @@ DIST avogadro-1.1.0.tar.bz2 10741835 SHA256 6b4eaf57ae52bf43df9b103c77e6abae71e067053d5c99f82acbce9855ecceb0 SHA512 d621dd3ea9e9223d3a29c6b0c0eec89a935837d0c587fcaaa549f91274a76f78a8c60c2a68a67d2f3aa2e107826befb6658be601c46c5bc0760c95bf7284540a WHIRLPOOL c81e866e60b3383a58de515317c754e3982e716c27974ce43ca0c1209d24544949361a7f2f93a4a940d73fd7a18b184f68c7a1856fea89ae5eba75db74b1012d +DIST avogadro-1.1.1.tar.bz2 11118046 SHA256 fe6f7bdea17a27a20be25b70d975145999aae9d90ef320217af2bc4d6e7a0a14 SHA512 37e2fc9400f8727b7e69d84c13989aaba6fc88287e106a6ed137e4d0fd8ea181dc4ab49b08148d2077754f014748c8ed6f46881f31a1455029f876b599754827 WHIRLPOOL 6bea2c25675ba29729785b561cbaed33929aeb4638180454b1aed8913160cd6d0315bb09e6ee4033a8d27ce84fd7a4573851fd02c76b64b6aa86e615a19b8c38 diff --git a/sci-chemistry/avogadro/avogadro-1.1.0.ebuild b/sci-chemistry/avogadro/avogadro-1.1.0.ebuild index 0de1b83085b6..4f7720d37e98 100644 --- a/sci-chemistry/avogadro/avogadro-1.1.0.ebuild +++ b/sci-chemistry/avogadro/avogadro-1.1.0.ebuild @@ -37,6 +37,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}"/${P}-textrel.patch "${FILESDIR}"/${P}-xlibs.patch + "${FILESDIR}"/${PN}-1.1.1-openbabel.patch ) pkg_setup() { diff --git a/sci-chemistry/avogadro/avogadro-1.1.1.ebuild b/sci-chemistry/avogadro/avogadro-1.1.1.ebuild new file mode 100644 index 000000000000..090d99ccd477 --- /dev/null +++ b/sci-chemistry/avogadro/avogadro-1.1.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils eutils flag-o-matic python-single-r1 + +DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL" +HOMEPAGE="http://avogadro.openmolecules.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+glsl python cpu_flags_x86_sse2 test" + +RDEPEND=" + >=sci-chemistry/openbabel-2.3.0 + >=dev-qt/qtgui-4.8.5:4 + >=dev-qt/qtopengl-4.8.5:4 + x11-libs/gl2ps + glsl? ( >=media-libs/glew-1.5.0 ) + python? ( + >=dev-libs/boost-1.35.0-r5[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/sip[${PYTHON_USEDEP}] + )" +DEPEND="${RDEPEND} + dev-cpp/eigen:2" + +# https://sourceforge.net/p/avogadro/bugs/653/ +RESTRICT="test" + +PATCHES=( + #"${FILESDIR}"/${PN}-1.1.0-textrel.patch + "${FILESDIR}"/${PN}-1.1.0-xlibs.patch + "${FILESDIR}"/${P}-eigen3.patch + "${FILESDIR}"/${P}-mkspecs-dir.patch + "${FILESDIR}"/${P}-no-strip.patch + "${FILESDIR}"/${P}-pkgconfig_eigen.patch + "${FILESDIR}"/${P}-openbabel.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + sed \ + -e 's:_BSD_SOURCE:_DEFAULT_SOURCE:g' \ + -i CMakeLists.txt || die + # warning: "Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3." + append-cppflags -DEIGEN_NO_EIGEN2_DEPRECATED_WARNING + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_THREADEDGL=OFF + -DENABLE_RPATH=OFF + -DENABLE_UPDATE_CHECKER=OFF + -DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs" + -DQT_MKSPECS_RELATIVE=share/qt4/mkspecs + $(cmake-utils_use_enable glsl) + $(cmake-utils_use_enable test TESTS) + $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2) + $(cmake-utils_use_enable python) + ) + + cmake-utils_src_configure +} diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.1-eigen3.patch b/sci-chemistry/avogadro/files/avogadro-1.1.1-eigen3.patch new file mode 100644 index 000000000000..dc07d6974e12 --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.1.1-eigen3.patch @@ -0,0 +1,51 @@ +--- avogadro-1.1.1/CMakeLists.txt.omv~ 2014-01-30 13:58:22.999443609 +0100 ++++ avogadro-1.1.1/CMakeLists.txt 2014-01-30 13:59:31.086106925 +0100 +@@ -230,13 +230,15 @@ if(NOT Linguist_FOUND) + message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations") + endif() + +-find_package(Eigen3) # find and setup Eigen3 if available ++find_package(Eigen3 REQUIRED) # find and setup Eigen3 if available + if(NOT EIGEN3_FOUND) + message(STATUS "Cannot find Eigen3, trying Eigen2") +- find_package(Eigen2 REQUIRED) # Some version is required ++ find_package(Eigen2) # Some version is required + else() + # Use Stage10 Eigen3 support + set (EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API TRUE) ++ add_definitions (-DEIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API) ++ set (EIGEN2_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR}) + endif() + + find_package(ZLIB REQUIRED) +--- avogadro-1.1.1/libavogadro/src/extensions/qtaim/CMakeLists.txt.omv~ 2014-01-30 14:12:33.859401753 +0100 ++++ avogadro-1.1.1/libavogadro/src/extensions/qtaim/CMakeLists.txt 2014-01-30 14:15:07.652727522 +0100 +@@ -4,6 +4,8 @@ set(LINK_LIBS avogadro) + set(PLUGIN_LABEL extensions) + set(PLUGIN_TARGET extensions) + ++add_definitions(-DEIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS -std=gnu++11) ++ + set(qtaimextension_SRCS + qtaimextension.cpp + # qtaimdialog.cpp +--- avogadro-1.1.1/libavogadro/src/extensions/surfaces/openqube/CMakeLists.txt.omv~ 2014-01-30 13:59:05.889441500 +0100 ++++ avogadro-1.1.1/libavogadro/src/extensions/surfaces/openqube/CMakeLists.txt 2014-01-30 13:59:08.832774688 +0100 +@@ -1,5 +1,5 @@ + find_package(Qt4 4.6 REQUIRED) +-find_package(Eigen2 REQUIRED) ++find_package(Eigen3 REQUIRED) + + include_directories(${QT_INCLUDE_DIR} ${EIGEN2_INCLUDE_DIR}) + +--- avogadro-1.1.1/cmake/modules/AvogadroUse.cmake.orig 2014-10-13 20:13:59.909828034 +0100 ++++ avogadro-1.1.1/cmake/modules/AvogadroUse.cmake 2014-10-13 20:15:09.492822908 +0100 +@@ -12,7 +12,7 @@ + + # Add the Avogadro modules directory to the CMake module path + set(CMAKE_MODULE_PATH ${Avogadro_PLUGIN_DIR}/cmake ${CMAKE_MODULE_PATH}) +-find_package(Eigen2 REQUIRED) ++find_package(Eigen3 REQUIRED) + include_directories(${EIGEN2_INCLUDE_DIR}) + if(Avogadro_ENABLE_GLSL) + find_package(GLEW) diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.1-mkspecs-dir.patch b/sci-chemistry/avogadro/files/avogadro-1.1.1-mkspecs-dir.patch new file mode 100644 index 000000000000..45c616422efe --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.1.1-mkspecs-dir.patch @@ -0,0 +1,12 @@ +diff -up avogadro-1.1.1/CMakeLists.txt.mkspecs-dir avogadro-1.1.1/CMakeLists.txt +--- avogadro-1.1.1/CMakeLists.txt.mkspecs-dir 2014-01-24 23:43:01.618510517 -0600 ++++ avogadro-1.1.1/CMakeLists.txt 2014-01-24 23:44:03.236844746 -0600 +@@ -547,7 +547,7 @@ if(QT_MKSPECS_DIR AND INSTALL_QMAKE_PRF) + # ) + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/avogadro.prf" +- DESTINATION "${CMAKE_INSTALL_PREFIX}/${QT_MKSPECS_RELATIVE}/features" ++ DESTINATION "${QT_MKSPECS_DIR}/features" + ) + # endif ("${QT_MKSPECS_DIR}" MATCHES ^$"${CMAKE_INSTALL_PREFIX}/") + else() diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.1-no-strip.patch b/sci-chemistry/avogadro/files/avogadro-1.1.1-no-strip.patch new file mode 100644 index 000000000000..490dd58907df --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.1.1-no-strip.patch @@ -0,0 +1,12 @@ +diff -up avogadro-1.1.1/CMakeLists.txt.no-strip avogadro-1.1.1/CMakeLists.txt +--- avogadro-1.1.1/CMakeLists.txt.no-strip 2014-01-24 23:14:44.473840038 -0600 ++++ avogadro-1.1.1/CMakeLists.txt 2014-01-24 23:15:46.869166459 -0600 +@@ -114,7 +114,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) + endif() + # Set up additional build flags for particular build types. These will be added to CMAKE_CXX_FLAGS, + # they will not replace them. +- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG_OUTPUT -Wl,-s") ++ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG -DQT_NO_DEBUG_OUTPUT") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}") + set(CMAKE_CXX_FLAGS_DEBUG "-g3 -fno-inline ${CMAKE_CXX_FLAGS_WARN}") diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.1-openbabel.patch b/sci-chemistry/avogadro/files/avogadro-1.1.1-openbabel.patch new file mode 100644 index 000000000000..4bdc6b2e780e --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.1.1-openbabel.patch @@ -0,0 +1,16 @@ + libavogadro/src/python/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavogadro/src/python/CMakeLists.txt b/libavogadro/src/python/CMakeLists.txt +index efb518a..1a3d91a 100644 +--- a/libavogadro/src/python/CMakeLists.txt ++++ b/libavogadro/src/python/CMakeLists.txt +@@ -21,7 +21,7 @@ if (WIN32) + target_link_libraries(python-module avogadro ${PYTHON_LIBRARIES}) + else() + target_link_libraries(python-module stdc++ avogadro +- ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES}) ++ ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} ${OPENBABEL2_LIBRARIES}) + endif() + + # Let's try to use this instead: diff --git a/sci-chemistry/avogadro/files/avogadro-1.1.1-pkgconfig_eigen.patch b/sci-chemistry/avogadro/files/avogadro-1.1.1-pkgconfig_eigen.patch new file mode 100644 index 000000000000..93dbe2ff4ecc --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.1.1-pkgconfig_eigen.patch @@ -0,0 +1,8 @@ +diff -up avogadro-1.1.1/avogadro.pc.in.eigen avogadro-1.1.1/avogadro.pc.in +--- avogadro-1.1.1/avogadro.pc.in.eigen 2013-12-06 09:50:04.000000000 -0600 ++++ avogadro-1.1.1/avogadro.pc.in 2014-01-25 00:37:45.732007852 -0600 +@@ -9,3 +9,4 @@ Description: Avogadro libraries + Version: @Avogadro_VERSION_FULL@ + Libs: -L${libdir} -lavogadro + Cflags: -I${pkgincludedir} ++Requires.private: eigen3 |