1 |
commit: 2f0f40fce0d6086339373a4a78cce3615904f619 |
2 |
Author: Reinis Danne <rei4dan <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Sep 24 18:41:59 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=2f0f40fc |
7 |
|
8 |
sci-chemistry/openbabel: Add live ebuild |
9 |
|
10 |
--- |
11 |
sci-chemistry/openbabel/ChangeLog | 10 +++ |
12 |
sci-chemistry/openbabel/metadata.xml | 20 ++++++ |
13 |
sci-chemistry/openbabel/openbabel-9999.ebuild | 87 +++++++++++++++++++++++++++ |
14 |
3 files changed, 117 insertions(+) |
15 |
|
16 |
diff --git a/sci-chemistry/openbabel/ChangeLog b/sci-chemistry/openbabel/ChangeLog |
17 |
new file mode 100644 |
18 |
index 0000000..be72d72 |
19 |
--- /dev/null |
20 |
+++ b/sci-chemistry/openbabel/ChangeLog |
21 |
@@ -0,0 +1,10 @@ |
22 |
+# ChangeLog for sci-chemistry/openbabel |
23 |
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
24 |
+# $Header: $ |
25 |
+ |
26 |
+*openbabel-9999 (24 Sep 2013) |
27 |
+ |
28 |
+ 24 Sep 2013; Reinis Danne <rei4dan@×××××.com> +openbabel-9999.ebuild, |
29 |
+ +metadata.xml: |
30 |
+ Add live ebuild with Java, Perl, Python and Ruby bindings. |
31 |
+ |
32 |
|
33 |
diff --git a/sci-chemistry/openbabel/metadata.xml b/sci-chemistry/openbabel/metadata.xml |
34 |
new file mode 100644 |
35 |
index 0000000..f0fb5ee |
36 |
--- /dev/null |
37 |
+++ b/sci-chemistry/openbabel/metadata.xml |
38 |
@@ -0,0 +1,20 @@ |
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 |
+ </longdescription> |
49 |
+ <use> |
50 |
+ <flag name="doc">Install API dicumentation.</flag> |
51 |
+ <flag name="openmp">Enable parallelization using OpenMP.</flag> |
52 |
+ <flag name="java">Install Java bindings.</flag> |
53 |
+ <flag name="perl">Install Perl bindings.</flag> |
54 |
+ <flag name="python">Install Python bindings and PyBel.</flag> |
55 |
+ <flag name="ruby">Install Ruby bindings.</flag> |
56 |
+ <flag name="wxwidgets">Build Open Babel GUI.</flag> |
57 |
+ </use> |
58 |
+</pkgmetadata> |
59 |
|
60 |
diff --git a/sci-chemistry/openbabel/openbabel-9999.ebuild b/sci-chemistry/openbabel/openbabel-9999.ebuild |
61 |
new file mode 100644 |
62 |
index 0000000..d57d78d |
63 |
--- /dev/null |
64 |
+++ b/sci-chemistry/openbabel/openbabel-9999.ebuild |
65 |
@@ -0,0 +1,87 @@ |
66 |
+# Copyright 1999-2013 Gentoo Foundation |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+# $Header: $ |
69 |
+ |
70 |
+EAPI=5 |
71 |
+ |
72 |
+WX_GTK_VER="2.8" |
73 |
+ |
74 |
+inherit cmake-utils eutils git-2 wxwidgets |
75 |
+ |
76 |
+DESCRIPTION="Interconverts file formats used in molecular modeling" |
77 |
+HOMEPAGE="http://openbabel.sourceforge.net/" |
78 |
+EGIT_REPO_URI="https://github.com/openbabel/openbabel.git" |
79 |
+ |
80 |
+LICENSE="GPL-2" |
81 |
+SLOT="0" |
82 |
+KEYWORDS="" |
83 |
+IUSE="doc java openmp perl python ruby test wxwidgets" |
84 |
+ |
85 |
+RDEPEND=" |
86 |
+ dev-cpp/eigen |
87 |
+ dev-libs/libxml2:2 |
88 |
+ !sci-chemistry/babel |
89 |
+ sci-libs/inchi |
90 |
+ sys-libs/zlib |
91 |
+ wxwidgets? ( x11-libs/wxGTK:2.8[X] )" |
92 |
+DEPEND="${RDEPEND} |
93 |
+ >=dev-util/cmake-2.4.8 |
94 |
+ doc? ( app-doc/doxygen )" |
95 |
+PDEPEND=" |
96 |
+ java? ( sci-chemistry/openbabel-java ) |
97 |
+ perl? ( sci-chemistry/openbabel-perl ) |
98 |
+ python? ( sci-chemistry/openbabel-python ) |
99 |
+ ruby? ( sci-chemistry/openbabel-ruby )" |
100 |
+ |
101 |
+DOCS="AUTHORS ChangeLog NEWS README THANKS doc/*.inc doc/README* doc/*.mol2" |
102 |
+ |
103 |
+pkg_setup() { |
104 |
+ if use openmp; then |
105 |
+ if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then |
106 |
+ ewarn "OpenMP is not available in your current selected gcc" |
107 |
+ die "need openmp capable gcc" |
108 |
+ fi |
109 |
+ FORTRAN_NEED_OPENMP=1 |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_configure() { |
114 |
+ local mycmakeargs="" |
115 |
+ mycmakeargs="${mycmakeargs} |
116 |
+ -DOPENBABEL_USE_SYSTEM_INCHI=ON |
117 |
+ $(cmake-utils_use_enable openmp OPENMP) |
118 |
+ $(cmake-utils_use wxwidgets BUILD_GUI)" |
119 |
+ |
120 |
+ cmake-utils_src_configure |
121 |
+} |
122 |
+ |
123 |
+src_test() { |
124 |
+ local mycmakeargs="" |
125 |
+ mycmakeargs="${mycmakeargs} |
126 |
+ -DOPENBABEL_USE_SYSTEM_INCHI=ON |
127 |
+ -DPYTHON_EXECUTABLE=false |
128 |
+ $(cmake-utils_use wxwidgets BUILD_GUI) |
129 |
+ $(cmake-utils_use_enable openmp OPENMP) |
130 |
+ $(cmake-utils_use_enable test TESTS)" |
131 |
+ |
132 |
+ cmake-utils_src_configure |
133 |
+ cmake-utils_src_compile |
134 |
+ cmake-utils_src_test -E py |
135 |
+} |
136 |
+ |
137 |
+src_install() { |
138 |
+ dohtml doc/{*.html,*.png} |
139 |
+ if use doc ; then |
140 |
+ insinto /usr/share/doc/${PF}/API/html |
141 |
+ doins doc/API/html/* |
142 |
+ fi |
143 |
+ cmake-utils_src_install |
144 |
+ |
145 |
+ # Ensure that modules are allways in openbabel/${PV} |
146 |
+ pushd "${ED}/usr/$(get_libdir)/openbabel" |
147 |
+ ver=$(ls -d * | grep -E '([0-9]+[.]){2}[0-9]+') |
148 |
+ if [ "${ver}" != "${PV}" ] ; then |
149 |
+ ln -s ${ver} ${PV} |
150 |
+ fi |
151 |
+ popd |
152 |
+} |