1 |
anarchy 11/06/27 00:42:11 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: firefox-5.0-r1.ebuild |
5 |
Removed: firefox-5.0.ebuild |
6 |
Log: |
7 |
Fix system myspell dictionary dectection, add support for ppc |
8 |
|
9 |
(Portage version: 2.1.10.3/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.78 www-client/firefox/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.78&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.78&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.77&r2=1.78 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v |
21 |
retrieving revision 1.77 |
22 |
retrieving revision 1.78 |
23 |
diff -u -r1.77 -r1.78 |
24 |
--- ChangeLog 26 Jun 2011 18:06:45 -0000 1.77 |
25 |
+++ ChangeLog 27 Jun 2011 00:42:11 -0000 1.78 |
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.77 2011/06/26 18:06:45 anarchy Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.78 2011/06/27 00:42:11 anarchy Exp $ |
31 |
+ |
32 |
+*firefox-5.0-r1 (27 Jun 2011) |
33 |
+ |
34 |
+ 27 Jun 2011; Jory A. Pratt <anarchy@g.o> -firefox-5.0.ebuild, |
35 |
+ +firefox-5.0-r1.ebuild, -files/firefox-5.0-fix-title.patch: |
36 |
+ Fix system myspell dictionary dectection, add support for ppc |
37 |
|
38 |
26 Jun 2011; Jory A. Pratt <anarchy@g.o> firefox-5.0.ebuild: |
39 |
Workaround misc hardened issues |
40 |
|
41 |
|
42 |
|
43 |
1.1 www-client/firefox/firefox-5.0-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-5.0-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-5.0-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: firefox-5.0-r1.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-5.0-r1.ebuild,v 1.1 2011/06/27 00:42:11 anarchy 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 makeedit multilib pax-utils fdo-mime autotools mozextension versionator python virtualx |
59 |
|
60 |
MAJ_XUL_PV="5.0" |
61 |
MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc. |
62 |
XUL_PV="${MAJ_XUL_PV}${PV/${MAJ_FF_PV}/}" # 1.9.3_alpha6, 1.9.2.3, 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}-5.0-patches-0.5" |
68 |
|
69 |
DESCRIPTION="Firefox Web Browser" |
70 |
HOMEPAGE="http://www.mozilla.com/firefox" |
71 |
|
72 |
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" |
73 |
SLOT="0" |
74 |
LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" |
75 |
IUSE="bindist gconf hardened +ipc pgo system-sqlite +webm" |
76 |
|
77 |
REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases" |
78 |
FTP_URI="ftp://ftp.mozilla.org/pub/firefox/releases/" |
79 |
# More URIs appended below... |
80 |
SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2" |
81 |
|
82 |
ASM_DEPEND=">=dev-lang/yasm-1.1" |
83 |
|
84 |
RDEPEND=" |
85 |
>=sys-devel/binutils-2.16.1 |
86 |
>=dev-libs/nss-3.12.9 |
87 |
>=dev-libs/nspr-4.8.7 |
88 |
gconf? ( >=gnome-base/gconf-1.2.1:2 ) |
89 |
>=dev-libs/glib-2.26 |
90 |
media-libs/libpng[apng] |
91 |
dev-libs/libffi |
92 |
system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] ) |
93 |
webm? ( media-libs/libvpx |
94 |
media-libs/alsa-lib )" |
95 |
# We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason |
96 |
DEPEND="${RDEPEND} |
97 |
dev-util/pkgconfig |
98 |
pgo? ( |
99 |
=dev-lang/python-2*[sqlite] |
100 |
>=sys-devel/gcc-4.5 ) |
101 |
webm? ( x86? ( ${ASM_DEPEND} ) |
102 |
amd64? ( ${ASM_DEPEND} ) )" |
103 |
|
104 |
# No source releases for alpha|beta |
105 |
if [[ ${PV} =~ alpha ]]; then |
106 |
SRC_URI="${SRC_URI} |
107 |
http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2" |
108 |
S="${WORKDIR}/mozilla-central" |
109 |
elif [[ ${PV} =~ beta ]]; then |
110 |
SRC_URI="${SRC_URI} |
111 |
${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2" |
112 |
S="${WORKDIR}/mozilla-beta" |
113 |
else |
114 |
SRC_URI="${SRC_URI} |
115 |
${REL_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2" |
116 |
S="${WORKDIR}/mozilla-release" |
117 |
fi |
118 |
|
119 |
# No language packs for alphas |
120 |
if ! [[ ${PV} =~ alpha|beta ]]; then |
121 |
# This list can be updated with scripts/get_langs.sh from mozilla overlay |
122 |
LANGS="af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de |
123 |
el en eo es-ES et eu fa fi fr fy-NL ga-IE gd gl gu-IN |
124 |
he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk |
125 |
ml mr nb-NO nl nn-NO nso or pa-IN pl pt-PT rm ro ru si sk sl |
126 |
son sq sr sv-SE ta ta-LK te th tr uk vi zu" |
127 |
NOSHORTLANGS="en-GB en-ZA es-AR es-CL es-MX pt-BR zh-CN zh-TW" |
128 |
|
129 |
for X in ${LANGS} ; do |
130 |
if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then |
131 |
SRC_URI="${SRC_URI} |
132 |
linguas_${X/-/_}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )" |
133 |
fi |
134 |
IUSE="${IUSE} linguas_${X/-/_}" |
135 |
# english is handled internally |
136 |
if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then |
137 |
if [ "${X}" != "en-US" ]; then |
138 |
SRC_URI="${SRC_URI} |
139 |
linguas_${X%%-*}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )" |
140 |
fi |
141 |
IUSE="${IUSE} linguas_${X%%-*}" |
142 |
fi |
143 |
done |
144 |
fi |
145 |
|
146 |
QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox" |
147 |
|
148 |
linguas() { |
149 |
local LANG SLANG |
150 |
for LANG in ${LINGUAS}; do |
151 |
if has ${LANG} en en_US; then |
152 |
has en ${linguas} || linguas="${linguas:+"${linguas} "}en" |
153 |
continue |
154 |
elif has ${LANG} ${LANGS//-/_}; then |
155 |
has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}" |
156 |
continue |
157 |
elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then |
158 |
for X in ${LANGS}; do |
159 |
if [[ "${X}" == "${LANG}-"* ]] && \ |
160 |
[[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then |
161 |
has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}" |
162 |
continue 2 |
163 |
fi |
164 |
done |
165 |
fi |
166 |
ewarn "Sorry, but ${P} does not support the ${LANG} LINGUA" |
167 |
done |
168 |
} |
169 |
|
170 |
pkg_setup() { |
171 |
moz_pkgsetup |
172 |
|
173 |
# Avoid PGO profiling problems due to enviroment leakage |
174 |
# These should *always* be cleaned up anyway |
175 |
unset DBUS_SESSION_BUS_ADDRESS \ |
176 |
DISPLAY \ |
177 |
ORBIT_SOCKETDIR \ |
178 |
SESSION_MANAGER \ |
179 |
XDG_SESSION_COOKIE \ |
180 |
XAUTHORITY |
181 |
|
182 |
if ! use bindist ; then |
183 |
einfo |
184 |
elog "You are enabling official branding. You may not redistribute this build" |
185 |
elog "to any users on your network or the internet. Doing so puts yourself into" |
186 |
elog "a legal problem with Mozilla Foundation" |
187 |
elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" |
188 |
fi |
189 |
|
190 |
if ! use hardened && use pgo; then |
191 |
einfo |
192 |
ewarn "You will do a double build for profile guided optimization. This will result in your" |
193 |
ewarn "build taking at least twice as long as before." |
194 |
fi |
195 |
} |
196 |
|
197 |
src_unpack() { |
198 |
unpack ${A} |
199 |
|
200 |
linguas |
201 |
for X in ${linguas}; do |
202 |
# FIXME: Add support for unpacking xpis to portage |
203 |
[[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi" |
204 |
done |
205 |
} |
206 |
|
207 |
src_prepare() { |
208 |
# Apply our patches |
209 |
EPATCH_EXCLUDE="5001_use_system_libffi.patch" \ |
210 |
EPATCH_SUFFIX="patch" \ |
211 |
EPATCH_FORCE="yes" \ |
212 |
epatch "${WORKDIR}" |
213 |
|
214 |
# Allow user to apply any additional patches without modifing ebuild |
215 |
epatch_user |
216 |
|
217 |
# Enable gnomebreakpad |
218 |
if use debug ; then |
219 |
sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \ |
220 |
"${S}"/build/unix/run-mozilla.sh || die "sed failed!" |
221 |
fi |
222 |
|
223 |
# Disable gnomevfs extension |
224 |
sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \ |
225 |
-e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \ |
226 |
|| die "Failed to remove gnomevfs extension" |
227 |
|
228 |
# Ensure that are plugins dir is enabled as default |
229 |
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \ |
230 |
"${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!" |
231 |
|
232 |
# Fix sandbox violations during make clean, bug 372817 |
233 |
sed -e "s:\(/no-such-file\):${T}\1:g" \ |
234 |
-i "${S}"/config/rules.mk \ |
235 |
-i "${S}"/js/src/config/rules.mk \ |
236 |
-i "${S}"/nsprpub/configure{.in,} \ |
237 |
|| die |
238 |
|
239 |
eautoreconf |
240 |
|
241 |
cd js/src |
242 |
eautoreconf |
243 |
} |
244 |
|
245 |
src_configure() { |
246 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
247 |
MEXTENSIONS="default" |
248 |
|
249 |
#################################### |
250 |
# |
251 |
# mozconfig, CFLAGS and CXXFLAGS setup |
252 |
# |
253 |
#################################### |
254 |
|
255 |
mozconfig_init |
256 |
mozconfig_config |
257 |
|
258 |
# It doesn't compile on alpha without this LDFLAGS |
259 |
use alpha && append-ldflags "-Wl,--no-relax" |
260 |
|
261 |
mozconfig_annotate '' --prefix=/usr |
262 |
mozconfig_annotate '' --libdir=/usr/$(get_libdir) |
263 |
mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" |
264 |
mozconfig_annotate '' --disable-mailnews |
265 |
mozconfig_annotate '' --enable-canvas |
266 |
mozconfig_annotate '' --enable-safe-browsing |
267 |
mozconfig_annotate '' --with-system-png |
268 |
use hardened && mozconfig_annotate 'hardened' --disable-methodjit |
269 |
|
270 |
# Other ff-specific settings |
271 |
mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} |
272 |
|
273 |
mozconfig_use_enable system-sqlite |
274 |
mozconfig_use_enable gconf |
275 |
|
276 |
# Allow for a proper pgo build |
277 |
if ! use hardened && use pgo; then |
278 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
279 |
fi |
280 |
|
281 |
# Finalize and report settings |
282 |
mozconfig_final |
283 |
|
284 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
285 |
append-cxxflags -fno-stack-protector |
286 |
fi |
287 |
|
288 |
if use amd64 || use x86; then |
289 |
append-flags -mno-avx |
290 |
fi |
291 |
} |
292 |
|
293 |
src_compile() { |
294 |
if ! use hardened && use pgo; then |
295 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
296 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
297 |
Xemake -f client.mk profiledbuild || die "Xemake failed" |
298 |
else |
299 |
CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ |
300 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
301 |
emake -f client.mk || die "emake failed" |
302 |
fi |
303 |
|
304 |
} |
305 |
|
306 |
src_install() { |
307 |
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" |
308 |
|
309 |
# MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc. |
310 |
local obj_dir="$(echo */config.log)" |
311 |
obj_dir="${obj_dir%/*}" |
312 |
cd "${S}/${obj_dir}" |
313 |
|
314 |
# Add our default prefs for firefox + xulrunner |
315 |
cp "${FILESDIR}"/gentoo-default-prefs.js \ |
316 |
"${S}/${obj_dir}/dist/bin/defaults/pref/all-gentoo.js" || die |
317 |
|
318 |
MOZ_MAKE_FLAGS="${MAKEOPTS}" \ |
319 |
emake DESTDIR="${D}" install || die "emake install failed" |
320 |
|
321 |
linguas |
322 |
for X in ${linguas}; do |
323 |
[[ ${X} != "en" ]] && xpi_install "${WORKDIR}/${P}-${X}" |
324 |
done |
325 |
|
326 |
local size sizes icon_path icon name |
327 |
if use bindist; then |
328 |
sizes="16 32 48" |
329 |
icon_path="${S}/browser/branding/unofficial" |
330 |
# Firefox's new rapid release cycle means no more codenames |
331 |
# Let's just stick with this one... |
332 |
icon="tumucumaque" |
333 |
name="Tumucumaque" |
334 |
else |
335 |
sizes="16 22 24 32 256" |
336 |
icon_path="${S}/other-licenses/branding/firefox" |
337 |
icon="${PN}" |
338 |
name="Mozilla Firefox" |
339 |
fi |
340 |
|
341 |
# Install icons and .desktop for menu entry |
342 |
for size in ${sizes}; do |
343 |
insinto "/usr/share/icons/hicolor/${size}x${size}/apps" |
344 |
newins "${icon_path}/default${size}.png" "${icon}.png" || die |
345 |
done |
346 |
# The 128x128 icon has a different name |
347 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
348 |
newins "${icon_path}/mozicon128.png" "${icon}.png" || die |
349 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
350 |
newicon "${icon_path}/content/icon48.png" "${icon}.png" || die |
351 |
newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die |
352 |
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
353 |
"${ED}/usr/share/applications/${PN}.desktop" || die |
354 |
|
355 |
# Add StartupNotify=true bug 237317 |
356 |
if use startup-notification ; then |
357 |
echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop" |
358 |
fi |
359 |
|
360 |
if use hardened; then |
361 |
pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox-bin |
362 |
pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/plugin-container |
363 |
fi |
364 |
|
365 |
# Plugins dir |
366 |
dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \ |
367 |
|| die "failed to symlink" |
368 |
|
369 |
# very ugly hack to make firefox not sigbus on sparc |
370 |
# FIXME: is this still needed?? |
371 |
use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \ |
372 |
-i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \ |
373 |
die "sparc sed failed"; } |
374 |
} |
375 |
|
376 |
pkg_preinst() { |
377 |
gnome2_icon_savelist |
378 |
} |
379 |
|
380 |
pkg_postinst() { |
381 |
# Update mimedb for the new .desktop file |
382 |
fdo-mime_desktop_database_update |
383 |
gnome2_icon_cache_update |
384 |
} |
385 |
|
386 |
pkg_postrm() { |
387 |
gnome2_icon_cache_update |
388 |
} |