# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 PYTHON_COMPAT=( python2_7 ) #PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) inherit eutils gnome2-utils distutils-r1 DESCRIPTION="Utility to parse the contents of elogs created by Portage" HOMEPAGE="http://sourceforge.net/projects/elogviewer/" SRC_URI="mirror://sourceforge/elogviewer/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" #KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" IUSE="gtk qt4" REQUIRED_USE="|| ( gtk qt4 )" DEPEND="" RDEPEND="${DEPEND} sys-apps/portage gtk? ( dev-python/pygtk gnome-base/librsvg ) qt4? ( dev-python/PyQt4 )" PATCHES=( "${FILESDIR}"/fix-path-in-setup.patch ) src_install () { distutils-r1_src_install newicon -s scalable \ libelogviewer/rsc/scalable/utilities-log-viewer.svg ${PN}.svg if use gtk; then make_wrapper "${PN}" "${PN}.py --gtk" make_desktop_entry "${PN}" Elogviewer "${PN}" System fi if use qt4; then make_wrapper "k${PN}" "${PN}.py --qt" make_desktop_entry "k${PN}" Kelogviewer "${PN}" System fi } pkg_preinst() { gnome2_icon_savelist } pkg_postinst() { gnome2_icon_cache_update if ! has_version ${CATEGORY}/${PN}; then einfo "In order to use this software, you need to activate" einfo "Portage's elog features. Required is" einfo " PORTAGE_ELOG_SYSTEM=\"save\" " einfo "and at least one out of " einfo " PORTAGE_ELOG_CLASSES=\"warn error info log qa\"" einfo "More information on the elog system can be found" einfo "in /etc/make.conf.example" einfo einfo "To operate properly this software needs the directory" einfo "${PORT_LOGDIR:-/var/log/portage}/elog created, belonging to group portage." einfo "To start the software as a user, add yourself to the portage" einfo "group." fi } pkg_postrm() { gnome2_icon_cache_update }