/[gentoo-x86]/eclass/mozconfig-v6.39.eclass
Gentoo

Contents of /eclass/mozconfig-v6.39.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Jul 17 18:25:45 2015 UTC (3 years, 3 months ago) by axs
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +5 -6 lines
ChangeLog

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig-v6.39.eclass,v 1.3 2015/07/17 17:34:54 axs Exp $
4 #
5 # @ECLASS: mozconfig-v5.33.eclass
6 # @MAINTAINER:
7 # mozilla team <mozilla@gentoo.org>
8 # @BLURB: the new mozilla common configuration eclass for FF33 and newer, v5
9 # @DESCRIPTION:
10 # This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey)
11 # to provide a single common place for the common mozilla engine compoments.
12 #
13 # The eclass provides all common dependencies as well as common use flags.
14 #
15 # Some use flags which may be optional in particular mozilla packages can be
16 # supported through setting eclass variables.
17 #
18 # This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3,
19 # and so ebuilds inheriting this eclass do not need to inherit that.
20
21 inherit multilib flag-o-matic toolchain-funcs mozcoreconf-v3
22
23 case ${EAPI} in
24 0|1|2|3|4) die "EAPI=${EAPI} not supported"
25 esac
26
27 # @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI
28 # @DESCRIPTION:
29 # Set this variable before the inherit line, when an ebuild needs to provide
30 # optional necko-wifi support via IUSE="wifi". Currently this would include
31 # ebuilds for firefox, and potentially seamonkey.
32 #
33 # Leave the variable UNSET if necko-wifi support should not be available.
34 # Set the variable to "enabled" if the use flag should be enabled by default.
35 # Set the variable to any value if the use flag should exist but not be default-enabled.
36
37 # @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT
38 # @DESCRIPTION:
39 # Set this variable before the inherit line, when an ebuild needs to provide
40 # optional necko-wifi support via IUSE="jit". Currently this would include
41 # ebuilds for firefox, and potentially seamonkey.
42 #
43 # Leave the variable UNSET if optional jit support should not be available.
44 # Set the variable to "enabled" if the use flag should be enabled by default.
45 # Set the variable to any value if the use flag should exist but not be default-enabled.
46
47 # use-flags common among all mozilla ebuilds
48 IUSE="${IUSE} dbus debug gstreamer gstreamer-0 +jemalloc3 pulseaudio selinux startup-notification system-cairo system-icu system-jpeg system-sqlite system-libvpx"
49
50 # some notes on deps:
51 # gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14
52 # media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau
53
54 RDEPEND=">=app-text/hunspell-1.2
55 dev-libs/atk
56 dev-libs/expat
57 >=dev-libs/libevent-1.4.7
58 >=x11-libs/cairo-1.10[X]
59 >=x11-libs/gtk+-2.18:2
60 x11-libs/gdk-pixbuf
61 >=x11-libs/pango-1.22.0
62 >=media-libs/libpng-1.6.16:0=[apng]
63 >=media-libs/mesa-10.2:*
64 media-libs/fontconfig
65 >=media-libs/freetype-2.4.10
66 kernel_linux? ( media-libs/alsa-lib )
67 pulseaudio? ( media-sound/pulseaudio )
68 virtual/freedesktop-icon-theme
69 dbus? ( >=sys-apps/dbus-0.60
70 >=dev-libs/dbus-glib-0.72 )
71 startup-notification? ( >=x11-libs/startup-notification-0.8 )
72 >=dev-libs/glib-2.26:2
73 >=sys-libs/zlib-1.2.3
74 >=virtual/libffi-3.0.10
75 gstreamer? (
76 >=media-libs/gstreamer-1.4.5:1.0
77 >=media-libs/gst-plugins-base-1.4.5:1.0
78 >=media-libs/gst-plugins-good-1.4.5:1.0
79 >=media-plugins/gst-plugins-libav-1.4.5:1.0
80 )
81 gstreamer-0? (
82 >=media-libs/gstreamer-0.10.25:0.10
83 media-plugins/gst-plugins-meta:0.10[ffmpeg]
84 )
85 x11-libs/libX11
86 x11-libs/libXcomposite
87 x11-libs/libXdamage
88 x11-libs/libXext
89 x11-libs/libXfixes
90 x11-libs/libXrender
91 x11-libs/libXt
92 system-cairo? ( >=x11-libs/cairo-1.12[X] >=x11-libs/pixman-0.19.2 )
93 system-icu? ( >=dev-libs/icu-51.1:= )
94 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
95 system-sqlite? ( >=dev-db/sqlite-3.8.9:3[secure-delete,debug=] )
96 system-libvpx? ( >=media-libs/libvpx-1.3.0[postproc] )
97 "
98
99 if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then
100 if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then
101 IUSE+=" +wifi"
102 else
103 IUSE+=" wifi"
104 fi
105 RDEPEND+="
106 wifi? ( >=sys-apps/dbus-0.60
107 >=dev-libs/dbus-glib-0.72
108 net-wireless/wireless-tools )"
109 fi
110 if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then
111 if [[ ${MOZCONFIG_OPTIONAL_JIT} = "enabled" ]]; then
112 IUSE+=" +jit"
113 else
114 IUSE+=" jit"
115 fi
116 fi
117
118 DEPEND="app-arch/zip
119 app-arch/unzip
120 >=sys-devel/binutils-2.16.1
121 ${RDEPEND}"
122
123 RDEPEND+="
124 selinux? ( sec-policy/selinux-mozilla )"
125
126 # only one of gstreamer and gstreamer-0 can be enabled at a time, so set REQUIRED_USE to signify this
127 REQUIRED_USE="?? ( gstreamer gstreamer-0 )"
128
129 # @FUNCTION: mozconfig_config
130 # @DESCRIPTION:
131 # Set common configure options for mozilla packages.
132 # Call this within src_configure() phase, after mozconfig_init
133 #
134 # Example:
135 #
136 # inherit mozconfig-v5.33
137 #
138 # src_configure() {
139 # mozconfig_init
140 # mozconfig_config
141 # # ... misc ebuild-unique settings via calls to
142 # # ... mozconfig_{annotate,use_with,use_enable}
143 # mozconfig_final
144 # }
145
146 mozconfig_config() {
147 # Migrated from mozcoreconf-2
148 mozconfig_annotate 'system_libs' \
149 --with-system-zlib \
150 --enable-pango \
151 --enable-svg \
152 --with-system-bz2
153
154 mozconfig_annotate '' --enable-default-toolkit=cairo-gtk2
155
156 if has bindist ${IUSE}; then
157 mozconfig_use_enable !bindist official-branding
158 if [[ ${PN} == firefox ]] && use bindist ; then
159 mozconfig_annotate '' --with-branding=browser/branding/aurora
160 fi
161 fi
162
163 mozconfig_use_enable debug
164 mozconfig_use_enable debug tests
165
166 if ! use debug ; then
167 mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
168 else
169 mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
170 fi
171
172 mozconfig_use_enable startup-notification
173
174 if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then
175 # wifi pulls in dbus so manage both here
176 mozconfig_use_enable wifi necko-wifi
177 if use wifi && ! use dbus; then
178 echo "Enabling dbus support due to wifi request"
179 mozconfig_annotate 'dbus required by necko-wifi' --enable-dbus
180 else
181 mozconfig_use_enable dbus
182 fi
183 else
184 mozconfig_use_enable dbus
185 mozconfig_annotate 'disabled' --disable-necko-wifi
186 fi
187
188 # These are forced-on for webm support
189 mozconfig_annotate 'required' --enable-ogg
190 mozconfig_annotate 'required' --enable-wave
191
192 if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then
193 mozconfig_use_enable jit ion
194 fi
195
196 # These are enabled by default in all mozilla applications
197 mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
198 mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
199 mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
200 mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr
201 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
202 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
203 mozconfig_annotate 'Gentoo default' --enable-system-hunspell
204 mozconfig_annotate '' --disable-gnomevfs
205 mozconfig_annotate '' --disable-gnomeui
206 mozconfig_annotate '' --enable-gio
207 mozconfig_annotate '' --disable-crashreporter
208 mozconfig_annotate 'Gentoo default' --with-system-png
209 mozconfig_annotate '' --enable-system-ffi
210 mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold
211 mozconfig_annotate '' --disable-gconf
212
213 # Use jemalloc unless libc is not glibc >= 2.4
214 # at this time the minimum glibc in the tree is 2.9 so we should be safe.
215 if use elibc_glibc && use jemalloc3; then
216 # We must force-enable jemalloc 3 via .mozconfig
217 echo "export MOZ_JEMALLOC3=1" >> "${S}"/.mozconfig || die
218 mozconfig_annotate '' --enable-jemalloc
219 mozconfig_annotate '' --enable-replace-malloc
220 fi
221
222 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
223 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
224
225 if use gstreamer ; then
226 mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0
227 elif use gstreamer-0 ; then
228 mozconfig_annotate '+gstreamer-0' --enable-gstreamer=0.10
229 else
230 mozconfig_annotate '' --disable-gstreamer
231 fi
232 mozconfig_use_enable pulseaudio
233
234 mozconfig_use_enable system-cairo
235 mozconfig_use_enable system-sqlite
236 mozconfig_use_with system-jpeg
237 mozconfig_use_with system-icu
238 mozconfig_use_enable system-icu intl-api
239 mozconfig_use_with system-libvpx
240 }

  ViewVC Help
Powered by ViewVC 1.1.20