diff options
author | 2011-03-26 15:52:07 +0000 | |
---|---|---|
committer | 2011-03-26 15:52:07 +0000 | |
commit | 4ea8120727f28a26f4aaf01a8deae7575803e7de (patch) | |
tree | 85341386d632aa264b8ae80087d26f2be2953754 /sci-chemistry/openbabel-perl | |
parent | Depend on virtual/ffmpeg instead of media-video/ffmpeg. (diff) | |
download | gentoo-2-4ea8120727f28a26f4aaf01a8deae7575803e7de.tar.gz gentoo-2-4ea8120727f28a26f4aaf01a8deae7575803e7de.tar.bz2 gentoo-2-4ea8120727f28a26f4aaf01a8deae7575803e7de.zip |
Perl Bindings for openbabel, writing by rei4dan, #212212
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/openbabel-perl')
4 files changed, 118 insertions, 0 deletions
diff --git a/sci-chemistry/openbabel-perl/ChangeLog b/sci-chemistry/openbabel-perl/ChangeLog new file mode 100644 index 000000000000..08d09c143f48 --- /dev/null +++ b/sci-chemistry/openbabel-perl/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sci-chemistry/openbabel-perl +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel-perl/ChangeLog,v 1.1 2011/03/26 15:52:07 jlec Exp $ + +*openbabel-perl-2.3.0 (26 Mar 2011) + + 26 Mar 2011; Justin Lecher <jlec@gentoo.org> +openbabel-perl-2.3.0.ebuild, + +files/openbabel-perl-2.3.0-makefile.patch, +metadata.xml: + Perl Bindings for openbabel, writing by rei4dan, #212212 + diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch new file mode 100644 index 000000000000..034b6090777c --- /dev/null +++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.0-makefile.patch @@ -0,0 +1,28 @@ + scripts/CMakeLists.txt | 2 +- + scripts/perl/Makefile.PL | 1 + + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index bf2527b..3c45111 100644 +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -223,7 +223,7 @@ if (DO_PERL_BINDINGS) + COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/Makefile.PL ${openbabel_BINARY_DIR}/scripts/perl + COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/OpenBabel.pm ${openbabel_BINARY_DIR}/scripts/perl + COMMAND ${CMAKE_COMMAND} -E copy ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp ${openbabel_BINARY_DIR}/scripts/perl +- COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL ${PERL_PREFIX_TEXT} ++ COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc SRC_DIR=${openbabel_SOURCE_DIR} OBJ_DIR=${openbabel_BINARY_DIR} ${PERL_EXECUTABLE} ${openbabel_BINARY_DIR}/scripts/perl/Makefile.PL INSTALLDIRS=vendor ${PERL_PREFIX_TEXT} + COMMAND PERL5LIB=${openbabel_SOURCE_DIR}/scripts/perl/inc make + DEPENDS ${openbabel_SOURCE_DIR}/scripts/perl/openbabel-perl.cpp + WORKING_DIRECTORY ${openbabel_BINARY_DIR}/scripts/perl +diff --git a/scripts/perl/Makefile.PL b/scripts/perl/Makefile.PL +index a3a2116..44ad27d 100644 +--- a/scripts/perl/Makefile.PL ++++ b/scripts/perl/Makefile.PL +@@ -32,5 +32,6 @@ WriteMakefile( + 'CC' => $CC, + 'LD' => '$(CC)', + 'INC' => '-I../../include -I'.$cmakesrcdir.'/include', ++ 'DESTDIR' => @ENV{"ED"}, + 'OBJECT' => 'openbabel-perl.o' + ); diff --git a/sci-chemistry/openbabel-perl/metadata.xml b/sci-chemistry/openbabel-perl/metadata.xml new file mode 100644 index 000000000000..78a71057d3ed --- /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> +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> +</pkgmetadata> diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-2.3.0.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.0.ebuild new file mode 100644 index 000000000000..41f94e0ea36c --- /dev/null +++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.0.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/openbabel-perl/openbabel-perl-2.3.0.ebuild,v 1.1 2011/03/26 15:52:07 jlec Exp $ + +EAPI="3" + +inherit cmake-utils eutils perl-module + +DESCRIPTION="Perl bindings for OpenBabel" +HOMEPAGE="http://openbabel.sourceforge.net/" +SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +SLOT="0" +LICENSE="GPL-2" +IUSE="" + +RDEPEND=" + dev-lang/perl + ~sci-chemistry/openbabel-${PV}" +DEPEND="${RDEPEND} + =dev-lang/swig-2.0.1 + dev-util/cmake" + +S="${WORKDIR}/openbabel-${PV}" + +src_prepare() { + epatch "${FILESDIR}/${P}-makefile.patch" +} + +src_configure() { + local mycmakeargs="-DPERL_BINDINGS=ON" + mycmakeargs="${mycmakeargs} + -DRUN_SWIG=ON" + cmake-utils_src_configure +} + +src_compile() { + cd "${WORKDIR}/${P}_build/scripts" + perl-module_src_prep + perl-module_src_compile +} + +src_test() { + cd "${WORKDIR}/${P}_build/scripts" + emake test || die "make test failed" +} + +src_install() { + cd "${WORKDIR}/${P}_build/scripts" + 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 +} |