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