Gentoo Archives: gentoo-commits

From: "Jory Pratt (anarchy)" <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox: firefox-4.0.1.ebuild ChangeLog firefox-4.0-r3.ebuild
Date: Mon, 02 May 2011 23:33:28
Message-Id: 20110502233317.D77BF20054@flycatcher.gentoo.org
1 anarchy 11/05/02 23:33:17
2
3 Modified: ChangeLog
4 Added: firefox-4.0.1.ebuild
5 Removed: firefox-4.0-r3.ebuild
6 Log:
7 Security bump for Firefox-4.x
8
9 (Portage version: 2.1.9.46/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.68 www-client/firefox/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.68&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?rev=1.68&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/ChangeLog?r1=1.67&r2=1.68
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v
21 retrieving revision 1.67
22 retrieving revision 1.68
23 diff -u -r1.67 -r1.68
24 --- ChangeLog 2 May 2011 15:38:52 -0000 1.67
25 +++ ChangeLog 2 May 2011 23:33:17 -0000 1.68
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.67 2011/05/02 15:38:52 jer Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/ChangeLog,v 1.68 2011/05/02 23:33:17 anarchy Exp $
31 +
32 +*firefox-4.0.1 (02 May 2011)
33 +
34 + 02 May 2011; Jory A. Pratt <anarchy@g.o> -firefox-4.0-r3.ebuild,
35 + +firefox-4.0.1.ebuild:
36 + Security Bump on Firefox-4.x
37
38 02 May 2011; Jeroen Roovers <jer@g.o> firefox-3.6.17.ebuild:
39 Stable for HPPA (bug #365323).
40
41
42
43 1.1 www-client/firefox/firefox-4.0.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-4.0.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-4.0.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: firefox-4.0.1.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-4.0.1.ebuild,v 1.1 2011/05/02 23:33:17 anarchy Exp $
53
54 EAPI="3"
55 WANT_AUTOCONF="2.1"
56
57 inherit flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension versionator python
58
59 MAJ_XUL_PV="2.0"
60 MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
61 XUL_PV="${MAJ_XUL_PV}${PV/${MAJ_FF_PV}/}" # 1.9.3_alpha6, 1.9.2.3, etc.
62 FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
63 FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
64 FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
65 CHANGESET="e56ecd8b3a68"
66 PATCH="${PN}-4.0-patches-0.9"
67
68 DESCRIPTION="Firefox Web Browser"
69 HOMEPAGE="http://www.mozilla.com/firefox"
70
71 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
72 SLOT="0"
73 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
74 IUSE="bindist +ipc system-sqlite +webm"
75
76 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
77 # More URIs appended below...
78 SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
79
80 RDEPEND="
81 >=sys-devel/binutils-2.16.1
82 >=dev-libs/nss-3.12.9
83 >=dev-libs/nspr-4.8.7
84 >=dev-libs/glib-2.26
85 >=media-libs/libpng-1.4.7[apng]
86 x11-libs/pango[X]
87 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
88 ~net-libs/xulrunner-${XUL_PV}[wifi=,libnotify=,system-sqlite=,webm=]
89 webm? ( media-libs/libvpx
90 media-libs/alsa-lib )"
91
92 DEPEND="${RDEPEND}
93 dev-util/pkgconfig
94 webm? ( dev-lang/yasm )"
95
96 # No source releases for alpha|beta
97 if [[ ${PV} =~ alpha|beta ]]; then
98 SRC_URI="${SRC_URI}
99 http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2"
100 S="${WORKDIR}/mozilla-central"
101 else
102 SRC_URI="${SRC_URI}
103 ${REL_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
104 S="${WORKDIR}/mozilla-${MAJ_XUL_PV}"
105 fi
106
107 # No language packs for alphas
108 if ! [[ ${PV} =~ alpha|beta ]]; then
109 # This list can be updated with scripts/get_langs.sh from mozilla overlay
110 LANGS="af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de
111 el en en-ZA eo es-ES et eu fa fi fr fy-NL ga-IE gd gl gu-IN
112 he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk
113 ml mr nb-NO nl nn-NO nso or pa-IN pl pt-PT rm ro ru si sk sl
114 son sq sr sv-SE ta ta-LK te th tr uk vi zu"
115 NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"
116
117 for X in ${LANGS} ; do
118 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
119 SRC_URI="${SRC_URI}
120 linguas_${X/-/_}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
121 fi
122 IUSE="${IUSE} linguas_${X/-/_}"
123 # english is handled internally
124 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
125 if [ "${X}" != "en-US" ]; then
126 SRC_URI="${SRC_URI}
127 linguas_${X%%-*}? ( ${REL_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
128 fi
129 IUSE="${IUSE} linguas_${X%%-*}"
130 fi
131 done
132 fi
133
134 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
135
136 linguas() {
137 local LANG SLANG
138 for LANG in ${LINGUAS}; do
139 if has ${LANG} en en_US; then
140 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
141 continue
142 elif has ${LANG} ${LANGS//-/_}; then
143 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
144 continue
145 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
146 for X in ${LANGS}; do
147 if [[ "${X}" == "${LANG}-"* ]] && \
148 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
149 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
150 continue 2
151 fi
152 done
153 fi
154 ewarn "Sorry, but ${P} does not support the ${LANG} LINGUA"
155 done
156 }
157
158 pkg_setup() {
159 moz_pkgsetup
160
161 if ! use bindist ; then
162 einfo
163 elog "You are enabling official branding. You may not redistribute this build"
164 elog "to any users on your network or the internet. Doing so puts yourself into"
165 elog "a legal problem with Mozilla Foundation"
166 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
167 fi
168 }
169
170 src_unpack() {
171 unpack ${A}
172
173 linguas
174 for X in ${linguas}; do
175 # FIXME: Add support for unpacking xpis to portage
176 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
177 done
178 }
179
180 src_prepare() {
181 # Apply our patches
182 EPATCH_SUFFIX="patch" \
183 EPATCH_FORCE="yes" \
184 epatch "${WORKDIR}"
185
186 epatch "${FILESDIR}"/fix-preferences-gentoo.patch
187
188 # Allow user to apply any additional patches without modifing ebuild
189 epatch_user
190
191 # Disable gnomevfs extension
192 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
193 || die "Failed to remove gnomevfs extension"
194
195 eautoreconf
196
197 cd js/src
198 eautoreconf
199 }
200
201 src_configure() {
202 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
203 MEXTENSIONS="default"
204
205 ####################################
206 #
207 # mozconfig, CFLAGS and CXXFLAGS setup
208 #
209 ####################################
210
211 mozconfig_init
212 mozconfig_config
213
214 # It doesn't compile on alpha without this LDFLAGS
215 use alpha && append-ldflags "-Wl,--no-relax"
216
217 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
218 mozconfig_annotate '' --disable-mailnews
219 mozconfig_annotate '' --enable-canvas
220 mozconfig_annotate '' --enable-safe-browsing
221 mozconfig_annotate '' --with-system-png
222 mozconfig_annotate '' --with-system-libxul
223 mozconfig_annotate '' --with-libxul-sdk="${EPREFIX}"/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
224
225 # Other ff-specific settings
226 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
227
228 mozconfig_use_enable system-sqlite
229
230 # Finalize and report settings
231 mozconfig_final
232
233 if [[ $(gcc-major-version) -lt 4 ]]; then
234 append-cxxflags -fno-stack-protector
235 fi
236
237 ####################################
238 #
239 # Configure and build
240 #
241 ####################################
242
243 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
244 }
245
246 src_install() {
247 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
248
249 # Enable very specific settings not inherited from xulrunner
250 cp "${FILESDIR}"/firefox-default-prefs.js \
251 "${S}/dist/bin/defaults/preferences/all-gentoo.js" || \
252 die "failed to cp firefox-default-prefs.js"
253
254 emake DESTDIR="${D}" install || die "emake install failed"
255
256 linguas
257 for X in ${linguas}; do
258 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}/${P}-${X}"
259 done
260
261 local size sizes icon_path icon name
262 if use bindist; then
263 sizes="16 32 48"
264 icon_path="${S}/browser/branding/unofficial"
265 icon="tumucumaque"
266 name="Tumucumaque"
267 else
268 sizes="16 22 24 32 256"
269 icon_path="${S}/other-licenses/branding/firefox"
270 icon="${PN}"
271 name="Mozilla Firefox"
272 fi
273
274 # Install icons and .desktop for menu entry
275 for size in ${sizes}; do
276 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
277 newins "${icon_path}/default${size}.png" "${icon}.png" || die
278 done
279 # The 128x128 icon has a different name
280 insinto "/usr/share/icons/hicolor/128x128/apps"
281 newins "${icon_path}/mozicon128.png" "${icon}.png" || die
282 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
283 newicon "${icon_path}/content/icon48.png" "${icon}.png" || die
284 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
285 sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
286 "${ED}/usr/share/applications/${PN}.desktop" || die
287
288 # Add StartupNotify=true bug 237317
289 if use startup-notification ; then
290 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
291 fi
292
293 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox
294
295 # Plugins dir
296 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
297 || die "failed to symlink"
298
299 # very ugly hack to make firefox not sigbus on sparc
300 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
301 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
302 die "sparc sed failed"; }
303 }
304
305 pkg_preinst() {
306 gnome2_icon_savelist
307 }
308
309 pkg_postinst() {
310 # Update mimedb for the new .desktop file
311 fdo-mime_desktop_database_update
312 gnome2_icon_cache_update
313 }
314
315 pkg_postrm() {
316 gnome2_icon_cache_update
317 }