1 |
commit: 75eca0ef8ac42f11a733ef9c1fb8b4dc96cd28a9 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 25 14:32:00 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 25 14:32:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75eca0ef |
7 |
|
8 |
Remove unused private eclasses |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
eclass/mozconfig-v6.52.eclass | 391 ------------------------------------------ |
13 |
eclass/mozcoreconf-v4.eclass | 261 ---------------------------- |
14 |
2 files changed, 652 deletions(-) |
15 |
|
16 |
diff --git a/eclass/mozconfig-v6.52.eclass b/eclass/mozconfig-v6.52.eclass |
17 |
deleted file mode 100644 |
18 |
index 42e6fb030cd..00000000000 |
19 |
--- a/eclass/mozconfig-v6.52.eclass |
20 |
+++ /dev/null |
21 |
@@ -1,391 +0,0 @@ |
22 |
-# Copyright 1999-2020 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
-# |
25 |
-# @ECLASS: mozconfig-v6.52.eclass |
26 |
-# @MAINTAINER: |
27 |
-# mozilla team <mozilla@g.o> |
28 |
-# @SUPPORTED_EAPIS: 5 6 7 |
29 |
-# @BLURB: the new mozilla common configuration eclass for FF33 and newer, v6 |
30 |
-# @DESCRIPTION: |
31 |
-# This eclass is used in mozilla ebuilds (firefox, thunderbird, seamonkey) |
32 |
-# to provide a single common place for the common mozilla engine compoments. |
33 |
-# |
34 |
-# The eclass provides all common dependencies as well as common use flags. |
35 |
-# |
36 |
-# Some use flags which may be optional in particular mozilla packages can be |
37 |
-# supported through setting eclass variables. |
38 |
-# |
39 |
-# This eclass inherits mozconfig helper functions as defined in mozcoreconf-v3, |
40 |
-# and so ebuilds inheriting this eclass do not need to inherit that. |
41 |
- |
42 |
-case ${EAPI} in |
43 |
- 0|1|2|3|4) |
44 |
- die "EAPI=${EAPI} not supported" |
45 |
- ;; |
46 |
- 5) |
47 |
- inherit multilib |
48 |
- ;; |
49 |
-esac |
50 |
- |
51 |
-inherit flag-o-matic toolchain-funcs mozcoreconf-v5 |
52 |
- |
53 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI |
54 |
-# @DEFAULT_UNSET |
55 |
-# @DESCRIPTION: |
56 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
57 |
-# optional necko-wifi support via IUSE="wifi". Currently this would include |
58 |
-# ebuilds for firefox, and potentially seamonkey. |
59 |
-# |
60 |
-# Leave the variable UNSET if necko-wifi support should not be available. |
61 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
62 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
63 |
- |
64 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT |
65 |
-# @DEFAULT_UNSET |
66 |
-# @DESCRIPTION: |
67 |
-# Set this variable before the inherit line, when an ebuild needs to provide |
68 |
-# deterministic jit support via IUSE="jit". The upstream default will be used |
69 |
-# otherwise, which is generally to enable jit unless support for the platform |
70 |
-# is missing. |
71 |
-# |
72 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
73 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
74 |
- |
75 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3 |
76 |
-# @DEFAULT_UNSET |
77 |
-# @DESCRIPTION: |
78 |
-# Set this variable before the inherit line, when an ebuild can provide |
79 |
-# optional gtk3 support via IUSE="force-gtk3". Currently this would include |
80 |
-# thunderbird and seamonkey in the future, once support is ready for testing. |
81 |
-# |
82 |
-# Leave the variable UNSET if gtk3 support should not be optionally available. |
83 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
84 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
85 |
-# If gtk+:3 is to be the standard toolkit, do not use this and instead use |
86 |
-# MOZCONFIG_OPTIONAL_GTK2ONLY. |
87 |
- |
88 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK2ONLY |
89 |
-# @DEFAULT_UNSET |
90 |
-# @DESCRIPTION: |
91 |
-# Set this variable before the inherit line, when an ebuild can provide |
92 |
-# optional gtk2-only support via IUSE="gtk2". |
93 |
-# |
94 |
-# Note that this option conflicts directly with MOZCONFIG_OPTIONAL_GTK3, both |
95 |
-# variables cannot be set at the same time and this variable will be ignored if |
96 |
-# MOZCONFIG_OPTIONAL_GTK3 is set. |
97 |
-# |
98 |
-# Leave the variable UNSET if gtk2-only support should not be available. |
99 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
100 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
101 |
- |
102 |
-# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_QT5 |
103 |
-# @DEFAULT_UNSET |
104 |
-# @DESCRIPTION: |
105 |
-# Set this variable before the inherit line, when an ebuild can provide |
106 |
-# optional qt5 support via IUSE="qt5". Currently this would include |
107 |
-# ebuilds for firefox, but thunderbird and seamonkey could follow in the future. |
108 |
-# |
109 |
-# Leave the variable UNSET if qt5 support should not be available. |
110 |
-# Set the variable to "enabled" if the use flag should be enabled by default. |
111 |
-# Set the variable to any value if the use flag should exist but not be default-enabled. |
112 |
- |
113 |
-# use-flags common among all mozilla ebuilds |
114 |
-IUSE="${IUSE} dbus debug +jemalloc neon pulseaudio selinux startup-notification system-cairo |
115 |
- system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-libvpx" |
116 |
- |
117 |
-# some notes on deps: |
118 |
-# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14 |
119 |
-# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau |
120 |
- |
121 |
-RDEPEND=">=app-text/hunspell-1.2:= |
122 |
- dev-libs/atk |
123 |
- dev-libs/expat |
124 |
- >=x11-libs/cairo-1.10[X] |
125 |
- >=x11-libs/gtk+-2.18:2 |
126 |
- x11-libs/gdk-pixbuf |
127 |
- >=x11-libs/pango-1.22.0 |
128 |
- >=media-libs/libpng-1.6.25:0=[apng] |
129 |
- >=media-libs/mesa-10.2:* |
130 |
- media-libs/fontconfig |
131 |
- >=media-libs/freetype-2.4.10 |
132 |
- kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) |
133 |
- pulseaudio? ( || ( media-sound/pulseaudio |
134 |
- >=media-sound/apulse-0.1.9 ) ) |
135 |
- virtual/freedesktop-icon-theme |
136 |
- dbus? ( >=sys-apps/dbus-0.60 |
137 |
- >=dev-libs/dbus-glib-0.72 ) |
138 |
- startup-notification? ( >=x11-libs/startup-notification-0.8 ) |
139 |
- >=dev-libs/glib-2.26:2 |
140 |
- >=sys-libs/zlib-1.2.3 |
141 |
- >=virtual/libffi-3.0.10 |
142 |
- media-video/ffmpeg |
143 |
- x11-libs/libX11 |
144 |
- x11-libs/libXcomposite |
145 |
- x11-libs/libXdamage |
146 |
- x11-libs/libXext |
147 |
- x11-libs/libXfixes |
148 |
- x11-libs/libXrender |
149 |
- x11-libs/libXt |
150 |
- system-cairo? ( >=x11-libs/cairo-1.12[X,xcb(+)] >=x11-libs/pixman-0.19.2 ) |
151 |
- system-icu? ( >=dev-libs/icu-58.1:= ) |
152 |
- system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) |
153 |
- system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] ) |
154 |
- system-sqlite? ( >=dev-db/sqlite-3.17.0:3[secure-delete,debug=] ) |
155 |
- system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] ) |
156 |
- system-harfbuzz? ( >=media-libs/harfbuzz-1.3.3:0= >=media-gfx/graphite2-1.3.8 ) |
157 |
-" |
158 |
- |
159 |
-if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
160 |
- MOZCONFIG_OPTIONAL_GTK2ONLY= |
161 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then |
162 |
- IUSE+=" +force-gtk3" |
163 |
- else |
164 |
- IUSE+=" force-gtk3" |
165 |
- fi |
166 |
- RDEPEND+=" force-gtk3? ( >=x11-libs/gtk+-3.4.0:3 )" |
167 |
-elif [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
168 |
- if [[ ${MOZCONFIG_OPTIONAL_GTK2ONLY} = "enabled" ]]; then |
169 |
- IUSE+=" +gtk2" |
170 |
- else |
171 |
- IUSE+=" gtk2" |
172 |
- fi |
173 |
- RDEPEND+=" !gtk2? ( >=x11-libs/gtk+-3.4.0:3 )" |
174 |
-fi |
175 |
-if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then |
176 |
- if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then |
177 |
- IUSE+=" +wifi" |
178 |
- else |
179 |
- IUSE+=" wifi" |
180 |
- fi |
181 |
- RDEPEND+=" |
182 |
- wifi? ( |
183 |
- kernel_linux? ( >=sys-apps/dbus-0.60 |
184 |
- >=dev-libs/dbus-glib-0.72 |
185 |
- net-misc/networkmanager ) |
186 |
- )" |
187 |
-fi |
188 |
- |
189 |
-DEPEND="app-arch/zip |
190 |
- app-arch/unzip |
191 |
- >=sys-devel/binutils-2.16.1 |
192 |
- sys-apps/findutils |
193 |
- pulseaudio? ( media-sound/pulseaudio ) |
194 |
- ${RDEPEND}" |
195 |
- |
196 |
-RDEPEND+=" |
197 |
- pulseaudio? ( || ( media-sound/pulseaudio |
198 |
- >=media-sound/apulse-0.1.9 ) ) |
199 |
- selinux? ( sec-policy/selinux-mozilla )" |
200 |
- |
201 |
-# @FUNCTION: mozconfig_config |
202 |
-# @DESCRIPTION: |
203 |
-# Set common configure options for mozilla packages. |
204 |
-# Call this within src_configure() phase, after mozconfig_init |
205 |
-# |
206 |
-# Example: |
207 |
-# |
208 |
-# inherit mozconfig-v6.46 |
209 |
-# |
210 |
-# src_configure() { |
211 |
-# mozconfig_init |
212 |
-# mozconfig_config |
213 |
-# # ... misc ebuild-unique settings via calls to |
214 |
-# # ... mozconfig_{annotate,use_with,use_enable} |
215 |
-# mozconfig_final |
216 |
-# } |
217 |
- |
218 |
-mozconfig_config() { |
219 |
- # Migrated from mozcoreconf-2 |
220 |
- mozconfig_annotate 'system_libs' \ |
221 |
- --with-system-zlib \ |
222 |
- --with-system-bz2 |
223 |
- |
224 |
- if has bindist ${IUSE}; then |
225 |
- mozconfig_use_enable !bindist official-branding |
226 |
- if [[ ${PN} == firefox ]] && use bindist ; then |
227 |
- mozconfig_annotate '' --with-branding=browser/branding/aurora |
228 |
- fi |
229 |
- fi |
230 |
- |
231 |
- # Enable position independent executables |
232 |
- mozconfig_annotate 'enabled by Gentoo' --enable-pie |
233 |
- mozconfig_use_enable debug |
234 |
- mozconfig_use_enable debug tests |
235 |
- |
236 |
- if ! use debug ; then |
237 |
- mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols |
238 |
- else |
239 |
- mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols |
240 |
- fi |
241 |
- |
242 |
- mozconfig_use_enable startup-notification |
243 |
- |
244 |
- if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then |
245 |
- # wifi pulls in dbus so manage both here |
246 |
- mozconfig_use_enable wifi necko-wifi |
247 |
- if use kernel_linux && use wifi && ! use dbus; then |
248 |
- echo "Enabling dbus support due to wifi request" |
249 |
- mozconfig_annotate 'dbus required by necko-wifi on linux' --enable-dbus |
250 |
- else |
251 |
- mozconfig_use_enable dbus |
252 |
- fi |
253 |
- else |
254 |
- mozconfig_use_enable dbus |
255 |
- mozconfig_annotate 'disabled' --disable-necko-wifi |
256 |
- fi |
257 |
- |
258 |
- if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then |
259 |
- mozconfig_use_enable jit ion |
260 |
- fi |
261 |
- |
262 |
- # These are enabled by default in all mozilla applications |
263 |
- mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr |
264 |
- mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr |
265 |
- mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir) |
266 |
- if use system-libevent; then |
267 |
- mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr |
268 |
- fi |
269 |
- mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
270 |
- mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
271 |
- mozconfig_annotate 'Gentoo default' --enable-system-hunspell |
272 |
- mozconfig_annotate '' --disable-gnomeui |
273 |
- mozconfig_annotate '' --enable-gio |
274 |
- mozconfig_annotate '' --disable-crashreporter |
275 |
- mozconfig_annotate 'Gentoo default' --with-system-png |
276 |
- mozconfig_annotate '' --enable-system-ffi |
277 |
- mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold |
278 |
- mozconfig_annotate '' --disable-gconf |
279 |
- mozconfig_annotate '' --with-intl-api |
280 |
- |
281 |
- # skia has no support for big-endian platforms |
282 |
- if [[ $(tc-endian) == "big" ]]; then |
283 |
- mozconfig_annotate 'big endian target' --disable-skia |
284 |
- else |
285 |
- mozconfig_annotate '' --enable-skia |
286 |
- fi |
287 |
- |
288 |
- # default toolkit is cairo-gtk2, optional use flags can change this |
289 |
- local toolkit="cairo-gtk2" |
290 |
- local toolkit_comment="" |
291 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then |
292 |
- if use force-gtk3; then |
293 |
- toolkit="cairo-gtk3" |
294 |
- toolkit_comment="force-gtk3 use flag" |
295 |
- fi |
296 |
- fi |
297 |
- if [[ -n ${MOZCONFIG_OPTIONAL_GTK2ONLY} ]]; then |
298 |
- if ! use gtk2 ; then |
299 |
- toolkit="cairo-gtk3" |
300 |
- else |
301 |
- toolkit_comment="gtk2 use flag" |
302 |
- fi |
303 |
- fi |
304 |
- if [[ -n ${MOZCONFIG_OPTIONAL_QT5} ]]; then |
305 |
- if use qt5; then |
306 |
- toolkit="cairo-qt" |
307 |
- toolkit_comment="qt5 use flag" |
308 |
- # need to specify these vars because the qt5 versions are not found otherwise, |
309 |
- # and setting --with-qtdir overrides the pkg-config include dirs |
310 |
- local i |
311 |
- for i in qmake moc rcc; do |
312 |
- echo "export HOST_${i^^}=\"$(qt5_get_bindir)/${i}\"" \ |
313 |
- >> "${S}"/.mozconfig || die |
314 |
- done |
315 |
- echo 'unset QTDIR' >> "${S}"/.mozconfig || die |
316 |
- mozconfig_annotate '+qt5' --disable-gio |
317 |
- fi |
318 |
- fi |
319 |
- mozconfig_annotate "${toolkit_comment}" --enable-default-toolkit=${toolkit} |
320 |
- |
321 |
- # Use jemalloc unless libc is not glibc >= 2.4 |
322 |
- # at this time the minimum glibc in the tree is 2.9 so we should be safe. |
323 |
- if use elibc_glibc && use jemalloc; then |
324 |
- # We must force-enable jemalloc 4 via .mozconfig |
325 |
- echo "export MOZ_JEMALLOC4=1" >> "${S}"/.mozconfig || die |
326 |
- mozconfig_annotate '' --enable-replace-malloc |
327 |
- fi |
328 |
- |
329 |
- # Instead of the standard --build= and --host=, mozilla uses --host instead |
330 |
- # of --build, and --target intstead of --host. |
331 |
- # Note, mozilla also has --build but it does not do what you think it does. |
332 |
- # Set both --target and --host as mozilla uses python to guess values otherwise |
333 |
- mozconfig_annotate '' --target="${CHOST}" |
334 |
- mozconfig_annotate '' --host="${CBUILD:-${CHOST}}" |
335 |
- |
336 |
- mozconfig_use_enable pulseaudio |
337 |
- # force the deprecated alsa sound code if pulseaudio is disabled |
338 |
- if use kernel_linux && ! use pulseaudio ; then |
339 |
- mozconfig_annotate '-pulseaudio' --enable-alsa |
340 |
- fi |
341 |
- |
342 |
- mozconfig_use_enable system-cairo |
343 |
- mozconfig_use_enable system-sqlite |
344 |
- mozconfig_use_with system-jpeg |
345 |
- mozconfig_use_with system-icu |
346 |
- mozconfig_use_with system-libvpx |
347 |
- mozconfig_use_with system-harfbuzz |
348 |
- mozconfig_use_with system-harfbuzz system-graphite2 |
349 |
- |
350 |
- # Modifications to better support ARM, bug 553364 |
351 |
- if use neon ; then |
352 |
- mozconfig_annotate '' --with-fpu=neon |
353 |
- mozconfig_annotate '' --with-thumb=yes |
354 |
- mozconfig_annotate '' --with-thumb-interwork=no |
355 |
- fi |
356 |
- if [[ ${CHOST} == armv* ]] ; then |
357 |
- mozconfig_annotate '' --with-float-abi=hard |
358 |
- if ! use system-libvpx ; then |
359 |
- sed -i -e "s|softfp|hard|" \ |
360 |
- "${S}"/media/libvpx/moz.build |
361 |
- fi |
362 |
- fi |
363 |
-} |
364 |
- |
365 |
-# @FUNCTION: mozconfig_install_prefs |
366 |
-# @DESCRIPTION: |
367 |
-# Set preferences into the prefs.js file specified as a parameter to |
368 |
-# the function. This sets both some common prefs to all mozilla |
369 |
-# packages, and any prefs that may relate to the use flags administered |
370 |
-# by mozconfig_config(). |
371 |
-# |
372 |
-# Call this within src_install() phase, after copying the template |
373 |
-# prefs file (if any) from ${FILESDIR} |
374 |
-# |
375 |
-# Example: |
376 |
-# |
377 |
-# inherit mozconfig-v6.46 |
378 |
-# |
379 |
-# src_install() { |
380 |
-# cp "${FILESDIR}"/gentoo-default-prefs.js \ |
381 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
382 |
-# || die |
383 |
-# |
384 |
-# mozconfig_install_prefs \ |
385 |
-# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" |
386 |
-# |
387 |
-# ... |
388 |
-# } |
389 |
- |
390 |
-mozconfig_install_prefs() { |
391 |
- local prefs_file="${1}" |
392 |
- |
393 |
- einfo "Adding prefs from mozconfig to ${prefs_file}" |
394 |
- |
395 |
- # set dictionary path, to use system hunspell |
396 |
- echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ |
397 |
- >>"${prefs_file}" || die |
398 |
- |
399 |
- # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it |
400 |
- if use system-harfbuzz ; then |
401 |
- echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ |
402 |
- >>"${prefs_file}" || die |
403 |
- fi |
404 |
- |
405 |
- # force cairo as the canvas renderer on platforms without skia support |
406 |
- if [[ $(tc-endian) == "big" ]] ; then |
407 |
- echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \ |
408 |
- >>"${prefs_file}" || die |
409 |
- echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \ |
410 |
- >>"${prefs_file}" || die |
411 |
- fi |
412 |
-} |
413 |
|
414 |
diff --git a/eclass/mozcoreconf-v4.eclass b/eclass/mozcoreconf-v4.eclass |
415 |
deleted file mode 100644 |
416 |
index ba9a65349fd..00000000000 |
417 |
--- a/eclass/mozcoreconf-v4.eclass |
418 |
+++ /dev/null |
419 |
@@ -1,261 +0,0 @@ |
420 |
-# Copyright 1999-2015 Gentoo Foundation |
421 |
-# Distributed under the terms of the GNU General Public License v2 |
422 |
-# |
423 |
-# @ECLASS: mozcoreconf-v4.eclass |
424 |
-# @MAINTAINER: |
425 |
-# Mozilla team <mozilla@g.o> |
426 |
-# @BLURB: core options and configuration functions for mozilla |
427 |
-# @DESCRIPTION: |
428 |
-# |
429 |
-# inherit mozconfig-v6.* or above for mozilla configuration support |
430 |
- |
431 |
-# @ECLASS-VARIABLE: MOZILLA_FIVE_HOME |
432 |
-# @DESCRIPTION: |
433 |
-# This is an eclass-generated variable that defines the rpath that the mozilla |
434 |
-# product will be installed in. Read-only |
435 |
- |
436 |
-if [[ ! ${_MOZCORECONF} ]]; then |
437 |
- |
438 |
-PYTHON_COMPAT=( python2_7 ) |
439 |
-PYTHON_REQ_USE='ncurses,sqlite,ssl,threads' |
440 |
- |
441 |
-inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator |
442 |
- |
443 |
-IUSE="${IUSE} custom-cflags custom-optimization" |
444 |
- |
445 |
-DEPEND="virtual/pkgconfig |
446 |
- ${PYTHON_DEPS}" |
447 |
- |
448 |
-# @FUNCTION: mozconfig_annotate |
449 |
-# @DESCRIPTION: |
450 |
-# add an annotated line to .mozconfig |
451 |
-# |
452 |
-# Example: |
453 |
-# mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc |
454 |
-# => ac_add_options --enable-js-ultrasparc # building on ultrasparc |
455 |
-mozconfig_annotate() { |
456 |
- declare reason=$1 x ; shift |
457 |
- [[ $# -gt 0 ]] || die "mozconfig_annotate missing flags for ${reason}\!" |
458 |
- for x in ${*}; do |
459 |
- echo "ac_add_options ${x} # ${reason}" >>.mozconfig |
460 |
- done |
461 |
-} |
462 |
- |
463 |
-# @FUNCTION: mozconfig_use_enable |
464 |
-# @DESCRIPTION: |
465 |
-# add a line to .mozconfig based on a USE-flag |
466 |
-# |
467 |
-# Example: |
468 |
-# mozconfig_use_enable truetype freetype2 |
469 |
-# => ac_add_options --enable-freetype2 # +truetype |
470 |
-mozconfig_use_enable() { |
471 |
- declare flag=$(use_enable "$@") |
472 |
- mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}" |
473 |
-} |
474 |
- |
475 |
-# @FUNCTION: mozconfig_use_with |
476 |
-# @DESCRIPTION: |
477 |
-# add a line to .mozconfig based on a USE-flag |
478 |
-# |
479 |
-# Example: |
480 |
-# mozconfig_use_with kerberos gss-api /usr/$(get_libdir) |
481 |
-# => ac_add_options --with-gss-api=/usr/lib # +kerberos |
482 |
-mozconfig_use_with() { |
483 |
- declare flag=$(use_with "$@") |
484 |
- mozconfig_annotate "$(use $1 && echo +$1 || echo -$1)" "${flag}" |
485 |
-} |
486 |
- |
487 |
-# @FUNCTION: mozconfig_use_extension |
488 |
-# @DESCRIPTION: |
489 |
-# enable or disable an extension based on a USE-flag |
490 |
-# |
491 |
-# Example: |
492 |
-# mozconfig_use_extension gnome gnomevfs |
493 |
-# => ac_add_options --enable-extensions=gnomevfs |
494 |
-mozconfig_use_extension() { |
495 |
- declare minus=$(use $1 || echo -) |
496 |
- mozconfig_annotate "${minus:-+}$1" --enable-extensions=${minus}${2} |
497 |
-} |
498 |
- |
499 |
-moz_pkgsetup() { |
500 |
- # Ensure we use C locale when building |
501 |
- export LANG="C" |
502 |
- export LC_ALL="C" |
503 |
- export LC_MESSAGES="C" |
504 |
- export LC_CTYPE="C" |
505 |
- |
506 |
- # Ensure we use correct toolchain |
507 |
- export HOST_CC="$(tc-getBUILD_CC)" |
508 |
- export HOST_CXX="$(tc-getBUILD_CXX)" |
509 |
- tc-export CC CXX LD PKG_CONFIG |
510 |
- |
511 |
- # Ensure that we have a sane build enviroment |
512 |
- export MOZILLA_CLIENT=1 |
513 |
- export BUILD_OPT=1 |
514 |
- export NO_STATIC_LIB=1 |
515 |
- export USE_PTHREADS=1 |
516 |
- export ALDFLAGS=${LDFLAGS} |
517 |
- # ensure MOZCONFIG is not defined |
518 |
- unset MOZCONFIG |
519 |
- |
520 |
- # set MOZILLA_FIVE_HOME |
521 |
- export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
522 |
- |
523 |
- # nested configure scripts in mozilla products generate unrecognized options |
524 |
- # false positives when toplevel configure passes downwards. |
525 |
- export QA_CONFIGURE_OPTIONS=".*" |
526 |
- |
527 |
- if [[ $(gcc-major-version) -eq 3 ]]; then |
528 |
- ewarn "Unsupported compiler detected, DO NOT file bugs for" |
529 |
- ewarn "outdated compilers. Bugs opened with gcc-3 will be closed" |
530 |
- ewarn "invalid." |
531 |
- fi |
532 |
- |
533 |
- python-any-r1_pkg_setup |
534 |
-} |
535 |
- |
536 |
-# @FUNCTION: mozconfig_init |
537 |
-# @DESCRIPTION: |
538 |
-# Initialize mozilla configuration and populate with core settings. |
539 |
-# This should be called in src_configure before any other mozconfig_* functions. |
540 |
-mozconfig_init() { |
541 |
- declare enable_optimize pango_version myext x |
542 |
- declare XUL=$([[ ${PN} == xulrunner ]] && echo true || echo false) |
543 |
- declare FF=$([[ ${PN} == firefox ]] && echo true || echo false) |
544 |
- declare SM=$([[ ${PN} == seamonkey ]] && echo true || echo false) |
545 |
- declare TB=$([[ ${PN} == thunderbird ]] && echo true || echo false) |
546 |
- |
547 |
- #################################### |
548 |
- # |
549 |
- # Setup the initial .mozconfig |
550 |
- # See http://www.mozilla.org/build/configure-build.html |
551 |
- # |
552 |
- #################################### |
553 |
- |
554 |
- case ${PN} in |
555 |
- *xulrunner) |
556 |
- cp xulrunner/config/mozconfig .mozconfig \ |
557 |
- || die "cp xulrunner/config/mozconfig failed" ;; |
558 |
- *firefox) |
559 |
- cp browser/config/mozconfig .mozconfig \ |
560 |
- || die "cp browser/config/mozconfig failed" ;; |
561 |
- seamonkey) |
562 |
- # Must create the initial mozconfig to enable application |
563 |
- : >.mozconfig || die "initial mozconfig creation failed" |
564 |
- mozconfig_annotate "" --enable-application=suite ;; |
565 |
- *thunderbird) |
566 |
- # Must create the initial mozconfig to enable application |
567 |
- : >.mozconfig || die "initial mozconfig creation failed" |
568 |
- mozconfig_annotate "" --enable-application=mail ;; |
569 |
- esac |
570 |
- |
571 |
- #################################### |
572 |
- # |
573 |
- # CFLAGS setup and ARCH support |
574 |
- # |
575 |
- #################################### |
576 |
- |
577 |
- # Set optimization level |
578 |
- if [[ ${ARCH} == hppa ]]; then |
579 |
- mozconfig_annotate "more than -O0 causes a segfault on hppa" --enable-optimize=-O0 |
580 |
- elif [[ ${ARCH} == x86 ]]; then |
581 |
- mozconfig_annotate "less then -O2 causes a segfault on x86" --enable-optimize=-O2 |
582 |
- elif use custom-optimization || [[ ${ARCH} =~ (alpha|ia64) ]]; then |
583 |
- # Set optimization level based on CFLAGS |
584 |
- if is-flag -O0; then |
585 |
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O0 |
586 |
- elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then |
587 |
- mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1 |
588 |
- elif is-flag -O4; then |
589 |
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O4 |
590 |
- elif is-flag -O3; then |
591 |
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O3 |
592 |
- elif is-flag -O1; then |
593 |
- mozconfig_annotate "from CFLAGS" --enable-optimize=-O1 |
594 |
- elif is-flag -Os; then |
595 |
- mozconfig_annotate "from CFLAGS" --enable-optimize=-Os |
596 |
- else |
597 |
- mozconfig_annotate "Gentoo's default optimization" --enable-optimize=-O2 |
598 |
- fi |
599 |
- else |
600 |
- # Enable Mozilla's default |
601 |
- mozconfig_annotate "mozilla default" --enable-optimize |
602 |
- fi |
603 |
- |
604 |
- # Strip optimization so it does not end up in compile string |
605 |
- filter-flags '-O*' |
606 |
- |
607 |
- # Strip over-aggressive CFLAGS |
608 |
- use custom-cflags || strip-flags |
609 |
- |
610 |
- # Additional ARCH support |
611 |
- case "${ARCH}" in |
612 |
- alpha) |
613 |
- # Historically we have needed to add -fPIC manually for 64-bit. |
614 |
- # Additionally, alpha should *always* build with -mieee for correct math |
615 |
- # operation |
616 |
- append-flags -fPIC -mieee |
617 |
- ;; |
618 |
- |
619 |
- ia64) |
620 |
- # Historically we have needed to add this manually for 64-bit |
621 |
- append-flags -fPIC |
622 |
- ;; |
623 |
- |
624 |
- ppc64) |
625 |
- append-flags -fPIC -mminimal-toc |
626 |
- ;; |
627 |
- esac |
628 |
- |
629 |
- # We need to append flags for gcc-6 support |
630 |
- if [[ $(gcc-major-version) -ge 6 ]]; then |
631 |
- append-cxxflags -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 |
632 |
- fi |
633 |
- |
634 |
- # Use the MOZILLA_FIVE_HOME for the rpath |
635 |
- append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags |
636 |
- # Set MOZILLA_FIVE_HOME in mozconfig |
637 |
- mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
638 |
- |
639 |
- #################################### |
640 |
- # |
641 |
- # mozconfig setup |
642 |
- # |
643 |
- #################################### |
644 |
- |
645 |
- mozconfig_annotate disable_update_strip \ |
646 |
- --disable-updater \ |
647 |
- --disable-strip \ |
648 |
- --disable-install-strip |
649 |
- |
650 |
- # jemalloc won't build with older glibc |
651 |
- ! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc |
652 |
-} |
653 |
- |
654 |
-# @FUNCTION: mozconfig_final |
655 |
-# @DESCRIPTION: |
656 |
-# Display a table describing all configuration options paired |
657 |
-# with reasons, then clean up extensions list. |
658 |
-# This should be called in src_configure at the end of all other mozconfig_* functions. |
659 |
-mozconfig_final() { |
660 |
- declare ac opt hash reason |
661 |
- echo |
662 |
- echo "==========================================================" |
663 |
- echo "Building ${PF} with the following configuration" |
664 |
- grep ^ac_add_options .mozconfig | while read ac opt hash reason; do |
665 |
- [[ -z ${hash} || ${hash} == \# ]] \ |
666 |
- || die "error reading mozconfig: ${ac} ${opt} ${hash} ${reason}" |
667 |
- printf " %-30s %s\n" "${opt}" "${reason:-mozilla.org default}" |
668 |
- done |
669 |
- echo "==========================================================" |
670 |
- echo |
671 |
- |
672 |
- # Resolve multiple --enable-extensions down to one |
673 |
- declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \ |
674 |
- .mozconfig | xargs) |
675 |
- sed -i '/^ac_add_options --enable-extensions/d' .mozconfig |
676 |
- echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig |
677 |
-} |
678 |
- |
679 |
-_MOZCORECONF=1 |
680 |
-fi |