1 |
commit: 294d85b8e60acca6ac91aac893f6e1b9d6b7e86d |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 28 17:01:37 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 28 17:01:37 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=294d85b8 |
7 |
|
8 |
removed mozconfig-v6.5{5,6} as they are replaced by mozsupport.eclass |
9 |
|
10 |
eclass/mozconfig-v6.55.eclass | 381 ----------------------------------------- |
11 |
eclass/mozconfig-v6.56.eclass | 386 ------------------------------------------ |
12 |
2 files changed, 767 deletions(-) |
13 |
|
14 |
diff --git a/eclass/mozconfig-v6.55.eclass b/eclass/mozconfig-v6.55.eclass |
15 |
deleted file mode 100644 |
16 |
index 4c20d97..0000000 |
17 |
--- a/eclass/mozconfig-v6.55.eclass |
18 |
+++ /dev/null |
19 |
@@ -1,381 +0,0 @@ |
20 |
-# Copyright 1999-2017 Gentoo Foundation |
21 |
-# Distributed under the terms of the GNU General Public License v2 |
22 |
-# |
23 |
-# @ECLASS: mozconfig-v6.55.eclass |
24 |
-# @MAINTAINER: |
25 |
-# mozilla team <mozilla@g.o> |
26 |
-# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 |
27 |
-# @DESCRIPTION: |
28 |
-# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) |
29 |
-# to provide a single common place for the common mozilla engine compoments. |
30 |
-# |
31 |
-# The eclass provides all common dependencies as well as common use flags. |
32 |
-# |
33 |
-# Some use flags which may be optional in particular mozilla packages can be |
34 |
-# supported through setting eclass variables. |
35 |
-# |
36 |
-# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3, |
37 |
-# and so ebuilds inheriting this eclass do not need to inherit that. |
38 |
- |
39 |
-case ${EAPI} in |
40 |
- 0|1|2|3|4) |
41 |
- die "EAPI=${EAPI} not supported" |
42 |
- ;; |
43 |
- 5) |
44 |
- inherit multilib |
45 |
- ;; |
46 |
-esac |
47 |
- |
48 |
-inherit flag-o-matic toolchain-funcs mozcoreconf-v5 |
49 |
- |
50 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI |
51 |
-# @DESCRIPTION: |
52 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
53 |
-# optional necko-wifi support via IUSE="wifi". Currently this would include |
54 |
-# ebuilds for firefox, and potentially seamonkey. |
55 |
-# |
56 |
-# Leave the variable UNSET if necko-wifi support should not be available. |
57 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
58 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
59 |
- |
60 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT |
61 |
-# @DESCRIPTION: |
62 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
63 |
-# deterministic jit support via IUSE="jit". The upstream default will be used |
64 |
-# otherwise, which is generally to enable jit unless support for the platform |
65 |
-# is missing. |
66 |
-# |
67 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
68 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
69 |
- |
70 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 |
71 |
-# @DESCRIPTION: |
72 |
-# Set this variable before the inherit line, when an ebuild can provide |
73 |
-# optional gtk3 support via IUSE="force-gtk3". Currently this would include |
74 |
-# thunderbird and seamonkey in the future, once support is ready for testing. |
75 |
-# |
76 |
-# Leave the variable UNSET if gtk3 support should not be optionally available. |
77 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
78 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
79 |
-# If gtk+:3 is to be the standard toolkit, do not use this and instead use |
80 |
-# MOZCONFIG_OPTIONAL_GTK2ONLY. |
81 |
- |
82 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK2ONLY |
83 |
-# @DESCRIPTION: |
84 |
-# Set this variable before the inherit line, when an ebuild can provide |
85 |
-# optional gtk2-only support via IUSE="gtk2". |
86 |
-# |
87 |
-# Note that this option conflicts directly with MOZCONFIG_OPTIONAL_GTK3, both |
88 |
-# variables cannot be set at the same time and this variable will be ignored if |
89 |
-# MOZCONFIG_OPTIONAL_GTK3 is set. |
90 |
-# |
91 |
-# Leave the variable UNSET if gtk2-only support should not be available. |
92 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
93 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
94 |
- |
95 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5 |
96 |
-# @DESCRIPTION: |
97 |
-# Set this variable before the inherit line, when an ebuild can provide |
98 |
-# optional qt5 support via IUSE="qt5". Currently this would include |
99 |
-# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. |
100 |
-# |
101 |
-# Leave the variable UNSET if qt5 support should not be available. |
102 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
103 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
104 |
- |
105 |
-# use-flags common among all mozilla ebuilds |
106 |
-IUSE="${IUSE} dbus debug neon pulseaudio selinux startup-notification system-cairo |
107 |
- system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-libvpx" |
108 |
- |
109 |
-# some notes on deps: |
110 |
-# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 |
111 |
-# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau |
112 |
- |
113 |
-RDEPEND=">=app-text/hunspell-1.5.4:= |
114 |
- dev-libs/atk |
115 |
- dev-libs/expat |
116 |
- >=x11-libs/cairo-1.10[X] |
117 |
- >=x11-libs/gtk+-2.18:2 |
118 |
- x11-libs/gdk-pixbuf |
119 |
- >=x11-libs/pango-1.22.0 |
120 |
- >=media-libs/libpng-1.6.29:0=[apng] |
121 |
- >=media-libs/mesa-10.2:* |
122 |
- media-libs/fontconfig |
123 |
- >=media-libs/freetype-2.4.10 |
124 |
- kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) |
125 |
- pulseaudio? ( || ( media-sound/pulseaudio |
126 |
- >=media-sound/apulse-0.1.9 ) ) |
127 |
- virtual/freedesktop-icon-theme |
128 |
- dbus? ( >=sys-apps/dbus-0.60 |
129 |
- >=dev-libs/dbus-glib-0.72 ) |
130 |
- startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
131 |
- >=dev-libs/glib-2.26:2 |
132 |
- >=sys-libs/zlib-1.2.3 |
133 |
- >=virtual/libffi-3.0.10 |
134 |
- virtual/ffmpeg |
135 |
- x11-libs/libX11 |
136 |
- x11-libs/libXcomposite |
137 |
- x11-libs/libXdamage |
138 |
- x11-libs/libXext |
139 |
- x11-libs/libXfixes |
140 |
- x11-libs/libXrender |
141 |
- x11-libs/libXt |
142 |
- system-cairo? ( >=x11-libs/cairo-1.12[X,xcb] >=x11-libs/pixman-0.19.2 ) |
143 |
- system-icu? ( >=dev-libs/icu-58.1:= ) |
144 |
- system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
145 |
- system-libevent? ( >=dev-libs/libevent-2.0:0= ) |
146 |
- system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] ) |
147 |
- system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] ) |
148 |
- system-harfbuzz? ( >=media-libs/harfbuzz-1.3.3:0= >=media-gfx/graphite2-1.3.9-r1 ) |
149 |
-" |
150 |
- |
151 |
-if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
152 |
- MOZCONFIG_OPTIONAL_GTK2ONLY= |
153 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then |
154 |
- IUSE+=" +force-gtk3" |
155 |
- else |
156 |
- IUSE+=" force-gtk3" |
157 |
- fi |
158 |
- RDEPEND+=" force-gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" |
159 |
-elif [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
160 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK2ONLY} = "enabled" ]]; then |
161 |
- IUSE+=" +gtk2" |
162 |
- else |
163 |
- IUSE+=" gtk2" |
164 |
- fi |
165 |
- RDEPEND+=" !gtk2? ( >=x11-libs/gtk+-3.4.0:3 )" |
166 |
-else |
167 |
- # no gtk3 related dep set by optional use flags, force it |
168 |
- RDEPEND+=" >=x11-libs/gtk+-3.4.0:3" |
169 |
-fi |
170 |
-if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then |
171 |
- if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then |
172 |
- IUSE+=" +wifi" |
173 |
- else |
174 |
- IUSE+=" wifi" |
175 |
- fi |
176 |
- RDEPEND+=" |
177 |
- wifi? ( |
178 |
- kernel_linux? ( >=sys-apps/dbus-0.60 |
179 |
- >=dev-libs/dbus-glib-0.72 |
180 |
- net-misc/networkmanager ) |
181 |
- )" |
182 |
-fi |
183 |
- |
184 |
-DEPEND="app-arch/zip |
185 |
- app-arch/unzip |
186 |
- >=sys-devel/binutils-2.16.1 |
187 |
- sys-apps/findutils |
188 |
- pulseaudio? ( media-sound/pulseaudio ) |
189 |
- ${RDEPEND}" |
190 |
- |
191 |
-RDEPEND+=" |
192 |
- pulseaudio? ( || ( media-sound/pulseaudio |
193 |
- >=media-sound/apulse-0.1.9 ) ) |
194 |
- selinux? ( sec-policy/selinux-mozilla )" |
195 |
- |
196 |
-# @FUNCTION: mozconfig_config |
197 |
-# @DESCRIPTION: |
198 |
-# Set common configure options for mozilla packages. |
199 |
-# Call this within src_configure() phase, after mozconfig_init |
200 |
-# |
201 |
-# Example: |
202 |
-# |
203 |
-# inherit mozconfig-v6.46 |
204 |
-# |
205 |
-# src_configure() { |
206 |
-# mozconfig_init |
207 |
-# mozconfig_config |
208 |
-# # ... misc ebuild-unique settings via calls to |
209 |
-# # ... mozconfig_{annotate,use_with,use_enable} |
210 |
-# mozconfig_final |
211 |
-# } |
212 |
- |
213 |
-mozconfig_config() { |
214 |
- # Migrated from mozcoreconf-2 |
215 |
- mozconfig_annotate 'system_libs' \ |
216 |
- --with-system-zlib \ |
217 |
- --with-system-bz2 |
218 |
- |
219 |
- if has bindist ${IUSE}; then |
220 |
- mozconfig_use_enable !bindist official-branding |
221 |
- if [[ ${PN} == firefox ]] && use bindist ; then |
222 |
- mozconfig_annotate '' --with-branding=browser/branding/aurora |
223 |
- fi |
224 |
- fi |
225 |
- |
226 |
- # Enable position independent executables |
227 |
- mozconfig_annotate 'enabled by Gentoo' --enable-pie |
228 |
- mozconfig_use_enable debug |
229 |
- mozconfig_use_enable debug tests |
230 |
- |
231 |
- if ! use debug ; then |
232 |
- mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols |
233 |
- else |
234 |
- mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols |
235 |
- fi |
236 |
- |
237 |
- mozconfig_use_enable startup-notification |
238 |
- |
239 |
- if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then |
240 |
- # wifi pulls in dbus so manage both here |
241 |
- mozconfig_use_enable wifi necko-wifi |
242 |
- if use kernel_linux && use wifi && ! use dbus; then |
243 |
- echo "Enabling dbus support due to wifi request" |
244 |
- mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus |
245 |
- else |
246 |
- mozconfig_use_enable dbus |
247 |
- fi |
248 |
- else |
249 |
- mozconfig_use_enable dbus |
250 |
- mozconfig_annotate 'disabled' --disable-necko-wifi |
251 |
- fi |
252 |
- |
253 |
- if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then |
254 |
- mozconfig_use_enable jit ion |
255 |
- fi |
256 |
- |
257 |
- # These are enabled by default in all mozilla applications |
258 |
- mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr |
259 |
- mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr |
260 |
- mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) |
261 |
- if use system-libevent; then |
262 |
- mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr |
263 |
- fi |
264 |
- mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
265 |
- mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
266 |
- mozconfig_annotate 'Gentoo default' --enable-system-hunspell |
267 |
- mozconfig_annotate '' --disable-crashreporter |
268 |
- mozconfig_annotate 'Gentoo default' --with-system-png |
269 |
- mozconfig_annotate '' --enable-system-ffi |
270 |
- mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold |
271 |
- mozconfig_annotate '' --disable-gconf |
272 |
- mozconfig_annotate '' --with-intl-api |
273 |
- |
274 |
- # skia has no support for big-endian platforms |
275 |
- if [[ $(tc-endian) == "big" ]]; then |
276 |
- mozconfig_annotate 'big endian target' --disable-skia |
277 |
- else |
278 |
- mozconfig_annotate '' --enable-skia |
279 |
- fi |
280 |
- |
281 |
- # default toolkit is cairo-gtk3, optional use flags can change this |
282 |
- local toolkit="cairo-gtk3" |
283 |
- local toolkit_comment="" |
284 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
285 |
- if ! use force-gtk3; then |
286 |
- toolkit="cairo-gtk2" |
287 |
- toolkit_comment="force-gtk3 use flag" |
288 |
- fi |
289 |
- fi |
290 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
291 |
- if use gtk2 ; then |
292 |
- toolkit="cairo-gtk2" |
293 |
- else |
294 |
- toolkit_comment="gtk2 use flag" |
295 |
- fi |
296 |
- fi |
297 |
- if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then |
298 |
- if use qt5; then |
299 |
- toolkit="cairo-qt" |
300 |
- toolkit_comment="qt5 use flag" |
301 |
- # need to specify these vars because the qt5 versions are not found otherwise, |
302 |
- # and setting --with-qtdir overrides the pkg-config include dirs |
303 |
- local i |
304 |
- for i in qmake moc rcc; do |
305 |
- echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \ |
306 |
- >> "${S}"/.mozconfig || die |
307 |
- done |
308 |
- echo 'unset QTDIR' >> "${S}"/.mozconfig || die |
309 |
- mozconfig_annotate '+qt5' --disable-gio |
310 |
- fi |
311 |
- fi |
312 |
- mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit} |
313 |
- |
314 |
- # Instead of the standard --build= and --host=, mozilla uses --host instead |
315 |
- # of --build, and --target intstead of --host. |
316 |
- # Note, mozilla also has --build but it does not do what you think it does. |
317 |
- # Set both --target and --host as mozilla uses python to guess values otherwise |
318 |
- mozconfig_annotate '' --target="${CHOST}" |
319 |
- mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" |
320 |
- |
321 |
- mozconfig_use_enable pulseaudio |
322 |
- # force the deprecated alsa sound code if pulseaudio is disabled |
323 |
- if use kernel_linux && ! use pulseaudio ; then |
324 |
- mozconfig_annotate '-pulseaudio' --enable-alsa |
325 |
- fi |
326 |
- |
327 |
- # For testing purpose only |
328 |
- mozconfig_annotate 'Sandbox' --enable-content-sandbox |
329 |
- |
330 |
- mozconfig_use_enable system-cairo |
331 |
- mozconfig_use_enable system-sqlite |
332 |
- mozconfig_use_with system-jpeg |
333 |
- mozconfig_use_with system-icu |
334 |
- mozconfig_use_with system-libvpx |
335 |
- mozconfig_use_with system-harfbuzz |
336 |
- mozconfig_use_with system-harfbuzz system-graphite2 |
337 |
- |
338 |
- # Modifications to better support ARM, bug 553364 |
339 |
- if use neon ; then |
340 |
- mozconfig_annotate '' --with-fpu=neon |
341 |
- mozconfig_annotate '' --with-thumb=yes |
342 |
- mozconfig_annotate '' --with-thumb-interwork=no |
343 |
- fi |
344 |
- if [[ ${CHOST} == armv* ]] ; then |
345 |
- mozconfig_annotate '' --with-float-abi=hard |
346 |
- if ! use system-libvpx ; then |
347 |
- sed -i -e "s|softfp|hard|" \ |
348 |
- "${S}"/media/libvpx/moz.build |
349 |
- fi |
350 |
- fi |
351 |
-} |
352 |
- |
353 |
-# @FUNCTION: mozconfig_install_prefs |
354 |
-# @DESCRIPTION: |
355 |
-# Set preferences into the prefs.js file specified as a parameter to |
356 |
-# the function. This sets both some common prefs to all mozilla |
357 |
-# packages, and any prefs that may relate to the use flags administered |
358 |
-# by mozconfig_config(). |
359 |
-# |
360 |
-# Call this within src_install() phase, after copying the template |
361 |
-# prefs file (if any) from ${FILESDIR} |
362 |
-# |
363 |
-# Example: |
364 |
-# |
365 |
-# inherit mozconfig-v6.46 |
366 |
-# |
367 |
-# src_install() { |
368 |
-# cp "${FILESDIR}"/gentoo-default-prefs.js \ |
369 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
370 |
-# || die |
371 |
-# |
372 |
-# mozconfig_install_prefs \ |
373 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" |
374 |
-# |
375 |
-# ... |
376 |
-# } |
377 |
- |
378 |
-mozconfig_install_prefs() { |
379 |
- local prefs_file="${1}" |
380 |
- |
381 |
- einfo "Adding prefs from mozconfig to ${prefs_file}" |
382 |
- |
383 |
- # set dictionary path, to use system hunspell |
384 |
- echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ |
385 |
- >>"${prefs_file}" || die |
386 |
- |
387 |
- # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it |
388 |
- if use system-harfbuzz ; then |
389 |
- echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ |
390 |
- >>"${prefs_file}" || die |
391 |
- fi |
392 |
- |
393 |
- # force cairo as the canvas renderer on platforms without skia support |
394 |
- if [[ $(tc-endian) == "big" ]] ; then |
395 |
- echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ |
396 |
- >>"${prefs_file}" || die |
397 |
- echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ |
398 |
- >>"${prefs_file}" || die |
399 |
- fi |
400 |
-} |
401 |
|
402 |
diff --git a/eclass/mozconfig-v6.56.eclass b/eclass/mozconfig-v6.56.eclass |
403 |
deleted file mode 100644 |
404 |
index 0b3df0e..0000000 |
405 |
--- a/eclass/mozconfig-v6.56.eclass |
406 |
+++ /dev/null |
407 |
@@ -1,386 +0,0 @@ |
408 |
-# Copyright 1999-2017 Gentoo Foundation |
409 |
-# Distributed under the terms of the GNU General Public License v2 |
410 |
-# |
411 |
-# @ECLASS: mozconfig-v6.55.eclass |
412 |
-# @MAINTAINER: |
413 |
-# mozilla team <mozilla@g.o> |
414 |
-# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 |
415 |
-# @DESCRIPTION: |
416 |
-# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) |
417 |
-# to provide a single common place for the common mozilla engine compoments. |
418 |
-# |
419 |
-# The eclass provides all common dependencies as well as common use flags. |
420 |
-# |
421 |
-# Some use flags which may be optional in particular mozilla packages can be |
422 |
-# supported through setting eclass variables. |
423 |
-# |
424 |
-# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3, |
425 |
-# and so ebuilds inheriting this eclass do not need to inherit that. |
426 |
- |
427 |
-case ${EAPI} in |
428 |
- 0|1|2|3|4) |
429 |
- die "EAPI=${EAPI} not supported" |
430 |
- ;; |
431 |
- 5) |
432 |
- inherit multilib |
433 |
- ;; |
434 |
-esac |
435 |
- |
436 |
-inherit flag-o-matic toolchain-funcs mozcoreconf-v5 |
437 |
- |
438 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI |
439 |
-# @DESCRIPTION: |
440 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
441 |
-# optional necko-wifi support via IUSE="wifi". Currently this would include |
442 |
-# ebuilds for firefox, and potentially seamonkey. |
443 |
-# |
444 |
-# Leave the variable UNSET if necko-wifi support should not be available. |
445 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
446 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
447 |
- |
448 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT |
449 |
-# @DESCRIPTION: |
450 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
451 |
-# deterministic jit support via IUSE="jit". The upstream default will be used |
452 |
-# otherwise, which is generally to enable jit unless support for the platform |
453 |
-# is missing. |
454 |
-# |
455 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
456 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
457 |
- |
458 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 |
459 |
-# @DESCRIPTION: |
460 |
-# Set this variable before the inherit line, when an ebuild can provide |
461 |
-# optional gtk3 support via IUSE="force-gtk3". Currently this would include |
462 |
-# thunderbird and seamonkey in the future, once support is ready for testing. |
463 |
-# |
464 |
-# Leave the variable UNSET if gtk3 support should not be optionally available. |
465 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
466 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
467 |
-# If gtk+:3 is to be the standard toolkit, do not use this and instead use |
468 |
-# MOZCONFIG_OPTIONAL_GTK2ONLY. |
469 |
- |
470 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK2ONLY |
471 |
-# @DESCRIPTION: |
472 |
-# Set this variable before the inherit line, when an ebuild can provide |
473 |
-# optional gtk2-only support via IUSE="gtk2". |
474 |
-# |
475 |
-# Note that this option conflicts directly with MOZCONFIG_OPTIONAL_GTK3, both |
476 |
-# variables cannot be set at the same time and this variable will be ignored if |
477 |
-# MOZCONFIG_OPTIONAL_GTK3 is set. |
478 |
-# |
479 |
-# Leave the variable UNSET if gtk2-only support should not be available. |
480 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
481 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
482 |
- |
483 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5 |
484 |
-# @DESCRIPTION: |
485 |
-# Set this variable before the inherit line, when an ebuild can provide |
486 |
-# optional qt5 support via IUSE="qt5". Currently this would include |
487 |
-# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. |
488 |
-# |
489 |
-# Leave the variable UNSET if qt5 support should not be available. |
490 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
491 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
492 |
- |
493 |
-# use-flags common among all mozilla ebuilds |
494 |
-IUSE="${IUSE} dbus debug neon pulseaudio selinux startup-notification system-harfbuzz |
495 |
- system-icu system-jpeg system-libevent system-sqlite system-libvpx" |
496 |
- |
497 |
-# some notes on deps: |
498 |
-# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 |
499 |
-# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau |
500 |
- |
501 |
-RDEPEND=">=app-text/hunspell-1.5.4:= |
502 |
- dev-libs/atk |
503 |
- dev-libs/expat |
504 |
- >=x11-libs/cairo-1.10[X] |
505 |
- >=x11-libs/gtk+-2.18:2 |
506 |
- x11-libs/gdk-pixbuf |
507 |
- >=x11-libs/pango-1.22.0 |
508 |
- >=media-libs/libpng-1.6.28:0=[apng] |
509 |
- >=media-libs/mesa-10.2:* |
510 |
- media-libs/fontconfig |
511 |
- >=media-libs/freetype-2.4.10 |
512 |
- kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) |
513 |
- pulseaudio? ( || ( media-sound/pulseaudio |
514 |
- >=media-sound/apulse-0.1.9 ) ) |
515 |
- virtual/freedesktop-icon-theme |
516 |
- dbus? ( >=sys-apps/dbus-0.60 |
517 |
- >=dev-libs/dbus-glib-0.72 ) |
518 |
- startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
519 |
- >=x11-libs/pixman-0.19.2 |
520 |
- >=dev-libs/glib-2.26:2 |
521 |
- >=sys-libs/zlib-1.2.3 |
522 |
- >=virtual/libffi-3.0.10 |
523 |
- virtual/ffmpeg |
524 |
- x11-libs/libX11 |
525 |
- x11-libs/libXcomposite |
526 |
- x11-libs/libXdamage |
527 |
- x11-libs/libXext |
528 |
- x11-libs/libXfixes |
529 |
- x11-libs/libXrender |
530 |
- x11-libs/libXt |
531 |
- system-icu? ( >=dev-libs/icu-58.1:= ) |
532 |
- system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
533 |
- system-libevent? ( >=dev-libs/libevent-2.0:0= ) |
534 |
- system-sqlite? ( >=dev-db/sqlite-3.19.3:3[secure-delete,debug=] ) |
535 |
- system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] ) |
536 |
- system-harfbuzz? ( >=media-libs/harfbuzz-1.3.3:0= >=media-gfx/graphite2-1.3.9-r1 ) |
537 |
-" |
538 |
- |
539 |
-if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
540 |
- MOZCONFIG_OPTIONAL_GTK2ONLY= |
541 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then |
542 |
- IUSE+=" +force-gtk3" |
543 |
- else |
544 |
- IUSE+=" force-gtk3" |
545 |
- fi |
546 |
- RDEPEND+=" force-gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" |
547 |
-elif [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
548 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK2ONLY} = "enabled" ]]; then |
549 |
- IUSE+=" +gtk2" |
550 |
- else |
551 |
- IUSE+=" gtk2" |
552 |
- fi |
553 |
- RDEPEND+=" !gtk2? ( >=x11-libs/gtk+-3.4.0:3 )" |
554 |
-else |
555 |
- # no gtk3 related dep set by optional use flags, force it |
556 |
- RDEPEND+=" >=x11-libs/gtk+-3.4.0:3" |
557 |
-fi |
558 |
-if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then |
559 |
- if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then |
560 |
- IUSE+=" +wifi" |
561 |
- else |
562 |
- IUSE+=" wifi" |
563 |
- fi |
564 |
- RDEPEND+=" |
565 |
- wifi? ( |
566 |
- kernel_linux? ( >=sys-apps/dbus-0.60 |
567 |
- >=dev-libs/dbus-glib-0.72 |
568 |
- net-misc/networkmanager ) |
569 |
- )" |
570 |
-fi |
571 |
- |
572 |
-DEPEND="app-arch/zip |
573 |
- app-arch/unzip |
574 |
- >=sys-devel/binutils-2.16.1 |
575 |
- sys-apps/findutils |
576 |
- pulseaudio? ( media-sound/pulseaudio ) |
577 |
- ${RDEPEND}" |
578 |
- |
579 |
-RDEPEND+=" |
580 |
- pulseaudio? ( || ( media-sound/pulseaudio |
581 |
- >=media-sound/apulse-0.1.9 ) ) |
582 |
- selinux? ( sec-policy/selinux-mozilla )" |
583 |
- |
584 |
-# @FUNCTION: mozconfig_config |
585 |
-# @DESCRIPTION: |
586 |
-# Set common configure options for mozilla packages. |
587 |
-# Call this within src_configure() phase, after mozconfig_init |
588 |
-# |
589 |
-# Example: |
590 |
-# |
591 |
-# inherit mozconfig-v6.46 |
592 |
-# |
593 |
-# src_configure() { |
594 |
-# mozconfig_init |
595 |
-# mozconfig_config |
596 |
-# # ... misc ebuild-unique settings via calls to |
597 |
-# # ... mozconfig_{annotate,use_with,use_enable} |
598 |
-# mozconfig_final |
599 |
-# } |
600 |
- |
601 |
-mozconfig_config() { |
602 |
- # Migrated from mozcoreconf-2 |
603 |
- mozconfig_annotate 'system_libs' \ |
604 |
- --with-system-zlib \ |
605 |
- --with-system-bz2 |
606 |
- |
607 |
- # Disable for testing purposes only |
608 |
- mozconfig_annotate 'Upstream bug 1341234' --disable-stylo |
609 |
- |
610 |
- # Enable release to we use system ld |
611 |
- mozconfig_annotate 'gentoo ld support' --enable-release |
612 |
- |
613 |
- if has bindist ${IUSE}; then |
614 |
- mozconfig_use_enable !bindist official-branding |
615 |
- if [[ ${PN} == firefox ]] && use bindist ; then |
616 |
- mozconfig_annotate '' --with-branding=browser/branding/aurora |
617 |
- fi |
618 |
- fi |
619 |
- |
620 |
- # Enable position independent executables |
621 |
- mozconfig_annotate 'enabled by Gentoo' --enable-pie |
622 |
- mozconfig_use_enable debug |
623 |
- mozconfig_use_enable debug tests |
624 |
- |
625 |
- if ! use debug ; then |
626 |
- mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols |
627 |
- else |
628 |
- mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols |
629 |
- fi |
630 |
- |
631 |
- mozconfig_use_enable startup-notification |
632 |
- |
633 |
- if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then |
634 |
- # wifi pulls in dbus so manage both here |
635 |
- mozconfig_use_enable wifi necko-wifi |
636 |
- if use kernel_linux && use wifi && ! use dbus; then |
637 |
- echo "Enabling dbus support due to wifi request" |
638 |
- mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus |
639 |
- else |
640 |
- mozconfig_use_enable dbus |
641 |
- fi |
642 |
- else |
643 |
- mozconfig_use_enable dbus |
644 |
- mozconfig_annotate 'disabled' --disable-necko-wifi |
645 |
- fi |
646 |
- |
647 |
- if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then |
648 |
- mozconfig_use_enable jit ion |
649 |
- fi |
650 |
- |
651 |
- # These are enabled by default in all mozilla applications |
652 |
- mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr |
653 |
- mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr |
654 |
- mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) |
655 |
- if use system-libevent; then |
656 |
- mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr |
657 |
- fi |
658 |
- mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
659 |
- mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
660 |
- mozconfig_annotate 'Gentoo default' --enable-system-hunspell |
661 |
- mozconfig_annotate '' --disable-crashreporter |
662 |
- mozconfig_annotate 'Gentoo default' --with-system-png |
663 |
- mozconfig_annotate '' --enable-system-ffi |
664 |
- mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold |
665 |
- mozconfig_annotate '' --disable-gconf |
666 |
- mozconfig_annotate '' --with-intl-api |
667 |
- |
668 |
- # skia has no support for big-endian platforms |
669 |
- if [[ $(tc-endian) == "big" ]]; then |
670 |
- mozconfig_annotate 'big endian target' --disable-skia |
671 |
- else |
672 |
- mozconfig_annotate '' --enable-skia |
673 |
- fi |
674 |
- |
675 |
- # default toolkit is cairo-gtk3, optional use flags can change this |
676 |
- local toolkit="cairo-gtk3" |
677 |
- local toolkit_comment="" |
678 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
679 |
- if ! use force-gtk3; then |
680 |
- toolkit="cairo-gtk2" |
681 |
- toolkit_comment="force-gtk3 use flag" |
682 |
- fi |
683 |
- fi |
684 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
685 |
- if use gtk2 ; then |
686 |
- toolkit="cairo-gtk2" |
687 |
- else |
688 |
- toolkit_comment="gtk2 use flag" |
689 |
- fi |
690 |
- fi |
691 |
- if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then |
692 |
- if use qt5; then |
693 |
- toolkit="cairo-qt" |
694 |
- toolkit_comment="qt5 use flag" |
695 |
- # need to specify these vars because the qt5 versions are not found otherwise, |
696 |
- # and setting --with-qtdir overrides the pkg-config include dirs |
697 |
- local i |
698 |
- for i in qmake moc rcc; do |
699 |
- echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \ |
700 |
- >> "${S}"/.mozconfig || die |
701 |
- done |
702 |
- echo 'unset QTDIR' >> "${S}"/.mozconfig || die |
703 |
- mozconfig_annotate '+qt5' --disable-gio |
704 |
- fi |
705 |
- fi |
706 |
- mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit} |
707 |
- |
708 |
- # Instead of the standard --build= and --host=, mozilla uses --host instead |
709 |
- # of --build, and --target intstead of --host. |
710 |
- # Note, mozilla also has --build but it does not do what you think it does. |
711 |
- # Set both --target and --host as mozilla uses python to guess values otherwise |
712 |
- mozconfig_annotate '' --target="${CHOST}" |
713 |
- mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" |
714 |
- |
715 |
- mozconfig_use_enable pulseaudio |
716 |
- # force the deprecated alsa sound code if pulseaudio is disabled |
717 |
- if use kernel_linux && ! use pulseaudio ; then |
718 |
- mozconfig_annotate '-pulseaudio' --enable-alsa |
719 |
- fi |
720 |
- |
721 |
- # For testing purpose only |
722 |
- mozconfig_annotate 'Sandbox' --enable-content-sandbox |
723 |
- |
724 |
- mozconfig_use_enable system-sqlite |
725 |
- mozconfig_use_with system-jpeg |
726 |
- mozconfig_use_with system-icu |
727 |
- mozconfig_use_with system-libvpx |
728 |
- mozconfig_use_with system-harfbuzz |
729 |
- mozconfig_use_with system-harfbuzz system-graphite2 |
730 |
- |
731 |
- # Modifications to better support ARM, bug 553364 |
732 |
- if use neon ; then |
733 |
- mozconfig_annotate '' --with-fpu=neon |
734 |
- mozconfig_annotate '' --with-thumb=yes |
735 |
- mozconfig_annotate '' --with-thumb-interwork=no |
736 |
- fi |
737 |
- if [[ ${CHOST} == armv* ]] ; then |
738 |
- mozconfig_annotate '' --with-float-abi=hard |
739 |
- if ! use system-libvpx ; then |
740 |
- sed -i -e "s|softfp|hard|" \ |
741 |
- "${S}"/media/libvpx/moz.build |
742 |
- fi |
743 |
- fi |
744 |
-} |
745 |
- |
746 |
-# @FUNCTION: mozconfig_install_prefs |
747 |
-# @DESCRIPTION: |
748 |
-# Set preferences into the prefs.js file specified as a parameter to |
749 |
-# the function. This sets both some common prefs to all mozilla |
750 |
-# packages, and any prefs that may relate to the use flags administered |
751 |
-# by mozconfig_config(). |
752 |
-# |
753 |
-# Call this within src_install() phase, after copying the template |
754 |
-# prefs file (if any) from ${FILESDIR} |
755 |
-# |
756 |
-# Example: |
757 |
-# |
758 |
-# inherit mozconfig-v6.46 |
759 |
-# |
760 |
-# src_install() { |
761 |
-# cp "${FILESDIR}"/gentoo-default-prefs.js \ |
762 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
763 |
-# || die |
764 |
-# |
765 |
-# mozconfig_install_prefs \ |
766 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" |
767 |
-# |
768 |
-# ... |
769 |
-# } |
770 |
- |
771 |
-mozconfig_install_prefs() { |
772 |
- local prefs_file="${1}" |
773 |
- |
774 |
- einfo "Adding prefs from mozconfig to ${prefs_file}" |
775 |
- |
776 |
- # set dictionary path, to use system hunspell |
777 |
- echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ |
778 |
- >>"${prefs_file}" || die |
779 |
- |
780 |
- # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it |
781 |
- if use system-harfbuzz ; then |
782 |
- echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ |
783 |
- >>"${prefs_file}" || die |
784 |
- fi |
785 |
- |
786 |
- # force cairo as the canvas renderer on platforms without skia support |
787 |
- if [[ $(tc-endian) == "big" ]] ; then |
788 |
- echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ |
789 |
- >>"${prefs_file}" || die |
790 |
- echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ |
791 |
- >>"${prefs_file}" || die |
792 |
- fi |
793 |
-} |