# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 PYTHON_COMPAT=( python{2_5,2_6,2_7} ) inherit eutils fdo-mime python-single-r1 DESCRIPTION="Advanced Comic Book Format Viewer" HOMEPAGE="https://launchpad.net/acbf" SRC_URI="https://launchpad.net/acbf/trunk/1.0/+download/${P}_linux.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" DEPEND="${PYTHON_DEPS}" RDEPEND="${PYTHON_DEPS} dev-python/imaging dev-python/lxml dev-python/pygtk:2" S=${WORKDIR} src_prepare() { sed -i "s|/usr/share/fonts/truetype|/usr/share/fonts|g" \ src/portability.py || die local pythondir="$(python_get_sitedir)/acbfv" pythondir="${pythondir/\/usr\/}" sed -i -e "s:share/acbfv/src:${pythondir}:g" install.py || die python_fix_shebang src/acbfv.py if [ $PV -ne 0.95] ; then eqawarn "This ebuild contains code for correcting acbfv.desktop " \ "issues that have been dealt with upstream, please trim this " \ "conditional from ${P}.ebuild if you are able." else sed -i 's/Categories=Application;Graphics;Viewer;GTK;/Categories=Graphics;2DGraphics;Viewer;Art;Literature;GTK;/g' acbfv.desktop fi } src_install() { dodir /usr $(python_get_PYTHON) install.py install --no-mime --dir "${D}usr" || die "install.py failed" python_optimize insinto /usr/share/mime/packages doins acbf.xml for size in 16 22 24 32 48; do doicon -s ${size} -c mimetypes images/${size}x${size}/application-x-acbf.png done } pkg_postrm() { fdo-mime_desktop_database_update }