blob: 49c06a8d17301dbe8e84feaf4fd70a22b32c5774 (
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
47
48
49
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Ruby bindings for OpenBabel"
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/ruby"
DEPEND="${RDEPEND}
swig? ( >=dev-lang/swig-1.3.39 )"
src_unpack() {
unpack ${A}
S="${WORKDIR}/openbabel-${PV}"
cd "${S}"
econf \
$(use_enable swig maintainer-mode) \
--enable-static \
|| die "econf failed"
S="${S}/scripts"
cd "${S}"
if use swig ; then
emake -W openbabel-ruby.i ruby/openbabel_ruby.cpp \
|| die "Failed to make SWIG ruby bindings"
fi
S="${S}/ruby"
cd "${S}"
}
src_compile() {
ruby ./extconf.rb || die "ruby setup config failed"
emake || die "ruby setup make failed"
}
src_install() {
emake DESTDIR="${D}" install || die "ruby setup make install failed"
dodoc README
}
|