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