blob: b751493dd35edd697f0211ac51442f47e910197f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Python bindings for OpenBabel (including Pybel)"
HOMEPAGE="http://openbabel.sourceforge.net/"
SRC_URI="mirror://sourceforge/openbabel/openbabel-${PV}.tar.gz"
KEYWORDS="~amd64"
SLOT="0"
LICENSE="GPL-2"
IUSE="swig"
RDEPEND="~sci-chemistry/openbabel-${PV}
dev-lang/python
dev-python/imaging
sci-libs/oasa"
DEPEND="${RDEPEND}
swig? ( >=dev-lang/swig-1.3.38 )"
S="${WORKDIR}/openbabel-${PV}"
src_compile() {
econf \
$(use_enable swig maintainer-mode) \
--enable-static \
|| die "econf failed"
if use swig ; then
cd "${S}/scripts"
emake -W openbabel-python.i python/openbabel_python.cpp \
|| die "Failed to make SWIG python bindings"
fi
cd "${S}/scripts/python"
python ./setup.py build || die "python setup build failed"
}
src_install() {
python ./setup.py install --root="${D}" --optimize=1 \
|| die "python setup install failed"
dohtml *.html
dodoc README
}
|