1 |
polynomial-c 12/04/30 06:43:36 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: firefox-12.0.ebuild |
5 |
Log: |
6 |
Security bump. |
7 |
|
8 |
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.144 www-client/firefox/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.144&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.144&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.143&r2=1.144 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v |
20 |
retrieving revision 1.143 |
21 |
retrieving revision 1.144 |
22 |
diff -u -r1.143 -r1.144 |
23 |
--- ChangeLog 26 Apr 2012 19:53:46 -0000 1.143 |
24 |
+++ ChangeLog 30 Apr 2012 06:43:36 -0000 1.144 |
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.143 2012/04/26 19:53:46 polynomial-c Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.144 2012/04/30 06:43:36 polynomial-c Exp $ |
30 |
+ |
31 |
+*firefox-12.0 (30 Apr 2012) |
32 |
+ |
33 |
+ 30 Apr 2012; Lars Wendler <polynomial-c@g.o> +firefox-12.0.ebuild: |
34 |
+ Security bump. |
35 |
|
36 |
*firefox-10.0.4 (26 Apr 2012) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 www-client/firefox/firefox-12.0.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-12.0.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-12.0.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: firefox-12.0.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-12.0.ebuild,v 1.1 2012/04/30 06:43:36 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 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}-12.0-patches-0.1" |
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 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
88 |
SLOT="0" |
89 |
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" |
90 |
IUSE="bindist +crashreporter +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.3 |
102 |
>=dev-libs/nspr-4.9 |
103 |
>=dev-libs/glib-2.26:2 |
104 |
>=media-libs/mesa-7.10 |
105 |
media-libs/libpng[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 |
crashreporter? ( net-misc/curl ) |
111 |
selinux? ( sec-policy/selinux-mozilla )" |
112 |
# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason |
113 |
DEPEND="${RDEPEND} |
114 |
dev-util/pkgconfig |
115 |
pgo? ( |
116 |
=dev-lang/python-2*[sqlite] |
117 |
>=sys-devel/gcc-4.5 ) |
118 |
webm? ( x86? ( ${ASM_DEPEND} ) |
119 |
amd64? ( ${ASM_DEPEND} ) |
120 |
virtual/opengl )" |
121 |
|
122 |
# No source releases for alpha|beta |
123 |
if [[ ${PV} =~ alpha ]]; then |
124 |
SRC_URI="${SRC_URI} |
125 |
http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2" |
126 |
S="${WORKDIR}/mozilla-central" |
127 |
elif [[ ${PV} =~ beta ]]; then |
128 |
S="${WORKDIR}/mozilla-beta" |
129 |
SRC_URI="${SRC_URI} |
130 |
${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
131 |
else |
132 |
SRC_URI="${SRC_URI} |
133 |
${MOZ_FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2" |
134 |
if [[ ${MOZ_ESR} == 1 ]]; then |
135 |
S="${WORKDIR}/mozilla-esr${PV%%.*}" |
136 |
else |
137 |
S="${WORKDIR}/mozilla-release" |
138 |
fi |
139 |
fi |
140 |
|
141 |
QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
142 |
|
143 |
pkg_setup() { |
144 |
moz_pkgsetup |
145 |
|
146 |
# Avoid PGO profiling problems due to enviroment leakage |
147 |
# These should *always* be cleaned up anyway |
148 |
unset DBUS_SESSION_BUS_ADDRESS \ |
149 |
DISPLAY \ |
150 |
ORBIT_SOCKETDIR \ |
151 |
SESSION_MANAGER \ |
152 |
XDG_SESSION_COOKIE \ |
153 |
XAUTHORITY |
154 |
|
155 |
if ! use bindist; then |
156 |
einfo |
157 |
elog "You are enabling official branding. You may not redistribute this build" |
158 |
elog "to any users on your network or the internet. Doing so puts yourself into" |
159 |
elog "a legal problem with Mozilla Foundation" |
160 |
elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
161 |
fi |
162 |
|
163 |
if use pgo; then |
164 |
einfo |
165 |
ewarn "You will do a double build for profile guided optimization." |
166 |
ewarn "This will result in your build taking at least twice as long as before." |
167 |
fi |
168 |
|
169 |
# Ensure we have enough disk space to compile |
170 |
if use pgo || use debug || use test ; then |
171 |
CHECKREQS_DISK_BUILD="8G" |
172 |
else |
173 |
CHECKREQS_DISK_BUILD="4G" |
174 |
fi |
175 |
check-reqs_pkg_setup |
176 |
} |
177 |
|
178 |
src_unpack() { |
179 |
unpack ${A} |
180 |
|
181 |
# Unpack language packs |
182 |
mozlinguas_src_unpack |
183 |
} |
184 |
|
185 |
src_prepare() { |
186 |
# Apply our patches |
187 |
EPATCH_SUFFIX="patch" \ |
188 |
EPATCH_FORCE="yes" \ |
189 |
epatch "${WORKDIR}/firefox" |
190 |
|
191 |
# Allow user to apply any additional patches without modifing ebuild |
192 |
epatch_user |
193 |
|
194 |
# Enable gnomebreakpad |
195 |
if use debug ; then |
196 |
sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
197 |
"${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
198 |
fi |
199 |
|
200 |
# Disable gnomevfs extension |
201 |
sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \ |
202 |
-e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \ |
203 |
|| die "Failed to remove gnomevfs extension" |
204 |
|
205 |
# Ensure that are plugins dir is enabled as default |
206 |
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \ |
207 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" |
208 |
|
209 |
# Fix sandbox violations during make clean, bug 372817 |
210 |
sed -e "s:\(/no-such-file\):${T}\1:g" \ |
211 |
-i "${S}"/config/rules.mk \ |
212 |
-i "${S}"/js/src/config/rules.mk \ |
213 |
-i "${S}"/nsprpub/configure{.in,} \ |
214 |
|| die |
215 |
|
216 |
#Fix compilation with curl-7.21.7 bug 376027 |
217 |
sed -e '/#include <curl\/types.h>/d' \ |
218 |
-i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ |
219 |
-i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ |
220 |
-i "${S}"/config/system-headers \ |
221 |
-i "${S}"/js/src/config/system-headers || die "Sed failed" |
222 |
|
223 |
eautoreconf |
224 |
} |
225 |
|
226 |
src_configure() { |
227 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
228 |
MEXTENSIONS="default" |
229 |
|
230 |
#################################### |
231 |
# |
232 |
# mozconfig, CFLAGS and CXXFLAGS setup |
233 |
# |
234 |
#################################### |
235 |
|
236 |
mozconfig_init |
237 |
mozconfig_config |
238 |
|
239 |
# It doesn't compile on alpha without this LDFLAGS |
240 |
use alpha && append-ldflags "-Wl,--no-relax" |
241 |
|
242 |
mozconfig_annotate '' --prefix="${EPREFIX}"/usr |
243 |
mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir) |
244 |
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
245 |
mozconfig_annotate '' --disable-gconf |
246 |
mozconfig_annotate '' --disable-mailnews |
247 |
mozconfig_annotate '' --enable-canvas |
248 |
mozconfig_annotate '' --enable-safe-browsing |
249 |
mozconfig_annotate '' --with-system-png |
250 |
mozconfig_annotate '' --enable-system-ffi |
251 |
mozconfig_annotate 'Missing fetures' --disable-system-cairo |
252 |
|
253 |
# Other ff-specific settings |
254 |
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
255 |
mozconfig_annotate '' --target="${CTARGET:-${CHOST}}" |
256 |
|
257 |
mozconfig_use_enable system-sqlite |
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 |
} |