# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit gnome2 autotools MY_P="gnome-chemistry-utils-${PV}" DESCRIPTION="C++ classes and Gtk+-2 widgets related to chemistry" HOMEPAGE="http://www.nongnu.org/gchemutils/" SRC_URI="http://savannah.nongnu.org/download/gchemutils/{PV%.*}/${MY_P}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="nls nsplugin" RDEPEND="gnome-base/libglade x11-libs/goffice x11-libs/gtkglext app-text/gnome-doc-utils >=sci-chemistry/openbabel-2.1.1 sci-chemistry/bodr sci-chemistry/chemical-mime-data nsplugin? ( || ( net-libs/xulrunner www-client/mozilla-firefox www-client/seamonkey ) )" DEPEND="${RDEPEND} dev-util/pkgconfig" S=${WORKDIR}/${MY_P} pkg_setup() { if ! built_with_use x11-libs/goffice gnome ; then eerror "Please rebuild x11-libs/goffice with gnome support enabled." eerror "This needs gnome-extra/libgsf to be built with gnome support." eerror "echo \"x11-libs/goffice gnome\" >> /etc/portage/package.use" eerror "and" eerror "echo \"gnome-extra/libgsf gnome\" >> /etc/portage/package.use." eerror "or add \"gnome\" to your USE string in /etc/make.conf" die "No Gnome support found in goffice." fi } src_unpack() { gnome2_src_unpack eautoreconf } src_compile() { gnome2_src_compile --disable-update-databases \ --docdir=/usr/share/doc/${PN}/html \ $(use_enable nls) \ $(use_enable nsplugin mozilla-plugin) } src_install() { gnome2_src_install if use nsplugin ; then dodir /usr/$(get_libdir)/nsbrowser/plugins mv "${D}"/plugins/* "${D}"/usr/$(get_libdir)/nsbrowser/plugins/ rmdir "${D}"/plugins fi } pkg_postinst() { elog "You can safely ignore any 'Unknown media type in type blah' warnings above." elog "For more info see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420795 " }