1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # mozconfig.eclass: the new mozilla.eclass
7 inherit multilib flag-o-matic mozcoreconf-2
9 # use-flags common among all mozilla ebuilds
10 IUSE="+alsa +dbus debug libnotify startup-notification system-sqlite wifi"
12 # XXX: GConf is used for setting the default browser
13 # revisit to make it optional with GNOME 3
14 # pango[X] is needed for pangoxft.h
15 # freedesktop-icon-theme is needed for bug 341697
18 >=app-text/hunspell-1.2
20 >=dev-libs/libevent-1.4.7
21 >=x11-libs/cairo-1.8[X]
22 >=x11-libs/gtk+-2.8.6:2
23 >=x11-libs/pango-1.10.1[X]
25 alsa? ( media-libs/alsa-lib )
26 virtual/freedesktop-icon-theme
27 dbus? ( >=dev-libs/dbus-glib-0.72 )
28 libnotify? ( >=x11-libs/libnotify-0.4 )
29 startup-notification? ( >=x11-libs/startup-notification-0.8 )
30 wifi? ( net-wireless/wireless-tools )"
34 mozconfig_annotate '' --enable-default-toolkit=cairo-gtk2
36 if has bindist ${IUSE}; then
37 mozconfig_use_enable !bindist official-branding
38 if [[ ${PN} == firefox ]] && use bindist ; then
39 mozconfig_annotate '' --with-branding=browser/branding/aurora
43 if ! $(mozversion_is_new_enough) ; then
44 mozconfig_use_enable alsa ogg
45 mozconfig_use_enable alsa wave
46 mozconfig_use_enable libnotify
47 mozconfig_use_enable debug debugger-info-modules
48 if has +ipc ${IUSE}; then
49 mozconfig_use_enable ipc
51 if [[ ${PN} != thunderbird ]] ; then
52 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
53 mozconfig_annotate '' --enable-oji --enable-mathml
54 mozconfig_annotate 'broken' --disable-mochitest
56 if use system-sqlite; then
57 mozconfig_annotate '' --with-sqlite-prefix="${EPREFIX}"/usr
59 if use amd64 || use x86 || use arm || use sparc; then
60 mozconfig_annotate '' --enable-tracejit
64 mozconfig_use_enable dbus
65 mozconfig_use_enable debug
66 mozconfig_use_enable debug tests
68 mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
70 mozconfig_use_enable startup-notification
71 mozconfig_use_enable system-sqlite
72 mozconfig_use_enable wifi necko-wifi
74 if $(mozversion_is_new_enough) ; then
75 mozconfig_annotate 'required' --enable-ogg
76 mozconfig_annotate 'required' --enable-wave
77 mozconfig_annotate 'required' --with-system-libvpx
78 elif has +webm ${IUSE} && use webm; then
80 echo "Enabling alsa support due to webm request"
81 mozconfig_annotate '+webm -alsa' --enable-ogg
82 mozconfig_annotate '+webm -alsa' --enable-wave
83 mozconfig_annotate '+webm' --enable-webm
84 mozconfig_annotate '+webm' --with-system-libvpx
86 mozconfig_use_enable webm
87 mozconfig_annotate '+webm' --with-system-libvpx
90 mozconfig_annotate '' --disable-webm
91 mozconfig_annotate '' --disable-system-libvpx
94 # These are enabled by default in all mozilla applications
95 mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
96 mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
97 mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
98 mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr
99 mozconfig_annotate '' --enable-system-hunspell
100 mozconfig_annotate '' --disable-gnomevfs
101 mozconfig_annotate '' --disable-gnomeui
102 mozconfig_annotate '' --enable-gio
103 mozconfig_annotate '' --disable-crashreporter