Gentoo Archives: gentoo-commits

From: "Jory Pratt (anarchy)" <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/mozilla-firefox: ChangeLog mozilla-firefox-3.6-r1.ebuild
Date: Fri, 29 Jan 2010 15:01:14
Message-Id: E1NasLN-0004t0-BC@stork.gentoo.org
1 anarchy 10/01/29 15:01:09
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-3.6-r1.ebuild
5 Log:
6 Fix sparc build issue thanks armin76, fix -alsa build error, change networkmanager to wifi useflag
7 (Portage version: 2.1.7.16/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.592 www-client/mozilla-firefox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.592&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.592&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?r1=1.591&r2=1.592
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v
19 retrieving revision 1.591
20 retrieving revision 1.592
21 diff -u -r1.591 -r1.592
22 --- ChangeLog 22 Jan 2010 02:25:34 -0000 1.591
23 +++ ChangeLog 29 Jan 2010 15:01:08 -0000 1.592
24 @@ -1,6 +1,13 @@
25 # ChangeLog for www-client/mozilla-firefox
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.591 2010/01/22 02:25:34 anarchy Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.592 2010/01/29 15:01:08 anarchy Exp $
29 +
30 +*mozilla-firefox-3.6-r1 (29 Jan 2010)
31 +
32 + 29 Jan 2010; <anarchy@g.o>
33 + +files/xulrunner-1.9.2-noalsa-fixup.patch, +mozilla-firefox-3.6-r1.ebuild:
34 + Fix sparc build issue thanks armin76, fix -alsa build error, change
35 + networkmanager to wifi useflag
36
37 *mozilla-firefox-3.6 (22 Jan 2010)
38
39
40
41
42 1.1 www-client/mozilla-firefox/mozilla-firefox-3.6-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.6-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.6-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: mozilla-firefox-3.6-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2010 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.6-r1.ebuild,v 1.1 2010/01/29 15:01:08 anarchy Exp $
52 EAPI="2"
53 WANT_AUTOCONF="2.1"
54
55 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension java-pkg-opt-2
56
57 LANGS="af ar as be bg bn-BD bn-IN ca cs cy da de el en en-GB en-US eo es-AR
58 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
59 ka kk kn ko ku lt lv mk ml mr nb-NO nl nn-NO oc or pa-IN pl pt-BR pt-PT rm ro
60 ru si sk sl sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW"
61 NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"
62
63 XUL_PV="1.9.2"
64 MAJ_XUL_PV="1.9.2"
65 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
66 DESKTOP_PV="3.6"
67 MY_PV="${PV/_rc/rc}" # Handle beta for SRC_URI
68 PATCH="${PN}-3.6-patches-0.6"
69
70 DESCRIPTION="Firefox Web Browser"
71 HOMEPAGE="http://www.mozilla.com/firefox"
72
73 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
74 SLOT="0"
75 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
76 IUSE="+alsa bindist java libnotify wifi"
77
78 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
79 SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
80 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
81
82 for X in ${LANGS} ; do
83 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
84 SRC_URI="${SRC_URI}
85 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.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%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
93 fi
94 IUSE="${IUSE} linguas_${X%%-*}"
95 fi
96 done
97
98 RDEPEND="
99 >=sys-devel/binutils-2.16.1
100 >=dev-libs/nss-3.12.4
101 >=dev-libs/nspr-4.8
102 >=app-text/hunspell-1.2
103 >=dev-db/sqlite-3.6.20-r1[fts3]
104 alsa? ( media-libs/alsa-lib )
105 >=x11-libs/cairo-1.8.8[X]
106 x11-libs/pango[X]
107 wifi? ( net-wireless/wireless-tools )
108 libnotify? ( >=x11-libs/libnotify-0.4 )
109 ~net-libs/xulrunner-${XUL_PV}[java=,wifi=,libnotify=]"
110
111 DEPEND="${RDEPEND}
112 java? ( >=virtual/jdk-1.4 )
113 dev-util/pkgconfig"
114
115 RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.4 )"
116
117 S="${WORKDIR}/mozilla-1.9.2"
118
119 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
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 ${PN} does not support the ${LANG} LINGUA"
140 done
141 }
142
143 pkg_setup() {
144 if ! use bindist ; then
145 einfo
146 elog "You are enabling official branding. You may not redistribute this build"
147 elog "to any users on your network or the internet. Doing so puts yourself into"
148 elog "a legal problem with Mozilla Foundation"
149 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
150 fi
151
152 java-pkg-opt-2_pkg_setup
153 }
154
155 src_unpack() {
156 unpack firefox-${MY_PV}.source.tar.bz2 ${PATCH}.tar.bz2
157
158 linguas
159 for X in ${linguas}; do
160 # FIXME: Add support for unpacking xpis to portage
161 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
162 done
163 }
164
165 src_prepare() {
166 # Apply our patches
167 EPATCH_SUFFIX="patch" \
168 EPATCH_FORCE="yes" \
169 epatch "${WORKDIR}"
170
171 # Fix media build failure
172 epatch "${FILESDIR}/xulrunner-1.9.2-noalsa-fixup.patch"
173
174 eautoreconf
175
176 cd js/src
177 eautoreconf
178
179 # We need to re-patch this because autoreconf overwrites it
180 epatch "${FILESDIR}/000_flex-configure-LANG.patch"
181 }
182
183 src_configure() {
184 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
185 MEXTENSIONS="default"
186
187 ####################################
188 #
189 # mozconfig, CFLAGS and CXXFLAGS setup
190 #
191 ####################################
192
193 mozconfig_init
194 mozconfig_config
195
196 # It doesn't compile on alpha without this LDFLAGS
197 use alpha && append-ldflags "-Wl,--no-relax"
198
199 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
200 mozconfig_annotate '' --enable-application=browser
201 mozconfig_annotate '' --disable-mailnews
202 mozconfig_annotate 'broken' --disable-crashreporter
203 mozconfig_annotate '' --enable-image-encoder=all
204 mozconfig_annotate '' --enable-canvas
205 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
206 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
207 # regardless of java setting.
208 mozconfig_annotate '' --enable-oji --enable-mathml
209 mozconfig_annotate 'places' --enable-storage --enable-places
210 mozconfig_annotate '' --enable-safe-browsing
211
212 # Build mozdevelop permately
213 mozconfig_annotate '' --enable-jsd --enable-xpctools
214
215 # System-wide install specs
216 mozconfig_annotate '' --disable-installer
217 mozconfig_annotate '' --disable-updater
218 mozconfig_annotate '' --disable-strip
219 mozconfig_annotate '' --disable-install-strip
220
221 # Use system libraries
222 mozconfig_annotate '' --enable-system-cairo
223 mozconfig_annotate '' --enable-system-hunspell
224 mozconfig_annotate '' --with-system-nspr
225 mozconfig_annotate '' --with-system-nss
226 mozconfig_annotate '' --enable-system-lcms
227 mozconfig_annotate '' --with-system-bz2
228 mozconfig_annotate '' --with-system-libxul
229 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
230
231 mozconfig_use_enable libnotify
232 mozconfig_use_enable java javaxpcom
233 mozconfig_use_enable wifi necko-wifi
234 mozconfig_use_enable alsa ogg
235 mozconfig_use_enable alsa wave
236
237 # Other ff-specific settings
238 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
239
240 # Enable/Disable audio in firefox
241 mozconfig_use_enable alsa ogg
242 mozconfig_use_enable alsa wave
243
244 if ! use bindist ; then
245 mozconfig_annotate '' --enable-official-branding
246 fi
247
248 # Finalize and report settings
249 mozconfig_final
250
251 if [[ $(gcc-major-version) -lt 4 ]]; then
252 append-cxxflags -fno-stack-protector
253 fi
254
255 ####################################
256 #
257 # Configure and build
258 #
259 ####################################
260
261 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
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 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
272
273 emake DESTDIR="${D}" install || die "emake install failed"
274
275 linguas
276 for X in ${linguas}; do
277 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
278 done
279
280 # Install icon and .desktop for menu entry
281 if ! use bindist ; then
282 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
283 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
284 ${PN}-${DESKTOP_PV}.desktop
285 else
286 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
287 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
288 ${PN}-${DESKTOP_PV}.desktop
289 sed -i -e "s:Bon Echo:Shiretoko:" \
290 "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
291 fi
292
293 # Add StartupNotify=true bug 237317
294 if use startup-notification ; then
295 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
296 fi
297
298 pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox
299
300 # Enable very specific settings not inherited from xulrunner
301 cp "${FILESDIR}"/firefox-default-prefs.js \
302 "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
303 die "failed to cp firefox-default-prefs.js"
304
305 # Plugins dir
306 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
307 || die "failed to symlink"
308
309 # very ugly hack to make firefox not sigbus on sparc
310 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
311 -i "${D}/${MOZILLA_FIVE_HOME}/application.ini" || \
312 die "sparc sed failed"; }
313 }
314
315 pkg_postinst() {
316 ewarn "All the packages built against ${PN} won't compile,"
317 ewarn "any package that fails to build warrants a bug report."
318 elog
319
320 # Update mimedb for the new .desktop file
321 fdo-mime_desktop_database_update
322 }