Gentoo Archives: gentoo-commits

From: "git@oystercatcher mirror+tproxy" <git@××××××××××××××××××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/
Date: Wed, 04 Mar 2015 00:16:08
Message-Id: 1425240407.a04646748edd7477097e32f8c2a498f93dcb34c5.git@gentoo
1 commit: a04646748edd7477097e32f8c2a498f93dcb34c5
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 1 20:06:47 2015 +0000
4 Commit: git@oystercatcher mirror+tproxy <git <AT> oystercatcher <DOT> gentoo <DOT> org>
5 CommitDate: Sun Mar 1 20:06:47 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=a0464674
7
8 Firefox 37 beta1 added
9
10 www-client/firefox/Manifest | 1 +
11 www-client/firefox/firefox-37.0_beta1.ebuild | 391 +++++++++++++++++++++++++++
12 2 files changed, 392 insertions(+)
13
14 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
15 index 43ffedc..5012da5 100644
16 --- a/www-client/firefox/Manifest
17 +++ b/www-client/firefox/Manifest
18 @@ -160,3 +160,4 @@ DIST firefox-36.0-xh.xpi 436240 SHA256 56f2cdd3b6e6fed9afd150a32234de8ffcd55da1e
19 DIST firefox-36.0-zh-CN.xpi 475834 SHA256 58016e2f50536c48f2be10f8cbba49c39f2195c92cced4cd27ff8625ed63a127 SHA512 b7a17553d776f1eda104526a648fac6deeba9b7a36da7df444f14aff8937c834a9d594d4af54d4093a45b6a5692f9b6cc73022f76a4c4274c60f039d94eddf7e WHIRLPOOL fd873219b35403e23d3b1525486b2912f054cd422b76f878e9eb1ec494aa6faa3a611b0856b5a1e8b5609052ba12e7ed972f64c54145d9e220d3d7a295a6fdd5
20 DIST firefox-36.0-zh-TW.xpi 455305 SHA256 1b383472774b35333622cf528f2d40ef00796795e876cfda233a86c262aea2fe SHA512 e2608ca2d502b5cccca9428ecf4a0d5bd0955662ef765e97e6783fc6ef1377635e5ed3eaad3df222f82542865b61162f07330274ad6b253d569aac412877b20c WHIRLPOOL 98341e5b4d48a3b171bbc41d9166abafa3f088980a88ea069245c7a19a7c3f40cc80279162db9a7ace7105a9724a7997e4a16a756683d9476c3d371371510e5f
21 DIST firefox-36.0.source.tar.bz2 179368018 SHA256 d1db20e5c9674ccc9c463ac3d52c9e8e465eef4b01c822a166458a7d0d5b4cf2 SHA512 224f88673b0b0875edc0189ba4a6d883c0920a0a1e296880324dcbb6ad53a6e0be707447b4b083a2cc1b862a04a1a5aed0d38f72e2d404c27666116fa689da66 WHIRLPOOL 59f6777cbb0449f605cd939a43e78136b8c12725b7eb8088516dc5d3c39d24278e67b5f65ef6d62015b5b445b56d7a36c9e4d8d6e3c8f2183dc96c09bd14d0ad
22 +DIST firefox-37.0b1.source.tar.bz2 178770650 SHA256 e4b7898e43d3c802f321083f08c268e64382eecd9ab29dfa853155964920fa7b SHA512 6ddd906641ee030a03231ee6b729c153f525a012996ab37c56ecda8a176e5347ffede95cabdf276f4e8293aa16f219fc8889b2ee20781905add3da0fd0f5b574 WHIRLPOOL 773449cb35c6e9d3517c5d06d4c505f46db0bd1c7abb2f259e294697fc8e675e2701b0441c341feb8752c09bb8c9078927abcd494517a1105ad0f163caabee6c
23
24 diff --git a/www-client/firefox/firefox-37.0_beta1.ebuild b/www-client/firefox/firefox-37.0_beta1.ebuild
25 new file mode 100644
26 index 0000000..7acd903
27 --- /dev/null
28 +++ b/www-client/firefox/firefox-37.0_beta1.ebuild
29 @@ -0,0 +1,391 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-36.0.ebuild,v 1.4 2015/03/01 01:44:10 axs Exp $
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}-36.0-patches-01"
60 +# Upstream ftp release URI that's used by mozlinguas.eclass
61 +# We don't use the http mirror because it deletes old tarballs.
62 +MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
63 +MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
64 +
65 +MOZCONFIG_OPTIONAL_WIFI=1
66 +MOZCONFIG_OPTIONAL_JIT="enabled"
67 +
68 +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v5.36 multilib pax-utils fdo-mime autotools virtualx mozlinguas
69 +
70 +DESCRIPTION="Firefox Web Browser"
71 +HOMEPAGE="http://www.mozilla.com/firefox"
72 +
73 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
74 +
75 +SLOT="0"
76 +LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
77 +IUSE="bindist hardened +minimal pgo selinux +gmp-autoupdate test"
78 +RESTRICT="!bindist? ( bindist )"
79 +
80 +# More URIs appended below...
81 +SRC_URI="${SRC_URI}
82 + http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
83 + http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz
84 + http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz"
85 +
86 +ASM_DEPEND=">=dev-lang/yasm-1.1"
87 +
88 +# Mesa 7.10 needed for WebGL + bugfixes
89 +RDEPEND="
90 + >=dev-libs/nss-3.17.4
91 + >=dev-libs/nspr-4.10.7
92 + selinux? ( sec-policy/selinux-mozilla )"
93 +
94 +DEPEND="${RDEPEND}
95 + pgo? (
96 + >=sys-devel/gcc-4.5 )
97 + amd64? ( ${ASM_DEPEND}
98 + virtual/opengl )
99 + x86? ( ${ASM_DEPEND}
100 + virtual/opengl )"
101 +
102 +# No source releases for alpha|beta
103 +if [[ ${PV} =~ alpha ]]; then
104 + CHANGESET="8a3042764de7"
105 + SRC_URI="${SRC_URI}
106 + http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
107 + S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
108 +elif [[ ${PV} =~ beta ]]; then
109 + S="${WORKDIR}/mozilla-beta"
110 + SRC_URI="${SRC_URI}
111 + ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
112 + ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
113 +else
114 + SRC_URI="${SRC_URI}
115 + ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
116 + ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
117 + if [[ ${MOZ_ESR} == 1 ]]; then
118 + S="${WORKDIR}/mozilla-esr${PV%%.*}"
119 + else
120 + S="${WORKDIR}/mozilla-release"
121 + fi
122 +fi
123 +
124 +QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
125 +
126 +BUILD_OBJ_DIR="${S}/ff"
127 +
128 +pkg_setup() {
129 + moz_pkgsetup
130 +
131 + # Avoid PGO profiling problems due to enviroment leakage
132 + # These should *always* be cleaned up anyway
133 + unset DBUS_SESSION_BUS_ADDRESS \
134 + DISPLAY \
135 + ORBIT_SOCKETDIR \
136 + SESSION_MANAGER \
137 + XDG_SESSION_COOKIE \
138 + XAUTHORITY
139 +
140 + if ! use bindist; then
141 + einfo
142 + elog "You are enabling official branding. You may not redistribute this build"
143 + elog "to any users on your network or the internet. Doing so puts yourself into"
144 + elog "a legal problem with Mozilla Foundation"
145 + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
146 + fi
147 +
148 + if use pgo; then
149 + einfo
150 + ewarn "You will do a double build for profile guided optimization."
151 + ewarn "This will result in your build taking at least twice as long as before."
152 + fi
153 +}
154 +
155 +pkg_pretend() {
156 + # Ensure we have enough disk space to compile
157 + if use pgo || use debug || use test ; then
158 + CHECKREQS_DISK_BUILD="8G"
159 + else
160 + CHECKREQS_DISK_BUILD="4G"
161 + fi
162 + check-reqs_pkg_setup
163 +}
164 +
165 +src_unpack() {
166 + unpack ${A}
167 +
168 + # Unpack language packs
169 + mozlinguas_src_unpack
170 +}
171 +
172 +src_prepare() {
173 + # Apply our patches
174 + EPATCH_SUFFIX="patch" \
175 + EPATCH_FORCE="yes" \
176 + EPATCH_EXCLUDE="8002_jemalloc_configure_unbashify.patch" \
177 + epatch "${WORKDIR}/firefox"
178 +
179 + epatch "${FILESDIR}"/${PN}-35.0-gmp-clearkey-sprintf.patch
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 + eautoreconf
212 +
213 + # Must run autoconf in js/src
214 + cd "${S}"/js/src || die
215 + eautoconf
216 +
217 + # Need to update jemalloc's configure
218 + cd "${S}"/memory/jemalloc/src || die
219 + WANT_AUTOCONF= eautoconf
220 +}
221 +
222 +src_configure() {
223 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
224 + MEXTENSIONS="default"
225 + # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
226 + # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
227 + # get your own set of keys.
228 + _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
229 +
230 + ####################################
231 + #
232 + # mozconfig, CFLAGS and CXXFLAGS setup
233 + #
234 + ####################################
235 +
236 + mozconfig_init
237 + mozconfig_config
238 +
239 + # It doesn't compile on alpha without this LDFLAGS
240 + use alpha && append-ldflags "-Wl,--no-relax"
241 +
242 + # Add full relro support for hardened
243 + use hardened && append-ldflags "-Wl,-z,relro,-z,now"
244 +
245 + # Setup api key for location services
246 + echo -n "${_google_api_key}" > "${S}"/google-api-key
247 + mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key"
248 +
249 + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
250 + mozconfig_annotate '' --disable-mailnews
251 +
252 + # Other ff-specific settings
253 + mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
254 +
255 + # Force jit simulators for mips and arm
256 + use jit && use arm && mozconfig_annotate '' --enable-arm-simulator
257 + use jit && use mips && mozconfig_annotate '' --enable-mips-simulator
258 +
259 + # Allow for a proper pgo build
260 + if use pgo; then
261 + echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
262 + fi
263 +
264 + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
265 +
266 + # Finalize and report settings
267 + mozconfig_final
268 +
269 + if [[ $(gcc-major-version) -lt 4 ]]; then
270 + append-cxxflags -fno-stack-protector
271 + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
272 + if use amd64 || use x86; then
273 + append-flags -mno-avx
274 + fi
275 + fi
276 +}
277 +
278 +src_compile() {
279 + if use pgo; then
280 + addpredict /root
281 + addpredict /etc/gconf
282 + # Reset and cleanup environment variables used by GNOME/XDG
283 + gnome2_environment_reset
284 +
285 + # Firefox tries to use dri stuff when it's run, see bug 380283
286 + shopt -s nullglob
287 + cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
288 + if test -z "${cards}"; then
289 + cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
290 + if test -n "${cards}"; then
291 + # Binary drivers seem to cause access violations anyway, so
292 + # let's use indirect rendering so that the device files aren't
293 + # touched at all. See bug 394715.
294 + export LIBGL_ALWAYS_INDIRECT=1
295 + fi
296 + fi
297 + shopt -u nullglob
298 + addpredict "${cards}"
299 +
300 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
301 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
302 + Xemake -f client.mk profiledbuild || die "Xemake failed"
303 + else
304 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
305 + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
306 + emake -f client.mk
307 + fi
308 +
309 +}
310 +
311 +src_install() {
312 + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
313 + DICTPATH="\"${EPREFIX}/usr/share/myspell\""
314 +
315 + cd "${BUILD_OBJ_DIR}" || die
316 +
317 + # Pax mark xpcshell for hardened support, only used for startupcache creation.
318 + pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
319 +
320 + # Add our default prefs for firefox
321 + cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
322 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
323 + || die
324 +
325 + # Set default path to search for dictionaries.
326 + echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
327 + >> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
328 + || die
329 +
330 + echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
331 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
332 + || die
333 +
334 + local plugin
335 + use gmp-autoupdate || for plugin in \
336 + gmp-gmpopenh264 ; do
337 + echo "pref(\"media.${plugin}.autoupdate\", false);" >> \
338 + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
339 + || die
340 + done
341 +
342 + MOZ_MAKE_FLAGS="${MAKEOPTS}" \
343 + emake DESTDIR="${D}" install
344 +
345 + # Install language packs
346 + mozlinguas_src_install
347 +
348 + local size sizes icon_path icon name
349 + if use bindist; then
350 + sizes="16 32 48"
351 + icon_path="${S}/browser/branding/aurora"
352 + # Firefox's new rapid release cycle means no more codenames
353 + # Let's just stick with this one...
354 + icon="aurora"
355 + name="Aurora"
356 + else
357 + sizes="16 22 24 32 256"
358 + icon_path="${S}/browser/branding/official"
359 + icon="${PN}"
360 + name="Mozilla Firefox"
361 + fi
362 +
363 + # Install icons and .desktop for menu entry
364 + for size in ${sizes}; do
365 + insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
366 + newins "${icon_path}/default${size}.png" "${icon}.png"
367 + done
368 + # The 128x128 icon has a different name
369 + insinto "/usr/share/icons/hicolor/128x128/apps"
370 + newins "${icon_path}/mozicon128.png" "${icon}.png"
371 + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
372 + newicon "${icon_path}/content/icon48.png" "${icon}.png"
373 + newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
374 + sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
375 + "${ED}/usr/share/applications/${PN}.desktop" || die
376 +
377 + # Add StartupNotify=true bug 237317
378 + if use startup-notification ; then
379 + echo "StartupNotify=true"\
380 + >> "${ED}/usr/share/applications/${PN}.desktop" \
381 + || die
382 + fi
383 +
384 + # Required in order to use plugins and even run firefox on hardened.
385 + if use jit; then
386 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
387 + else
388 + pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
389 + fi
390 +
391 + if use minimal; then
392 + rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \
393 + || die "Failed to remove sdk and headers"
394 + fi
395 +
396 + # very ugly hack to make firefox not sigbus on sparc
397 + # FIXME: is this still needed??
398 + use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
399 + -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \
400 + || die "sparc sed failed"; }
401 +
402 + # revdep-rebuild entry
403 + insinto /etc/revdep-rebuild
404 + echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10firefox
405 + doins "${T}"/10${PN} || die
406 +}
407 +
408 +pkg_preinst() {
409 + gnome2_icon_savelist
410 +}
411 +
412 +pkg_postinst() {
413 + # Update mimedb for the new .desktop file
414 + fdo-mime_desktop_database_update
415 + gnome2_icon_cache_update
416 +}
417 +
418 +pkg_postrm() {
419 + gnome2_icon_cache_update
420 +}