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