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