# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 PYTHON_COMPAT=( python2_{6,7} ) inherit eutils fdo-mime gnome2-utils python-single-r1 waf-utils DESCRIPTION="Kupfer, a convenient command and access tool" HOMEPAGE="http://engla.github.io/kupfer/" MY_P="${PN}-v${PV}" SRC_URI="mirror://github/engla/${PN}/${MY_P}.tar.xz" # plugins have diferent licenses LICENSE="Apache-2.0 GPL-2 GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="gnome gnome-keyring +keybinder doc nautilus" COMMON_DEPEND="${PYTHON_DEPS} dev-python/pygtk:2[${PYTHON_USEDEP}] dev-python/pyxdg[${PYTHON_USEDEP}] dev-python/dbus-python[${PYTHON_USEDEP}] dev-python/pygobject:2[${PYTHON_USEDEP}] gnome? ( dev-python/libgnome-python ) gnome-keyring? ( dev-python/gnome-keyring-python )" DEPEND="${COMMON_DEPEND} dev-python/docutils doc? ( app-text/gnome-doc-utils ) dev-util/intltool" RDEPEND="${COMMON_DEPEND} keybinder? ( dev-libs/keybinder[python] ) nautilus? ( gnome-base/nautilus )" S=${WORKDIR}/${MY_P} # the old waf scripts would fail with --verbose # as they'd try to import a module errcheck WAF_VERBOSE="" src_prepare() { # recognise Xfce terminal installation in Gentoo epatch "${FILESDIR}/${PN}-206-xfce4-terminal.patch" if ! use doc; then sed -i -e 's/bld.env\["XML2PO"\]/False/' help/wscript || die fi } src_configure() { local myopts="" use nautilus || myopts="--no-install-nautilus-extension" waf-utils_src_configure --no-update-mime $myopts } src_install() { waf-utils_src_install } pkg_preinst() { gnome2_icon_savelist } pkg_postinst() { fdo-mime_desktop_database_update fdo-mime_mime_database_update gnome2_icon_cache_update elog "Some Kupfer plugins require optional runtime dependencies" elog "check ${HOMEPAGE} for details" elog "e.g. x11-libs/libwnck, dev-python/gdata" } pkg_postrm() { fdo-mime_desktop_database_update fdo-mime_mime_database_update gnome2_icon_cache_update }