# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils qt3 DESCRIPTION="A Linux GUI for the iRiver iFP flash portable player based on QT" HOMEPAGE="http://ifpgui.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="doc" RDEPEND=">=media-libs/libifp-1.0.0.2 $(qt_min_version 3.3) >=dev-libs/libusb-0.1.7" DEPEND="${RDEPEND} >=sys-apps/sed-4 doc? ( >=app-doc/doxygen-1.3.7 )" src_unpack() { unpack ${A} cd ${S} # for common problems with non-standard PORTAGE_TMPDIR epatch ${FILESDIR}/${PN}-config_no_fixpath.patch # some Doxyfile improvements epatch ${FILESDIR}/${PN}-doxyfile_fixes.patch sed -i -e '/PROJECT_NUMBER/ s/[0..9].*$/'${PV}'/' \ -e '/OUTPUT/ s/\/home.*$/\.\/doc/' Doxyfile use doc && mkdir doc # we want to use system libifp rm -rf src/libifp src/ifp.h epatch ${FILESDIR}/${PN}-use_system_libifp.patch # change path to translation files epatch ${FILESDIR}/${PN}-translation_files_directory.patch } src_compile() { cd ${S}/src ${QTDIR}/bin/qmake src.pro \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_RPATH= \ || die "qmake src.pro failed" cd ${S} ${QTDIR}/bin/qmake ${PN}.pro \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_RPATH= \ || die "qmake ${PN}.pro failed" emake || die "emake failed" use doc && doxygen # make translation files if there are any chosen cd ${S}/src/translations for i in ${LINGUAS}; do if [ -f ${PN}_${i}.ts ]; then ${QTDIR}/bin/lrelease ${PN}_${i}.ts fi; done; } src_install() { dobin bin/${PN} insinto /usr/share/${PN} doins nonroot.sh dodoc README CHANGELOG if use doc; then cp -ar doc/* ${D}/usr/share/doc/${PF} fi; # install translation files cd ${S}/src/translations insinto /usr/share/${PN}/i18n for i in ${LINGUAS}; do if [ -f ${PN}_${i}.qm ]; then doins ${PN}_${i}.qm fi; done; # desktop file and icon domenu ${FILESDIR}/${PN}.desktop doicon ${FILESDIR}/${PN}.png } pkg_postinst() { echo ewarn "If you want to use ifp_gui without root-privileges, you should run " ewarn "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" ewarn "or" ewarn "/usr/share/${PN}/nonroot.sh" ewarn "to add approprate rules to your hotplug scripts" echo } pkg_config() { ${ROOT}/usr/share/${PN}/nonroot.sh || die "config failed" }