Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/
Date: Fri, 27 Nov 2015 21:00:22
Message-Id: 1448655500.653b23d4814bdd1d754f62a01c89ed3a3f2f5eeb.axs@gentoo
1 commit: 653b23d4814bdd1d754f62a01c89ed3a3f2f5eeb
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 27 20:18:20 2015 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 27 20:18:20 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=653b23d4
7
8 ff43 beta initial commit
9
10 www-client/firefox/Manifest | 1 +
11 www-client/firefox/firefox-43.0_beta7.ebuild | 417 +++++++++++++++++++++++++++
12 2 files changed, 418 insertions(+)
13
14 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
15 index 6aa0924..cde2cee 100644
16 --- a/www-client/firefox/Manifest
17 +++ b/www-client/firefox/Manifest
18 @@ -79,3 +79,4 @@ DIST firefox-42.0-xh.xpi 455527 SHA256 1a1776e5770dd361d0adc85ed80bb1e81dd5436a0
19 DIST firefox-42.0-zh-CN.xpi 491278 SHA256 46bb4b1b67494004441135dbf3051501e0580fb8da29548de73f2e0fe12f7834 SHA512 af6b29e0b75b213ad82d8b6d9d0222f58a2992c3758fb6de2ea7e6d85736889eb0e66d45f3ef112eb5bc1b194ee747f5cf4eed73f153d6e35e031d2c36339993 WHIRLPOOL eeee742d90de3e7e5266617565a953a04f5c0736d76fef83710cd308150fa4509d5195b5a334097303896a1cc6fcb5070258c25fb2bea7862b77e8d0e7a28d77
20 DIST firefox-42.0-zh-TW.xpi 482387 SHA256 ef4e9b5e01b85564b935a5f9bc663ffac61ce0f3ca166c316b1aee648832d458 SHA512 35993b713480d68d647c0bcee9ccb8b58949097663ea839ed4ff9de3d11081863db5ab035f74b61beaabc448440c2aa5f6f6955112a23c8702adb8d7af57cd4b WHIRLPOOL 6aea103b3298a07490af7d067df61e0c5693416d8003272478e7c73bb5f36e92fb2f5c96f8b86f83faffe46c5ed7eb142ecfce300e215096585a8eace330ac1e
21 DIST firefox-42.0.source.tar.xz 165766832 SHA256 994a346699298277b64ec0cab72660b8d3e5b879a2ac79207576f7e6c33da3ae SHA512 d38f48047233bf68929bd05276165266d341c0186214687405010cac7ccbb266618eec43849b05fa12358eb43a106494d8dce9683bae62e133b7f990bb4c8aaf WHIRLPOOL 2ecb00867045f13739dc58838675f0620e3f0e69f7b446a99e9306061f1d44296fb054a8e19fda3f082f0c11f54c4e81810700705df574ee00d96f6332e1b0e1
22 +DIST firefox-43.0b7.source.tar.xz 175452128 SHA256 4ee0779c3c18f89b0c5bdf46c10b0de17811926bb1d7659afba8a43cf106e56b SHA512 bbee06acf2c8e38db26405f3c766a7930bd1a459140b3b392386eca52694dec05333bfa1baebbc68932065ad43489f91b24f7bf05761ca70194104464af1f34f WHIRLPOOL 38a66d5487e6366a7e9c56bd5825594b1a9fbb037028848a0a1dbaeb4510531dbad3c693932fe07abad3e5c73e77af8e0b4c214b137d8b32f6d465768d8c231b
23
24 diff --git a/www-client/firefox/firefox-43.0_beta7.ebuild b/www-client/firefox/firefox-43.0_beta7.ebuild
25 new file mode 100644
26 index 0000000..eeec89b
27 --- /dev/null
28 +++ b/www-client/firefox/firefox-43.0_beta7.ebuild
29 @@ -0,0 +1,417 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI="5"
35 +VIRTUALX_REQUIRED="pgo"
36 +WANT_AUTOCONF="2.1"
37 +MOZ_ESR=""
38 +
39 +# This list can be updated with scripts/get_langs.sh from the mozilla overlay
40 +# No official support as of fetch time
41 +# csb
42 +MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs cy da de el en
43 +en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd
44 +gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko lt lv mai mk ml mr
45 +nb-NO nl nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta te
46 +th tr uk vi xh zh-CN zh-TW )
47 +
48 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
49 +MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
50 +MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
51 +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
52 +
53 +if [[ ${MOZ_ESR} == 1 ]]; then
54 + # ESR releases have slightly version numbers
55 + MOZ_PV="${MOZ_PV}esr"
56 +fi
57 +
58 +# Patch version
59 +PATCH="${PN}-42.0-patches-0.3"
60 +MOZ_HTTP_URI="http://archive.mozilla.org/pub/${PN}/releases"
61 +
62 +MOZCONFIG_OPTIONAL_GTK3=1
63 +MOZCONFIG_OPTIONAL_WIFI=1
64 +MOZCONFIG_OPTIONAL_JIT="enabled"
65 +
66 +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.42 multilib pax-utils fdo-mime autotools virtualx mozlinguas
67 +
68 +DESCRIPTION="Firefox Web Browser"
69 +HOMEPAGE="http://www.mozilla.com/firefox"
70 +
71 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
72 +
73 +SLOT="0"
74 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
75 +IUSE="bindist egl hardened +minimal neon pgo selinux +gmp-autoupdate test"
76 +RESTRICT="!bindist? ( bindist )"
77 +
78 +# More URIs appended below...
79 +SRC_URI="${SRC_URI}
80 + https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
81 + https://dev.gentoo.org/~axs/mozilla/patchsets/${PATCH}.tar.xz
82 + https://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz"
83 +
84 +ASM_DEPEND=">=dev-lang/yasm-1.1"
85 +
86 +# Mesa 7.10 needed for WebGL + bugfixes
87 +RDEPEND="
88 + >=dev-libs/nss-3.20.1
89 + >=dev-libs/nspr-4.10.10-r1
90 + selinux? ( sec-policy/selinux-mozilla )"
91 +
92 +DEPEND="${RDEPEND}
93 + pgo? (
94 + >=sys-devel/gcc-4.5 )
95 + amd64? ( ${ASM_DEPEND}
96 + virtual/opengl )
97 + x86? ( ${ASM_DEPEND}
98 + virtual/opengl )"
99 +
100 +# No source releases for alpha|beta
101 +if [[ ${PV} =~ alpha ]]; then
102 + CHANGESET="8a3042764de7"
103 + SRC_URI="${SRC_URI}
104 + https://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.xz"
105 + S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
106 +else
107 + S="${WORKDIR}/firefox-${MOZ_PV}"
108 + SRC_URI="${SRC_URI}
109 + ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
110 +fi
111 +#elif [[ ${PV} =~ beta ]]; then
112 +# S="${WORKDIR}/mozilla-beta"
113 +# SRC_URI="${SRC_URI}
114 +# ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
115 +#else
116 +# SRC_URI="${SRC_URI}
117 +# ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.xz"
118 +# if [[ ${MOZ_ESR} == 1 ]]; then
119 +# S="${WORKDIR}/mozilla-esr${PV%%.*}"
120 +# else
121 +# S="${WORKDIR}/mozilla-release"
122 +# fi
123 +#fi
124 +
125 +QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
126 +
127 +BUILD_OBJ_DIR="${S}/ff"
128 +
129 +pkg_setup() {
130 + moz_pkgsetup
131 +
132 + # Avoid PGO profiling problems due to enviroment leakage
133 + # These should *always* be cleaned up anyway
134 + unset DBUS_SESSION_BUS_ADDRESS \
135 + DISPLAY \
136 + ORBIT_SOCKETDIR \
137 + SESSION_MANAGER \
138 + XDG_SESSION_COOKIE \
139 + XAUTHORITY
140 +
141 + if ! use bindist; then
142 + einfo
143 + elog "You are enabling official branding. You may not redistribute this build"
144 + elog "to any users on your network or the internet. Doing so puts yourself into"
145 + elog "a legal problem with Mozilla Foundation"
146 + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
147 + fi
148 +
149 + if use pgo; then
150 + einfo
151 + ewarn "You will do a double build for profile guided optimization."
152 + ewarn "This will result in your build taking at least twice as long as before."
153 + fi
154 +}
155 +
156 +pkg_pretend() {
157 + # Ensure we have enough disk space to compile
158 + if use pgo || use debug || use test ; then
159 + CHECKREQS_DISK_BUILD="8G"
160 + else
161 + CHECKREQS_DISK_BUILD="4G"
162 + fi
163 + check-reqs_pkg_setup
164 +}
165 +
166 +src_unpack() {
167 + unpack ${A}
168 +
169 + # Unpack language packs
170 + mozlinguas_src_unpack
171 +}
172 +
173 +src_prepare() {
174 + # Apply our patches
175 + EPATCH_SUFFIX="patch" \
176 + EPATCH_FORCE="yes" \
177 + EPATCH_EXCLUDE="8002_jemalloc_configure_unbashify.patch
178 + 8011_bug1194520-freetype261_until_moz43.patch" \
179 + epatch "${WORKDIR}/firefox"
180 +
181 + # Allow user to apply any additional patches without modifing ebuild
182 + epatch_user
183 +
184 + # Enable gnomebreakpad
185 + if use debug ; then
186 + sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
187 + "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
188 + fi
189 +
190 + # Ensure that our plugins dir is enabled as default
191 + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
192 + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
193 + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
194 + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
195 +
196 + # Fix sandbox violations during make clean, bug 372817
197 + sed -e "s:\(/no-such-file\):${T}\1:g" \
198 + -i "${S}"/config/rules.mk \
199 + -i "${S}"/nsprpub/configure{.in,} \
200 + || die
201 +
202 + # Don't exit with error when some libs are missing which we have in
203 + # system.
204 + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
205 + -i "${S}"/browser/installer/Makefile.in || die
206 +
207 + # Don't error out when there's no files to be removed:
208 + sed 's@\(xargs rm\)$@\1 -f@' \
209 + -i "${S}"/toolkit/mozapps/installer/packager.mk || die
210 +
211 + # Keep codebase the same even if not using official branding
212 + sed '/^MOZ_DEV_EDITION=1/d' \
213 + -i "${S}"/browser/branding/aurora/configure.sh || die
214 +
215 + eautoreconf
216 +
217 + # Must run autoconf in js/src
218 + cd "${S}"/js/src || die
219 + eautoconf
220 +
221 + # Need to update jemalloc's configure
222 + cd "${S}"/memory/jemalloc/src || die
223 + WANT_AUTOCONF= eautoconf
224 +}
225 +
226 +src_configure() {
227 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
228 + MEXTENSIONS="default"
229 + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
230 + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
231 + # get your own set of keys.
232 + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
233 +
234 + ####################################
235 + #
236 + # mozconfig, CFLAGS and CXXFLAGS setup
237 + #
238 + ####################################
239 +
240 + mozconfig_init
241 + mozconfig_config
242 +
243 + # We want rpath support to prevent unneeded hacks on different libc variants
244 + append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}"
245 +
246 + # It doesn't compile on alpha without this LDFLAGS
247 + use alpha && append-ldflags "-Wl,--no-relax"
248 +
249 + # Add full relro support for hardened
250 + use hardened && append-ldflags "-Wl,-z,relro,-z,now"
251 +
252 + if use neon ; then
253 + mozconfig_annotate '' --with-fpu=neon
254 + mozconfig_annotate '' --with-thumb=yes
255 + mozconfig_annotate '' --with-thumb-interwork=no
256 + fi
257 +
258 + if [[ ${CHOST} == armv* ]] ; then
259 + mozconfig_annotate '' --with-float-abi=hard
260 + mozconfig_annotate '' --enable-skia
261 +
262 + if ! use system-libvpx ; then
263 + sed -i -e "s|softfp|hard|" \
264 + "${S}"/media/libvpx/moz.build
265 + fi
266 + fi
267 +
268 + use egl && mozconfig_annotate 'Enable EGL as GL provider' --with-gl-provider=EGL
269 +
270 + # Setup api key for location services
271 + echo -n "${_google_api_key}" > "${S}"/google-api-key
272 + mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key"
273 +
274 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
275 + mozconfig_annotate '' --disable-mailnews
276 +
277 + # Other ff-specific settings
278 + mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
279 +
280 + # Allow for a proper pgo build
281 + if use pgo; then
282 + echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
283 + fi
284 +
285 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
286 +
287 + # Finalize and report settings
288 + mozconfig_final
289 +
290 + if [[ $(gcc-major-version) -lt 4 ]]; then
291 + append-cxxflags -fno-stack-protector
292 + fi
293 +
294 + # workaround for funky/broken upstream configure...
295 + emake -f client.mk configure
296 +}
297 +
298 +src_compile() {
299 + if use pgo; then
300 + addpredict /root
301 + addpredict /etc/gconf
302 + # Reset and cleanup environment variables used by GNOME/XDG
303 + gnome2_environment_reset
304 +
305 + # Firefox tries to use dri stuff when it's run, see bug 380283
306 + shopt -s nullglob
307 + cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
308 + if test -z "${cards}"; then
309 + cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
310 + if test -n "${cards}"; then
311 + # Binary drivers seem to cause access violations anyway, so
312 + # let's use indirect rendering so that the device files aren't
313 + # touched at all. See bug 394715.
314 + export LIBGL_ALWAYS_INDIRECT=1
315 + fi
316 + fi
317 + shopt -u nullglob
318 + addpredict "${cards}"
319 +
320 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
321 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
322 + Xemake -f client.mk profiledbuild || die "Xemake failed"
323 + else
324 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
325 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
326 + emake -f client.mk realbuild
327 + fi
328 +
329 +}
330 +
331 +src_install() {
332 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
333 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
334 +
335 + cd "${BUILD_OBJ_DIR}" || die
336 +
337 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
338 + pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
339 +
340 + # Add our default prefs for firefox
341 + cp "${FILESDIR}"/gentoo-default-prefs.js-2 \
342 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
343 + || die
344 +
345 + # Set default path to search for dictionaries.
346 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
347 + >> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
348 + || die
349 +
350 + echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
351 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
352 + || die
353 +
354 + local plugin
355 + use gmp-autoupdate || for plugin in \
356 + gmp-gmpopenh264 ; do
357 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
358 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
359 + || die
360 + done
361 +
362 + MOZ_MAKE_FLAGS="${MAKEOPTS}" \
363 + emake DESTDIR="${D}" install
364 +
365 + # Install language packs
366 + mozlinguas_src_install
367 +
368 + local size sizes icon_path icon name
369 + if use bindist; then
370 + sizes="16 32 48"
371 + icon_path="${S}/browser/branding/aurora"
372 + # Firefox's new rapid release cycle means no more codenames
373 + # Let's just stick with this one...
374 + icon="aurora"
375 + name="Aurora"
376 +
377 + # Override preferences to set the MOZ_DEV_EDITION defaults, since we
378 + # don't define MOZ_DEV_EDITION to avoid profile debaucles.
379 + # (source: browser/app/profile/firefox.js)
380 + cat >>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" <<PROFILE_EOF
381 +pref("app.feedback.baseURL", "https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/");
382 +sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@×××××××.org");
383 +sticky_pref("browser.devedition.theme.enabled", true);
384 +sticky_pref("devtools.theme", "dark");
385 +PROFILE_EOF
386 +
387 + else
388 + sizes="16 22 24 32 256"
389 + icon_path="${S}/browser/branding/official"
390 + icon="${PN}"
391 + name="Mozilla Firefox"
392 + fi
393 +
394 + # Install icons and .desktop for menu entry
395 + for size in ${sizes}; do
396 + insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
397 + newins "${icon_path}/default${size}.png" "${icon}.png"
398 + done
399 + # The 128x128 icon has a different name
400 + insinto "/usr/share/icons/hicolor/128x128/apps"
401 + newins "${icon_path}/mozicon128.png" "${icon}.png"
402 + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
403 + newicon "${icon_path}/content/icon48.png" "${icon}.png"
404 + newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
405 + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
406 + "${ED}/usr/share/applications/${PN}.desktop" || die
407 +
408 + # Add StartupNotify=true bug 237317
409 + if use startup-notification ; then
410 + echo "StartupNotify=true"\
411 + >> "${ED}/usr/share/applications/${PN}.desktop" \
412 + || die
413 + fi
414 +
415 + # Required in order to use plugins and even run firefox on hardened.
416 + if use jit; then
417 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
418 + else
419 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
420 + fi
421 +
422 + if use minimal; then
423 + rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \
424 + || die "Failed to remove sdk and headers"
425 + fi
426 +
427 + # very ugly hack to make firefox not sigbus on sparc
428 + # FIXME: is this still needed??
429 + use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
430 + -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \
431 + || die "sparc sed failed"; }
432 +}
433 +
434 +pkg_preinst() {
435 + gnome2_icon_savelist
436 +}
437 +
438 +pkg_postinst() {
439 + # Update mimedb for the new .desktop file
440 + fdo-mime_desktop_database_update
441 + gnome2_icon_cache_update
442 +}
443 +
444 +pkg_postrm() {
445 + gnome2_icon_cache_update
446 +}