Gentoo Archives: gentoo-commits

From: Reinis Danne <rei4dan@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/openbabel-perl/
Date: Thu, 26 Sep 2013 20:27:43
Message-Id: 1380227120.e75ac73b4b32cccf5d834e468e62a2429549d295.rei4dan@gentoo
1 commit: e75ac73b4b32cccf5d834e468e62a2429549d295
2 Author: Reinis Danne <rei4dan <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 26 19:20:39 2013 +0000
4 Commit: Reinis Danne <rei4dan <AT> gmail <DOT> com>
5 CommitDate: Thu Sep 26 20:25:20 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e75ac73b
7
8 Add sci-chemistry/openbabel-perl live ebuild
9
10 ---
11 sci-chemistry/openbabel-perl/ChangeLog | 10 ++++
12 sci-chemistry/openbabel-perl/metadata.xml | 12 ++++
13 .../openbabel-perl/openbabel-perl-9999.ebuild | 64 ++++++++++++++++++++++
14 3 files changed, 86 insertions(+)
15
16 diff --git a/sci-chemistry/openbabel-perl/ChangeLog b/sci-chemistry/openbabel-perl/ChangeLog
17 new file mode 100644
18 index 0000000..14040e1
19 --- /dev/null
20 +++ b/sci-chemistry/openbabel-perl/ChangeLog
21 @@ -0,0 +1,10 @@
22 +# ChangeLog for sci-chemistry/openbabel-perl
23 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
24 +# $Header: $
25 +
26 +*openbabel-perl-9999 (26 Sep 2013)
27 +
28 + 26 Sep 2013; Reinis Danne <rei4dan@×××××.com> +openbabel-perl-9999.ebuild,
29 + +metadata.xml:
30 + Add live ebuild.
31 +
32
33 diff --git a/sci-chemistry/openbabel-perl/metadata.xml b/sci-chemistry/openbabel-perl/metadata.xml
34 new file mode 100644
35 index 0000000..0750562
36 --- /dev/null
37 +++ b/sci-chemistry/openbabel-perl/metadata.xml
38 @@ -0,0 +1,12 @@
39 +<?xml version="1.0" encoding="UTF-8"?>
40 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
41 +<pkgmetadata>
42 + <herd>sci-chemistry</herd>
43 + <longdescription>
44 + Open Babel is a chemical toolbox designed to speak the many languages of
45 + chemical data. It's an open, collaborative project allowing anyone to
46 + search, convert, analyze, or store data from molecular modeling, chemistry,
47 + solid-state materials, biochemistry, or related areas.
48 + This package enables to access Open Babel library from Perl programs.
49 + </longdescription>
50 +</pkgmetadata>
51
52 diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild
53 new file mode 100644
54 index 0000000..2a352a8
55 --- /dev/null
56 +++ b/sci-chemistry/openbabel-perl/openbabel-perl-9999.ebuild
57 @@ -0,0 +1,64 @@
58 +# Copyright 1999-2013 Gentoo Foundation
59 +# Distributed under the terms of the GNU General Public License v2
60 +# $Header: $
61 +
62 +EAPI=5
63 +
64 +inherit cmake-utils eutils git-2 perl-module
65 +
66 +DESCRIPTION="Perl bindings for OpenBabel"
67 +HOMEPAGE="http://openbabel.sourceforge.net/"
68 +EGIT_REPO_URI="https://github.com/openbabel/openbabel.git"
69 +
70 +LICENSE="GPL-2"
71 +SLOT="0"
72 +KEYWORDS=""
73 +IUSE=""
74 +
75 +RDEPEND="
76 + dev-lang/perl
77 + ~sci-chemistry/openbabel-${PV}"
78 +DEPEND="${RDEPEND}
79 + >=dev-util/cmake-2.4.8
80 + >=dev-lang/swig-2"
81 +
82 +S="${WORKDIR}/openbabel-${PV}"
83 +
84 +src_unpack() {
85 + git-2_src_unpack
86 +}
87 +
88 +src_configure() {
89 + perl_set_version
90 + local mycmakeargs="${mycmakeargs}
91 + -DCMAKE_INSTALL_RPATH=
92 + -DBINDINGS_ONLY=ON
93 + -DBABEL_SYSTEM_LIBRARY=${EPREFIX}/usr/$(get_libdir)/libopenbabel.so
94 + -DOB_MODULE_PATH=${EPREFIX}/usr/$(get_libdir)/openbabel/${PV}
95 + -DLIB_INSTALL_DIR=${ED}/${VENDOR_ARCH}
96 + -DPERL_BINDINGS=ON
97 + -DRUN_SWIG=ON"
98 +
99 + cmake-utils_src_configure
100 +}
101 +
102 +src_compile() {
103 + cmake-utils_src_compile bindings_perl
104 +}
105 +
106 +src_test() {
107 + mkdir "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry"
108 + cp \
109 + "${CMAKE_USE_DIR}/scripts/perl/OpenBabel.pm" \
110 + "${CMAKE_BUILD_DIR}/$(get_libdir)/Chemistry/"
111 + for i in "${CMAKE_USE_DIR}"/scripts/perl/t/*
112 + do
113 + einfo "Running test: ${i}"
114 + perl -I"${CMAKE_BUILD_DIR}/$(get_libdir)" "${i}" || die
115 + done
116 +}
117 +
118 +src_install() {
119 + cd "${CMAKE_BUILD_DIR}"
120 + cmake -DCOMPONENT=bindings_perl -P cmake_install.cmake
121 +}