diff options
author | Marcus D. Hanwell <cryos@gentoo.org> | 2009-07-24 19:00:34 +0000 |
---|---|---|
committer | Marcus D. Hanwell <cryos@gentoo.org> | 2009-07-24 19:00:34 +0000 |
commit | e7c28b4c190ddae599e0117caad410012bbdad19 (patch) | |
tree | fd8398a16cc9e977490802116f7625bf42828e36 /sci-chemistry/openbabel | |
parent | Added local swig use flag for sci-chemistry/openbabel. (diff) | |
download | gentoo-2-e7c28b4c190ddae599e0117caad410012bbdad19.tar.gz gentoo-2-e7c28b4c190ddae599e0117caad410012bbdad19.tar.bz2 gentoo-2-e7c28b4c190ddae599e0117caad410012bbdad19.zip |
Added python use flag to optionally build python language bindings. Thanks to My Th <rei4dan@gmail.com> for suggestions in bug 212212.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/openbabel')
-rw-r--r-- | sci-chemistry/openbabel/ChangeLog | 9 | ||||
-rw-r--r-- | sci-chemistry/openbabel/metadata.xml | 3 | ||||
-rw-r--r-- | sci-chemistry/openbabel/openbabel-2.2.2-r1.ebuild | 86 |
3 files changed, 97 insertions, 1 deletions
diff --git a/sci-chemistry/openbabel/ChangeLog b/sci-chemistry/openbabel/ChangeLog index 1a51b119a924..62b17207eae8 100644 --- a/sci-chemistry/openbabel/ChangeLog +++ b/sci-chemistry/openbabel/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/openbabel # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/ChangeLog,v 1.26 2009/07/18 15:40:42 cryos Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/ChangeLog,v 1.27 2009/07/24 19:00:34 cryos Exp $ + +*openbabel-2.2.2-r1 (24 Jul 2009) + + 24 Jul 2009; Marcus D. Hanwell <cryos@gentoo.org> + +openbabel-2.2.2-r1.ebuild, metadata.xml: + Added python use flag to optionally build python language bindings. Thanks + to My Th <rei4dan@gmail.com> for suggestions in bug 212212. *openbabel-2.2.2 (18 Jul 2009) diff --git a/sci-chemistry/openbabel/metadata.xml b/sci-chemistry/openbabel/metadata.xml index d0238ddefc03..dd056d677694 100644 --- a/sci-chemistry/openbabel/metadata.xml +++ b/sci-chemistry/openbabel/metadata.xml @@ -8,4 +8,7 @@ search, convert, analyze, or store data from molecular modeling, chemistry, solid-state materials, biochemistry, or related areas. </longdescription> + <use> + <flag name="swig">Use swig to rebuild language bindings.</flag> + </use> </pkgmetadata> diff --git a/sci-chemistry/openbabel/openbabel-2.2.2-r1.ebuild b/sci-chemistry/openbabel/openbabel-2.2.2-r1.ebuild new file mode 100644 index 000000000000..0f0edbfc2653 --- /dev/null +++ b/sci-chemistry/openbabel/openbabel-2.2.2-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel/openbabel-2.2.2-r1.ebuild,v 1.1 2009/07/24 19:00:34 cryos Exp $ + +EAPI=1 + +inherit eutils + +DESCRIPTION="interconverts file formats used in molecular modeling" +HOMEPAGE="http://openbabel.sourceforge.net/" +SRC_URI="mirror://sourceforge/openbabel/${P}.tar.gz" + +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +SLOT="0" +LICENSE="GPL-2" +IUSE="doc python swig" + +RDEPEND="!sci-chemistry/babel + >=dev-libs/libxml2-2.6.5 + sys-libs/zlib + python? ( dev-lang/python )" + +DEPEND="${RDEPEND} + >=dev-libs/boost-1.35.0 + dev-lang/perl + python? ( swig? ( >=dev-lang/swig-1.3.38 ) ) + doc? ( app-doc/doxygen )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${PN}-2.2.0-doxyfile.patch" +} + +src_compile() { + local swigconf="" + if use swig; then + swigconf="--enable-maintainer-mode" + fi + econf ${swigconf} || die "econf failed" + emake || die "emake failed" + if use doc ; then + emake docs || die "make docs failed" + fi + if use swig; then + emake scripts/python/openbabel_python.cpp \ + || die "Failed to make SWIG python bindings" + fi + if use python; then + cd "${S}/scripts/python" + python setup.py build || die "Python build failed." + fi +} + +src_test() { + emake check || die "make check failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + # Now to install the Python bindings if necessary + if use python; then + cd "${S}/scripts/python" + python ./setup.py install --root="${D}" --optimize=1 \ + || die "Python bindings install failed" + if use doc; then + docinto python + dodoc README + docinto python/html + dodoc *.html + fi + fi + # And the documentation + docinto + cd "${S}" + dodoc AUTHORS ChangeLog NEWS README THANKS + cd doc + dohtml *.html *.png + dodoc *.inc README* *.inc *.mol2 + if use doc ; then + dodir /usr/share/doc/${PF}/API/html + insinto /usr/share/doc/${PF}/API/html + cd API/html + doins * + fi +} |