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 mail-client/thunderbird: ChangeLog thunderbird-3.1.14.ebuild thunderbird-6.0.2.ebuild thunderbird-3.1.10.ebuild
Date: Mon, 26 Sep 2011 15:51:21
Message-Id: 20110926155046.3CF9D20036@flycatcher.gentoo.org
1 polynomial-c 11/09/26 15:50:46
2
3 Modified: ChangeLog
4 Added: thunderbird-3.1.14.ebuild thunderbird-6.0.2.ebuild
5 Removed: thunderbird-3.1.10.ebuild
6 Log:
7 Security bump. Removed old
8
9 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.95 mail-client/thunderbird/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?rev=1.95&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?rev=1.95&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?r1=1.94&r2=1.95
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v
21 retrieving revision 1.94
22 retrieving revision 1.95
23 diff -u -r1.94 -r1.95
24 --- ChangeLog 11 Sep 2011 11:02:08 -0000 1.94
25 +++ ChangeLog 26 Sep 2011 15:50:46 -0000 1.95
26 @@ -1,6 +1,14 @@
27 # ChangeLog for mail-client/thunderbird
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.94 2011/09/11 11:02:08 armin76 Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.95 2011/09/26 15:50:46 polynomial-c Exp $
31 +
32 +*thunderbird-6.0.2 (26 Sep 2011)
33 +*thunderbird-3.1.14 (26 Sep 2011)
34 +
35 + 26 Sep 2011; Lars Wendler <polynomial-c@g.o>
36 + -thunderbird-3.1.10.ebuild, +thunderbird-3.1.14.ebuild,
37 + +thunderbird-6.0.2.ebuild:
38 + Security bump. Removed old.
39
40 11 Sep 2011; Raúl Porcel <armin76@g.o> thunderbird-3.1.12.ebuild:
41 alpha/ia64/sparc stable wrt #379549
42
43
44
45 1.1 mail-client/thunderbird/thunderbird-3.1.14.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-3.1.14.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-3.1.14.ebuild?rev=1.1&content-type=text/plain
49
50 Index: thunderbird-3.1.14.ebuild
51 ===================================================================
52 # Copyright 1999-2011 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-3.1.14.ebuild,v 1.1 2011/09/26 15:50:46 polynomial-c Exp $
55
56 EAPI="3"
57 WANT_AUTOCONF="2.1"
58
59 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib mozextension autotools python pax-utils
60
61 # This list can be updated using get_langs.sh from the mozilla overlay
62 LANGS="af ar be bg bn-BD ca cs da de el en en-GB en-US es-AR es-ES et eu fi fr \
63 fy-NL ga-IE he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ro ru si \
64 sk sl sq sv-SE tr uk zh-CN zh-TW"
65 NOSHORTLANGS="en-GB es-AR pt-BR zh-TW"
66
67 MY_PV="${PV/_rc/rc}"
68 MY_P="${P/_rc/rc}"
69
70 DESCRIPTION="Thunderbird Mail Client"
71 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
72
73 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
74 SLOT="0"
75 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
76 IUSE="+alsa ldap +crypt bindist gnome libnotify +lightning mozdom system-sqlite wifi"
77 PATCH="${PN}-3.1-patches-1.2"
78
79 REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases"
80 SRC_URI="${REL_URI}/${MY_PV}/source/${MY_P}.source.tar.bz2
81 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
82
83 for X in ${LANGS} ; do
84 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
85 SRC_URI="${SRC_URI}
86 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
87 fi
88 IUSE="${IUSE} linguas_${X/-/_}"
89 # english is handled internally
90 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
91 if [ "${X}" != "en-US" ]; then
92 SRC_URI="${SRC_URI}
93 linguas_${X%%-*}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
94 fi
95 IUSE="${IUSE} linguas_${X%%-*}"
96 fi
97 done
98
99 RDEPEND=">=sys-devel/binutils-2.16.1
100 >=dev-libs/nss-3.12.8
101 >=dev-libs/nspr-4.8.6
102 >=app-text/hunspell-1.2
103 x11-libs/cairo[X]
104 alsa? ( media-libs/alsa-lib )
105 gnome? ( >=gnome-base/gnome-vfs-2.16.3
106 >=gnome-base/libgnomeui-2.16.1
107 >=gnome-base/gconf-2.16.0
108 >=gnome-base/libgnome-2.16.0 )
109 libnotify? ( >=x11-libs/libnotify-0.4 )
110 system-sqlite? ( >=dev-db/sqlite-3.7.1[fts3,secure-delete,threadsafe] )
111 wifi? ( net-wireless/wireless-tools )
112 !x11-plugins/lightning"
113
114 DEPEND="${RDEPEND}
115 =dev-lang/python-2*[threads]"
116
117 PDEPEND="crypt? ( >=x11-plugins/enigmail-1.1 )"
118
119 S="${WORKDIR}"/comm-1.9.2
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 ${PN} does not support the ${LANG} LINGUA"
140 done
141 }
142
143 pkg_setup() {
144 export BUILD_OFFICIAL=1
145 export MOZILLA_OFFICIAL=1
146 export ALDFLAGS=${LDFLAGS}
147
148 if ! use bindist; then
149 elog "You are enabling official branding. You may not redistribute this build"
150 elog "to any users on your network or the internet. Doing so puts yourself into"
151 elog "a legal problem with Mozilla Foundation"
152 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
153 fi
154
155 python_set_active_version 2
156 }
157
158 src_unpack() {
159 unpack ${A}
160
161 linguas
162 for X in ${linguas}; do
163 # FIXME: Add support for unpacking xpis to portage
164 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
165 done
166 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
167 einfo "Selected language packs (first will be default): ${linguas}"
168 fi
169 }
170
171 src_prepare() {
172 # Apply our patches
173 EPATCH_EXCLUDE="1002-fix_hunspell_double_buffer.patch" \
174 EPATCH_SUFFIX="patch" \
175 EPATCH_FORCE="yes" \
176 epatch "${WORKDIR}"
177
178 epatch "${FILESDIR}/bug-606109.patch"
179
180 # Allow user to apply any additional patches without modifing ebuild
181 epatch_user
182
183 eautoreconf
184
185 cd mozilla
186 eautoreconf
187 cd js/src
188 eautoreconf
189 }
190
191 src_configure() {
192 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
193 MEXTENSIONS="default"
194
195 ####################################
196 #
197 # mozconfig, CFLAGS and CXXFLAGS setup
198 #
199 ####################################
200
201 touch mail/config/mozconfig
202 mozconfig_init
203 mozconfig_config
204
205 # It doesn't compile on alpha without this LDFLAGS
206 use alpha && append-ldflags "-Wl,--no-relax"
207
208 mozconfig_annotate '' --enable-crypto
209 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
210 mozconfig_annotate '' --enable-application=mail
211 mozconfig_annotate '' --with-default-mozilla-five-home="${EPREFIX}${MOZILLA_FIVE_HOME}"
212 mozconfig_annotate '' --with-user-appdir=.thunderbird
213 mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
214 mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
215 mozconfig_annotate '' --with-sqlite-prefix="${EPREFIX}"/usr
216 mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
217 mozconfig_annotate 'broken' --disable-crashreporter
218 mozconfig_annotate '' --enable-system-hunspell
219
220 # Use enable features
221 mozconfig_use_enable ldap
222 mozconfig_use_enable ldap ldap-experimental
223 mozconfig_use_enable gnome gnomevfs
224 mozconfig_use_enable gnome gnomeui
225 mozconfig_use_enable libnotify
226 mozconfig_use_enable lightning calendar
227 mozconfig_use_enable wifi necko-wifi
228 mozconfig_use_enable system-sqlite
229 mozconfig_use_enable !bindist official-branding
230 mozconfig_use_enable alsa ogg
231 mozconfig_use_enable alsa wave
232
233 # Bug #72667
234 if use mozdom; then
235 MEXTENSIONS="${MEXTENSIONS},inspector"
236 fi
237
238 # Finalize and report settings
239 mozconfig_final
240
241 ####################################
242 #
243 # Configure and build
244 #
245 ####################################
246
247 # Disable no-print-directory
248 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
249
250 if [[ $(gcc-major-version) -lt 4 ]]; then
251 append-cxxflags -fno-stack-protector
252 fi
253
254 CPPFLAGS="${CPPFLAGS}" \
255 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
256 econf || die
257 }
258
259 src_compile() {
260 # Should the build use multiprocessing? Not enabled by default, as it tends to break
261 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
262 emake ${jobs} || die
263 }
264
265 src_install() {
266 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
267
268 emake DESTDIR="${D}" install || die "emake install failed"
269
270 if use lightning ; then
271 declare emid emd1 emid2
272
273 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
274 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
275 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
276 unzip "${S}"/mozilla/dist/xpi-stage/gdata-provider.xpi
277
278 emid1="calendar-timezones@×××××××.org"
279 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid1}
280 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid1}
281 unzip "${S}"/mozilla/dist/xpi-stage/calendar-timezones.xpi
282
283 emid2="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
284 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid2}
285 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid2}
286 unzip "${S}"/mozilla/dist/xpi-stage/lightning.xpi
287 fi
288
289 linguas
290 for X in ${linguas}; do
291 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
292 done
293
294 if ! use bindist; then
295 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
296 domenu "${FILESDIR}"/icon/${PN}.desktop
297 else
298 newicon "${S}"/mail/branding/unofficial/content/icon48.png thunderbird-icon-unbranded.png
299 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
300 ${PN}.desktop
301
302 sed -i -e "s:Mozilla\ Thunderbird:Lanikai:g" \
303 "${D}"/usr/share/applications/${PN}.desktop
304
305 fi
306
307 # Warn user that remerging enigmail is neccessary on USE=crypt
308 use crypt && ewarn "Please remerge x11-plugins/enigmail after updating ${PN}."
309
310 # Enable very specific settings for thunderbird-3
311 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js \
312 "${ED}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js" || \
313 die "failed to cp thunderbird-gentoo-default-prefs.js"
314
315 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/thunderbird-bin
316 }
317
318
319
320 1.1 mail-client/thunderbird/thunderbird-6.0.2.ebuild
321
322 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-6.0.2.ebuild?rev=1.1&view=markup
323 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-6.0.2.ebuild?rev=1.1&content-type=text/plain
324
325 Index: thunderbird-6.0.2.ebuild
326 ===================================================================
327 # Copyright 1999-2011 Gentoo Foundation
328 # Distributed under the terms of the GNU General Public License v2
329 # $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-6.0.2.ebuild,v 1.1 2011/09/26 15:50:46 polynomial-c Exp $
330
331 EAPI="3"
332 WANT_AUTOCONF="2.1"
333
334 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib mozextension autotools pax-utils python
335
336 TB_PV="${PV/_beta/b}"
337 TB_P="${PN}-${TB_PV}"
338 EMVER="1.3"
339
340 DESCRIPTION="Thunderbird Mail Client"
341 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
342
343 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
344 SLOT="0"
345 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
346 IUSE="bindist gconf +crashreporter +crypt +ipc +lightning mozdom"
347 PATCH="${PN}-5.0-patches-0.1"
348
349 FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
350 SRC_URI="${FTP_URI}/${TB_PV}/source/${TB_P}.source.tar.bz2
351 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )
352 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.bz2"
353
354 if ! [[ ${PV} =~ alpha|beta ]]; then
355 # This list can be updated using get_langs.sh from the mozilla overlay
356 # Not supported yet bn-BD ro id zh-CN be af el pa-IN bg
357 LANGS=(ar be bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi fr
358 fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pl pt-BR pt-PT rm
359 ru si sk sl sq sv-SE ta-LK tr uk)
360
361 for X in "${LANGS[@]}" ; do
362 # en and en_US are handled internally
363 if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
364 SRC_URI="${SRC_URI}
365 linguas_${X/-/_}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
366 fi
367 IUSE="${IUSE} linguas_${X/-/_}"
368 # Install all the specific locale xpis if there's no generic locale xpi
369 # Example: there's no pt.xpi, so install all pt-*.xpi
370 if ! has ${X%%-*} "${LANGS[@]}"; then
371 SRC_URI="${SRC_URI}
372 linguas_${X%%-*}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
373 IUSE="${IUSE} linguas_${X%%-*}"
374 fi
375 done
376 fi
377
378 RDEPEND=">=sys-devel/binutils-2.16.1
379 >=dev-libs/nss-3.12.10
380 >=dev-libs/nspr-4.8.8
381 gconf? ( >=gnome-base/gconf-1.2.1:2 )
382 media-libs/libpng[apng]
383 !x11-plugins/lightning
384 !x11-plugins/enigmail
385 system-sqlite? ( >=dev-db/sqlite-3.7.5[fts3,secure-delete,unlock-notify,debug=] )
386 crypt? ( || (
387 ( >=app-crypt/gnupg-2.0
388 || (
389 app-crypt/pinentry[gtk]
390 app-crypt/pinentry[qt4]
391 )
392 )
393 =app-crypt/gnupg-1.4*
394 ) )"
395
396 DEPEND="${RDEPEND}"
397
398 S="${WORKDIR}"/comm-release
399
400 # TODO: Move all the linguas crap to an eclass
401 linguas() {
402 # Generate the list of language packs called "linguas"
403 # This list is used to install the xpi language packs
404 local LINGUA
405 for LINGUA in ${LINGUAS}; do
406 if has ${LINGUA} en en_US; then
407 # For mozilla products, en and en_US are handled internally
408 continue
409 # If this language is supported by ${P},
410 elif has ${LINGUA} "${LANGS[@]//-/_}"; then
411 # Add the language to linguas, if it isn't already there
412 has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
413 continue
414 # For each short LINGUA that isn't in LANGS,
415 # add *all* long LANGS to the linguas list
416 elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
417 for LANG in "${LANGS[@]}"; do
418 if [[ ${LANG} == ${LINGUA}-* ]]; then
419 has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
420 continue 2
421 fi
422 done
423 fi
424 ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
425 done
426 }
427
428 pkg_setup() {
429 moz_pkgsetup
430
431 if ! use bindist; then
432 elog "You are enabling official branding. You may not redistribute this build"
433 elog "to any users on your network or the internet. Doing so puts yourself into"
434 elog "a legal problem with Mozilla Foundation"
435 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
436 fi
437 }
438
439 src_unpack() {
440 unpack ${A}
441
442 if ! [[ ${PV} =~ alpha|beta ]]; then
443 linguas
444 for X in "${linguas[@]}"; do
445 # FIXME: Add support for unpacking xpis to portage
446 xpi_unpack "${P}-${X}.xpi"
447 done
448 if [[ "${linguas[*]}" != "" ]]; then
449 einfo "Selected language packs (first will be default): ${linguas[*]}"
450 fi
451 fi
452 }
453
454 src_prepare() {
455 # Apply our patches
456 EPATCH_SUFFIX="patch" \
457 EPATCH_FORCE="yes" \
458 epatch "${WORKDIR}"
459
460 epatch "${FILESDIR}"/fix-thunderbird-calender-support.patch
461
462 if use crypt ; then
463 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
464 cd "${S}"/mailnews/extensions/enigmail || die
465 ./makemake -r 2&> /dev/null
466 sed -i -e 's:@srcdir@:${S}/mailnews/extensions/enigmail:' Makefile.in
467 cd "${S}"
468 fi
469
470 #Fix compilation with curl-7.21.7 bug 376027
471 sed -e '/#include <curl\/types.h>/d' \
472 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
473 -i "${S}"/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
474 -i "${S}"/mozilla/config/system-headers \
475 -i "${S}"/mozilla/js/src/config/system-headers || die "Sed failed"
476
477 # Allow user to apply any additional patches without modifing ebuild
478 epatch_user
479
480 eautoreconf
481
482 cd mozilla
483 eautoreconf
484 cd js/src
485 eautoreconf
486 }
487
488 src_configure() {
489 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
490 MEXTENSIONS="default"
491
492 ####################################
493 #
494 # mozconfig, CFLAGS and CXXFLAGS setup
495 #
496 ####################################
497
498 mozconfig_init
499 mozconfig_config
500
501 # It doesn't compile on alpha without this LDFLAGS
502 use alpha && append-ldflags "-Wl,--no-relax"
503
504 if use crypt ; then
505 # omni.jar breaks enigmail
506 mozconfig_annotate '' --enable-chrome-format=jar
507 fi
508 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
509 mozconfig_annotate '' --with-default-mozilla-five-home="${EPREFIX}${MOZILLA_FIVE_HOME}"
510 mozconfig_annotate '' --with-user-appdir=.thunderbird
511 mozconfig_annotate '' --with-system-png
512
513 # Use enable features
514 mozconfig_use_enable lightning calendar
515 mozconfig_use_enable gconf
516
517 # Bug #72667
518 if use mozdom; then
519 MEXTENSIONS="${MEXTENSIONS},inspector"
520 fi
521
522 # Finalize and report settings
523 mozconfig_final
524
525 ####################################
526 #
527 # Configure and build
528 #
529 ####################################
530
531 # Disable no-print-directory
532 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
533
534 if [[ $(gcc-major-version) -lt 4 ]]; then
535 append-cxxflags -fno-stack-protector
536 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
537 if use amd64 || use x86; then
538 append-flags -mno-avx
539 fi
540 fi
541
542 CPPFLAGS="${CPPFLAGS}" \
543 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
544 econf || die
545 }
546
547 src_compile() {
548 emake || die
549
550 # Only build enigmail extension if crypt enabled.
551 if use crypt ; then
552 emake -C "${S}"/mailnews/extensions/enigmail || die "make enigmail failed"
553 emake -C "${S}"/mailnews/extensions/enigmail xpi || die "make enigmail xpi failed"
554 fi
555 }
556
557 src_install() {
558 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
559
560 emake DESTDIR="${D}" install || die "emake install failed"
561
562 if use crypt ; then
563 cd "${T}" || die
564 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi install.rdf || die
565 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
566
567 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
568 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
569 unzip "${S}"/mozilla/dist/bin/enigmail*.xpi || die
570 fi
571
572 if use lightning ; then
573 declare emid emd1 emid2
574
575 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
576 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
577 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
578 unzip "${S}"/mozilla/dist/xpi-stage/gdata-provider.xpi
579
580 emid1="calendar-timezones@×××××××.org"
581 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid1}
582 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid1}
583 unzip "${S}"/mozilla/dist/xpi-stage/calendar-timezones.xpi
584
585 emid2="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
586 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid2}
587 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid2}
588 unzip "${S}"/mozilla/dist/xpi-stage/lightning.xpi
589 fi
590
591 if ! [[ ${PV} =~ alpha|beta ]]; then
592 linguas
593 for X in "${linguas[@]}"; do
594 xpi_install "${WORKDIR}/${P}-${X}"
595 done
596 fi
597
598 if ! use bindist; then
599 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
600 domenu "${FILESDIR}"/icon/${PN}.desktop
601 else
602 newicon "${S}"/mail/branding/unofficial/content/icon48.png thunderbird-icon-unbranded.png
603 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
604 ${PN}.desktop
605
606 sed -i -e "s:Mozilla\ Thunderbird:Lanikai:g" \
607 "${D}"/usr/share/applications/${PN}.desktop
608
609 fi
610
611 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/thunderbird-bin
612
613 # Enable very specific settings for thunderbird-3
614 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js \
615 "${ED}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js" || \
616 die "failed to cp thunderbird-gentoo-default-prefs.js"
617 }