Gentoo Archives: gentoo-commits

From: "Mounir Lamouri (volkmar)" <volkmar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/mozilla-firefox: mozilla-firefox-3.5.2-r3.ebuild ChangeLog mozilla-firefox-3.5.2-r2.ebuild
Date: Wed, 09 Sep 2009 17:15:36
Message-Id: E1MlQlZ-0007kN-57@stork.gentoo.org
1 volkmar 09/09/09 17:15:33
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-3.5.2-r3.ebuild
5 Removed: mozilla-firefox-3.5.2-r2.ebuild
6 Log:
7 PDEPEND on >=www-plugins/noscript-1.9.6.6.
8 Fix bug 282462
9 Non-maintainer commit with agreement of Anarchy.
10 (Portage version: 14103-svn/cvs/Linux ppc)
11
12 Revision Changes Path
13 1.545 www-client/mozilla-firefox/ChangeLog
14
15 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.545&view=markup
16 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.545&content-type=text/plain
17 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?r1=1.544&r2=1.545
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v
22 retrieving revision 1.544
23 retrieving revision 1.545
24 diff -u -r1.544 -r1.545
25 --- ChangeLog 5 Sep 2009 20:58:15 -0000 1.544
26 +++ ChangeLog 9 Sep 2009 17:15:32 -0000 1.545
27 @@ -1,6 +1,13 @@
28 # ChangeLog for www-client/mozilla-firefox
29 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.544 2009/09/05 20:58:15 keytoaster Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.545 2009/09/09 17:15:32 volkmar Exp $
32 +
33 +*mozilla-firefox-3.5.2-r3 (09 Sep 2009)
34 +
35 + 09 Sep 2009; Mounir Lamouri <volkmar@g.o>
36 + -mozilla-firefox-3.5.2-r2.ebuild, +mozilla-firefox-3.5.2-r3.ebuild:
37 + PDEPEND on >=www-plugins/noscript-1.9.6.6. Fix bug 282462
38 + Non-maintainer commit with agreement of Anarchy.
39
40 05 Sep 2009; Tobias Heinlein <keytoaster@g.o>
41 mozilla-firefox-3.0.13.ebuild:
42
43
44
45 1.1 www-client/mozilla-firefox/mozilla-firefox-3.5.2-r3.ebuild
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5.2-r3.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5.2-r3.ebuild?rev=1.1&content-type=text/plain
49
50 Index: mozilla-firefox-3.5.2-r3.ebuild
51 ===================================================================
52 # Copyright 1999-2009 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5.2-r3.ebuild,v 1.1 2009/09/09 17:15:32 volkmar Exp $
55 EAPI="2"
56 WANT_AUTOCONF="2.1"
57
58 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension
59
60 LANGS="af ar as be bg bn-BD bn-IN ca cs cy da de el en en-GB en-US eo es-AR
61 es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gl gu-IN he hi-IN hr hu id is it ja
62 ka kk kn ko ku lt lv mk ml mn mr nb-NO nl nn-NO oc or pa-IN pl pt-BR pt-PT rm ro
63 ru si sk sl sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW"
64 NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"
65
66 XUL_PV="1.9.1.2"
67 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
68 DESKTOP_PV="3.5"
69 MY_PV="${PV/_beta/b}" # Handle betas for SRC_URI
70 MY_PV="${PV/_/}" # Handle rcs for SRC_URI
71 PATCH="${P}-patches-0.1"
72
73 DESCRIPTION="Firefox Web Browser"
74 HOMEPAGE="http://www.mozilla.com/firefox"
75
76 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86"
77 SLOT="0"
78 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
79 IUSE="+alsa bindist iceweasel java mozdevelop restrict-javascript" # qt-experimental
80
81 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
82 SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}-source.tar.bz2
83 iceweasel? ( mirror://gentoo/iceweasel-icons-3.0.tar.bz2 )
84 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
85
86 for X in ${LANGS} ; do
87 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
88 SRC_URI="${SRC_URI}
89 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
90 fi
91 IUSE="${IUSE} linguas_${X/-/_}"
92 # english is handled internally
93 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
94 if [ "${X}" != "en-US" ]; then
95 SRC_URI="${SRC_URI}
96 linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
97 fi
98 IUSE="${IUSE} linguas_${X%%-*}"
99 fi
100 done
101
102 # Not working.
103 # qt-experimental? (
104 # x11-libs/qt-gui
105 # x11-libs/qt-core )
106 # =net-libs/xulrunner-${XUL_PV}*[java=,qt-experimental=]
107
108 RDEPEND="
109 >=sys-devel/binutils-2.16.1
110 >=dev-libs/nss-3.12.2
111 >=dev-libs/nspr-4.7.3
112 >=app-text/hunspell-1.2
113 alsa? ( media-libs/alsa-lib )
114 >=net-libs/xulrunner-${XUL_PV}[java=]
115 >=x11-libs/cairo-1.8.8[X]
116 x11-libs/pango[X]"
117
118 DEPEND="${RDEPEND}
119 dev-util/pkgconfig"
120
121 PDEPEND="restrict-javascript? ( >=www-plugins/noscript-1.9.6.6 )"
122
123 S="${WORKDIR}/mozilla-1.9.1"
124
125 # Needed by src_compile() and src_install().
126 # Would do in pkg_setup but that loses the export attribute, they
127 # become pure shell variables.
128 export BUILD_OFFICIAL=1
129 export MOZILLA_OFFICIAL=1
130
131 linguas() {
132 local LANG SLANG
133 for LANG in ${LINGUAS}; do
134 if has ${LANG} en en_US; then
135 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
136 continue
137 elif has ${LANG} ${LANGS//-/_}; then
138 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
139 continue
140 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
141 for X in ${LANGS}; do
142 if [[ "${X}" == "${LANG}-"* ]] && \
143 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
144 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
145 continue 2
146 fi
147 done
148 fi
149 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
150 done
151 }
152
153 pkg_setup() {
154 if ! use bindist && ! use iceweasel ; then
155 elog "You are enabling official branding. You may not redistribute this build"
156 elog "to any users on your network or the internet. Doing so puts yourself into"
157 elog "a legal problem with Mozilla Foundation"
158 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
159 fi
160 }
161
162 src_unpack() {
163 unpack ${A}
164
165 if use iceweasel ; then
166 unpack iceweasel-icons-3.0.tar.bz2
167
168 cp -r iceweaselicons/browser "${WORKDIR}"
169 fi
170
171 linguas
172 for X in ${linguas}; do
173 # FIXME: Add support for unpacking xpis to portage
174 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
175 done
176 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
177 einfo "Selected language packs (first will be default): ${linguas}"
178 fi
179 }
180
181 src_prepare() {
182 # Apply our patches
183 EPATCH_SUFFIX="patch" \
184 EPATCH_FORCE="yes" \
185 epatch "${WORKDIR}"
186
187 if use iceweasel ; then
188 sed -i -e "s:Minefield:Iceweasel:" browser/locales/en-US/chrome/branding/brand.* \
189 browser/branding/nightly/configure.sh || die "iceweasel sed failed!"
190 fi
191
192 eautoreconf
193
194 cd js/src
195 eautoreconf
196
197 # We need to re-patch this because autoreconf overwrites it
198 epatch "${FILESDIR}/000_flex-configure-LANG.patch"
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 '' --enable-application=browser
219 mozconfig_annotate '' --disable-mailnews
220 mozconfig_annotate 'broken' --disable-crashreporter
221 mozconfig_annotate '' --enable-image-encoder=all
222 mozconfig_annotate '' --enable-canvas
223 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
224 # regardless of java setting.
225 mozconfig_annotate '' --enable-oji --enable-mathml
226 mozconfig_annotate 'places' --enable-storage --enable-places
227 mozconfig_annotate '' --enable-safe-browsing
228
229 # System-wide install specs
230 mozconfig_annotate '' --disable-installer
231 mozconfig_annotate '' --disable-updater
232 mozconfig_annotate '' --disable-strip
233 mozconfig_annotate '' --disable-install-strip
234
235 # Use system libraries
236 mozconfig_annotate '' --enable-system-cairo
237 mozconfig_annotate '' --enable-system-hunspell
238 # mozconfig_annotate '' --enable-system-sqlite
239 mozconfig_annotate '' --with-system-nspr
240 mozconfig_annotate '' --with-system-nss
241 mozconfig_annotate '' --enable-system-lcms
242 mozconfig_annotate '' --with-system-bz2
243 mozconfig_annotate '' --with-system-libxul
244 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${XUL_PV}
245
246 # IUSE mozdevelop
247 mozconfig_use_enable mozdevelop jsd
248 mozconfig_use_enable mozdevelop xpctools
249 #mozconfig_use_extension mozdevelop venkman
250
251 # IUSE qt-experimental
252 # if use qt-experimental ; then
253 # ewarn "You are enabling the EXPERIMENTAL qt toolkit"
254 # ewarn "Usage is at your own risk"
255 # ewarn "Known to be broken. DO NOT file bugs."
256 # mozconfig_annotate '' --disable-system-cairo
257 # mozconfig_annotate 'qt-experimental' --enable-default-toolkit=cairo-qt
258 # else
259 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
260 # fi
261
262 # Other ff-specific settings
263 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
264
265 # Enable/Disable audio in firefox
266 mozconfig_use_enable alsa ogg
267 mozconfig_use_enable alsa wave
268
269 if ! use bindist && ! use iceweasel ; then
270 mozconfig_annotate '' --enable-official-branding
271 fi
272
273 # Finalize and report settings
274 mozconfig_final
275
276 if [[ $(gcc-major-version) -lt 4 ]]; then
277 append-cxxflags -fno-stack-protector
278 fi
279
280 ####################################
281 #
282 # Configure and build
283 #
284 ####################################
285
286 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
287 }
288
289 src_compile() {
290 # Should the build use multiprocessing? Not enabled by default, as it tends to break
291 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
292 emake ${jobs} || die
293 }
294
295 src_install() {
296 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
297
298 emake DESTDIR="${D}" install || die "emake install failed"
299 rm "${D}"/usr/bin/firefox
300
301 linguas
302 for X in ${linguas}; do
303 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
304 done
305
306 # Install icon and .desktop for menu entry
307 if use iceweasel ; then
308 newicon "${S}"/browser/base/branding/icon48.png iceweasel-icon.png
309 newmenu "${FILESDIR}"/icon/iceweasel.desktop \
310 ${PN}-${DESKTOP_PV}.desktop
311 elif ! use bindist ; then
312 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
313 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
314 ${PN}-${DESKTOP_PV}.desktop
315 else
316 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
317 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
318 ${PN}-${DESKTOP_PV}.desktop
319 sed -i -e "s:Bon Echo:Minefield:" \
320 "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
321 fi
322
323 # Add StartupNotify=true bug 237317
324 if use startup-notification ; then
325 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
326 fi
327
328 # Create /usr/bin/firefox
329 cat <<EOF >"${D}"/usr/bin/firefox
330 #!/bin/sh
331 export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}\${LD_LIBRARY_PATH+":\${LD_LIBRARY_PATH}"}"
332 exec "${MOZILLA_FIVE_HOME}"/firefox "\$@"
333 EOF
334
335 fperms 0755 /usr/bin/firefox
336 pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox
337
338 # Enable very specific settings not inherited from xulrunner
339 cp "${FILESDIR}"/firefox-default-prefs.js \
340 "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
341 die "failed to cp xulrunner-default-prefs.js"
342
343 # Plugins dir
344 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
345 }
346
347 pkg_postinst() {
348 ewarn "All the packages built against ${PN} won't compile,"
349 ewarn "any package that fails to build warrants a bug report."
350 elog
351
352 # Update mimedb for the new .desktop file
353 fdo-mime_desktop_database_update
354 }