aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinis Danne <rei4dan@gmail.com>2009-02-10 23:22:48 +0200
committerReinis Danne <rei4dan@gmail.com>2009-02-21 01:26:30 +0200
commit68a95f060a86b4fa3757400503a12a73f3b08b2c (patch)
treed6985ee340cfb06ef0ac2b5035de323e474bd5ca /sci-chemistry
parentdev-tcltk/anigif added (diff)
downloadsci-68a95f060a86b4fa3757400503a12a73f3b08b2c.tar.gz
sci-68a95f060a86b4fa3757400503a12a73f3b08b2c.tar.bz2
sci-68a95f060a86b4fa3757400503a12a73f3b08b2c.zip
New package sci-chemistry/openbabel-perl, #212212
Ebuild, metadata.xml and a patch for Makefile.PL.
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/openbabel-perl/ChangeLog11
-rw-r--r--sci-chemistry/openbabel-perl/Manifest5
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.2.0-makefile.patch25
-rw-r--r--sci-chemistry/openbabel-perl/metadata.xml15
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-2.2.0.ebuild82
5 files changed, 138 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/ChangeLog b/sci-chemistry/openbabel-perl/ChangeLog
new file mode 100644
index 000000000..d33744b62
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-chemistry/openbabel-perl
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openbabel-perl-2.2.0 (10 Feb 2009)
+
+ 10 Feb 2009; Reinis Danne <rei4dan@gmail.com>
+ +files/openbabel-perl-2.2.0-makefile.patch, +metadata.xml,
+ +openbabel-perl-2.2.0.ebuild:
+ New package sci-chemistry/openbabel-perl, #212212
+
diff --git a/sci-chemistry/openbabel-perl/Manifest b/sci-chemistry/openbabel-perl/Manifest
new file mode 100644
index 000000000..bf7e820e0
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/Manifest
@@ -0,0 +1,5 @@
+AUX openbabel-perl-2.2.0-makefile.patch 1151 RMD160 8e46b23009c938f102874242b4539d912bc7f47e SHA1 cb5616215d3199170759c35968243bf0f9c846f5 SHA256 55f1b90d5e388401eecb56a3fdaf6b33a8eb2326a7a329605624ffd08e6ba81d
+DIST openbabel-2.2.0.tar.gz 6127264 RMD160 ade8e65ab37278d9af3ff1b9cfb115437f52e0ea SHA1 5fdc084fb744d5dae4cd9ddbd52fe1f0c56c973b SHA256 a898b79336c7372c901bcc7e5f83db7b8e79f8e864be6a262f515b3e088bc607
+EBUILD openbabel-perl-2.2.0.ebuild 1607 RMD160 c6022cc3bcf7c27be297274d62644af7f0ce612b SHA1 61a459b73b07a90b3d6a749a2a4a745d87b676e1 SHA256 826634836a20cb660d94bce3064c8ef48a1e8e2af9f105d22cebdd54874c597a
+MISC ChangeLog 360 RMD160 2515f2a497076a5514328639f60b84dc5e223f1d SHA1 10707cf0c81ff3be7a744c96cfa78d07e98ac033 SHA256 57f1ca9b019a7609933239899220502cdf96013cefa663d194895cc0556d92aa
+MISC metadata.xml 627 RMD160 2eed792ed60ef1e4fe0aba88690f1fc4ff93b3e5 SHA1 d1e9cc0888dfedadb394def1835b272d11d91b38 SHA256 83b3a75fd868e56866941cba2671a75decc1e099e22709b3c6e799767f1e7253
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.2.0-makefile.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.2.0-makefile.patch
new file mode 100644
index 000000000..4c5d4c69b
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.2.0-makefile.patch
@@ -0,0 +1,25 @@
+--- Makefile.PL.orig 2009-02-09 15:32:59.000000000 +0200
++++ Makefile.PL 2009-02-09 15:49:44.000000000 +0200
+@@ -7,16 +7,15 @@
+ @ENV{"LD_LIBRARY_PATH"});
+
+ $CC = 'g++';
+-$srcdir = '../../src';
+
+ # check if we're compiling in the source directory
+ # check first for the static, then change to dynamic if available
+-$ldfrom = "\$(OBJECT) $srcdir/.libs/libopenbabel.a -lz"
+- if (-r "$srcdir/.libs/libopenbabel.a") and (-s _) and (-B _);
+-$ldfrom = "\$(OBJECT) -L$srcdir/.libs -lopenbabel -lz"
+- if (-r "$srcdir/.libs/libopenbabel.dylib") and (-s _) and (-B _);
+-$ldfrom = "\$(OBJECT) -L$srcdir/.libs -lopenbabel -lz"
+- if (-r "$srcdir/.libs/libopenbabel.so") and (-s _) and (-B _);
++$ldfrom = "\$(OBJECT) /usr/lib/libopenbabel.a -lz"
++ if (-r "/usr/lib/libopenbabel.a") and (-s _) and (-B _);
++$ldfrom = "\$(OBJECT) -L/usr/lib -lopenbabel -lz"
++ if (-r "/usr/lib/libopenbabel.dylib") and (-s _) and (-B _);
++$ldfrom = "\$(OBJECT) -L/usr/lib -lopenbabel -lz"
++ if (-r "/usr/lib/libopenbabel.so") and (-s _) and (-B _);
+
+ # See lib/ExtUtils/MakeMaker.pm for details of how to influence
+ # the contents of the Makefile that is written.
diff --git a/sci-chemistry/openbabel-perl/metadata.xml b/sci-chemistry/openbabel-perl/metadata.xml
new file mode 100644
index 000000000..7dd11d8d7
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-chemistry</herd>
+<longdescription>
+OpenBabel 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 OpenBabel library from Python programs.
+</longdescription>
+<use>
+<flag name='swig'>Enable SWIG language binding regeneration</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-2.2.0.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-2.2.0.ebuild
new file mode 100644
index 000000000..b6a8f7f97
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.2.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils perl-module
+
+DESCRIPTION="Perl bindings for OpenBabel"
+HOMEPAGE="http://openbabel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="swig"
+
+RDEPEND="~sci-chemistry/openbabel-2.2.0
+ dev-lang/perl"
+
+DEPEND="${RDEPEND}
+ swig? ( >=dev-lang/swig-1.3.29 )"
+
+src_unpack() {
+ unpack ${A}
+ S="${WORKDIR}/openbabel-${PV}"
+ cd "${S}"
+
+ local myconf=""
+ if use swig ; then
+ if ! built_with_use dev-lang/swig perl ; then
+ echo
+ eerror "To be able to build openbabel-perl with swig use"
+ eerror "dev-lang/swig has to be merged with perl enabled."
+ eerror "Please, re-emerge dev-lang/swig with USE=\"perl\"."
+ die "dev-lang/swig has been built without perl support"
+ else
+ myconf="--enable-maintainer-mode"
+ fi
+ fi
+ econf \
+ ${myconf} \
+ --enable-static \
+ || die "econf failed"
+ S="${S}/scripts"
+ cd "${S}"
+ if use swig ; then
+ emake perl/openbabel_perl.cpp || die "Failed to make SWIG perl bindings"
+ fi
+ S="${S}/perl"
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ || die "Failed to apply ${P}-makefile.patch"
+}
+
+src_compile() {
+ perl-module_src_prep
+ perl-module_src_compile
+}
+
+src_test() {
+ emake test || die "make test failed"
+}
+
+src_install() {
+ perl-module_src_install
+}
+
+pkg_preinst() {
+ perl-module_pkg_preinst
+}
+
+pkg_postinst() {
+ perl-module_pkg_postinst
+}
+
+pkg_prerm() {
+ perl-module_pkg_prerm
+}
+
+pkg_postrm() {
+ perl-module_pkg_postrm
+}
+