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-6.0.2.ebuild firefox-3.6.17.ebuild
Date: Mon, 26 Sep 2011 15:47:57
Message-Id: 20110926154741.BA9B520036@flycatcher.gentoo.org
1 polynomial-c 11/09/26 15:47:41
2
3 Modified: ChangeLog
4 Added: firefox-6.0.2.ebuild
5 Removed: firefox-3.6.17.ebuild
6 Log:
7 Security bump. Removed old
8
9 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.98 www-client/firefox/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.98&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.98&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.97&r2=1.98
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
21 retrieving revision 1.97
22 retrieving revision 1.98
23 diff -u -r1.97 -r1.98
24 --- ChangeLog 11 Sep 2011 10:54:14 -0000 1.97
25 +++ ChangeLog 26 Sep 2011 15:47:41 -0000 1.98
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/firefox
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.97 2011/09/11 10:54:14 armin76 Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.98 2011/09/26 15:47:41 polynomial-c Exp $
31 +
32 +*firefox-6.0.2 (26 Sep 2011)
33 +
34 + 26 Sep 2011; Lars Wendler <polynomial-c@g.o> -firefox-3.6.17.ebuild,
35 + +firefox-6.0.2.ebuild:
36 + Security bump. Removed old.
37
38 11 Sep 2011; Raúl Porcel <armin76@g.o> firefox-3.6.20.ebuild:
39 alpha/ia64 stable wrt #379549
40
41
42
43 1.1 www-client/firefox/firefox-6.0.2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-6.0.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-6.0.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: firefox-6.0.2.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-6.0.2.ebuild,v 1.1 2011/09/26 15:47:41 polynomial-c Exp $
53
54 EAPI="3"
55 VIRTUALX_REQUIRED="pgo"
56 WANT_AUTOCONF="2.1"
57
58 inherit flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension versionator python virtualx
59
60 MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
61 FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
62 FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
63 FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
64 CHANGESET="e56ecd8b3a68"
65 PATCH="${PN}-6.0-patches-0.1"
66
67 DESCRIPTION="Firefox Web Browser"
68 HOMEPAGE="http://www.mozilla.com/firefox"
69
70 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
71 SLOT="0"
72 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
73 IUSE="bindist +crashreporter +methodjit +ipc pgo system-sqlite +webm"
74
75 FTP_URI="ftp://ftp.mozilla.org/pub/firefox/releases/"
76 # More URIs appended below...
77 SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
78
79 ASM_DEPEND=">=dev-lang/yasm-1.1"
80
81 # Mesa 7.10 needed for WebGL + bugfixes
82 RDEPEND="
83 >=sys-devel/binutils-2.16.1
84 >=dev-libs/nss-3.12.10
85 >=dev-libs/nspr-4.8.8
86 >=dev-libs/glib-2.26:2
87 >=media-libs/mesa-7.10
88 media-libs/libpng[apng]
89 dev-libs/libffi
90 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
91 webm? ( media-libs/libvpx
92 media-libs/alsa-lib )
93 crashreporter? ( net-misc/curl )"
94 # We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
95 DEPEND="${RDEPEND}
96 dev-util/pkgconfig
97 pgo? (
98 =dev-lang/python-2*[sqlite]
99 >=sys-devel/gcc-4.5 )
100 webm? ( x86? ( ${ASM_DEPEND} )
101 amd64? ( ${ASM_DEPEND} ) )"
102
103 # No source releases for alpha|beta
104 if [[ ${PV} =~ alpha ]]; then
105 SRC_URI="${SRC_URI}
106 http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2"
107 S="${WORKDIR}/mozilla-central"
108 elif [[ ${PV} =~ beta ]]; then
109 SRC_URI="${SRC_URI}
110 ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
111 S="${WORKDIR}/mozilla-beta"
112 else
113 SRC_URI="${SRC_URI}
114 ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
115 S="${WORKDIR}/mozilla-release"
116 fi
117
118 # No language packs for alphas
119 if ! [[ ${PV} =~ alpha|beta ]]; then
120 # This list can be updated with scripts/get_langs.sh from mozilla overlay
121 LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
122 en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he
123 hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
124 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
125 te th tr uk vi zh-CN zh-TW zu)
126
127 for X in "${LANGS[@]}" ; do
128 # en and en_US are handled internally
129 if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
130 SRC_URI="${SRC_URI}
131 linguas_${X/-/_}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
132 fi
133 IUSE="${IUSE} linguas_${X/-/_}"
134 # Install all the specific locale xpis if there's no generic locale xpi
135 # Example: there's no pt.xpi, so install all pt-*.xpi
136 if ! has ${X%%-*} "${LANGS[@]}"; then
137 SRC_URI="${SRC_URI}
138 linguas_${X%%-*}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
139 IUSE="${IUSE} linguas_${X%%-*}"
140 fi
141 done
142 fi
143
144 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
145
146 # TODO: Move all the linguas crap to an eclass
147 linguas() {
148 # Generate the list of language packs called "linguas"
149 # This list is used to install the xpi language packs
150 local LINGUA
151 for LINGUA in ${LINGUAS}; do
152 if has ${LINGUA} en en_US; then
153 # For mozilla products, en and en_US are handled internally
154 continue
155 # If this language is supported by ${P},
156 elif has ${LINGUA} "${LANGS[@]//-/_}"; then
157 # Add the language to linguas, if it isn't already there
158 has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
159 continue
160 # For each short LINGUA that isn't in LANGS,
161 # add *all* long LANGS to the linguas list
162 elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
163 for LANG in "${LANGS[@]}"; do
164 if [[ ${LANG} == ${LINGUA}-* ]]; then
165 has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
166 continue 2
167 fi
168 done
169 fi
170 ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
171 done
172 }
173
174 pkg_setup() {
175 moz_pkgsetup
176
177 # Avoid PGO profiling problems due to enviroment leakage
178 # These should *always* be cleaned up anyway
179 unset DBUS_SESSION_BUS_ADDRESS \
180 DISPLAY \
181 ORBIT_SOCKETDIR \
182 SESSION_MANAGER \
183 XDG_SESSION_COOKIE \
184 XAUTHORITY
185
186 if ! use bindist; then
187 einfo
188 elog "You are enabling official branding. You may not redistribute this build"
189 elog "to any users on your network or the internet. Doing so puts yourself into"
190 elog "a legal problem with Mozilla Foundation"
191 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
192 fi
193
194 if ! use methodjit; then
195 einfo
196 ewarn "You are disabling the method-based JIT in JägerMonkey."
197 ewarn "This will greatly slowdown JavaScript in ${PN}!"
198 fi
199
200 if use pgo; then
201 einfo
202 ewarn "You will do a double build for profile guided optimization."
203 ewarn "This will result in your build taking at least twice as long as before."
204 fi
205 }
206
207 src_unpack() {
208 unpack ${A}
209
210 linguas
211 for X in "${linguas[@]}"; do
212 # FIXME: Add support for unpacking xpis to portage
213 xpi_unpack "${P}-${X}.xpi"
214 done
215 }
216
217 src_prepare() {
218 # Apply our patches
219 EPATCH_EXCLUDE="5001_use_system_libffi.patch" \
220 EPATCH_SUFFIX="patch" \
221 EPATCH_FORCE="yes" \
222 epatch "${WORKDIR}"
223
224 # Allow user to apply any additional patches without modifing ebuild
225 epatch_user
226
227 # Enable gnomebreakpad
228 if use debug ; then
229 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
230 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
231 fi
232
233 # Disable gnomevfs extension
234 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
235 -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
236 || die "Failed to remove gnomevfs extension"
237
238 # Ensure that are plugins dir is enabled as default
239 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
240 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
241
242 # Fix sandbox violations during make clean, bug 372817
243 sed -e "s:\(/no-such-file\):${T}\1:g" \
244 -i "${S}"/config/rules.mk \
245 -i "${S}"/js/src/config/rules.mk \
246 -i "${S}"/nsprpub/configure{.in,} \
247 || die
248
249 #Fix compilation with curl-7.21.7 bug 376027
250 sed -e '/#include <curl\/types.h>/d' \
251 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
252 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
253 -i "${S}"/config/system-headers \
254 -i "${S}"/js/src/config/system-headers || die "Sed failed"
255
256 eautoreconf
257
258 cd js/src
259 eautoreconf
260 }
261
262 src_configure() {
263 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
264 MEXTENSIONS="default"
265
266 ####################################
267 #
268 # mozconfig, CFLAGS and CXXFLAGS setup
269 #
270 ####################################
271
272 mozconfig_init
273 mozconfig_config
274
275 # It doesn't compile on alpha without this LDFLAGS
276 use alpha && append-ldflags "-Wl,--no-relax"
277
278 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
279 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
280 # mozconfig_annotate '' --target="${target}"
281 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
282 mozconfig_annotate '' --disable-gconf
283 mozconfig_annotate '' --disable-mailnews
284 mozconfig_annotate '' --enable-canvas
285 mozconfig_annotate '' --enable-safe-browsing
286 mozconfig_annotate '' --with-system-png
287
288 # Other ff-specific settings
289 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
290
291 mozconfig_use_enable system-sqlite
292 mozconfig_use_enable methodjit
293
294 # Allow for a proper pgo build
295 if use pgo; then
296 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
297 fi
298
299 # Finalize and report settings
300 mozconfig_final
301
302 if [[ $(gcc-major-version) -lt 4 ]]; then
303 append-cxxflags -fno-stack-protector
304 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
305 if use amd64 || use x86; then
306 append-flags -mno-avx
307 fi
308 fi
309 }
310
311 src_compile() {
312 if use pgo; then
313 addpredict /root
314 addpredict /etc/gconf
315 # Firefox tries to dri stuff when it's run, see bug 380283
316 shopt -s nullglob
317 local cards=$(echo -n /dev/{dri,ati}/card* /dev/nvidiactl* | sed 's/ /:/g')
318 shopt -u nullglob
319 test -n "${cards}" && addpredict "${cards}"
320
321 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
322 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
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}" \
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
335 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
336 local obj_dir="$(echo */config.log)"
337 obj_dir="${obj_dir%/*}"
338 cd "${S}/${obj_dir}"
339
340 # Add our default prefs for firefox + xulrunner
341 cp "${FILESDIR}"/gentoo-default-prefs.js \
342 "${S}/${obj_dir}/dist/bin/defaults/pref/all-gentoo.js" || die
343
344 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
345 emake DESTDIR="${D}" install || die "emake install failed"
346
347 linguas
348 for X in "${linguas[@]}"; do
349 xpi_install "${WORKDIR}/${P}-${X}"
350 done
351
352 local size sizes icon_path icon name
353 if use bindist; then
354 sizes="16 32 48"
355 icon_path="${S}/browser/branding/unofficial"
356 # Firefox's new rapid release cycle means no more codenames
357 # Let's just stick with this one...
358 icon="tumucumaque"
359 name="Tumucumaque"
360 else
361 sizes="16 22 24 32 256"
362 icon_path="${S}/browser/branding/official"
363 icon="${PN}"
364 name="Mozilla Firefox"
365 fi
366
367 # Install icons and .desktop for menu entry
368 for size in ${sizes}; do
369 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
370 newins "${icon_path}/default${size}.png" "${icon}.png" || die
371 done
372 # The 128x128 icon has a different name
373 insinto "/usr/share/icons/hicolor/128x128/apps"
374 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
375 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
376 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
377 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
378 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
379 "${ED}/usr/share/applications/${PN}.desktop" || die
380
381 # Add StartupNotify=true bug 237317
382 if use startup-notification ; then
383 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
384 fi
385
386 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox-bin
387 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/plugin-container
388
389 # Plugins dir
390 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
391 || die "failed to symlink"
392
393 # very ugly hack to make firefox not sigbus on sparc
394 # FIXME: is this still needed??
395 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
396 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
397 die "sparc sed failed"; }
398 }
399
400 pkg_preinst() {
401 gnome2_icon_savelist
402 }
403
404 pkg_postinst() {
405 # Update mimedb for the new .desktop file
406 fdo-mime_desktop_database_update
407 gnome2_icon_cache_update
408 }
409
410 pkg_postrm() {
411 gnome2_icon_cache_update
412 }