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: ChangeLog firefox-10.0.10.ebuild
Date: Tue, 30 Oct 2012 18:48:42
Message-Id: 20121030184829.B96C721600@flycatcher.gentoo.org
1 axs 12/10/30 18:48:29
2
3 Modified: ChangeLog
4 Added: firefox-10.0.10.ebuild
5 Log:
6 ESR bump for security bug 439960
7
8 (Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
9
10 Revision Changes Path
11 1.183 www-client/firefox/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.183&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.183&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.182&r2=1.183
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
20 retrieving revision 1.182
21 retrieving revision 1.183
22 diff -u -r1.182 -r1.183
23 --- ChangeLog 28 Oct 2012 01:04:54 -0000 1.182
24 +++ ChangeLog 30 Oct 2012 18:48:29 -0000 1.183
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/firefox
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.182 2012/10/28 01:04:54 anarchy Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.183 2012/10/30 18:48:29 axs Exp $
30 +
31 +*firefox-10.0.10 (30 Oct 2012)
32 +
33 + 30 Oct 2012; Ian Stakenvicius <axs@g.o> +firefox-10.0.10.ebuild:
34 + ESR bump for security bug 439960
35
36 *firefox-16.0.2 (28 Oct 2012)
37
38
39
40
41 1.1 www-client/firefox/firefox-10.0.10.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-10.0.10.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-10.0.10.ebuild?rev=1.1&content-type=text/plain
45
46 Index: firefox-10.0.10.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-10.0.10.ebuild,v 1.1 2012/10/30 18:48:29 axs Exp $
51
52 EAPI="3"
53 VIRTUALX_REQUIRED="pgo"
54 WANT_AUTOCONF="2.1"
55 MOZ_ESR="1"
56
57 # This list can be updated with scripts/get_langs.sh from the mozilla overlay
58 MOZ_LANGS=(af ak 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 gl
60 gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO
61 nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK
62 te th tr uk vi 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 # Changeset for alpha snapshot
75 CHANGESET="e56ecd8b3a68"
76 # Patch version
77 PATCH="${PN}-10.0-patches-0.9"
78 # Upstream ftp release URI that's used by mozlinguas.eclass
79 # We don't use the http mirror because it deletes old tarballs.
80 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
81
82 inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools python virtualx nsplugins mozlinguas
83
84 DESCRIPTION="Firefox Web Browser"
85 HOMEPAGE="http://www.mozilla.com/firefox"
86
87 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~amd64-linux ~x86-linux"
88 SLOT="0"
89 LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
90 IUSE="bindist +ipc +minimal pgo selinux system-sqlite +webm"
91
92 # More URIs appended below...
93 SRC_URI="${SRC_URI}
94 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
95
96 ASM_DEPEND=">=dev-lang/yasm-1.1"
97
98 # Mesa 7.10 needed for WebGL + bugfixes
99 RDEPEND="
100 >=sys-devel/binutils-2.16.1
101 >=dev-libs/nss-3.13.6
102 >=dev-libs/nspr-4.9.2
103 >=dev-libs/glib-2.26:2
104 >=media-libs/mesa-7.10
105 >=media-libs/libpng-1.5.9[apng]
106 virtual/libffi
107 system-sqlite? ( >=dev-db/sqlite-3.7.7.1[fts3,secure-delete,threadsafe,unlock-notify,debug=] )
108 webm? ( >=media-libs/libvpx-1.0.0
109 media-libs/alsa-lib )
110 selinux? ( sec-policy/selinux-mozilla )"
111 # We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
112 DEPEND="${RDEPEND}
113 virtual/pkgconfig
114 pgo? (
115 =dev-lang/python-2*[sqlite]
116 >=sys-devel/gcc-4.5 )
117 webm? ( virtual/opengl
118 x86? ( ${ASM_DEPEND} )
119 amd64? ( ${ASM_DEPEND} ) )"
120
121 # No source releases for alpha|beta
122 if [[ ${PV} =~ alpha ]]; then
123 SRC_URI="${SRC_URI}
124 http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
125 S="${WORKDIR}/mozilla-central"
126 elif [[ ${PV} =~ beta ]]; then
127 SRC_URI="${SRC_URI}
128 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
129 S="${WORKDIR}/mozilla-beta"
130 else
131 SRC_URI="${SRC_URI}
132 ${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
133 if [[ ${MOZ_ESR} == 1 ]]; then
134 S="${WORKDIR}/mozilla-esr${PV%%.*}"
135 else
136 S="${WORKDIR}/mozilla-release"
137 fi
138 fi
139
140 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
141
142 pkg_setup() {
143 moz_pkgsetup
144
145 # Avoid PGO profiling problems due to enviroment leakage
146 # These should *always* be cleaned up anyway
147 unset DBUS_SESSION_BUS_ADDRESS \
148 DISPLAY \
149 ORBIT_SOCKETDIR \
150 SESSION_MANAGER \
151 XDG_SESSION_COOKIE \
152 XAUTHORITY
153
154 if ! use bindist; then
155 einfo
156 elog "You are enabling official branding. You may not redistribute this build"
157 elog "to any users on your network or the internet. Doing so puts yourself into"
158 elog "a legal problem with Mozilla Foundation"
159 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
160 fi
161
162 if use pgo; then
163 einfo
164 ewarn "You will do a double build for profile guided optimization."
165 ewarn "This will result in your build taking at least twice as long as before."
166 fi
167
168 # Ensure we have enough disk space to compile
169 if use pgo || use debug || use test ; then
170 CHECKREQS_DISK_BUILD="8G"
171 else
172 CHECKREQS_DISK_BUILD="4G"
173 fi
174 check-reqs_pkg_setup
175 }
176
177 src_unpack() {
178 unpack ${A}
179
180 # Unpack language packs
181 mozlinguas_src_unpack
182 }
183
184 src_prepare() {
185 # Apply our patches
186 EPATCH_EXCLUDE="5005_use_resource_urls_appropriately.patch
187 6012_fix_shlibsign.patch
188 6013_fix_abort_declaration.patch" \
189 EPATCH_SUFFIX="patch" \
190 EPATCH_FORCE="yes" \
191 epatch "${WORKDIR}/firefox"
192
193 # Allow user to apply any additional patches without modifing ebuild
194 epatch_user
195
196 # Enable gnomebreakpad
197 if use debug ; then
198 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
199 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
200 fi
201
202 # Disable gnomevfs extension
203 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
204 -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
205 || die "Failed to remove gnomevfs extension"
206
207 # Ensure that are plugins dir is enabled as default
208 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
209 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
210
211 # Fix sandbox violations during make clean, bug 372817
212 sed -e "s:\(/no-such-file\):${T}\1:g" \
213 -i "${S}"/config/rules.mk \
214 -i "${S}"/js/src/config/rules.mk \
215 -i "${S}"/nsprpub/configure{.in,} \
216 || die
217
218 #Fix compilation with curl-7.21.7 bug 376027
219 sed -e '/#include <curl\/types.h>/d' \
220 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
221 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
222 -i "${S}"/config/system-headers \
223 -i "${S}"/js/src/config/system-headers || die "Sed failed"
224
225 eautoreconf
226 }
227
228 src_configure() {
229 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
230 MEXTENSIONS="default"
231
232 ####################################
233 #
234 # mozconfig, CFLAGS and CXXFLAGS setup
235 #
236 ####################################
237
238 mozconfig_init
239 mozconfig_config
240
241 # It doesn't compile on alpha without this LDFLAGS
242 use alpha && append-ldflags "-Wl,--no-relax"
243
244 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
245 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
246 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
247 mozconfig_annotate '' --disable-gconf
248 mozconfig_annotate '' --disable-mailnews
249 mozconfig_annotate '' --enable-canvas
250 mozconfig_annotate '' --enable-safe-browsing
251 mozconfig_annotate '' --with-system-png
252 mozconfig_annotate '' --enable-system-ffi
253 mozconfig_annotate 'regression' --disable-tracejit
254
255 # Other ff-specific settings
256 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
257 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
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 # Finalize and report settings
265 mozconfig_final
266
267 if [[ $(gcc-major-version) -lt 4 ]]; then
268 append-cxxflags -fno-stack-protector
269 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
270 if use amd64 || use x86; then
271 append-flags -mno-avx
272 fi
273 fi
274 }
275
276 src_compile() {
277 if use pgo; then
278 addpredict /root
279 addpredict /etc/gconf
280 # Reset and cleanup environment variables used by GNOME/XDG
281 gnome2_environment_reset
282
283 # Firefox tries to use dri stuff when it's run, see bug 380283
284 shopt -s nullglob
285 cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
286 if test -n "${cards}"; then
287 # FOSS drivers are fine
288 addpredict "${cards}"
289 else
290 cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
291 if test -n "${cards}"; then
292 # Binary drivers seem to cause access violations anyway, so
293 # let's use indirect rendering so that the device files aren't
294 # touched at all. See bug 394715.
295 export LIBGL_ALWAYS_INDIRECT=1
296 fi
297 fi
298 shopt -u nullglob
299
300 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
301 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
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}" \
306 emake -f client.mk || die "emake failed"
307 fi
308
309 }
310
311 src_install() {
312 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
313
314 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
315 local obj_dir="$(echo */config.log)"
316 obj_dir="${obj_dir%/*}"
317 cd "${S}/${obj_dir}"
318
319 # Pax mark xpcshell for hardened support, only used for startupcache creation.
320 pax-mark m "${S}/${obj_dir}"/dist/bin/xpcshell
321
322 # Add our default prefs for firefox + xulrunner
323 cp "${FILESDIR}"/gentoo-default-prefs.js-1 \
324 "${S}/${obj_dir}/dist/bin/defaults/pref/all-gentoo.js" || die
325
326 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
327 emake DESTDIR="${D}" install || die "emake install failed"
328
329 # Install language packs
330 mozlinguas_src_install
331
332 local size sizes icon_path icon name
333 if use bindist; then
334 sizes="16 32 48"
335 icon_path="${S}/browser/branding/aurora"
336 # Firefox's new rapid release cycle means no more codenames
337 # Let's just stick with this one...
338 icon="aurora"
339 name="Aurora"
340 else
341 sizes="16 22 24 32 256"
342 icon_path="${S}/browser/branding/official"
343 icon="${PN}"
344 name="Mozilla Firefox"
345 fi
346
347 # Install icons and .desktop for menu entry
348 for size in ${sizes}; do
349 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
350 newins "${icon_path}/default${size}.png" "${icon}.png" || die
351 done
352 # The 128x128 icon has a different name
353 insinto "/usr/share/icons/hicolor/128x128/apps"
354 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
355 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
356 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
357 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
358 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
359 "${ED}/usr/share/applications/${PN}.desktop" || die
360
361 # Add StartupNotify=true bug 237317
362 if use startup-notification ; then
363 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
364 fi
365
366 # Required in order to use plugins and even run firefox on hardened.
367 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/{firefox,firefox-bin,plugin-container}
368
369 # Plugins dir
370 share_plugins_dir
371
372 if use minimal; then
373 rm -rf "${ED}"/usr/include "${ED}${MOZILLA_FIVE_HOME}"/{idl,include,lib,sdk} || \
374 die "Failed to remove sdk and headers"
375 fi
376
377 # very ugly hack to make firefox not sigbus on sparc
378 # FIXME: is this still needed??
379 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
380 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
381 die "sparc sed failed"; }
382 }
383
384 pkg_preinst() {
385 gnome2_icon_savelist
386 }
387
388 pkg_postinst() {
389 # Update mimedb for the new .desktop file
390 fdo-mime_desktop_database_update
391 gnome2_icon_cache_update
392 }
393
394 pkg_postrm() {
395 gnome2_icon_cache_update
396 }