Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox: ChangeLog firefox-27.0.1.ebuild
Date: Wed, 26 Feb 2014 12:50:36
Message-Id: 20140226125032.009032004C@flycatcher.gentoo.org
1 polynomial-c 14/02/26 12:50:31
2
3 Modified: ChangeLog
4 Added: firefox-27.0.1.ebuild
5 Log:
6 Version bump (bug #502512)
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.308 www-client/firefox/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.308&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.308&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.307&r2=1.308
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
20 retrieving revision 1.307
21 retrieving revision 1.308
22 diff -u -r1.307 -r1.308
23 --- ChangeLog 22 Feb 2014 08:42:39 -0000 1.307
24 +++ ChangeLog 26 Feb 2014 12:50:31 -0000 1.308
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.307 2014/02/22 08:42:39 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.308 2014/02/26 12:50:31 polynomial-c Exp $
30 +
31 +*firefox-27.0.1 (26 Feb 2014)
32 +
33 + 26 Feb 2014; Lars Wendler <polynomial-c@g.o> +firefox-27.0.1.ebuild:
34 + Version bump (bug #502512).
35
36 22 Feb 2014; Lars Wendler <polynomial-c@g.o> -firefox-24.1.1.ebuild,
37 -firefox-24.2.0.ebuild, -firefox-26.0.ebuild:
38
39
40
41 1.1 www-client/firefox/firefox-27.0.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-27.0.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-27.0.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: firefox-27.0.1.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-27.0.1.ebuild,v 1.1 2014/02/26 12:50:31 polynomial-c Exp $
51
52 EAPI="3"
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}-26.0-patches-0.3"
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-3 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 +jit +minimal pgo pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite"
90 RESTRICT="mirror"
91
92 # More URIs appended below...
93 SRC_URI="${SRC_URI}
94 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
95 http://dev.gentoo.org/~nirbheek/mozilla/patchsets/${PATCH}.tar.xz"
96
97 ASM_DEPEND=">=dev-lang/yasm-1.1"
98
99 # Mesa 7.10 needed for WebGL + bugfixes
100 RDEPEND="
101 >=dev-libs/nss-3.15.4
102 >=dev-libs/nspr-4.10.2
103 >=dev-libs/glib-2.26:2
104 >=media-libs/mesa-7.10
105 >=media-libs/libpng-1.6.6[apng]
106 virtual/libffi
107 gstreamer? ( media-plugins/gst-plugins-meta:0.10[ffmpeg] )
108 pulseaudio? ( media-sound/pulseaudio )
109 system-cairo? ( >=x11-libs/cairo-1.12[X] )
110 system-icu? ( >=dev-libs/icu-0.51.1 )
111 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
112 system-sqlite? ( >=dev-db/sqlite-3.8.0.2:3[secure-delete,debug=] )
113 >=media-libs/libvpx-1.0.0
114 kernel_linux? ( media-libs/alsa-lib )
115 selinux? ( sec-policy/selinux-mozilla )"
116
117 DEPEND="${RDEPEND}
118 >=sys-devel/binutils-2.16.1
119 virtual/pkgconfig
120 pgo? (
121 >=sys-devel/gcc-4.5 )
122 amd64? ( ${ASM_DEPEND}
123 virtual/opengl )
124 x86? ( ${ASM_DEPEND}
125 virtual/opengl )"
126
127 # No source releases for alpha|beta
128 if [[ ${PV} =~ alpha ]]; then
129 CHANGESET="8a3042764de7"
130 SRC_URI="${SRC_URI}
131 http://dev.gentoo.org/~nirbheek/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
132 S="${WORKDIR}/mozilla-aurora-${CHANGESET}"
133 elif [[ ${PV} =~ beta ]]; then
134 S="${WORKDIR}/mozilla-beta"
135 SRC_URI="${SRC_URI}
136 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
137 ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
138 else
139 SRC_URI="${SRC_URI}
140 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2
141 ${MOZ_HTTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
142 if [[ ${MOZ_ESR} == 1 ]]; then
143 S="${WORKDIR}/mozilla-esr${PV%%.*}"
144 else
145 S="${WORKDIR}/mozilla-release"
146 fi
147 fi
148
149 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
150
151 pkg_setup() {
152 moz_pkgsetup
153
154 # Avoid PGO profiling problems due to enviroment leakage
155 # These should *always* be cleaned up anyway
156 unset DBUS_SESSION_BUS_ADDRESS \
157 DISPLAY \
158 ORBIT_SOCKETDIR \
159 SESSION_MANAGER \
160 XDG_SESSION_COOKIE \
161 XAUTHORITY
162
163 if ! use bindist; then
164 einfo
165 elog "You are enabling official branding. You may not redistribute this build"
166 elog "to any users on your network or the internet. Doing so puts yourself into"
167 elog "a legal problem with Mozilla Foundation"
168 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
169 fi
170
171 if use pgo; then
172 einfo
173 ewarn "You will do a double build for profile guided optimization."
174 ewarn "This will result in your build taking at least twice as long as before."
175 fi
176
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_EXCLUDE="7007_fix_missing_strings.patch" \
196 EPATCH_SUFFIX="patch" \
197 EPATCH_FORCE="yes" \
198 epatch "${WORKDIR}/firefox"
199
200 # Allow user to apply any additional patches without modifing ebuild
201 epatch_user
202
203 # Enable gnomebreakpad
204 if use debug ; then
205 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
206 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
207 fi
208
209 # Ensure that our plugins dir is enabled as default
210 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
211 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
212 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
213 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
214
215 # Fix sandbox violations during make clean, bug 372817
216 sed -e "s:\(/no-such-file\):${T}\1:g" \
217 -i "${S}"/config/rules.mk \
218 -i "${S}"/js/src/config/rules.mk \
219 -i "${S}"/nsprpub/configure{.in,} \
220 || die
221
222 # Don't exit with error when some libs are missing which we have in
223 # system.
224 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
225 -i "${S}"/browser/installer/Makefile.in || die
226
227 # Don't error out when there's no files to be removed:
228 sed 's@\(xargs rm\)$@\1 -f@' \
229 -i "${S}"/toolkit/mozapps/installer/packager.mk || die
230
231 eautoreconf
232
233 # Must run autoconf in js/src
234 cd "${S}"/js/src
235 eautoconf
236 }
237
238 src_configure() {
239 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
240 MEXTENSIONS="default"
241
242 ####################################
243 #
244 # mozconfig, CFLAGS and CXXFLAGS setup
245 #
246 ####################################
247
248 mozconfig_init
249 mozconfig_config
250
251 # It doesn't compile on alpha without this LDFLAGS
252 use alpha && append-ldflags "-Wl,--no-relax"
253
254 # We must force enable jemalloc 3 threw .mozconfig
255 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
256
257 mozconfig_annotate '' --enable-jemalloc
258 mozconfig_annotate '' --enable-replace-malloc
259 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
260 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
261 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
262 mozconfig_annotate '' --disable-gconf
263 mozconfig_annotate '' --disable-mailnews
264 mozconfig_annotate '' --with-system-png
265 mozconfig_annotate '' --enable-system-ffi
266
267 # Other ff-specific settings
268 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
269 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
270 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
271
272 mozconfig_use_enable gstreamer
273 mozconfig_use_enable pulseaudio
274 mozconfig_use_enable system-cairo
275 mozconfig_use_enable system-sqlite
276 mozconfig_use_with system-jpeg
277 mozconfig_use_with system-icu
278 mozconfig_use_enable system-icu intl-api
279 # Feature is know to cause problems on hardened
280 mozconfig_use_enable jit ion
281
282 # Allow for a proper pgo build
283 if use pgo; then
284 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
285 fi
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 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
293 if use amd64 || use x86; then
294 append-flags -mno-avx
295 fi
296 fi
297 }
298
299 src_compile() {
300 if use pgo; then
301 addpredict /root
302 addpredict /etc/gconf
303 # Reset and cleanup environment variables used by GNOME/XDG
304 gnome2_environment_reset
305
306 # Firefox tries to use dri stuff when it's run, see bug 380283
307 shopt -s nullglob
308 cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
309 if test -z "${cards}"; then
310 cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
311 if test -n "${cards}"; then
312 # Binary drivers seem to cause access violations anyway, so
313 # let's use indirect rendering so that the device files aren't
314 # touched at all. See bug 394715.
315 export LIBGL_ALWAYS_INDIRECT=1
316 fi
317 fi
318 shopt -u nullglob
319 addpredict "${cards}"
320
321 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
322 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
323 Xemake -f client.mk profiledbuild || die "Xemake failed"
324 else
325 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
326 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
327 emake -f client.mk || die "emake failed"
328 fi
329
330 }
331
332 src_install() {
333 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
334 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
335
336 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
337 local obj_dir="$(echo */config.log)"
338 obj_dir="${obj_dir%/*}"
339 cd "${S}/${obj_dir}"
340
341 # Pax mark xpcshell for hardened support, only used for startupcache creation.
342 pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
343
344 # Add our default prefs for firefox
345 cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
346 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
347
348 # Set default path to search for dictionaries.
349 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
350 >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
351
352 if ! use libnotify; then
353 echo "pref(\"browser.download.manager.showAlertOnComplete\", false);" \
354 >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
355 fi
356
357 echo "pref(\"extensions.autoDisableScopes\", 3);" >> \
358 "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/all-gentoo.js" || die
359
360 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
361 emake DESTDIR="${D}" install || die "emake install failed"
362
363 # Install language packs
364 mozlinguas_src_install
365
366 local size sizes icon_path icon name
367 if use bindist; then
368 sizes="16 32 48"
369 icon_path="${S}/browser/branding/aurora"
370 # Firefox's new rapid release cycle means no more codenames
371 # Let's just stick with this one...
372 icon="aurora"
373 name="Aurora"
374 else
375 sizes="16 22 24 32 256"
376 icon_path="${S}/browser/branding/official"
377 icon="${PN}"
378 name="Mozilla Firefox"
379 fi
380
381 # Install icons and .desktop for menu entry
382 for size in ${sizes}; do
383 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
384 newins "${icon_path}/default${size}.png" "${icon}.png" || die
385 done
386 # The 128x128 icon has a different name
387 insinto "/usr/share/icons/hicolor/128x128/apps"
388 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
389 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
390 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
391 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
392 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
393 "${ED}/usr/share/applications/${PN}.desktop" || die
394
395 # Add StartupNotify=true bug 237317
396 if use startup-notification ; then
397 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
398 fi
399
400 # Required in order to use plugins and even run firefox on hardened.
401 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
402
403 if use minimal; then
404 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
405 die "Failed to remove sdk and headers"
406 fi
407
408 # very ugly hack to make firefox not sigbus on sparc
409 # FIXME: is this still needed??
410 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
411 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
412 die "sparc sed failed"; }
413 }
414
415 pkg_preinst() {
416 gnome2_icon_savelist
417 }
418
419 pkg_postinst() {
420 # Update mimedb for the new .desktop file
421 fdo-mime_desktop_database_update
422 gnome2_icon_cache_update
423 }
424
425 pkg_postrm() {
426 gnome2_icon_cache_update
427 }