Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/icecat: icecat-5.0.ebuild metadata.xml ChangeLog
Date: Tue, 28 Jun 2011 22:08:08
Message-Id: 20110628220757.8848520054@flycatcher.gentoo.org
1 polynomial-c 11/06/28 22:07:57
2
3 Modified: metadata.xml ChangeLog
4 Added: icecat-5.0.ebuild
5 Log:
6 Version bump (bug #373191)
7
8 (Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.7 www-client/icecat/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/metadata.xml?rev=1.7&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/metadata.xml?rev=1.7&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/metadata.xml?r1=1.6&r2=1.7
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/icecat/metadata.xml,v
20 retrieving revision 1.6
21 retrieving revision 1.7
22 diff -u -r1.6 -r1.7
23 --- metadata.xml 14 Apr 2011 13:13:59 -0000 1.6
24 +++ metadata.xml 28 Jun 2011 22:07:57 -0000 1.7
25 @@ -5,8 +5,12 @@
26 <use>
27 <flag name='custom-optimization'>Fine-tune custom compiler
28 optimizations</flag>
29 + <flag name="gconf">Add support for setting of default browser using
30 + <pkg>gnome-base/gconf</pkg>. Useful only for GNOME 2 users.</flag>
31 <flag name="ipc">Use inter-process communication between tabs and plugins.
32 Allows for greater stability in case of plugin crashes</flag>
33 + <flag name="pgo">Add support for profile-guided optimization using gcc-4.5,
34 + for faster binaries. This option will double the compile time.</flag>
35 <flag name='system-sqlite'>Use the system-wide <pkg>dev-db/sqlite</pkg>
36 installation with secure-delete enabled</flag>
37 <flag name="webm">Use system libvpx <pkg>media-libs/libvpx</pkg></flag>
38
39
40
41 1.91 www-client/icecat/ChangeLog
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/ChangeLog?rev=1.91&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/ChangeLog?rev=1.91&content-type=text/plain
45 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/ChangeLog?r1=1.90&r2=1.91
46
47 Index: ChangeLog
48 ===================================================================
49 RCS file: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v
50 retrieving revision 1.90
51 retrieving revision 1.91
52 diff -u -r1.90 -r1.91
53 --- ChangeLog 23 Jun 2011 11:13:10 -0000 1.90
54 +++ ChangeLog 28 Jun 2011 22:07:57 -0000 1.91
55 @@ -1,6 +1,13 @@
56 # ChangeLog for www-client/icecat
57 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
58 -# $Header: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v 1.90 2011/06/23 11:13:10 polynomial-c Exp $
59 +# $Header: /var/cvsroot/gentoo-x86/www-client/icecat/ChangeLog,v 1.91 2011/06/28 22:07:57 polynomial-c Exp $
60 +
61 +*icecat-5.0 (28 Jun 2011)
62 +
63 + 28 Jun 2011; Lars Wendler <polynomial-c@g.o> +icecat-5.0.ebuild,
64 + +files/2000-icecat-5_gentoo_install_dirs.patch,
65 + +files/gentoo-default-prefs.js:
66 + Version bump (bug #373191).
67
68 23 Jun 2011; Lars Wendler <polynomial-c@g.o> icecat-3.6.16-r2.ebuild:
69 Fixed dependecy on xulrunner.
70
71
72
73 1.1 www-client/icecat/icecat-5.0.ebuild
74
75 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/icecat-5.0.ebuild?rev=1.1&view=markup
76 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/icecat/icecat-5.0.ebuild?rev=1.1&content-type=text/plain
77
78 Index: icecat-5.0.ebuild
79 ===================================================================
80 # Copyright 1999-2011 Gentoo Foundation
81 # Distributed under the terms of the GNU General Public License v2
82 # $Header: /var/cvsroot/gentoo-x86/www-client/icecat/icecat-5.0.ebuild,v 1.1 2011/06/28 22:07:57 polynomial-c Exp $
83
84 EAPI="3"
85 VIRTUALX_REQUIRED="pgo"
86 WANT_AUTOCONF="2.1"
87
88 inherit flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension versionator python virtualx
89
90 MAJ_XUL_PV="5.0"
91 MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
92 XUL_PV="${MAJ_XUL_PV}${PV/${MAJ_FF_PV}/}" # 1.9.3_alpha6, 1.9.2.3, etc.
93 FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
94 FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
95 FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
96 PATCH="firefox-5.0-patches-0.5"
97
98 DESCRIPTION="GNU project's edition of Mozilla Firefox"
99 HOMEPAGE="http://www.gnu.org/software/gnuzilla/"
100
101 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
102 SLOT="0"
103 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
104 IUSE="gconf hardened +ipc pgo system-sqlite +webm"
105
106 # More URIs appended below...
107 SRC_URI="mirror://gnu/gnuzilla/${FF_PV}/${PN}-${FF_PV}.tar.bz2
108 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
109 LANGPACK_URI="http://gnuzilla.gnu.org/download/langpacks/${FF_PV}"
110
111 ASM_DEPEND=">=dev-lang/yasm-1.1"
112
113 RDEPEND="
114 >=sys-devel/binutils-2.16.1
115 >=dev-libs/nss-3.12.9
116 >=dev-libs/nspr-4.8.7
117 gconf? ( >=gnome-base/gconf-1.2.1:2 )
118 >=dev-libs/glib-2.26
119 media-libs/libpng[apng]
120 dev-libs/libffi
121 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
122 webm? ( media-libs/libvpx
123 media-libs/alsa-lib )"
124 # We don't use PYTHON_DEPEND/PYTHON_USE_WITH for some silly reason
125 DEPEND="${RDEPEND}
126 dev-util/pkgconfig
127 pgo? (
128 =dev-lang/python-2*[sqlite]
129 >=sys-devel/gcc-4.5 )
130 webm? ( x86? ( ${ASM_DEPEND} )
131 amd64? ( ${ASM_DEPEND} ) )"
132
133 # No language packs for alphas
134 if ! [[ ${PV} =~ alpha|beta ]]; then
135 # This list can be updated with scripts/get_langs.sh from mozilla overlay
136 LANGS="af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de
137 el en eo es-ES et eu fa fi fr fy-NL ga-IE gd gl gu-IN
138 he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk
139 ml mr nb-NO nl nn-NO nso or pa-IN pl pt-PT rm ro ru si sk sl
140 son sq sr sv-SE ta ta-LK te th tr uk vi zu"
141 NOSHORTLANGS="en-GB en-ZA es-AR es-CL es-MX pt-BR zh-CN zh-TW"
142
143 for X in ${LANGS} ; do
144 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
145 SRC_URI="${SRC_URI}
146 linguas_${X/-/_}? ( ${LANGPACK_URI}/${X}.xpi -> ${P}-${X}.xpi )"
147 fi
148 IUSE="${IUSE} linguas_${X/-/_}"
149 # english is handled internally
150 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
151 if [ "${X}" != "en-US" ]; then
152 SRC_URI="${SRC_URI}
153 linguas_${X%%-*}? ( ${LANGPACK_URI}/${X}.xpi -> ${P}-${X}.xpi )"
154 fi
155 IUSE="${IUSE} linguas_${X%%-*}"
156 fi
157 done
158 fi
159
160 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/${PN}"
161
162 linguas() {
163 local LANG SLANG
164 for LANG in ${LINGUAS}; do
165 if has ${LANG} en en_US; then
166 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
167 continue
168 elif has ${LANG} ${LANGS//-/_}; then
169 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
170 continue
171 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
172 for X in ${LANGS}; do
173 if [[ "${X}" == "${LANG}-"* ]] && \
174 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
175 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
176 continue 2
177 fi
178 done
179 fi
180 ewarn "Sorry, but ${P} does not support the ${LANG} LINGUA"
181 done
182 }
183
184 pkg_setup() {
185 moz_pkgsetup
186
187 # Avoid PGO profiling problems due to enviroment leakage
188 # These should *always* be cleaned up anyway
189 unset DBUS_SESSION_BUS_ADDRESS \
190 DISPLAY \
191 ORBIT_SOCKETDIR \
192 SESSION_MANAGER \
193 XDG_SESSION_COOKIE \
194 XAUTHORITY
195
196 if ! use hardened && use pgo; then
197 einfo
198 ewarn "You will do a double build for profile guided optimization. This will result in your"
199 ewarn "build taking at least twice as long as before."
200 fi
201 }
202
203 src_unpack() {
204 unpack ${A}
205
206 linguas
207 for X in ${linguas}; do
208 # FIXME: Add support for unpacking xpis to portage
209 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
210 done
211 }
212
213 src_prepare() {
214 # Fix preferences location
215 sed -i 's|defaults/pref/|defaults/preferences/|' browser/installer/packages-static || die "sed failed"
216
217 # Apply our patches
218 #
219 EPATCH_EXCLUDE="2000-firefox_gentoo_install_dirs.patch
220 5001_use_system_libffi.patch" \
221 EPATCH_SUFFIX="patch" \
222 EPATCH_FORCE="yes" \
223 epatch "${WORKDIR}"
224
225 epatch "${FILESDIR}"/2000-icecat-5_gentoo_install_dirs.patch
226
227 # Allow user to apply any additional patches without modifing ebuild
228 epatch_user
229
230 # Fix rebranding
231 sed -i 's|\$(DIST)/bin/firefox|\$(DIST)/bin/icecat|' browser/app/Makefile.in
232
233 # Enable gnomebreakpad
234 if use debug ; then
235 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
236 "${S}"/build/unix/run-mozilla.sh || die "sed failed!"
237 fi
238
239 # Disable gnomevfs extension
240 sed -i -e "s:gnomevfs::" "${S}/"browser/confvars.sh \
241 -e "s:gnomevfs::" "${S}/"xulrunner/confvars.sh \
242 || die "Failed to remove gnomevfs extension"
243
244 # Ensure that are plugins dir is enabled as default
245 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/$(get_libdir)/nsbrowser/plugins:" \
246 "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path!"
247
248 # Fix sandbox violations during make clean, bug 372817
249 sed -e "s:\(/no-such-file\):${T}\1:g" \
250 -i "${S}"/config/rules.mk \
251 -i "${S}"/js/src/config/rules.mk \
252 -i "${S}"/nsprpub/configure{.in,} \
253 || die
254
255 eautoreconf
256
257 cd js/src
258 eautoreconf
259 }
260
261 src_configure() {
262 # We will build our own .mozconfig
263 rm "${S}"/.mozconfig
264
265 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
266 MEXTENSIONS="default"
267
268 ####################################
269 #
270 # mozconfig, CFLAGS and CXXFLAGS setup
271 #
272 ####################################
273
274 mozconfig_init
275 mozconfig_config
276
277 # It doesn't compile on alpha without this LDFLAGS
278 use alpha && append-ldflags "-Wl,--no-relax"
279
280 # Specific settings for icecat
281 echo "export MOZ_PHOENIX=1" >> "${S}"/.mozconfig
282 echo "mk_add_options MOZ_PHOENIX=1" "${S}"/.mozconfig
283 mozconfig_annotate '' --with-branding=browser/branding/unofficial
284 mozconfig_annotate '' --disable-official-branding
285 mozconfig_annotate '' --with-user-appdir=.icecat
286
287 mozconfig_annotate '' --prefix=/usr
288 mozconfig_annotate '' --libdir=/usr/$(get_libdir)
289 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
290 mozconfig_annotate '' --disable-mailnews
291 mozconfig_annotate '' --enable-canvas
292 mozconfig_annotate '' --enable-safe-browsing
293 mozconfig_annotate '' --with-system-png
294 use hardened && mozconfig_annotate 'hardened' --disable-methodjit
295
296 # Other browser-specific settings
297 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
298
299 mozconfig_use_enable system-sqlite
300 mozconfig_use_enable gconf
301
302 # Allow for a proper pgo build
303 if ! use hardened && use pgo; then
304 echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
305 fi
306
307 # Finalize and report settings
308 mozconfig_final
309
310 if [[ $(gcc-major-version) -lt 4 ]]; then
311 append-cxxflags -fno-stack-protector
312 fi
313
314 if use amd64 || use x86; then
315 append-flags -mno-avx
316 fi
317 }
318
319 src_compile() {
320 if ! use hardened && use pgo; then
321 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
322 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
323 Xemake -f client.mk profiledbuild || die "Xemake failed"
324 else
325 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
326 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
327 emake -f client.mk || die "emake failed"
328 fi
329
330 }
331
332 src_install() {
333 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
334
335 # MOZ_BUILD_ROOT, and hence OBJ_DIR change depending on arch, compiler, pgo, etc.
336 local obj_dir="$(echo */config.log)"
337 obj_dir="${obj_dir%/*}"
338 cd "${S}/${obj_dir}"
339
340 # Add our default prefs for firefox + xulrunner
341 cp "${FILESDIR}"/gentoo-default-prefs.js \
342 "${S}/${obj_dir}/dist/bin/defaults/pref/all-gentoo.js" || die
343
344 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
345 emake DESTDIR="${D}" install || die "emake install failed"
346
347 linguas
348 for X in ${linguas}; do
349 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}/${P}-${X}"
350 done
351
352 local size sizes icon_path icon name
353 sizes="16 32 48"
354 icon_path="${S}/browser/branding/unofficial"
355
356 # Install icons and .desktop for menu entry
357 for size in ${sizes}; do
358 insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
359 newins "${icon_path}/default${size}.png" "${PN}.png" || die
360 done
361 # The 128x128 icon has a different name
362 insinto "/usr/share/icons/hicolor/128x128/apps"
363 newins "${icon_path}/mozicon128.png" "${PN}.png" || die
364 # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
365 newicon "${icon_path}/content/icon48.png" "${PN}.png" || die
366 newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop" || die
367 sed -e "/^Icon/s:${PN}-icon:${PN}:" -i \
368 "${ED}/usr/share/applications/${PN}.desktop" || die
369
370 # Add StartupNotify=true bug 237317
371 if use startup-notification ; then
372 echo "StartupNotify=true" >> "${ED}/usr/share/applications/${PN}.desktop"
373 fi
374
375 if use hardened; then
376 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/${PN}
377 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/plugin-container
378 fi
379
380 # Plugins dir
381 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
382 || die "failed to symlink"
383
384 }
385
386 pkg_preinst() {
387 gnome2_icon_savelist
388 }
389
390 pkg_postinst() {
391 # Update mimedb for the new .desktop file
392 fdo-mime_desktop_database_update
393 gnome2_icon_cache_update
394 }
395
396 pkg_postrm() {
397 gnome2_icon_cache_update
398 }