--- /usr/portage/sci-chemistry/openbabel/openbabel-2.2.0.ebuild 2008-11-02 09:07:07.000000000 +0100 +++ /usr/portage/sci-chemistry/openbabel/openbabel-2.2.0.ebuild 2008-12-15 11:24:35.212343668 +0100 @@ -11,16 +11,47 @@ KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" SLOT="0" LICENSE="GPL-2" -IUSE="" +IUSE="doc pic python static zlib" +EAPI="1" RDEPEND="!sci-chemistry/babel - dev-libs/libxml2" + >=dev-libs/libxml2-2.6.5 + python? ( dev-lang/python ) + zlib? ( sys-libs/zlib )" + DEPEND="${RDEPEND} dev-libs/boost - dev-lang/perl" + dev-lang/perl + python? ( dev-lang/swig ) + doc? ( app-doc/doxygen )" + +src_compile() { + local myconf="" + if use python; then myconf="$myconf --enable-maintainer-mode"; fi + myconf="${myconf} $(use_with pic)" + myconf="${myconf} $(use_enable static)" + # wxwidgets interface works only with Windows + myconf="${myconf} --disable-wx-gui" + myconf="${myconf} $(use_with zlib)" + + econf ${myconf} || die "econf failed" + emake || die "emake failed" + + if use python; then + pushd scripts/python > /dev/null + python setup.py build || die "build python failed" + popd > /dev/null + fi +} src_install() { - emake DESTDIR="${D}" install || die "make install failed." + emake DESTDIR="${D}" install || die "make install failed" + if use python; then + pushd scripts/python > /dev/null + python setup.py install --root="${D}" --optimize=1 || \ + die "install python failed" + popd > /dev/null + fi dodoc AUTHORS ChangeLog NEWS README THANKS cd doc dohtml *.html *.png