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/icecat: ChangeLog icecat-3.5.5.ebuild icecat-3.5.3.ebuild
Date: Tue, 10 Nov 2009 07:42:53
Message-Id: E1N7lNL-0000Wo-3j@stork.gentoo.org
1 anarchy 09/11/10 07:42:51
2
3 Modified: ChangeLog
4 Added: icecat-3.5.5.ebuild
5 Removed: icecat-3.5.3.ebuild
6 Log:
7 crash fixes, remove stale version
8 (Portage version: 2.1.7.4/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.5 www-client/icecat/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/icecat/ChangeLog?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/icecat/ChangeLog?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/icecat/ChangeLog?r1=1.4&r2=1.5
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- ChangeLog 4 Nov 2009 14:19:24 -0000 1.4
24 +++ ChangeLog 10 Nov 2009 07:42:50 -0000 1.5
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-client/icecat
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v 1.4 2009/11/04 14:19:24 anarchy Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v 1.5 2009/11/10 07:42:50 anarchy Exp $
30 +
31 +*icecat-3.5.5 (10 Nov 2009)
32 +
33 + 10 Nov 2009; Jory A. Pratt <anarchy@g.o> -icecat-3.5.3.ebuild,
34 + +icecat-3.5.5.ebuild:
35 + crash fixes, remove stale version
36
37 04 Nov 2009; Jory A. Pratt <anarchy@g.o> icecat-3.5.4.ebuild:
38 apply patch in topsrc dir bug #291797
39
40
41
42 1.1 www-client/icecat/icecat-3.5.5.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/icecat/icecat-3.5.5.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/icecat/icecat-3.5.5.ebuild?rev=1.1&content-type=text/plain
46
47 Index: icecat-3.5.5.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/icecat/icecat-3.5.5.ebuild,v 1.1 2009/11/10 07:42:50 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
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 mn 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.1.5"
64 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
65 MAJ_XUL_PV="1.9.1"
66 DESKTOP_PV="3.5"
67 MY_PV="${PV/_beta/b}" # Handle betas for SRC_URI
68 MY_PV="${PV/_/}" # Handle rcs for SRC_URI
69 FIREFOX_PN="mozilla-firefox"
70 FIREFOX_P="${FIREFOX_PN}-${PV}"
71 PATCH="${FIREFOX_PN}-3.5.2-patches-0.1"
72
73 DESCRIPTION="GNU project's edition of Mozilla Firefox"
74 HOMEPAGE="http://www.gnu.org/software/gnuzilla/"
75
76 KEYWORDS="~x86 ~amd64"
77 SLOT="0"
78 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
79 IUSE="+alsa java mozdevelop restrict-javascript sqlite"
80
81 FIREFOX_REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
82 SRC_URI="mirror://gnu/gnuzilla/${MY_PV}/${PN}-${MY_PV}.tar.bz2
83 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
84
85 for X in ${LANGS} ; do
86 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
87 SRC_URI="${SRC_URI}
88 linguas_${X/-/_}? ( ${FIREFOX_REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${FIREFOX_P}-${X}.xpi )"
89 fi
90 IUSE="${IUSE} linguas_${X/-/_}"
91 # english is handled internally
92 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
93 if [ "${X}" != "en-US" ]; then
94 SRC_URI="${SRC_URI}
95 linguas_${X%%-*}? ( ${FIREFOX_REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${FIREFOX_P}-${X}.xpi )"
96 fi
97 IUSE="${IUSE} linguas_${X%%-*}"
98 fi
99 done
100
101 RDEPEND="
102 >=sys-devel/binutils-2.16.1
103 >=dev-libs/nss-3.12.2
104 >=dev-libs/nspr-4.7.3
105 sqlite? ( >=dev-db/sqlite-3.6.10 )
106 >=app-text/hunspell-1.2
107 alsa? ( media-libs/alsa-lib )
108 ~net-libs/xulrunner-${XUL_PV}[java=,sqlite=]
109 >=x11-libs/cairo-1.8.8[X]
110 x11-libs/pango[X]"
111
112 DEPEND="${RDEPEND}
113 dev-util/pkgconfig"
114
115 PDEPEND="restrict-javascript? ( >=www-plugins/noscript-1.9.6.6 )"
116
117 linguas() {
118 local LANG SLANG
119 for LANG in ${LINGUAS}; do
120 if has ${LANG} en en_US; then
121 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
122 continue
123 elif has ${LANG} ${LANGS//-/_}; then
124 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
125 continue
126 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
127 for X in ${LANGS}; do
128 if [[ "${X}" == "${LANG}-"* ]] && \
129 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
130 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
131 continue 2
132 fi
133 done
134 fi
135 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
136 done
137 }
138
139 src_unpack() {
140 unpack ${A}
141
142 linguas
143 for X in ${linguas}; do
144 # FIXME: Add support for unpacking xpis to portage
145 [[ ${X} != "en" ]] && xpi_unpack "${FIREFOX_P}-${X}.xpi"
146 done
147 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
148 einfo "Selected language packs (first will be default): ${linguas}"
149 fi
150 }
151
152 src_prepare() {
153 # Integrate rebranding
154 sed -i "s|/mozilla-firefox|/icecat|" \
155 "${WORKDIR}"/001-firefox_gentoo_install_dirs.patch
156
157 # Fix preferences location
158 sed -i 's|defaults/pref/|defaults/preferences/|' browser/installer/packages-static || die "sed failed"
159
160 for X in ${linguas}; do
161 # replace any linguas-provided branding with official branding
162 if [ ${X} != "en" ]; then
163 cd "${WORKDIR}"/${FIREFOX_P}-${X}/chrome/
164 unzip -q ${X}.jar
165
166 # Ensure branding is copied directly from icecat
167 cp "${S}"/browser/branding/unofficial/brand\.* locale/branding/
168
169 # Any variable being set should be changed
170 find . -type f -exec sed -i 's/\(.*=.*\)Firefox/\1IceCat/g' {} +;
171
172 rm ${X}.jar
173 zip -q -r ${X}.jar .
174
175 rm -r locale/
176
177 cd "${S}"
178 fi
179 done
180
181 # Apply our patches
182 EPATCH_SUFFIX="patch" \
183 EPATCH_FORCE="yes" \
184 epatch "${WORKDIR}"
185
186 # Fix rebranding
187 sed -i 's|\$(DIST)/bin/firefox|\$(DIST)/bin/icecat|' browser/app/Makefile.in
188
189 eautoreconf
190
191 cd js/src
192 eautoreconf
193
194 # We need to re-patch this because autoreconf overwrites it
195 cd "${S}"
196 epatch "${FILESDIR}/000_flex-configure-LANG.patch"
197 }
198
199 src_configure() {
200 # We will build our own .mozconfig
201 rm "${S}"/.mozconfig
202
203 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
204 MEXTENSIONS="default"
205
206 ####################################
207 #
208 # mozconfig, CFLAGS and CXXFLAGS setup
209 #
210 ####################################
211
212 mozconfig_init
213 mozconfig_config
214
215 # It doesn't compile on alpha without this LDFLAGS
216 use alpha && append-ldflags "-Wl,--no-relax"
217
218 # Specific settings for icecat
219 echo "export MOZ_PHOENIX=1" >> "${S}"/.mozconfig
220 echo "mk_add_options MOZ_PHOENIX=1" "${S}"/.mozconfig
221 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
222 mozconfig_annotate '' --with-branding=browser/branding/unofficial
223 mozconfig_annotate '' --disable-official-branding
224 mozconfig_annotate '' --with-user-appdir=.icecat
225
226 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
227 mozconfig_annotate '' --enable-application=browser
228 mozconfig_annotate '' --disable-mailnews
229 mozconfig_annotate 'broken' --disable-crashreporter
230 mozconfig_annotate '' --enable-image-encoder=all
231 mozconfig_annotate '' --enable-canvas
232 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
233 # regardless of java setting.
234 mozconfig_annotate '' --enable-oji --enable-mathml
235 mozconfig_annotate 'places' --enable-storage --enable-places
236 mozconfig_annotate '' --enable-safe-browsing
237
238 # System-wide install specs
239 mozconfig_annotate '' --disable-installer
240 mozconfig_annotate '' --disable-updater
241 mozconfig_annotate '' --disable-strip
242 mozconfig_annotate '' --disable-install-strip
243
244 # Use system libraries
245 mozconfig_annotate '' --enable-system-cairo
246 mozconfig_annotate '' --enable-system-hunspell
247 mozconfig_annotate '' --with-system-nspr
248 mozconfig_annotate '' --with-system-nss
249 mozconfig_annotate '' --enable-system-lcms
250 mozconfig_annotate '' --with-system-bz2
251 mozconfig_annotate '' --with-system-libxul
252 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
253
254 # Enable/Disable based on useflag
255 mozconfig_use_enable sqlite system-sqlite
256 mozconfig_use_enable mozdevelop jsd
257 mozconfig_use_enable mozdevelop xpctools
258 mozconfig_use_enable alsa ogg
259 mozconfig_use_enable alsa wave
260
261 # Other ff-specific settings
262 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
263
264 # Finalize and report settings
265 mozconfig_final
266
267 if [[ $(gcc-major-version) -lt 4 ]]; then
268 append-cxxflags -fno-stack-protector
269 fi
270
271 ####################################
272 #
273 # Configure and build
274 #
275 ####################################
276
277 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
278 }
279
280 src_compile() {
281 # Should the build use multiprocessing? Not enabled by default, as it tends to break
282 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
283 emake ${jobs} || die
284 }
285
286 src_install() {
287 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
288
289 emake DESTDIR="${D}" install || die "emake install failed"
290
291 linguas
292 for X in ${linguas}; do
293 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${FIREFOX_P}-${X}"
294 done
295
296 # Install icon and .desktop for menu entry
297 newicon "${S}"/browser/base/branding/icon48.png icecat-icon.png
298 newmenu "${FILESDIR}"/icon/icecat.desktop ${PN}-${DESKTOP_PV}.desktop
299
300 # Add StartupNotify=true bug 237317
301 if use startup-notification ; then
302 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
303 fi
304
305 pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/${PN}
306
307 # Enable very specific settings not inherited from xulrunner
308 cp "${FILESDIR}"/firefox-default-prefs.js \
309 "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
310 die "failed to cp icecat-default-prefs.js"
311
312 # Plugins dir
313 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
314 }
315
316 pkg_postinst() {
317 ewarn "All the packages built against ${PN} won't compile,"
318 ewarn "any package that fails to build warrants a bug report."
319 elog
320
321 # Update mimedb for the new .desktop file
322 fdo-mime_desktop_database_update
323 }