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.4-r1.ebuild
Date: Sun, 23 Nov 2008 17:15:01
Message-Id: E1L4IXz-0000Ba-Ej@stork.gentoo.org
1 armin76 08/11/23 17:14:59
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-3.0.4-r1.ebuild
5 Log:
6 Fix collisions, bug #247119, thanks to zmedico for the hints
7 (Portage version: 2.1.4.5)
8
9 Revision Changes Path
10 1.456 www-client/mozilla-firefox/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.456&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?rev=1.456&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/ChangeLog?r1=1.455&r2=1.456
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v
19 retrieving revision 1.455
20 retrieving revision 1.456
21 diff -u -r1.455 -r1.456
22 --- ChangeLog 16 Nov 2008 20:11:29 -0000 1.455
23 +++ ChangeLog 23 Nov 2008 17:14:59 -0000 1.456
24 @@ -1,6 +1,12 @@
25 # ChangeLog for www-client/mozilla-firefox
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.455 2008/11/16 20:11:29 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.456 2008/11/23 17:14:59 armin76 Exp $
29 +
30 +*mozilla-firefox-3.0.4-r1 (23 Nov 2008)
31 +
32 + 23 Nov 2008; Raúl Porcel <armin76@g.o>
33 + +mozilla-firefox-3.0.4-r1.ebuild:
34 + Fix collisions, bug #247119, thanks to zmedico for the hints
35
36 16 Nov 2008; Raúl Porcel <armin76@g.o>
37 -mozilla-firefox-2.0.0.17.ebuild, -mozilla-firefox-3.0.3.ebuild:
38
39
40
41 1.1 www-client/mozilla-firefox/mozilla-firefox-3.0.4-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.4-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.4-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mozilla-firefox-3.0.4-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 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.4-r1.ebuild,v 1.1 2008/11/23 17:14:59 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.1-patches-0.3"
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
101 >=dev-libs/nspr-4.7.1
102 >=media-libs/lcms-1.17
103 >=app-text/hunspell-1.1.9
104 xulrunner? ( >=net-libs/xulrunner-1.9${MY_PV}-r1 )"
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 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
217 mozconfig_annotate '' --disable-mailnews
218 mozconfig_annotate 'broken' --disable-mochitest
219 mozconfig_annotate 'broken' --disable-crashreporter
220 mozconfig_annotate '' --enable-system-hunspell
221 #mozconfig_annotate '' --enable-system-sqlite
222 mozconfig_annotate '' --enable-image-encoder=all
223 mozconfig_annotate '' --enable-canvas
224 mozconfig_annotate '' --with-system-nspr
225 mozconfig_annotate '' --with-system-nss
226 mozconfig_annotate '' --enable-system-lcms
227 mozconfig_annotate '' --enable-oji --enable-mathml
228 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
229
230 # Other ff-specific settings
231 #mozconfig_use_enable mozdevelop jsd
232 #mozconfig_use_enable mozdevelop xpctools
233 mozconfig_use_extension mozdevelop venkman
234 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
235 if use xulrunner; then
236 # Add xulrunner variable
237 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-1.9
238 fi
239
240 if ! use bindist && ! use iceweasel; then
241 mozconfig_annotate '' --enable-official-branding
242 fi
243
244 # Finalize and report settings
245 mozconfig_final
246
247 # -fstack-protector breaks us
248 if gcc-version ge 4 1; then
249 gcc-specs-ssp && append-flags -fno-stack-protector
250 else
251 gcc-specs-ssp && append-flags -fno-stack-protector-all
252 fi
253 filter-flags -fstack-protector -fstack-protector-all
254
255 ####################################
256 #
257 # Configure and build
258 #
259 ####################################
260
261 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
262 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
263 econf || die
264
265 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
266 # to econf, but the quotes cause configure to fail.
267 sed -i -e \
268 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
269 "${S}"/config/autoconf.mk \
270 "${S}"/toolkit/content/buildconfig.html
271
272 # Should the build use multiprocessing? Not enabled by default, as it tends to break
273 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
274 emake ${jobs} || die
275 }
276
277 pkg_preinst() {
278 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
279
280 einfo "Removing old installs with some really ugly code. It potentially"
281 einfo "eliminates any problems during the install, however suggestions to"
282 einfo "replace this are highly welcome. Send comments and suggestions to"
283 einfo "mozilla@g.o."
284 rm -rf "${ROOT}"${MOZILLA_FIVE_HOME}
285 }
286
287 src_install() {
288 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
289
290 emake DESTDIR="${D}" install || die "emake install failed"
291 rm "${D}"/usr/bin/firefox
292
293 linguas
294 for X in ${linguas}; do
295 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
296 done
297
298 use xulrunner && prefs=preferences || prefs=pref
299 cp "${FILESDIR}"/gentoo-default-prefs.js "${D}"${MOZILLA_FIVE_HOME}/defaults/${prefs}/all-gentoo.js
300
301 local LANG=${linguas%% *}
302 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
303 elog "Setting default locale to ${LANG}"
304 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
305 ${MOZILLA_FIVE_HOME}/defaults/${prefs}/firefox.js \
306 ${MOZILLA_FIVE_HOME}/defaults/${prefs}/firefox-l10n.js || \
307 die "sed failed to change locale"
308 fi
309
310 # Install icon and .desktop for menu entry
311 if use iceweasel; then
312 newicon "${S}"/browser/base/branding/icon48.png iceweasel-icon.png
313 newmenu "${FILESDIR}"/icon/iceweasel.desktop \
314 mozilla-firefox-3.0.desktop
315 elif ! use bindist; then
316 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
317 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
318 mozilla-firefox-3.0.desktop
319 else
320 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
321 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
322 mozilla-firefox-3.0.desktop
323 sed -i -e "s/Bon Echo/Minefield/" "${D}"/usr/share/applications/mozilla-firefox-3.0.desktop
324 fi
325
326 if use xulrunner; then
327 # Create /usr/bin/firefox
328 cat <<EOF >"${D}"/usr/bin/firefox
329 #!/bin/sh
330 export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"
331 exec "${MOZILLA_FIVE_HOME}"/firefox "\$@"
332 EOF
333 fperms 0755 /usr/bin/firefox
334 else
335 # Create /usr/bin/firefox
336 make_wrapper firefox "${MOZILLA_FIVE_HOME}/firefox"
337
338 # Add vendor
339 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
340 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
341 fi
342
343 }
344
345 pkg_postinst() {
346 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
347
348 ewarn "All the packages built against ${PN} won't compile,"
349 ewarn "if after installing firefox 3.0 you get some blockers,"
350 ewarn "please add 'xulrunner' to your USE-flags."
351
352 if use xulrunner; then
353 dosym /usr/$(get_libdir)/xulrunner-1.9/defaults/autoconfig \
354 ${MOZILLA_FIVE_HOME}/defaults/autoconfig
355 fi
356
357 # Update mimedb for the new .desktop file
358 fdo-mime_desktop_database_update
359 }