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