diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild')
-rw-r--r-- | sci-chemistry/openbabel-perl/openbabel-perl-2.4.1.ebuild | 70 |
1 files changed, 70 insertions, 0 deletions
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..1e01e9007b7b --- /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 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 +} |