Gentoo Archives: gentoo-commits

From: "Nirbheek Chauhan (nirbheek)" <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/mozilla-firefox: mozilla-firefox-3.5-r1.ebuild ChangeLog mozilla-firefox-3.5.ebuild
Date: Thu, 02 Jul 2009 06:57:16
Message-Id: E1MMGEM-0004qu-AC@stork.gentoo.org
1 nirbheek 09/07/02 06:57:14
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-3.5-r1.ebuild
5 Removed: mozilla-firefox-3.5.ebuild
6 Log:
7 Fix bug 276024 (NOSHORTLANGS update), bug 275991 (Missing en-US from LINGUAS) and bug 256688 (LD_LIBRARY_PATH ignored by firefox)
8 (Portage version: 2.2_rc33/cvs/Linux i686)
9
10 Revision Changes Path
11 1.516 www-client/mozilla-firefox/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.516&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.516&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?r1=1.515&r2=1.516
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v
20 retrieving revision 1.515
21 retrieving revision 1.516
22 diff -u -r1.515 -r1.516
23 --- ChangeLog 30 Jun 2009 17:15:51 -0000 1.515
24 +++ ChangeLog 2 Jul 2009 06:57:14 -0000 1.516
25 @@ -1,6 +1,13 @@
26 # ChangeLog for www-client/mozilla-firefox
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.515 2009/06/30 17:15:51 nirbheek Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.516 2009/07/02 06:57:14 nirbheek Exp $
30 +
31 +*mozilla-firefox-3.5-r1 (02 Jul 2009)
32 +
33 + 02 Jul 2009; <nirbheek@g.o> -mozilla-firefox-3.5.ebuild,
34 + +mozilla-firefox-3.5-r1.ebuild:
35 + Fix bug 276024 (NOSHORTLANGS update), bug 275991 (Missing en-US from
36 + LINGUAS) and bug 256688 (LD_LIBRARY_PATH ignored by firefox)
37
38 *mozilla-firefox-3.5 (30 Jun 2009)
39
40
41
42
43 1.1 www-client/mozilla-firefox/mozilla-firefox-3.5-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: mozilla-firefox-3.5-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2009 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.5-r1.ebuild,v 1.1 2009/07/02 06:57:14 nirbheek Exp $
53 EAPI="2"
54 WANT_AUTOCONF="2.1"
55
56 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension
57
58 LANGS="af ar as be bg bn-BD bn-IN ca cs cy da de el en en-GB en-US eo es-AR
59 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
60 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
61 ru si sk sl sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW"
62 NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"
63
64 XUL_PV="1.9.1"
65 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
66 MY_PV="${PV/_beta/b}" # Handle betas for SRC_URI
67 MY_PV="${PV/_/}" # Handle rcs for SRC_URI
68 MY_PV="${MY_PV/1.9.1/3.5}" # Why is this here?
69 PATCH="${PN}-${MAJ_PV}-patches-0.1"
70
71 DESCRIPTION="Firefox Web Browser"
72 HOMEPAGE="http://www.mozilla.com/firefox"
73
74 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
75 SLOT="0"
76 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
77 IUSE="bindist iceweasel java mozdevelop restrict-javascript" # qt-experimental
78
79 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
80 SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}-source.tar.bz2
81 iceweasel? ( mirror://gentoo/iceweasel-icons-3.0.tar.bz2 )
82 mirror://gentoo/${PATCH}.tar.bz2"
83
84 for X in ${LANGS} ; do
85 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
86 SRC_URI="${SRC_URI}
87 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
88 fi
89 IUSE="${IUSE} linguas_${X/-/_}"
90 # english is handled internally
91 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
92 if [ "${X}" != "en-US" ]; then
93 SRC_URI="${SRC_URI}
94 linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
95 fi
96 IUSE="${IUSE} linguas_${X%%-*}"
97 fi
98 done
99
100 # Not working.
101 # qt-experimental? (
102 # x11-libs/qt-gui
103 # x11-libs/qt-core )
104 # =net-libs/xulrunner-${XUL_PV}*[java=,qt-experimental=]
105
106 RDEPEND="
107 >=sys-devel/binutils-2.16.1
108 >=dev-libs/nss-3.12.2
109 >=dev-libs/nspr-4.7.3
110 >=dev-db/sqlite-3.6.7
111 >=app-text/hunspell-1.2
112
113 >=net-libs/xulrunner-${XUL_PV}[java=]
114
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? ( x11-plugins/noscript )"
122
123 S="${WORKDIR}/mozilla-${XUL_PV}"
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 elog
162 elog "libgnomebreakpad now works with firefox so you can debug crashes using bug-buddy"
163 elog "If you don't have bug-buddy installed, ignore the gtk-warning at startup"
164 }
165
166 src_unpack() {
167 unpack ${A}
168
169 if use iceweasel; then
170 unpack iceweasel-icons-3.0.tar.bz2
171
172 cp -r iceweaselicons/browser "${WORKDIR}"
173 fi
174
175 linguas
176 for X in ${linguas}; do
177 # FIXME: Add support for unpacking xpis to portage
178 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
179 done
180 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
181 einfo "Selected language packs (first will be default): ${linguas}"
182 fi
183 }
184
185 src_prepare() {
186 # Apply our patches
187 EPATCH_SUFFIX="patch" \
188 EPATCH_FORCE="yes" \
189 epatch "${WORKDIR}"
190
191 if use iceweasel; then
192 sed -i -e "s|Minefield|Iceweasel|" browser/locales/en-US/chrome/branding/brand.* \
193 browser/branding/nightly/configure.sh
194 fi
195
196 eautoreconf
197
198 cd js/src
199 eautoreconf
200
201 # We need to re-patch this because autoreconf overwrites it
202 # epatch "${WORKDIR}"/patch/000_flex-configure-LANG.patch
203 }
204
205 src_configure() {
206 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
207 MEXTENSIONS="default"
208
209 ####################################
210 #
211 # mozconfig, CFLAGS and CXXFLAGS setup
212 #
213 ####################################
214
215 mozconfig_init
216 mozconfig_config
217
218 # It doesn't compile on alpha without this LDFLAGS
219 use alpha && append-ldflags "-Wl,--no-relax"
220
221 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
222 mozconfig_annotate '' --enable-application=browser
223 mozconfig_annotate '' --disable-mailnews
224 mozconfig_annotate 'broken' --disable-crashreporter
225 mozconfig_annotate '' --enable-image-encoder=all
226 mozconfig_annotate '' --enable-canvas
227 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
228 # regardless of java setting.
229 mozconfig_annotate '' --enable-oji --enable-mathml
230 mozconfig_annotate 'places' --enable-storage --enable-places
231 mozconfig_annotate '' --enable-safe-browsing
232
233 # System-wide install specs
234 mozconfig_annotate '' --disable-installer
235 mozconfig_annotate '' --disable-updater
236 mozconfig_annotate '' --disable-strip
237 mozconfig_annotate '' --disable-install-strip
238
239 # Use system libraries
240 mozconfig_annotate '' --enable-system-cairo
241 mozconfig_annotate '' --enable-system-hunspell
242 mozconfig_annotate '' --enable-system-sqlite
243 mozconfig_annotate '' --with-system-nspr
244 mozconfig_annotate '' --with-system-nss
245 mozconfig_annotate '' --enable-system-lcms
246 mozconfig_annotate '' --with-system-bz2
247 mozconfig_annotate '' --with-system-libxul
248 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${XUL_PV}
249
250 # IUSE mozdevelop
251 mozconfig_use_enable mozdevelop jsd
252 mozconfig_use_enable mozdevelop xpctools
253 #mozconfig_use_extension mozdevelop venkman
254
255 # IUSE qt-experimental
256 # if use qt-experimental; then
257 # ewarn "You are enabling the EXPERIMENTAL qt toolkit"
258 # ewarn "Usage is at your own risk"
259 # ewarn "Known to be broken. DO NOT file bugs."
260 # mozconfig_annotate '' --disable-system-cairo
261 # mozconfig_annotate 'qt-experimental' --enable-default-toolkit=cairo-qt
262 # else
263 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
264 # fi
265
266 # Other ff-specific settings
267 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
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)" \
287 econf || die
288 }
289
290 src_compile() {
291 # Should the build use multiprocessing? Not enabled by default, as it tends to break
292 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
293 emake ${jobs} || die
294 }
295
296 src_install() {
297 emake DESTDIR="${D}" install || die "emake install failed"
298 rm "${D}"/usr/bin/firefox
299
300 linguas
301 for X in ${linguas}; do
302 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
303 done
304
305 cp "${FILESDIR}"/gentoo-default-prefs.js \
306 "${D}"${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js
307
308 local LANG=${linguas%% *}
309 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
310 elog "Setting default locale to ${LANG}"
311 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
312 ${MOZILLA_FIVE_HOME}/defaults/preferences/firefox.js \
313 ${MOZILLA_FIVE_HOME}/defaults/preferences/firefox-l10n.js || \
314 die "sed failed to change locale"
315 fi
316
317 # Install icon and .desktop for menu entry
318 if use iceweasel; then
319 newicon "${S}"/browser/base/branding/icon48.png iceweasel-icon.png
320 newmenu "${FILESDIR}"/icon/iceweasel.desktop \
321 ${PN}-${MAJ_PV}.desktop
322 elif ! use bindist; then
323 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
324 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
325 ${PN}-${MAJ_PV}.desktop
326 else
327 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
328 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
329 ${PN}-${MAJ_PV}.desktop
330 sed -e "s/Bon Echo/Minefield/" \
331 -i "${D}"/usr/share/applications/${PN}-${MAJ_PV}.desktop
332 fi
333
334 # Create /usr/bin/firefox
335 cat <<EOF >"${D}"/usr/bin/firefox
336 #!/bin/sh
337 export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}:${LD_LIBRARY_PATH}"
338 exec "${MOZILLA_FIVE_HOME}"/firefox "\$@"
339 EOF
340
341 fperms 0755 /usr/bin/firefox
342
343 # Plugins dir
344 ln -s "${D}"/usr/$(get_libdir)/{nsbrowser,mozilla-firefox}/plugins
345 }
346
347 pkg_postinst() {
348 ewarn "All the packages built against ${PN} won't compile,"
349 ewarn "if after installing firefox 3.5 you get some blockers,"
350 ewarn "please add 'xulrunner' to your USE-flags."
351 elog
352
353 # Update mimedb for the new .desktop file
354 fdo-mime_desktop_database_update
355 }