Gentoo Archives: gentoo-commits

From: "Ian Stakenvicius (axs)" <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox: firefox-31.0.ebuild ChangeLog
Date: Mon, 28 Jul 2014 21:02:58
Message-Id: 20140728210253.7CDC62004E@flycatcher.gentoo.org
1 axs 14/07/28 21:02:53
2
3 Modified: ChangeLog
4 Added: firefox-31.0.ebuild
5 Log:
6 version bump, remove old; security bug 517876
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
9
10 Revision Changes Path
11 1.343 www-client/firefox/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.343&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.343&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.342&r2=1.343
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
20 retrieving revision 1.342
21 retrieving revision 1.343
22 diff -u -r1.342 -r1.343
23 --- ChangeLog 25 Jul 2014 14:22:23 -0000 1.342
24 +++ ChangeLog 28 Jul 2014 21:02:53 -0000 1.343
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/firefox
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.342 2014/07/25 14:22:23 axs Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.343 2014/07/28 21:02:53 axs Exp $
30 +
31 +*firefox-31.0 (28 Jul 2014)
32 +
33 + 28 Jul 2014; Ian Stakenvicius (_AxS_) <axs@g.o> +firefox-31.0.ebuild:
34 + version bump, remove old; security bug 517876
35
36 25 Jul 2014; Ian Stakenvicius (_AxS_) <axs@g.o> firefox-24.7.0.ebuild:
37 fixed nss dependency, bug 518024
38
39
40
41 1.1 www-client/firefox/firefox-31.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-31.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-31.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: firefox-31.0.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-31.0.ebuild,v 1.1 2014/07/28 21:02:53 axs Exp $
51
52 EAPI="5"
53 VIRTUALX_REQUIRED="pgo"
54 WANT_AUTOCONF="2.1"
55 MOZ_ESR=""
56
57 # This list can be updated with scripts/get_langs.sh from the mozilla overlay
58 MOZ_LANGS=( af ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
59 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
60 gl gu-IN he hi-IN hr hu hy-AM id is it ja kk km kn ko ku lt lv mai mk ml mr
61 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
62 th tr uk vi xh zh-CN zh-TW zu )
63
64 # Convert the ebuild version to the upstream mozilla version, used by mozlinguas
65 MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
66 MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
67 MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
68
69 if [[ ${MOZ_ESR} == 1 ]]; then
70 # ESR releases have slightly version numbers
71 MOZ_PV="${MOZ_PV}esr"
72 fi
73
74 # Patch version
75 PATCH="${PN}-31.0-patches-0.1"
76 # Upstream ftp release URI that's used by mozlinguas.eclass
77 # We don't use the http mirror because it deletes old tarballs.
78 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
79 MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
80
81 inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v4 multilib pax-utils fdo-mime autotools virtualx mozlinguas
82
83 DESCRIPTION="Firefox Web Browser"
84 HOMEPAGE="http://www.mozilla.com/firefox"
85
86 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
87 SLOT="0"
88 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
89 IUSE="bindist gstreamer hardened +jit +minimal pgo pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite test wifi"
90
91 # More URIs appended below...
92 SRC_URI="${SRC_URI}
93 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
94 http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz"
95
96 ASM_DEPEND=">=dev-lang/yasm-1.1"
97
98 # Mesa 7.10 needed for WebGL + bugfixes
99 RDEPEND="
100 >=dev-libs/nss-3.16.2
101 >=dev-libs/nspr-4.10.6
102 >=media-libs/mesa-7.10
103 >=media-libs/libpng-1.6.7[apng]
104 virtual/libffi
105 gstreamer? ( media-plugins/gst-plugins-meta:1.0[ffmpeg] )
106 pulseaudio? ( media-sound/pulseaudio )
107 system-cairo? ( >=x11-libs/cairo-1.12[X] )
108 system-icu? ( >=dev-libs/icu-51.1 )
109 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
110 system-sqlite? ( >=dev-db/sqlite-3.8.3.1:3[secure-delete,debug=] )
111 >=media-libs/libvpx-1.3.0
112 kernel_linux? ( media-libs/alsa-lib )
113 selinux? ( sec-policy/selinux-mozilla )"
114
115 DEPEND="${RDEPEND}
116 >=sys-devel/binutils-2.16.1
117 virtual/pkgconfig
118 pgo? (
119 >=sys-devel/gcc-4.5 )
120 amd64? ( ${ASM_DEPEND}
121 virtual/opengl )
122 x86? ( ${ASM_DEPEND}
123 virtual/opengl )"
124
125 # No source releases for alpha|beta
126 if [[ ${PV} =~ alpha ]]; then
127 CHANGESET="8a3042764de7"
128 SRC_URI="${SRC_URI}
129 http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
130 S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
131 elif [[ ${PV} =~ beta ]]; then
132 S="${WORKDIR}/mozilla-beta"
133 SRC_URI="${SRC_URI}
134 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
135 ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
136 else
137 SRC_URI="${SRC_URI}
138 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
139 ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
140 if [[ ${MOZ_ESR} == 1 ]]; then
141 S="${WORKDIR}/mozilla-esr${PV%%.*}"
142 else
143 S="${WORKDIR}/mozilla-release"
144 fi
145 fi
146
147 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
148
149 pkg_setup() {
150 moz_pkgsetup
151
152 # Avoid PGO profiling problems due to enviroment leakage
153 # These should *always* be cleaned up anyway
154 unset DBUS_SESSION_BUS_ADDRESS \
155 DISPLAY \
156 ORBIT_SOCKETDIR \
157 SESSION_MANAGER \
158 XDG_SESSION_COOKIE \
159 XAUTHORITY
160
161 if ! use bindist; then
162 einfo
163 elog "You are enabling official branding. You may not redistribute this build"
164 elog "to any users on your network or the internet. Doing so puts yourself into"
165 elog "a legal problem with Mozilla Foundation"
166 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
167 fi
168
169 if use pgo; then
170 einfo
171 ewarn "You will do a double build for profile guided optimization."
172 ewarn "This will result in your build taking at least twice as long as before."
173 fi
174 }
175
176 pkg_pretend() {
177 # Ensure we have enough disk space to compile
178 if use pgo || use debug || use test ; then
179 CHECKREQS_DISK_BUILD="8G"
180 else
181 CHECKREQS_DISK_BUILD="4G"
182 fi
183 check-reqs_pkg_setup
184 }
185
186 src_unpack() {
187 unpack ${A}
188
189 # Unpack language packs
190 mozlinguas_src_unpack
191 }
192
193 src_prepare() {
194 # Apply our patches
195 EPATCH_SUFFIX="patch" \
196 EPATCH_FORCE="yes" \
197 epatch "${WORKDIR}/firefox"
198
199 # Allow user to apply any additional patches without modifing ebuild
200 epatch_user
201
202 # Enable gnomebreakpad
203 if use debug ; then
204 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
205 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
206 fi
207
208 # Ensure that our plugins dir is enabled as default
209 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
210 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
211 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
212 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
213
214 # Fix sandbox violations during make clean, bug 372817
215 sed -e "s:\(/no-such-file\):${T}\1:g" \
216 -i "${S}"/config/rules.mk \
217 -i "${S}"/nsprpub/configure{.in,} \
218 || die
219
220 # Don't exit with error when some libs are missing which we have in
221 # system.
222 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
223 -i "${S}"/browser/installer/Makefile.in || die
224
225 # Don't error out when there's no files to be removed:
226 sed 's@\(xargs rm\)$@\1 -f@' \
227 -i "${S}"/toolkit/mozapps/installer/packager.mk || die
228
229 eautoreconf
230
231 # Must run autoconf in js/src
232 cd "${S}"/js/src || die
233 eautoconf
234 }
235
236 src_configure() {
237 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
238 MEXTENSIONS="default"
239 # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
240 # Note: These are for Gentoo Linux use ONLY. For your own distribution, please
241 # get your own set of keys.
242 _google_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
243
244 ####################################
245 #
246 # mozconfig, CFLAGS and CXXFLAGS setup
247 #
248 ####################################
249
250 mozconfig_init
251 mozconfig_config
252
253 # It doesn't compile on alpha without this LDFLAGS
254 use alpha && append-ldflags "-Wl,--no-relax"
255
256 # Add full relro support for hardened
257 use hardened && append-ldflags "-Wl,-z,relro,-z,now"
258
259 # We must force enable jemalloc 3 threw .mozconfig
260 echo "export MOZ_JEMALLOC=1" >> "${S}"/.mozconfig || die
261
262 # Setup api key for location services
263 echo -n "${_google_api_key}" > "${S}"/google-api-key
264 mozconfig_annotate '' --with-google-api-keyfile="${S}/google-api-key"
265
266 mozconfig_annotate '' --enable-jemalloc
267 mozconfig_annotate '' --enable-replace-malloc
268 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
269 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
270 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
271 mozconfig_annotate '' --disable-gconf
272 mozconfig_annotate '' --disable-mailnews
273 mozconfig_annotate '' --with-system-png
274 mozconfig_annotate '' --enable-system-ffi
275 mozconfig_annotate '' --disable-gold
276
277 # Other ff-specific settings
278 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
279 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
280 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
281
282 # gstreamer now needs the version specified
283 if use gstreamer; then
284 mozconfig_annotate '' --enable-gstreamer=1.0
285 else
286 mozconfig_annotate '' --disable-gstreamer
287 fi
288 mozconfig_use_enable pulseaudio
289 mozconfig_use_enable system-cairo
290 mozconfig_use_enable system-sqlite
291 mozconfig_use_with system-jpeg
292 mozconfig_use_with system-icu
293 mozconfig_use_enable system-icu intl-api
294
295 # Allow for a proper pgo build
296 if use pgo; then
297 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
298 fi
299
300 # Finalize and report settings
301 mozconfig_final
302
303 if [[ $(gcc-major-version) -lt 4 ]]; then
304 append-cxxflags -fno-stack-protector
305 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
306 if use amd64 || use x86; then
307 append-flags -mno-avx
308 fi
309 fi
310 }
311
312 src_compile() {
313 if use pgo; then
314 addpredict /root
315 addpredict /etc/gconf
316 # Reset and cleanup environment variables used by GNOME/XDG
317 gnome2_environment_reset
318
319 # Firefox tries to use dri stuff when it's run, see bug 380283
320 shopt -s nullglob
321 cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
322 if test -z "${cards}"; then
323 cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
324 if test -n "${cards}"; then
325 # Binary drivers seem to cause access violations anyway, so
326 # let's use indirect rendering so that the device files aren't
327 # touched at all. See bug 394715.
328 export LIBGL_ALWAYS_INDIRECT=1
329 fi
330 fi
331 shopt -u nullglob
332 addpredict "${cards}"
333
334 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
335 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
336 Xemake -f client.mk profiledbuild || die "Xemake failed"
337 else
338 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
339 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
340 emake -f client.mk
341 fi
342
343 }
344
345 src_install() {
346 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
347 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
348
349 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
350 local obj_dir="$(echo */config.log)"
351 obj_dir="${obj_dir%/*}"
352 cd "${S}/${obj_dir}" || die
353
354 # Pax mark xpcshell for hardened support, only used for startupcache creation.
355 pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
356
357 # Add our default prefs for firefox
358 cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
359 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
360 || die
361
362 # Set default path to search for dictionaries.
363 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
364 >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
365 || die
366
367 echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
368 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" \
369 || die
370
371 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
372 emake DESTDIR="${D}" install
373
374 # Install language packs
375 mozlinguas_src_install
376
377 local size sizes icon_path icon name
378 if use bindist; then
379 sizes="16 32 48"
380 icon_path="${S}/browser/branding/aurora"
381 # Firefox's new rapid release cycle means no more codenames
382 # Let's just stick with this one...
383 icon="aurora"
384 name="Aurora"
385 else
386 sizes="16 22 24 32 256"
387 icon_path="${S}/browser/branding/official"
388 icon="${PN}"
389 name="Mozilla Firefox"
390 fi
391
392 # Install icons and .desktop for menu entry
393 for size in ${sizes}; do
394 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
395 newins "${icon_path}/default${size}.png" "${icon}.png"
396 done
397 # The 128x128 icon has a different name
398 insinto "/usr/share/icons/hicolor/128x128/apps"
399 newins "${icon_path}/mozicon128.png" "${icon}.png"
400 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
401 newicon "${icon_path}/content/icon48.png" "${icon}.png"
402 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
403 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
404 "${ED}/usr/share/applications/${PN}.desktop" || die
405
406 # Add StartupNotify=true bug 237317
407 if use startup-notification ; then
408 echo "StartupNotify=true"\
409 >> "${ED}/usr/share/applications/${PN}.desktop" \
410 || die
411 fi
412
413 # Required in order to use plugins and even run firefox on hardened.
414 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
415
416 if use minimal; then
417 rm -r "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} \
418 || die "Failed to remove sdk and headers"
419 fi
420
421 # very ugly hack to make firefox not sigbus on sparc
422 # FIXME: is this still needed??
423 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
424 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" \
425 || die "sparc sed failed"; }
426
427 # revdep-rebuild entry
428 insinto /etc/revdep-rebuild
429 echo "SEARCH_DIRS_MASK=${MOZILLA_FIVE_HOME}" >> ${T}/10firefox
430 doins "${T}"/10${PN} || die
431 }
432
433 pkg_preinst() {
434 gnome2_icon_savelist
435 }
436
437 pkg_postinst() {
438 # Update mimedb for the new .desktop file
439 fdo-mime_desktop_database_update
440 gnome2_icon_cache_update
441 }
442
443 pkg_postrm() {
444 gnome2_icon_cache_update
445 }