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