Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 23 Sep 2015 01:01:39
Message-Id: 1442970032.ae5121580421d3dd59511696961dc4ae837585e0.axs@gentoo
1 commit: ae5121580421d3dd59511696961dc4ae837585e0
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 22 18:40:48 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 23 01:00:32 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae512158
7
8 added mozconfig.eclass for mozilla41
9
10 eclass/mozconfig-v6.41.eclass | 263 ++++++++++++++++++++++++++++++++++++++++++
11 1 file changed, 263 insertions(+)
12
13 diff --git a/eclass/mozconfig-v6.41.eclass b/eclass/mozconfig-v6.41.eclass
14 new file mode 100644
15 index 0000000..8177eb4
16 --- /dev/null
17 +++ b/eclass/mozconfig-v6.41.eclass
18 @@ -0,0 +1,263 @@
19 +# Copyright 1999-2015 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +#
23 +# @ECLASS: mozconfig-v6.40.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 +inherit multilib flag-o-matic toolchain-funcs mozcoreconf-v3
40 +
41 +case ${EAPI} in
42 + 0|1|2|3|4) die "EAPI=${EAPI} not supported"
43 +esac
44 +
45 +# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_WIFI
46 +# @DESCRIPTION:
47 +# Set this variable before the inherit line, when an ebuild needs to provide
48 +# optional necko-wifi support via IUSE="wifi". Currently this would include
49 +# ebuilds for firefox, and potentially seamonkey.
50 +#
51 +# Leave the variable UNSET if necko-wifi support should not be available.
52 +# Set the variable to "enabled" if the use flag should be enabled by default.
53 +# Set the variable to any value if the use flag should exist but not be default-enabled.
54 +
55 +# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_JIT
56 +# @DESCRIPTION:
57 +# Set this variable before the inherit line, when an ebuild needs to provide
58 +# optional necko-wifi support via IUSE="jit". Currently this would include
59 +# ebuilds for firefox, and potentially seamonkey.
60 +#
61 +# Leave the variable UNSET if optional jit support should not be available.
62 +# Set the variable to "enabled" if the use flag should be enabled by default.
63 +# Set the variable to any value if the use flag should exist but not be default-enabled.
64 +
65 +# @ECLASS-VARIABLE: MOZCONFIG_OPTIONAL_GTK3
66 +# @DESCRIPTION:
67 +# Set this variable before the inherit line, when an ebuild can provide
68 +# optional gtk3 support via IUSE="gtk3". Currently this would include
69 +# ebuilds for firefox, but thunderbird and seamonkey could follow in the future.
70 +#
71 +# Leave the variable UNSET if gtk3 support should not be available.
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 +# use-flags common among all mozilla ebuilds
76 +IUSE="${IUSE} dbus debug gstreamer gstreamer-0 +jemalloc3 pulseaudio selinux startup-notification system-cairo system-icu system-jpeg system-sqlite system-libvpx"
77 +
78 +# some notes on deps:
79 +# gtk:2 minimum is technically 2.10 but gio support (enabled by default) needs 2.14
80 +# media-libs/mesa needs to be 10.2 or above due to a bug with flash+vdpau
81 +
82 +RDEPEND=">=app-text/hunspell-1.2
83 + dev-libs/atk
84 + dev-libs/expat
85 + >=dev-libs/libevent-1.4.7
86 + >=x11-libs/cairo-1.10[X]
87 + >=x11-libs/gtk+-2.18:2
88 + x11-libs/gdk-pixbuf
89 + >=x11-libs/pango-1.22.0
90 + >=media-libs/libpng-1.6.17:0=[apng]
91 + >=media-libs/mesa-10.2:*
92 + media-libs/fontconfig
93 + >=media-libs/freetype-2.4.10
94 + kernel_linux? ( media-libs/alsa-lib )
95 + pulseaudio? ( media-sound/pulseaudio )
96 + virtual/freedesktop-icon-theme
97 + dbus? ( >=sys-apps/dbus-0.60
98 + >=dev-libs/dbus-glib-0.72 )
99 + startup-notification? ( >=x11-libs/startup-notification-0.8 )
100 + >=dev-libs/glib-2.26:2
101 + >=sys-libs/zlib-1.2.3
102 + >=virtual/libffi-3.0.10
103 + gstreamer? (
104 + >=media-libs/gstreamer-1.4.5:1.0
105 + >=media-libs/gst-plugins-base-1.4.5:1.0
106 + >=media-libs/gst-plugins-good-1.4.5:1.0
107 + >=media-plugins/gst-plugins-libav-1.4.5:1.0
108 + )
109 + gstreamer-0? (
110 + >=media-libs/gstreamer-0.10.25:0.10
111 + media-plugins/gst-plugins-meta:0.10[ffmpeg]
112 + )
113 + x11-libs/libX11
114 + x11-libs/libXcomposite
115 + x11-libs/libXdamage
116 + x11-libs/libXext
117 + x11-libs/libXfixes
118 + x11-libs/libXrender
119 + x11-libs/libXt
120 + system-cairo? ( >=x11-libs/cairo-1.12[X] >=x11-libs/pixman-0.19.2 )
121 + system-icu? ( >=dev-libs/icu-51.1:= )
122 + system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
123 + system-sqlite? ( >=dev-db/sqlite-3.8.10.1:3[secure-delete,debug=] )
124 + system-libvpx? ( >=media-libs/libvpx-1.3.0[postproc] )
125 +"
126 +
127 +if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then
128 + if [[ ${MOZCONFIG_OPTIONAL_GTK3} = "enabled" ]]; then
129 + IUSE+=" +gtk3"
130 + else
131 + IUSE+=" gtk3"
132 + fi
133 + RDEPEND+="
134 + gtk3? ( >=x11-libs/gtk+-3.14.0:3 )"
135 +fi
136 +if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]]; then
137 + if [[ ${MOZCONFIG_OPTIONAL_WIFI} = "enabled" ]]; then
138 + IUSE+=" +wifi"
139 + else
140 + IUSE+=" wifi"
141 + fi
142 + RDEPEND+="
143 + wifi? ( >=sys-apps/dbus-0.60
144 + >=dev-libs/dbus-glib-0.72
145 + net-wireless/wireless-tools )"
146 +fi
147 +if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then
148 + if [[ ${MOZCONFIG_OPTIONAL_JIT} = "enabled" ]]; then
149 + IUSE+=" +jit"
150 + else
151 + IUSE+=" jit"
152 + fi
153 +fi
154 +
155 +DEPEND="app-arch/zip
156 + app-arch/unzip
157 + >=sys-devel/binutils-2.16.1
158 + ${RDEPEND}"
159 +
160 +RDEPEND+="
161 + selinux? ( sec-policy/selinux-mozilla )"
162 +
163 +# only one of gstreamer and gstreamer-0 can be enabled at a time, so set REQUIRED_USE to signify this
164 +REQUIRED_USE="?? ( gstreamer gstreamer-0 )"
165 +
166 +# @FUNCTION: mozconfig_config
167 +# @DESCRIPTION:
168 +# Set common configure options for mozilla packages.
169 +# Call this within src_configure() phase, after mozconfig_init
170 +#
171 +# Example:
172 +#
173 +# inherit mozconfig-v5.33
174 +#
175 +# src_configure() {
176 +# mozconfig_init
177 +# mozconfig_config
178 +# # ... misc ebuild-unique settings via calls to
179 +# # ... mozconfig_{annotate,use_with,use_enable}
180 +# mozconfig_final
181 +# }
182 +
183 +mozconfig_config() {
184 + # Migrated from mozcoreconf-2
185 + mozconfig_annotate 'system_libs' \
186 + --with-system-zlib \
187 + --enable-pango \
188 + --enable-svg \
189 + --with-system-bz2
190 +
191 + if [[ -n ${MOZCONFIG_OPTIONAL_GTK3} ]]; then
192 + mozconfig_annotate 'gtk3 use flag' --enable-default-toolkit=$(usex gtk3 cairo-gtk3 cairo-gtk2)
193 + else
194 + mozconfig_annotate '' --enable-default-toolkit=cairo-gtk2
195 + fi
196 +
197 + if has bindist ${IUSE}; then
198 + mozconfig_use_enable !bindist official-branding
199 + if [[ ${PN} == firefox ]] && use bindist ; then
200 + mozconfig_annotate '' --with-branding=browser/branding/aurora
201 + fi
202 + fi
203 +
204 + mozconfig_use_enable debug
205 + mozconfig_use_enable debug tests
206 +
207 + if ! use debug ; then
208 + mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
209 + else
210 + mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
211 + fi
212 +
213 + mozconfig_use_enable startup-notification
214 +
215 + if [[ -n ${MOZCONFIG_OPTIONAL_WIFI} ]] ; then
216 + # wifi pulls in dbus so manage both here
217 + mozconfig_use_enable wifi necko-wifi
218 + if use wifi && ! use dbus; then
219 + echo "Enabling dbus support due to wifi request"
220 + mozconfig_annotate 'dbus required by necko-wifi' --enable-dbus
221 + else
222 + mozconfig_use_enable dbus
223 + fi
224 + else
225 + mozconfig_use_enable dbus
226 + mozconfig_annotate 'disabled' --disable-necko-wifi
227 + fi
228 +
229 + # These are forced-on for webm support
230 + mozconfig_annotate 'required' --enable-ogg
231 + mozconfig_annotate 'required' --enable-wave
232 +
233 + if [[ -n ${MOZCONFIG_OPTIONAL_JIT} ]]; then
234 + mozconfig_use_enable jit ion
235 + fi
236 +
237 + # These are enabled by default in all mozilla applications
238 + mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
239 + mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
240 + mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
241 + mozconfig_annotate '' --with-system-libevent="${EPREFIX}"/usr
242 + mozconfig_annotate '' --prefix="${EPREFIX}"/usr
243 + mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
244 + mozconfig_annotate 'Gentoo default' --enable-system-hunspell
245 + mozconfig_annotate '' --disable-gnomevfs
246 + mozconfig_annotate '' --disable-gnomeui
247 + mozconfig_annotate '' --enable-gio
248 + mozconfig_annotate '' --disable-crashreporter
249 + mozconfig_annotate 'Gentoo default' --with-system-png
250 + mozconfig_annotate '' --enable-system-ffi
251 + mozconfig_annotate 'Gentoo default to honor system linker' --disable-gold
252 + mozconfig_annotate '' --disable-gconf
253 +
254 + # Use jemalloc unless libc is not glibc >= 2.4
255 + # at this time the minimum glibc in the tree is 2.9 so we should be safe.
256 + if use elibc_glibc && use jemalloc3; then
257 + # We must force-enable jemalloc 3 via .mozconfig
258 + echo "export MOZ_JEMALLOC3=1" >> "${S}"/.mozconfig || die
259 + mozconfig_annotate '' --enable-jemalloc
260 + mozconfig_annotate '' --enable-replace-malloc
261 + fi
262 +
263 + mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
264 + mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
265 +
266 + if use gstreamer ; then
267 + mozconfig_annotate '+gstreamer' --enable-gstreamer=1.0
268 + elif use gstreamer-0 ; then
269 + mozconfig_annotate '+gstreamer-0' --enable-gstreamer=0.10
270 + else
271 + mozconfig_annotate '' --disable-gstreamer
272 + fi
273 + mozconfig_use_enable pulseaudio
274 +
275 + mozconfig_use_enable system-cairo
276 + mozconfig_use_enable system-sqlite
277 + mozconfig_use_with system-jpeg
278 + mozconfig_use_with system-icu
279 + mozconfig_use_enable system-icu intl-api
280 + mozconfig_use_with system-libvpx
281 +}