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/seamonkey: ChangeLog seamonkey-2.3.3-r1.ebuild seamonkey-2.4.ebuild seamonkey-2.3.3.ebuild seamonkey-2.3.2.ebuild
Date: Mon, 26 Sep 2011 15:08:24
Message-Id: 20110926150807.98B3020036@flycatcher.gentoo.org
1 polynomial-c 11/09/26 15:08:07
2
3 Modified: ChangeLog
4 Added: seamonkey-2.3.3-r1.ebuild seamonkey-2.4.ebuild
5 Removed: seamonkey-2.3.3.ebuild seamonkey-2.3.2.ebuild
6 Log:
7 Version bump. Added new enigmail version to seamonkey-2.3.3-r1
8
9 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.336 www-client/seamonkey/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/ChangeLog?rev=1.336&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/ChangeLog?rev=1.336&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/ChangeLog?r1=1.335&r2=1.336
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/seamonkey/ChangeLog,v
21 retrieving revision 1.335
22 retrieving revision 1.336
23 diff -u -r1.335 -r1.336
24 --- ChangeLog 5 Sep 2011 10:18:29 -0000 1.335
25 +++ ChangeLog 26 Sep 2011 15:08:07 -0000 1.336
26 @@ -1,6 +1,13 @@
27 # ChangeLog for www-client/seamonkey
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/ChangeLog,v 1.335 2011/09/05 10:18:29 polynomial-c Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/ChangeLog,v 1.336 2011/09/26 15:08:07 polynomial-c Exp $
31 +
32 +*seamonkey-2.4 (26 Sep 2011)
33 +*seamonkey-2.3.3-r1 (26 Sep 2011)
34 +
35 + 26 Sep 2011; Lars Wendler <polynomial-c@g.o> -seamonkey-2.3.2.ebuild,
36 + -seamonkey-2.3.3.ebuild, +seamonkey-2.3.3-r1.ebuild, +seamonkey-2.4.ebuild:
37 + Version bump. Added new enigmail version to seamonkey-2.3.3-r1.
38
39 05 Sep 2011; Lars Wendler <polynomial-c@g.o> seamonkey-2.3.3.ebuild:
40 Fixed patchset.
41
42
43
44 1.1 www-client/seamonkey/seamonkey-2.3.3-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/seamonkey-2.3.3-r1.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/seamonkey-2.3.3-r1.ebuild?rev=1.1&content-type=text/plain
48
49 Index: seamonkey-2.3.3-r1.ebuild
50 ===================================================================
51 # Copyright 1999-2011 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.3.3-r1.ebuild,v 1.1 2011/09/26 15:08:07 polynomial-c Exp $
54
55 EAPI="3"
56 WANT_AUTOCONF="2.1"
57
58 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension python
59
60 PATCH="${PN}-2.3.3-patches-02"
61 EMVER="1.3.2"
62
63 LANGS="be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN"
64 NOSHORTLANGS="en-GB en-US es-AR"
65
66 MY_PV="${PV/_pre*}"
67 MY_PV="${MY_PV/_alpha/a}"
68 MY_PV="${MY_PV/_beta/b}"
69 MY_PV="${MY_PV/_rc/rc}"
70 MY_P="${PN}-${MY_PV}"
71
72 # release versions usually have language packs. So be careful with changing this.
73 HAS_LANGS="true"
74 LANGPACK_PREFIX="${MY_P}."
75 LANGPACK_SUFFIX=".langpack"
76 if [[ ${PV} == *_pre* ]] ; then
77 # pre-releases. No need for arch teams to change KEYWORDS here.
78
79 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
80 #LANG_URI="${REL_URI}/langpack"
81 LANG_URI="${REL_URI}/linux-i686/xpi"
82 LANGPACK_PREFIX=""
83 LANGPACK_SUFFIX=""
84 #KEYWORDS=""
85 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
86 #HAS_LANGS="false"
87 else
88 # This is where arch teams should change the KEYWORDS.
89
90 #REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
91 REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
92 LANG_URI="${REL_URI}/langpack"
93 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
94 [[ ${PV} == *alpha* ]] && HAS_LANGS="false"
95 fi
96
97 DESCRIPTION="Seamonkey Web Browser"
98 HOMEPAGE="http://www.seamonkey-project.org"
99
100 SLOT="0"
101 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
102 IUSE="+alsa +chatzilla +crypt +ipc +methodjit +roaming system-sqlite +webm"
103
104 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2 -> ${P}.source.tar.bz2
105 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
106 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
107
108 if ${HAS_LANGS} ; then
109 for X in ${LANGS} ; do
110 if [ "${X}" != "en" ] ; then
111 SRC_URI="${SRC_URI}
112 linguas_${X/-/_}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
113 fi
114 IUSE="${IUSE} linguas_${X/-/_}"
115 # english is handled internally
116 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
117 #if [ "${X}" != "en-US" ]; then
118 SRC_URI="${SRC_URI}
119 linguas_${X%%-*}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
120 #fi
121 IUSE="${IUSE} linguas_${X%%-*}"
122 fi
123 done
124 fi
125
126 ASM_DEPEND=">=dev-lang/yasm-1.1"
127
128 # Mesa 7.10 needed for WebGL + bugfixes
129 RDEPEND=">=sys-devel/binutils-2.16.1
130 >=dev-libs/nss-3.12.10
131 >=dev-libs/nspr-4.8.8
132 >=dev-libs/glib-2.26
133 >=media-libs/mesa-7.10
134 >=media-libs/libpng-1.4.1[apng]
135 >=x11-libs/cairo-1.10
136 dev-libs/libffi
137 system-sqlite? ( >=dev-db/sqlite-3.7.4[fts3,secure-delete,unlock-notify,debug=] )
138 crypt? ( >=app-crypt/gnupg-1.4 )
139 webm? ( media-libs/libvpx
140 media-libs/alsa-lib )"
141
142 DEPEND="${RDEPEND}
143 dev-util/pkgconfig
144 webm? ( amd64? ( ${ASM_DEPEND} )
145 x86? ( ${ASM_DEPEND} ) )"
146
147 if [[ ${PV} == *beta* ]] ; then
148 S="${WORKDIR}/comm-beta"
149 else
150 S="${WORKDIR}/comm-release"
151 fi
152
153 linguas() {
154 local LANG SLANG
155 for LANG in ${LINGUAS}; do
156 if has ${LANG} en en_US; then
157 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
158 continue
159 elif has ${LANG} ${LANGS//-/_}; then
160 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
161 continue
162 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
163 for X in ${LANGS}; do
164 if [[ "${X}" == "${LANG}-"* ]] && \
165 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
166 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
167 continue 2
168 fi
169 done
170 fi
171 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
172 done
173 }
174
175 src_unpack() {
176 unpack ${A}
177
178 if ${HAS_LANGS} ; then
179 linguas
180 for X in ${linguas}; do
181 # FIXME: Add support for unpacking xpis to portage
182 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
183 done
184 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
185 einfo "Selected language packs (first will be default): ${linguas}"
186 fi
187 fi
188 }
189
190 pkg_setup() {
191 if [[ ${PV} == *_pre* ]] ; then
192 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
193 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
194 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
195 fi
196
197 moz_pkgsetup
198
199 if ! use methodjit ; then
200 einfo
201 ewarn "You are disabling the method-based JIT in JägerMonkey."
202 ewarn "This will greatly slowdown JavaScript in ${PN}!"
203 fi
204 }
205
206 src_prepare() {
207 # Apply our patches
208 EPATCH_SUFFIX="patch" \
209 EPATCH_FORCE="yes" \
210 epatch "${WORKDIR}/_seamonkey"
211
212 # browser patches go here
213 pushd "${S}"/mozilla &>/dev/null || die
214 EPATCH_SUFFIX="patch" \
215 EPATCH_FORCE="yes" \
216 epatch "${WORKDIR}/_mozilla"
217 popd &>/dev/null || die
218
219 # mailnews patches go here
220 #pushd "${S}"/mailnews &>/dev/null || die
221 #EPATCH_SUFFIX="patch" \
222 #EPATCH_FORCE="yes" \
223 #epatch "${WORKDIR}/_mailnews"
224 #popd &>/dev/null || die
225
226 epatch "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch \
227 "${FILESDIR}"/${PN}-2.3.1-scrollbar-mouse-interaction-improvement.patch
228
229 # Allow user to apply any additional patches without modifing ebuild
230 epatch_user
231
232 if use crypt ; then
233 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
234 cd "${S}"/mailnews/extensions/enigmail || die
235 ./makemake -r 2&>/dev/null
236 sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
237 -i Makefile.in || die
238 cd "${S}"
239 fi
240
241 #Ensure we disable javaxpcom by default to prevent configure breakage
242 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
243 || die "sed javaxpcom"
244
245 # Disable gnomevfs extension
246 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
247 || die "Failed to remove gnomevfs extension"
248
249 eautoreconf
250 cd "${S}"/mozilla || die
251 eautoreconf
252 cd "${S}"/mozilla/js/src || die
253 eautoreconf
254 }
255
256 src_configure() {
257 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
258 MEXTENSIONS=""
259
260 ####################################
261 #
262 # mozconfig, CFLAGS and CXXFLAGS setup
263 #
264 ####################################
265
266 mozconfig_init
267 mozconfig_config
268
269 # It doesn't compile on alpha without this LDFLAGS
270 use alpha && append-ldflags "-Wl,--no-relax"
271
272 if ! use chatzilla ; then
273 MEXTENSIONS="${MEXTENSIONS},-irc"
274 fi
275 if ! use roaming ; then
276 MEXTENSIONS="${MEXTENSIONS},-sroaming"
277 fi
278
279 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
280 mozconfig_annotate '' --disable-gconf
281 mozconfig_annotate '' --enable-jsd
282 mozconfig_annotate '' --enable-canvas
283 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
284
285 mozconfig_use_enable system-sqlite
286 mozconfig_use_enable methodjit
287
288 if use crypt ; then
289 mozconfig_annotate "mail crypt" --enable-chrome-format=jar
290 fi
291
292 mozconfig_annotate '' --with-system-png
293
294 # Finalize and report settings
295 mozconfig_final
296
297 if [[ $(gcc-major-version) -lt 4 ]]; then
298 append-cxxflags -fno-stack-protector
299 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
300 if use amd64 || use x86; then
301 append-flags -mno-avx
302 fi
303 fi
304
305 ####################################
306 #
307 # Configure and build
308 #
309 ####################################
310
311 # Work around breakage in makeopts with --no-print-directory
312 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
313
314 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
315 }
316
317 src_compile() {
318 emake || die
319
320 # Only build enigmail extension if conditions are met.
321 if use crypt ; then
322 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
323 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
324 fi
325 }
326
327 src_install() {
328 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
329 declare emid
330
331 emake DESTDIR="${D}" install || die "emake install failed"
332 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
333
334 if use crypt ; then
335 cd "${T}" || die
336 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
337 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
338
339 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
340 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
341 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
342 fi
343
344 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
345 -i "${T}"/${PN}.desktop || die
346 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
347 || die
348
349 if ${HAS_LANGS} ; then
350 linguas
351 for X in ${linguas}; do
352 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
353 done
354 fi
355
356 # Add StartupNotify=true bug 290401
357 if use startup-notification ; then
358 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
359 fi
360
361 # Install icon and .desktop for menu entry
362 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
363 || die
364 domenu "${T}"/${PN}.desktop || die
365
366 # Add our default prefs
367 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
368 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
369 || die
370
371 # Plugins dir
372 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
373 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
374
375 doman "${S}"/suite/app/${PN}.1 || die
376 }
377
378 pkg_preinst() {
379 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
380
381 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
382 rm ${MOZILLA_FIVE_HOME}/plugins -rf
383 fi
384 }
385
386 pkg_postinst() {
387 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
388
389 # Update mimedb for the new .desktop file
390 fdo-mime_desktop_database_update
391
392 if use chatzilla ; then
393 elog "chatzilla is now an extension which can be en-/disabled and configured via"
394 elog "the Add-on manager."
395 fi
396 }
397
398
399
400 1.1 www-client/seamonkey/seamonkey-2.4.ebuild
401
402 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/seamonkey-2.4.ebuild?rev=1.1&view=markup
403 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/seamonkey/seamonkey-2.4.ebuild?rev=1.1&content-type=text/plain
404
405 Index: seamonkey-2.4.ebuild
406 ===================================================================
407 # Copyright 1999-2011 Gentoo Foundation
408 # Distributed under the terms of the GNU General Public License v2
409 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.4.ebuild,v 1.1 2011/09/26 15:08:07 polynomial-c Exp $
410
411 EAPI="3"
412 WANT_AUTOCONF="2.1"
413
414 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension python
415
416 PATCH="${PN}-2.4-patches-01"
417 EMVER="1.3.2"
418
419 LANGS="be ca cs de en en-GB en-US es-AR es-ES fi fr gl hu it ja lt nb-NO nl pl pt-PT ru sk sv-SE tr zh-CN"
420 NOSHORTLANGS="en-GB en-US es-AR"
421
422 MY_PV="${PV/_pre*}"
423 MY_PV="${MY_PV/_alpha/a}"
424 MY_PV="${MY_PV/_beta/b}"
425 MY_PV="${MY_PV/_rc/rc}"
426 MY_P="${PN}-${MY_PV}"
427
428 # release versions usually have language packs. So be careful with changing this.
429 HAS_LANGS="true"
430 LANGPACK_PREFIX="${MY_P}."
431 LANGPACK_SUFFIX=".langpack"
432 if [[ ${PV} == *_pre* ]] ; then
433 # pre-releases. No need for arch teams to change KEYWORDS here.
434
435 REL_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${PN}/nightly/${MY_PV}-candidates/build${PV##*_pre}"
436 #LANG_URI="${REL_URI}/langpack"
437 LANG_URI="${REL_URI}/linux-i686/xpi"
438 LANGPACK_PREFIX=""
439 LANGPACK_SUFFIX=""
440 #KEYWORDS=""
441 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
442 #HAS_LANGS="false"
443 else
444 # This is where arch teams should change the KEYWORDS.
445
446 #REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases/${MY_PV}"
447 REL_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/${MY_PV}"
448 LANG_URI="${REL_URI}/langpack"
449 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
450 [[ ${PV} == *alpha* ]] && HAS_LANGS="false"
451 fi
452
453 DESCRIPTION="Seamonkey Web Browser"
454 HOMEPAGE="http://www.seamonkey-project.org"
455
456 SLOT="0"
457 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
458 IUSE="+alsa +chatzilla +crypt +ipc +methodjit +roaming system-sqlite +webm"
459
460 SRC_URI="${REL_URI}/source/${MY_P}.source.tar.bz2 -> ${P}.source.tar.bz2
461 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz
462 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )"
463
464 if ${HAS_LANGS} ; then
465 for X in ${LANGS} ; do
466 if [ "${X}" != "en" ] ; then
467 SRC_URI="${SRC_URI}
468 linguas_${X/-/_}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
469 fi
470 IUSE="${IUSE} linguas_${X/-/_}"
471 # english is handled internally
472 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
473 #if [ "${X}" != "en-US" ]; then
474 SRC_URI="${SRC_URI}
475 linguas_${X%%-*}? ( ${LANG_URI}/${LANGPACK_PREFIX}${X}${LANGPACK_SUFFIX}.xpi -> ${P}-${X}.xpi )"
476 #fi
477 IUSE="${IUSE} linguas_${X%%-*}"
478 fi
479 done
480 fi
481
482 ASM_DEPEND=">=dev-lang/yasm-1.1"
483
484 # Mesa 7.10 needed for WebGL + bugfixes
485 RDEPEND=">=sys-devel/binutils-2.16.1
486 >=dev-libs/nss-3.12.10
487 >=dev-libs/nspr-4.8.8
488 >=dev-libs/glib-2.26
489 >=media-libs/mesa-7.10
490 >=media-libs/libpng-1.4.1[apng]
491 >=x11-libs/cairo-1.10
492 >=x11-libs/pango-1.14.0
493 >=x11-libs/gtk+-2.14
494 dev-libs/libffi
495 system-sqlite? ( >=dev-db/sqlite-3.7.5[fts3,secure-delete,unlock-notify,debug=] )
496 crypt? ( >=app-crypt/gnupg-1.4 )
497 webm? ( media-libs/libvpx
498 media-libs/alsa-lib )"
499
500 DEPEND="${RDEPEND}
501 dev-util/pkgconfig
502 webm? ( amd64? ( ${ASM_DEPEND} )
503 x86? ( ${ASM_DEPEND} ) )"
504
505 if [[ ${PV} == *beta* ]] ; then
506 S="${WORKDIR}/comm-beta"
507 else
508 S="${WORKDIR}/comm-release"
509 fi
510
511 linguas() {
512 local LANG SLANG
513 for LANG in ${LINGUAS}; do
514 if has ${LANG} en en_US; then
515 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
516 continue
517 elif has ${LANG} ${LANGS//-/_}; then
518 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
519 continue
520 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
521 for X in ${LANGS}; do
522 if [[ "${X}" == "${LANG}-"* ]] && \
523 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
524 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
525 continue 2
526 fi
527 done
528 fi
529 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
530 done
531 }
532
533 src_unpack() {
534 unpack ${A}
535
536 if ${HAS_LANGS} ; then
537 linguas
538 for X in ${linguas}; do
539 # FIXME: Add support for unpacking xpis to portage
540 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
541 done
542 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
543 einfo "Selected language packs (first will be default): ${linguas}"
544 fi
545 fi
546 }
547
548 pkg_setup() {
549 if [[ ${PV} == *_pre* ]] ; then
550 ewarn "You're using an unofficial release of ${PN}. Don't file any bug in"
551 ewarn "Gentoo's Bugtracker against this package in case it breaks for you."
552 ewarn "Those belong to upstream: https://bugzilla.mozilla.org"
553 fi
554
555 moz_pkgsetup
556
557 if ! use methodjit ; then
558 einfo
559 ewarn "You are disabling the method-based JIT in JägerMonkey."
560 ewarn "This will greatly slowdown JavaScript in ${PN}!"
561 fi
562 }
563
564 src_prepare() {
565 # Apply our patches
566 EPATCH_SUFFIX="patch" \
567 EPATCH_FORCE="yes" \
568 epatch "${WORKDIR}/_seamonkey"
569
570 # browser patches go here
571 pushd "${S}"/mozilla &>/dev/null || die
572 EPATCH_SUFFIX="patch" \
573 EPATCH_FORCE="yes" \
574 epatch "${WORKDIR}/_mozilla"
575 popd &>/dev/null || die
576
577 # mailnews patches go here
578 #pushd "${S}"/mailnews &>/dev/null || die
579 #EPATCH_SUFFIX="patch" \
580 #EPATCH_FORCE="yes" \
581 #epatch "${WORKDIR}/_mailnews"
582 #popd &>/dev/null || die
583
584 epatch "${FILESDIR}"/${PN}-2.2-curl7217-includes-fix.patch \
585 "${FILESDIR}"/${PN}-2.3.1-scrollbar-mouse-interaction-improvement.patch
586
587 # Allow user to apply any additional patches without modifing ebuild
588 epatch_user
589
590 if use crypt ; then
591 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
592 cd "${S}"/mailnews/extensions/enigmail || die
593 ./makemake -r 2&>/dev/null
594 sed -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' \
595 -i Makefile.in || die
596 cd "${S}"
597 fi
598
599 #Ensure we disable javaxpcom by default to prevent configure breakage
600 sed -i -e s:MOZ_JAVAXPCOM\=1::g "${S}"/mozilla/xulrunner/confvars.sh \
601 || die "sed javaxpcom"
602
603 # Disable gnomevfs extension
604 sed -i -e "s:gnomevfs::" "${S}/"suite/confvars.sh \
605 || die "Failed to remove gnomevfs extension"
606
607 eautoreconf
608 cd "${S}"/mozilla || die
609 eautoreconf
610 cd "${S}"/mozilla/js/src || die
611 eautoreconf
612 }
613
614 src_configure() {
615 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
616 MEXTENSIONS=""
617
618 ####################################
619 #
620 # mozconfig, CFLAGS and CXXFLAGS setup
621 #
622 ####################################
623
624 mozconfig_init
625 mozconfig_config
626
627 # It doesn't compile on alpha without this LDFLAGS
628 use alpha && append-ldflags "-Wl,--no-relax"
629
630 if ! use chatzilla ; then
631 MEXTENSIONS="${MEXTENSIONS},-irc"
632 fi
633 if ! use roaming ; then
634 MEXTENSIONS="${MEXTENSIONS},-sroaming"
635 fi
636
637 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
638 mozconfig_annotate '' --disable-gconf
639 mozconfig_annotate '' --enable-jsd
640 mozconfig_annotate '' --enable-canvas
641 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
642
643 mozconfig_use_enable system-sqlite
644 mozconfig_use_enable methodjit
645
646 if use crypt ; then
647 mozconfig_annotate "mail crypt" --enable-chrome-format=jar
648 fi
649
650 mozconfig_annotate '' --with-system-png
651
652 # Finalize and report settings
653 mozconfig_final
654
655 if [[ $(gcc-major-version) -lt 4 ]]; then
656 append-cxxflags -fno-stack-protector
657 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
658 if use amd64 || use x86; then
659 append-flags -mno-avx
660 fi
661 fi
662
663 ####################################
664 #
665 # Configure and build
666 #
667 ####################################
668
669 # Work around breakage in makeopts with --no-print-directory
670 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
671
672 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
673 }
674
675 src_compile() {
676 emake || die
677
678 # Only build enigmail extension if conditions are met.
679 if use crypt ; then
680 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
681 emake -j1 -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
682 fi
683 }
684
685 src_install() {
686 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
687 declare emid
688
689 emake DESTDIR="${D}" install || die "emake install failed"
690 cp -f "${FILESDIR}"/icon/${PN}.desktop "${T}" || die
691
692 if use crypt ; then
693 cd "${T}" || die
694 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
695 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
696
697 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
698 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
699 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
700 fi
701
702 sed 's|^\(MimeType=.*\)$|\1text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;|' \
703 -i "${T}"/${PN}.desktop || die
704 sed 's|^\(Categories=.*\)$|\1Email;|' -i "${T}"/${PN}.desktop \
705 || die
706
707 if ${HAS_LANGS} ; then
708 linguas
709 for X in ${linguas}; do
710 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
711 done
712 fi
713
714 # Add StartupNotify=true bug 290401
715 if use startup-notification ; then
716 echo "StartupNotify=true" >> "${T}"/${PN}.desktop
717 fi
718
719 # Install icon and .desktop for menu entry
720 newicon "${S}"/suite/branding/nightly/content/icon64.png ${PN}.png \
721 || die
722 domenu "${T}"/${PN}.desktop || die
723
724 # Add our default prefs
725 sed "s|SEAMONKEY_PVR|${PVR}|" "${FILESDIR}"/all-gentoo.js \
726 > "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js \
727 || die
728
729 # Plugins dir
730 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
731 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins || die
732
733 doman "${S}"/suite/app/${PN}.1 || die
734 }
735
736 pkg_preinst() {
737 declare MOZILLA_FIVE_HOME="${ROOT}/usr/$(get_libdir)/${PN}"
738
739 if [ -d ${MOZILLA_FIVE_HOME}/plugins ] ; then
740 rm ${MOZILLA_FIVE_HOME}/plugins -rf
741 fi
742 }
743
744 pkg_postinst() {
745 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
746
747 # Update mimedb for the new .desktop file
748 fdo-mime_desktop_database_update
749
750 if use chatzilla ; then
751 elog "chatzilla is now an extension which can be en-/disabled and configured via"
752 elog "the Add-on manager."
753 fi
754 }