# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" PYTHON_DEPEND="2:2.5" PYTHON_USE_WITH="sqlite" inherit distutils python if [[ ${PV} == "9999" ]] ; then inherit git KEYWORDS="~x86 ~amd64 ~amd64-linux ~x86-linux" EGIT_REPO_URI="git://repo.or.cz/gpodder.git" else KEYWORDS="x86 amd64 amd64-linux x86-linux" SRC_URI="mirror://berlios/${PN}/${P}.tar.gz" fi DESCRIPTION="gPodder is a Podcast receiver/catcher written in Python, using GTK." HOMEPAGE="http://www.gpodder.org" LICENSE="GPL-3" SLOT="0" IUSE="bluetooth dbus examples gtkhtml ipod libnotify mad mtp nls ogg rockbox webkit linguas_cs linguas_da linguas_de linguas_el linguas_es linguas_fi linguas_fr linguas_gl linguas_he linguas_it linguas_kk linguas_nb linguas_nl linguas_nn linguas_pl linguas_pt_BR linguas_pt linguas_ro linguas_ru linguas_sv linguas_uk" RDEPEND="dev-python/feedparser dev-python/pygtk dev-python/mygpoclient bluetooth? ( net-wireless/gnome-bluetooth ) dbus? ( dev-python/dbus-python ) ipod? ( media-libs/libgpod[python] || ( mad? ( dev-python/pymad ) dev-python/eyeD3 ) ) mtp? ( dev-python/pymtp ) ogg? ( media-sound/vorbis-tools ) libnotify? ( dev-python/notify-python ) rockbox? ( dev-python/imaging ) gtkhtml? ( dev-python/gtkhtml-python ) webkit? ( dev-python/pywebkitgtk )" DEPEND="${RDEPEND} dev-util/intltool sys-apps/help2man dev-python/setuptools" RESTRICT="test nomirror" pkg_setup() { python_set_active_version 2 python_pkg_setup } src_prepare() { if use nls ; then # USE=nls has no real meaning if LINGUAS isn't set if [ -z "${LINGUAS}" ]; then ewarn "you must set LINGUAS in /etc/make.conf" ewarn "if you want to USE=nls" die "please either set LINGUAS or do not use nls" fi # Removing unnecessary languages for l in $(find data/po -name '*.po' -exec basename {} .po ';'); do if [[ ! "${LINGUAS}" =~ $l ]] ; then rm -f data/po/$l.po ; fi done # Update translations only when using live ebuild if [[ ${PV} == "9999" ]] ; then emake messages else emake -C data/po fi fi emake data/org.gpodder.service } src_install() { distutils_src_install if use examples ; then insinto /usr/share/doc/${PF}/scripts doins doc/dev/convert/* doins doc/dev/examples/* elog "Example scripts to use with gPodder can be found in:" elog " /usr/share/doc/${PF}/scripts" fi }