summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2017-05-19 10:37:53 +0100
committerJustin Lecher <jlec@gentoo.org>2017-05-19 10:52:25 +0100
commit6db59b1b66771c9769ab80f7b4663b18123f3437 (patch)
treed9282f8d09e7bd37430cc7fe77f07a00add116db /sci-chemistry/openbabel-perl
parentsci-chemistry/openbabel: Version Bump (diff)
downloadgentoo-6db59b1b66771c9769ab80f7b4663b18123f3437.tar.gz
gentoo-6db59b1b66771c9769ab80f7b4663b18123f3437.tar.bz2
gentoo-6db59b1b66771c9769ab80f7b4663b18123f3437.zip
sci-chemistry/openbabel-perl: Version Bump
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=618402 Package-Manager: Portage-2.3.5, Repoman-2.3.2 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sci-chemistry/openbabel-perl')
-rw-r--r--sci-chemistry/openbabel-perl/Manifest1
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild70
2 files changed, 71 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/Manifest b/sci-chemistry/openbabel-perl/Manifest
index 082e5b029843..3d09a5c54b9a 100644
--- a/sci-chemistry/openbabel-perl/Manifest
+++ b/sci-chemistry/openbabel-perl/Manifest
@@ -1 +1,2 @@
DIST openbabel-2.3.2.tar.gz 20509105 SHA256 4eaca26679aa6cc85ebf96af19191472ac63ca442c36b0427b369c3a25705188 SHA512 d0e1f8b758ffdd65ec6c31d988bffe3279355e286ce69fad12c5905b3b832e2b73ee95b1061b1576aba1ee9fe4da5e31ec30350c473be17493c657dc80caf919 WHIRLPOOL 74eff18b73d24c8f702e5573a58ba6afba8402e9ce8782de95dc0568575a7d2d632dbc8e8a98b3cd25efdfa7379494f7dcd449342c81ddf73f42a387bce77aaa
+DIST openbabel-2.4.1.tar.gz 11618304 SHA256 204136582cdfe51d792000b20202de8950218d617fd9c6e18cee36706a376dfc SHA512 427e678f0a911bd27b9a8a05e60b6e09f113be4e5dd180daaf80c28d06368e52b57501261755ab3817a8d31f2754db24471fd0ceee706d029386d6f70800e9c6 WHIRLPOOL 88e333b47118449e1edba2b164af77ac7fac9c60e2965b5d6657ba8cf981845f49f6bac9427515ebbdf62668fddf38ae2422c4e107b98df46922c5bba860b216
diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild
new file mode 100644
index 000000000000..a9493e69441f
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils perl-module
+
+DESCRIPTION="Perl bindings for OpenBabel"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
+
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0/5"
+LICENSE="GPL-2"
+IUSE=""
+
+RDEPEND="
+ dev-lang/perl:=
+ ~sci-chemistry/openbabel-${PV}"
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.4.8
+ >=dev-lang/swig-2"
+
+S="${WORKDIR}/openbabel-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.2-gcc-6_and_7-backport.patch
+)
+
+src_prepare() {
+ sed \
+ -e '/__GNUC__/s:== 4:>= 4:g' \
+ -i include/openbabel/shared_ptr.h || die
+ default
+ perl_set_version
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_RPATH=
+ -DBINDINGS_ONLY=ON
+ -DBABEL_SYSTEM_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libopenbabel.so"
+ -DOB_MODULE_PATH="${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}"
+ -DLIB_INSTALL_DIR="${D}/${VENDOR_ARCH}"
+ -DPERL_BINDINGS=ON
+ -DRUN_SWIG=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile bindings_perl
+}
+
+src_test() {
+ mkdir "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry" || die
+ cp \
+ "${CMAKE_USE_DIR}/scripts/perl/OpenBabel.pm" \
+ "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry/" || die
+ for i in "${CMAKE_USE_DIR}"/scripts/perl/t/*; do
+ einfo "Running test: ${i}"
+ perl -I"${CMAKE_BUILD_DIR}/$(get_libdir)" "${i}" || die
+ done
+}
+
+src_install() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ cmake -DCOMPONENT=bindings_perl -P cmake_install.cmake
+}