]> Pileus Git - ~andy/sunrise/blob - net-misc/mugshot/mugshot-1.1.58.ebuild
sunrise/x11-libs/pdcurses/pdcurses-2.8.ebuild: drop some unneeded WANT_AUTO* and...
[~andy/sunrise] / net-misc / mugshot / mugshot-1.1.58.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 GCONF_DEBUG="no"
6 SCROLLKEEPER_UPDATE="no"
7
8 inherit autotools eutils gnome2 multilib
9
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"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="firefox sqlite xulrunner"
18
19 RDEPEND=">=dev-libs/glib-2.6
20         >=dev-libs/dbus-glib-0.71
21         >=dev-libs/libpcre-6.3
22         media-libs/jpeg
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
27         x11-libs/cairo
28         >=x11-libs/gtk+-2.6
29         x11-libs/libXScrnSaver
30         x11-libs/pango
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 )"
35
36 DEPEND=">=dev-util/pkgconfig-0.19
37         >=gnome-base/gconf-2
38         ${RDEPEND}"
39
40 FIREDIRS="/usr/$(get_libdir)/mozilla-firefox"
41
42 src_unpack() {
43         unpack ${A}
44         cd "${S}"
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"
49         eautoreconf
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"
54                 else
55                         G2CONF="${G2CONF} --with-gecko-sdk=/usr/$(get_libdir)/mozilla-firefox"
56                 fi
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"
62                 fi
63                 sed -e "s:FIREDIRS:${FIREDIRS}:" -i "${S}/firefox-update.sh"
64         else
65                 G2CONF="--disable-firefox"
66         fi
67         # external hippo-canvas seems to be deprecated now?
68         G2CONF="${G2CONF} $(use_with sqlite) --with-included-canvas"
69 }
70
71 src_install() {
72         gnome2_src_install
73
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"
81                         fi
82                 done
83         fi
84 }
85
86 pkg_postinst () {
87         gnome2_pkg_postinst
88
89         if use firefox || use xulrunner ; then
90                 # pkg_prerm logic was broken in older ebuilds
91                 elog
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."
95                 elog
96                 elog "Please restart firefox in order to use the mugshot extension."
97         fi
98         elog
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."
101 }