1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 SCROLLKEEPER_UPDATE="no"
8 inherit autotools eutils gnome2 multilib
10 DESCRIPTION="Companion software for mugshot.org"
11 HOMEPAGE="http://www.mugshot.org/"
12 SRC_URI="http://download.mugshot.org/client/sources/linux/${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="firefox xulrunner"
19 RDEPEND=">=dev-libs/glib-2.6
20 >=dev-libs/dbus-glib-0.71
22 >=gnome-extra/desktop-data-model-1.2
23 >=net-misc/curl-7.13.1
27 x11-libs/libXScrnSaver
28 >=x11-libs/hippo-canvas-0.2.30
30 firefox? ( !xulrunner? ( www-client/mozilla-firefox ) )
31 xulrunner? ( net-libs/xulrunner )"
33 DEPEND=">=dev-util/pkgconfig-0.19
37 FIREDIRS="/usr/$(get_libdir)/mozilla-firefox"
42 # configure looks in the wrong place for xpidl
43 sed -e 's:bin/xpidl:xpidl:' -i configure.ac
44 epatch "${FILESDIR}/${PN}-1.1.92-libxpcom.patch"
45 epatch "${FILESDIR}/${PN}-1.1.93-use-firefox.patch"
47 if use firefox || use xulrunner ; then
48 G2CONF="--enable-firefox"
49 if use xulrunner ; then
50 G2CONF="${G2CONF} --with-gecko-sdk=/usr/$(get_libdir)/xulrunner"
52 G2CONF="${G2CONF} --with-gecko-sdk=/usr/$(get_libdir)/mozilla-firefox"
55 # use the correct libdir in the firefox-update.sh script
56 sed -e "s:GET_LIBDIR:$(get_libdir):" \
57 "${FILESDIR}/${PN}-1.1.58-firefox-update.sh" > "${S}/firefox-update.sh"
59 # add support for (32-bit) mozilla-firefox-bin if our profile is
60 # x86 or amd64 with a 32-bit userland
61 if [ "${ARCH}" = "x86" -o "${ABI}" = "x86" ] ; then
62 FIREDIRS="${FIREDIRS} /opt/firefox"
64 sed -e "s:FIREDIRS:${FIREDIRS}:" -i "${S}/firefox-update.sh"
66 G2CONF="--disable-firefox"
73 # this replaces the broken pkg_prerm logic we had before, which removed the
74 # firefox extensions on every upgrade.
75 if use firefox || use xulrunner ; then
76 einfo "Installing firefox extension."
77 for d in ${FIREDIRS} ; do
78 if [ -e "$d/firefox-bin" -a -d "$d/extensions" ] ; then
79 dosym "/usr/$(get_libdir)/mugshot/firefox" "${d}/extensions/firefox@mugshot.org"
88 if use firefox || use xulrunner ; then
89 # pkg_prerm logic was broken in older ebuilds
91 elog "If you are upgrading from <net-misc/mugshot-1.1.58 please run"
92 elog " /usr/share/firefox-update.sh install"
93 elog "to properly install the firefox extension."
95 elog "Please restart firefox in order to use the mugshot extension."