Gentoo Archives: gentoo-commits

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