1 |
commit: 23e15c4c2d4ef0352a77c96a7aca963cd621372d |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 29 11:26:27 2019 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 29 11:26:41 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23e15c4c |
7 |
|
8 |
sci-chemistry/openbabel: Fix openmp support, add a desktop file. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/659148 |
11 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
12 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
13 |
|
14 |
sci-chemistry/openbabel/Manifest | 1 + |
15 |
sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild | 101 ++++++++++++++++++++++ |
16 |
2 files changed, 102 insertions(+) |
17 |
|
18 |
diff --git a/sci-chemistry/openbabel/Manifest b/sci-chemistry/openbabel/Manifest |
19 |
index ac268758e8c..b22751d4a86 100644 |
20 |
--- a/sci-chemistry/openbabel/Manifest |
21 |
+++ b/sci-chemistry/openbabel/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST openbabel-2.4.1.tar.gz 11618304 BLAKE2B 8fc051e83add9be6456e281a109bd6bbec282a64ffc83309819f0decbf167b4914fbb7f1966e95e103f268754045b804317f51c79a952ace707c6af2bd320125 SHA512 427e678f0a911bd27b9a8a05e60b6e09f113be4e5dd180daaf80c28d06368e52b57501261755ab3817a8d31f2754db24471fd0ceee706d029386d6f70800e9c6 |
24 |
+DIST openbabel.png 29060 BLAKE2B 8d217d92125cc73462437411dd4e0cc05179cb0934f5ed15a307acc6b549b8ebab250a48a05ef7657f48c6df394f37da9b659de61efb1477b79b573a5b393ad3 SHA512 bbcaaa37663b526c9038ccb9edaf05ccc3ad1a861739a737f05f363098d8402a10b36e341fcc0aca636e809c6c32db99bf987b41719a0c756bf5e31444d3eb70 |
25 |
|
26 |
diff --git a/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild b/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..0834c411ef2 |
29 |
--- /dev/null |
30 |
+++ b/sci-chemistry/openbabel/openbabel-2.4.1-r1.ebuild |
31 |
@@ -0,0 +1,101 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+WX_GTK_VER="3.0" |
37 |
+ |
38 |
+inherit cmake-utils desktop eutils wxwidgets |
39 |
+ |
40 |
+DESCRIPTION="Interconverts file formats used in molecular modeling" |
41 |
+HOMEPAGE="http://openbabel.org/wiki/Main_Page" |
42 |
+SRC_URI=" |
43 |
+ mirror://sourceforge/openbabel/${P}.tar.gz |
44 |
+ https://openbabel.org/docs/dev/_static/babel130.png -> ${PN}.png |
45 |
+" |
46 |
+ |
47 |
+# See src/CMakeLists.txt for LIBRARY_VERSION |
48 |
+SLOT="0/5.0.0" |
49 |
+LICENSE="GPL-2" |
50 |
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
51 |
+IUSE="doc openmp test wxwidgets" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ dev-cpp/eigen:3 |
55 |
+ dev-libs/libxml2:2 |
56 |
+ sci-libs/inchi |
57 |
+ sys-libs/zlib |
58 |
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] ) |
59 |
+" |
60 |
+DEPEND="${RDEPEND}" |
61 |
+BDEPEND=" |
62 |
+ >=dev-util/cmake-2.4.8 |
63 |
+ doc? ( app-doc/doxygen ) |
64 |
+" |
65 |
+ |
66 |
+DOCS=( AUTHORS NEWS.md README.md THANKS doc/dioxin.{inc,mol2} doc/README.{dioxin.pov,povray} ) |
67 |
+ |
68 |
+PATCHES=( |
69 |
+ "${FILESDIR}"/${PN}-2.3.2-gcc-6_and_7-backport.patch |
70 |
+ "${FILESDIR}"/${P}-gcc-8.patch |
71 |
+) |
72 |
+ |
73 |
+pkg_setup() { |
74 |
+ if use openmp; then |
75 |
+ if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then |
76 |
+ ewarn "OpenMP is not available in your current selected gcc" |
77 |
+ die "need openmp capable gcc" |
78 |
+ fi |
79 |
+ FORTRAN_NEED_OPENMP=1 |
80 |
+ fi |
81 |
+} |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ sed \ |
85 |
+ -e '/__GNUC__/s:== 4:>= 4:g' \ |
86 |
+ -i include/openbabel/shared_ptr.h || die |
87 |
+ cmake-utils_src_prepare |
88 |
+} |
89 |
+ |
90 |
+src_configure() { |
91 |
+ use wxwidgets && setup-wxwidgets |
92 |
+ local mycmakeargs=( |
93 |
+ -DOPENBABEL_USE_SYSTEM_INCHI=ON |
94 |
+ -DENABLE_OPENMP=$(usex openmp) |
95 |
+ -DBUILD_GUI=$(usex wxwidgets) |
96 |
+ ) |
97 |
+ |
98 |
+ cmake-utils_src_configure |
99 |
+} |
100 |
+ |
101 |
+src_install() { |
102 |
+ docinto html |
103 |
+ dodoc doc/{*.html,*.png} |
104 |
+ if use doc ; then |
105 |
+ docinto html/API |
106 |
+ dodoc -r doc/API/html/* |
107 |
+ fi |
108 |
+ |
109 |
+ make_desktop_entry obgui "Open Babel" "${PN}" |
110 |
+ doicon "${DISTDIR}/${PN}.png" |
111 |
+ |
112 |
+ cmake-utils_src_install |
113 |
+} |
114 |
+ |
115 |
+src_test() { |
116 |
+ local mycmakeargs=( |
117 |
+ -DOPENBABEL_USE_SYSTEM_INCHI=ON |
118 |
+ -DPYTHON_EXECUTABLE=false |
119 |
+ -DOPENMP=$(usex openmp) |
120 |
+ -DBUILD_GUI=$(usex wxwidgets) |
121 |
+ -DTESTS=$(usex test) |
122 |
+ ) |
123 |
+ |
124 |
+ cmake-utils_src_configure |
125 |
+ cmake-utils_src_compile |
126 |
+ cmake-utils_src_test -E py |
127 |
+} |
128 |
+ |
129 |
+pkg_postinst() { |
130 |
+ optfeature "perl support" sci-chemistry/openbabel-perl |
131 |
+ optfeature "python support" sci-chemistry/openbabel-python |
132 |
+} |