aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinis Danne <rei4dan@gmail.com>2013-09-26 22:20:39 +0300
committerReinis Danne <rei4dan@gmail.com>2013-09-26 23:25:20 +0300
commite75ac73b4b32cccf5d834e468e62a2429549d295 (patch)
treec97c14bda1f381fa28c57a7401d0ceb0735aa7a8
parentAdd sci-chemistry/openbabel-java live ebuild (diff)
downloadsci-e75ac73b4b32cccf5d834e468e62a2429549d295.tar.gz
sci-e75ac73b4b32cccf5d834e468e62a2429549d295.tar.bz2
sci-e75ac73b4b32cccf5d834e468e62a2429549d295.zip
Add sci-chemistry/openbabel-perl live ebuild
-rw-r--r--sci-chemistry/openbabel-perl/ChangeLog10
-rw-r--r--sci-chemistry/openbabel-perl/metadata.xml12
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild64
3 files changed, 86 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/ChangeLog b/sci-chemistry/openbabel-perl/ChangeLog
new file mode 100644
index 000000000..14040e1a2
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-chemistry/openbabel-perl
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openbabel-perl-9999 (26 Sep 2013)
+
+ 26 Sep 2013; Reinis Danne <rei4dan@gmail.com> +openbabel-perl-9999.ebuild,
+ +metadata.xml:
+ Add live ebuild.
+
diff --git a/sci-chemistry/openbabel-perl/metadata.xml b/sci-chemistry/openbabel-perl/metadata.xml
new file mode 100644
index 000000000..075056290
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <longdescription>
+ Open Babel is a chemical toolbox designed to speak the many languages of
+ chemical data. It's an open, collaborative project allowing anyone to
+ search, convert, analyze, or store data from molecular modeling, chemistry,
+ solid-state materials, biochemistry, or related areas.
+ This package enables to access Open Babel library from Perl programs.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild
new file mode 100644
index 000000000..2a352a8c2
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit cmake-utils eutils git-2 perl-module
+
+DESCRIPTION="Perl bindings for OpenBabel"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+EGIT_REPO_URI="https://github.com/openbabel/openbabel.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+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}"
+
+src_unpack() {
+ git-2_src_unpack
+}
+
+src_configure() {
+ perl_set_version
+ local mycmakeargs="${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=${ED}/${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"
+ cp \
+ "${CMAKE_USE_DIR}/scripts/perl/OpenBabel.pm" \
+ "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry/"
+ 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}"
+ cmake -DCOMPONENT=bindings_perl -P cmake_install.cmake
+}