1 # Copyright 1999-2008 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; also includes the ddm library"
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 sqlite xulrunner"
19 RDEPEND=">=dev-libs/glib-2.6
20 >=dev-libs/dbus-glib-0.71
21 >=dev-libs/libpcre-6.3
23 >=gnome-base/gnome-desktop-2.10
24 >=gnome-base/gnome-vfs-2
25 >=net-libs/loudmouth-1.2.2
26 >=net-misc/curl-7.13.1
29 x11-libs/libXScrnSaver
31 firefox? ( !xulrunner? (
32 >=www-client/mozilla-firefox-1.5 <www-client/mozilla-firefox-2.0.1 ) )
33 sqlite? ( >=dev-db/sqlite-3.3 )
34 xulrunner? ( net-libs/xulrunner )"
36 DEPEND=">=dev-util/pkgconfig-0.19
40 FIREDIRS="/usr/$(get_libdir)/mozilla-firefox"
45 # configure looks in the wrong place for xpidl
46 sed -e 's:bin/xpidl:xpidl:' -i configure.ac
47 epatch "${FILESDIR}/${PN}-1.1.42-libxpcom.patch" || die "epatch failed"
48 epatch "${FILESDIR}/${PN}-1.1.56-use-firefox.patch" || die "epatch failed"
50 if use firefox || use xulrunner ; then
51 G2CONF="--enable-firefox"
52 if use xulrunner ; then
53 G2CONF="${G2CONF} --with-gecko-sdk=/usr/$(get_libdir)/xulrunner"
55 G2CONF="${G2CONF} --with-gecko-sdk=/usr/$(get_libdir)/mozilla-firefox"
57 sed -e "s:GET_LIBDIR:$(get_libdir):" \
58 "${FILESDIR}/${P}-firefox-update.sh" > "${S}/firefox-update.sh"
59 # support mozilla-firefox-bin if we are compiling for x86
60 if [ "${ARCH}" = "x86" -o "${ABI}" = "x86" ] ; then
61 FIREDIRS="${FIREDIRS} /opt/firefox"
63 sed -e "s:FIREDIRS:${FIREDIRS}:" -i "${S}/firefox-update.sh"
65 G2CONF="--disable-firefox"
67 # external hippo-canvas seems to be deprecated now?
68 G2CONF="${G2CONF} $(use_with sqlite) --with-included-canvas"
74 # this replaces the broken pkg_prerm logic we had before, which removed the
75 # firefox extensions on every upgrade.
76 if use firefox || use xulrunner ; then
77 einfo "Installing firefox extension."
78 for d in ${FIREDIRS} ; do
79 if [ -e "$d/firefox-bin" -a -d "$d/extensions" ] ; then
80 dosym "/usr/$(get_libdir)/mugshot/firefox" "${d}/extensions/firefox@mugshot.org"
89 if use firefox || use xulrunner ; then
90 # pkg_prerm logic was broken in older ebuilds
92 elog "If you are upgrading from <net-misc/mugshot-1.1.58 please run"
93 elog " /usr/share/firefox-update.sh install"
94 elog "to properly install the firefox extension."
96 elog "Please restart firefox in order to use the mugshot extension."
99 elog "net-misc/mugshot does not (yet) support logging in via mozilla-firefox-3"
100 elog "If you use firefox 3, try logging into mugshot.org using epiphany."