# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit autotools eutils mercurial multilib subversion DESCRIPTION="A community branch of Songbird media player" HOMEPAGE="http://getnightingale.org/" EHG_REPO_URI="http://code.getnightingale.org/nightingale/trunk" #SRC_URI="${PN}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="bindist debug test" COMMON_DEPENS=" dev-libs/dbus-glib dev-libs/glib:2 media-libs/gstreamer =net-libs/xulrunner-1.9.2* sys-apps/hal x11-libs/gtk+:2 || ( www-client/firefox-bin www-client/mozilla-firefox )" DEPEND="${COMMON_DEPEND} app-arch/unzip app-arch/zip app-doc/doxygen dev-lang/perl dev-lang/python" RDEPEND="${COMMON_DEPEND}" S=${WORKDIR}/trunk src_unpack() { unpack ${A} || die local my_arch=$(use amd64 && echo x86_64)$(use x86 && echo i686) subversion_fetch \ http://publicsvn.songbirdnest.com/vendor-binaries/trunk/linux-${my_arch}/mozilla/release/scripts \ scripts } src_prepare() { epatch ${FILESDIR}/${PN}-dependencies.patch eautoreconf mkdir -p compiled ln -s ../configure compiled } src_configure () { cd compiled econf \ $(use_enable debug) \ $(use_enable bindist official) \ $(use_enable test tests) \ --with-media-core=gstreamer-system \ || die } src_compile() { if has_version www-client/mozilla-firefox ; then export my_js="/usr/$(get_libdir)/mozilla-firefox/modules/distribution.js" elif has_version www-client/firefox-bin ; then export my_js="/opt/firefox/modules/distribution.js" fi emake \ MOZSDK_SCRIPTS_DIR="${S}/scripts" \ MOZBROWSER_DIR=/var/tmp \ MOZSDK_DIR=/usr/$(get_libdir)/xulrunner-devel-1.9.2 \ SB_MOZILLA_VERSION=1.9.2 \ CPP_DEFAULT_INCLUDES="$(pkg-config --cflags-only-I libxul | sed -e 's:-I::g')" \ -C compiled } src_install() { emake DESTDIR="${D}" -C compiled install }