Gentoo Archives: gentoo-commits

From: "Ian Stakenvicius (axs)" <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-client/thunderbird: thunderbird-31.1.0.ebuild thunderbird-24.8.0.ebuild ChangeLog thunderbird-24.4.0.ebuild thunderbird-24.6.0.ebuild thunderbird-24.5.0.ebuild
Date: Wed, 03 Sep 2014 22:11:42
Message-Id: 20140903221138.9D0974A26@oystercatcher.gentoo.org
1 axs 14/09/03 22:11:38
2
3 Modified: ChangeLog
4 Added: thunderbird-31.1.0.ebuild thunderbird-24.8.0.ebuild
5 Removed: thunderbird-24.4.0.ebuild thunderbird-24.6.0.ebuild
6 thunderbird-24.5.0.ebuild
7 Log:
8 versiom bump, cleaned up some old ebuilds
9
10 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
11
12 Revision Changes Path
13 1.295 mail-client/thunderbird/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?rev=1.295&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?rev=1.295&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/ChangeLog?r1=1.294&r2=1.295
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v
22 retrieving revision 1.294
23 retrieving revision 1.295
24 diff -u -r1.294 -r1.295
25 --- ChangeLog 10 Aug 2014 18:37:37 -0000 1.294
26 +++ ChangeLog 3 Sep 2014 22:11:38 -0000 1.295
27 @@ -1,6 +1,15 @@
28 # ChangeLog for mail-client/thunderbird
29 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.294 2014/08/10 18:37:37 ago Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/ChangeLog,v 1.295 2014/09/03 22:11:38 axs Exp $
32 +
33 +*thunderbird-24.8.0 (03 Sep 2014)
34 +*thunderbird-31.1.0 (03 Sep 2014)
35 +
36 + 03 Sep 2014; Ian Stakenvicius (_AxS_) <axs@g.o>
37 + +thunderbird-24.8.0.ebuild, +thunderbird-31.1.0.ebuild,
38 + -thunderbird-24.4.0.ebuild, -thunderbird-24.5.0.ebuild,
39 + -thunderbird-24.6.0.ebuild:
40 + versiom bump, cleaned up some old ebuilds
41
42 10 Aug 2014; Agostino Sarubbo <ago@g.o> thunderbird-24.7.0.ebuild:
43 Stable for ppc64, wrt bug #517876
44
45
46
47 1.1 mail-client/thunderbird/thunderbird-31.1.0.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-31.1.0.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-31.1.0.ebuild?rev=1.1&content-type=text/plain
51
52 Index: thunderbird-31.1.0.ebuild
53 ===================================================================
54 # Copyright 1999-2014 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-31.1.0.ebuild,v 1.1 2014/09/03 22:11:38 axs Exp $
57
58 EAPI=5
59 WANT_AUTOCONF="2.1"
60 MOZ_ESR=""
61 MOZ_LIGHTNING_VER="3.3"
62 MOZ_LIGHTNING_GDATA_VER="2.6.3"
63
64 # This list can be updated using scripts/get_langs.sh from the mozilla overlay
65 MOZ_LANGS=(ar ast be bg bn-BD br ca cs da de el en en-GB en-US es-AR
66 es-ES et eu fi fr fy-NL ga-IE gd gl he hr hu hy-AM id is it ja ko lt nb-NO
67 nl nn-NO pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta-LK tr uk vi
68 zh-CN zh-TW )
69
70 # Convert the ebuild version to th firefox-24.0-patches-0.4.tar.xze upstream mozilla version, used by mozlinguas
71 MOZ_PV="${PV/_beta/b}"
72 # ESR releases have slightly version numbers
73 if [[ ${MOZ_ESR} == 1 ]]; then
74 MOZ_PV="${MOZ_PV}esr"
75 fi
76 MOZ_P="${PN}-${MOZ_PV}"
77
78 # Enigmail version
79 EMVER="1.7"
80 # Upstream ftp release URI that's used by mozlinguas.eclass
81 # We don't use the http mirror because it deletes old tarballs.
82 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
83 MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
84
85 MOZCONFIG_OPTIONAL_JIT="enabled"
86 inherit flag-o-matic toolchain-funcs mozconfig-v4.1 makeedit multilib autotools pax-utils check-reqs nsplugins mozlinguas
87
88 DESCRIPTION="Thunderbird Mail Client"
89 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
90
91 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
92 SLOT="0"
93 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
94 IUSE="bindist crypt gstreamer ldap +lightning +minimal mozdom pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite"
95
96 PATCH="thunderbird-31.0-patches-0.1"
97 PATCHFF="firefox-31.0-patches-0.2"
98
99 SRC_URI="${SRC_URI}
100 ${MOZ_FTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
101 ${MOZ_HTTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
102 crypt? ( http://www.enigmail.net/download/source/enigmail-${EMVER}.tar.gz )
103 lightning? (
104 ${MOZ_HTTP_URI/${PN}/calendar/lightning}${MOZ_LIGHTNING_VER}/linux/lightning.xpi -> lightning-${MOZ_LIGHTNING_VER}.xpi
105 ${MOZ_HTTP_URI/${PN}/calendar/lightning}${MOZ_LIGHTNING_GDATA_VER}/linux/gdata-provider.xpi -> gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi
106 )
107 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
108 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz
109 http://dev.gentoo.org/~axs/distfiles/${PATCH}.tar.xz
110 http://dev.gentoo.org/~axs/distfiles/${PATCHFF}.tar.xz
111 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz"
112
113 ASM_DEPEND=">=dev-lang/yasm-1.1"
114
115 RDEPEND="
116 >=dev-libs/nss-3.16.2
117 >=dev-libs/nspr-4.10.6
118 >=dev-libs/glib-2.26:2
119 >=media-libs/mesa-7.10
120 >=media-libs/libpng-1.6.6[apng]
121 virtual/libffi
122 gstreamer? ( media-plugins/gst-plugins-meta:1.0[ffmpeg] )
123 pulseaudio? ( media-sound/pulseaudio )
124 system-cairo? ( >=x11-libs/cairo-1.12[X] )
125 system-icu? ( >=dev-libs/icu-51.1 )
126 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
127 system-sqlite? ( >=dev-db/sqlite-3.8.3.1:3[secure-delete,debug=] )
128 >=media-libs/libvpx-1.0.0
129 kernel_linux? ( media-libs/alsa-lib )
130 selinux? ( sec-policy/selinux-thunderbird )
131 !x11-plugins/enigmail
132 crypt? ( || (
133 ( >=app-crypt/gnupg-2.0
134 || (
135 app-crypt/pinentry[gtk]
136 app-crypt/pinentry[qt4]
137 )
138 )
139 =app-crypt/gnupg-1.4*
140 ) )"
141
142 DEPEND="${RDEPEND}
143 >=sys-devel/binutils-2.16.1
144 virtual/pkgconfig
145 amd64? ( ${ASM_DEPEND}
146 virtual/opengl )
147 x86? ( ${ASM_DEPEND}
148 virtual/opengl )"
149
150 if [[ ${PV} =~ beta ]]; then
151 S="${WORKDIR}/comm-beta"
152 else
153 S="${WORKDIR}/comm-esr${PV%%.*}"
154 fi
155
156 BUILD_OBJ_DIR="${WORKDIR}/tbird"
157
158 pkg_setup() {
159 moz_pkgsetup
160
161 export MOZILLA_DIR="${S}/mozilla"
162
163 if ! use bindist ; then
164 elog "You are enabling official branding. You may not redistribute this build"
165 elog "to any users on your network or the internet. Doing so puts yourself into"
166 elog "a legal problem with Mozilla Foundation"
167 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
168 elog
169 fi
170 }
171
172 pkg_pretend() {
173 # Ensure we have enough disk space to compile
174 CHECKREQS_DISK_BUILD="4G"
175 check-reqs_pkg_setup
176 }
177
178 src_unpack() {
179 unpack ${A}
180
181 # Unpack language packs
182 mozlinguas_src_unpack
183
184 # Unpack lightning for calendar locales
185 if use lightning ; then
186 xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi
187 xpi_unpack gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi
188 fi
189 }
190
191 src_prepare() {
192 # Apply our Thunderbird patchset
193 EPATCH_SUFFIX="patch" \
194 EPATCH_FORCE="yes" \
195 epatch "${WORKDIR}/thunderbird"
196
197 # Apply our patchset from firefox to thunderbird as well
198 pushd "${S}"/mozilla &>/dev/null || die
199 EPATCH_SUFFIX="patch" \
200 EPATCH_FORCE="yes" \
201 epatch "${WORKDIR}/firefox"
202 popd &>/dev/null || die
203
204 # Ensure that are plugins dir is enabled as default
205 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
206 "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
207 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
208 "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
209
210 # Don't exit with error when some libs are missing which we have in
211 # system.
212 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
213 -i "${S}"/mail/installer/Makefile.in || die
214
215 # Don't error out when there's no files to be removed:
216 sed 's@\(xargs rm\)$@\1 -f@' \
217 -i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
218
219 # Shell scripts sometimes contain DOS line endings; bug 391889
220 grep -rlZ --include="*.sh" $'\r$' . |
221 while read -r -d $'\0' file ; do
222 einfo edos2unix "${file}"
223 edos2unix "${file}"
224 done
225
226 # Confirm the version of lightning being grabbed for langpacks is the same
227 # as that used in thunderbird
228 local THIS_MOZ_LIGHTNING_VER=$(python "${S}"/calendar/lightning/build/makeversion.py ${PV})
229 if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then
230 eqawarn "The version of lightning used for localization differs from the version"
231 eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}"
232 eqawarn "to ${THIS_MOZ_LIGHTNING_VER}"
233 fi
234
235 # Allow user to apply any additional patches without modifing ebuild
236 epatch_user
237
238 eautoreconf
239 # Ensure we run eautoreconf in mozilla to regenerate configure
240 cd "${S}"/mozilla || die
241 eautoconf
242 cd "${S}"/mozilla/js/src || die
243 eautoconf
244 }
245
246 src_configure() {
247 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
248 MEXTENSIONS="default"
249
250 ####################################
251 #
252 # mozconfig, CFLAGS and CXXFLAGS setup
253 #
254 ####################################
255
256 mozconfig_init
257 mozconfig_config
258
259 # It doesn't compile on alpha without this LDFLAGS
260 use alpha && append-ldflags "-Wl,--no-relax"
261
262 # We must force enable jemalloc 3 threw .mozconfig
263 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
264
265 mozconfig_annotate '' --enable-jemalloc
266 mozconfig_annotate '' --enable-replace-malloc
267 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
268 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
269 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
270 mozconfig_annotate '' --disable-gconf
271 mozconfig_annotate '' --disable-mailnews
272 mozconfig_annotate '' --with-system-png
273 mozconfig_annotate '' --enable-system-ffi
274
275 # Other ff-specific settings
276 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
277 mozconfig_annotate '' --with-user-appdir=.thunderbird
278 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
279 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
280
281 # Use enable features
282 if use gstreamer ; then
283 mozconfig_annotate '' --enable-gstreamer=1.0
284 else
285 mozconfig_annotate '' --disable-gstreamer
286 fi
287 mozconfig_use_enable pulseaudio
288 mozconfig_use_enable system-cairo
289 mozconfig_use_enable system-sqlite
290 mozconfig_use_with system-jpeg
291 mozconfig_use_with system-icu
292 mozconfig_use_enable system-icu intl-api
293 mozconfig_use_enable lightning calendar
294 mozconfig_use_enable ldap
295
296 # Bug #72667
297 if use mozdom; then
298 MEXTENSIONS="${MEXTENSIONS},inspector"
299 fi
300
301 # Use an objdir to keep things organized.
302 echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
303
304 # Finalize and report settings
305 mozconfig_final
306
307 ####################################
308 #
309 # Configure and build
310 #
311 ####################################
312
313 # Disable no-print-directory
314 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
315
316 if [[ $(gcc-major-version) -lt 4 ]]; then
317 append-cxxflags -fno-stack-protector
318 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
319 if use amd64 || use x86; then
320 append-flags -mno-avx
321 fi
322 fi
323
324 if use crypt; then
325 pushd "${WORKDIR}"/enigmail &>/dev/null ||die
326 econf
327 popd &>/dev/null ||die
328 fi
329 }
330
331 src_compile() {
332 mkdir -p "${BUILD_OBJ_DIR}" && cd "${BUILD_OBJ_DIR}" || die
333
334 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
335 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
336 emake -f "${S}"/client.mk
337
338 # Only build enigmail extension if crypt enabled.
339 if use crypt ; then
340 einfo "Building enigmail"
341 pushd "${WORKDIR}"/enigmail &>/dev/null || die
342 emake -j1
343 emake -j1 xpi
344 popd &>/dev/null || die
345 fi
346 }
347
348 src_install() {
349 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
350 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
351
352 declare emid
353 cd "${BUILD_OBJ_DIR}" || die
354
355 # Copy our preference before omnijar is created.
356 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
357 "${BUILD_OBJ_DIR}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
358 || die
359
360 # Set default path to search for dictionaries.
361 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
362 >> "${BUILD_OBJ_DIR}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
363 || die
364
365 # Pax mark xpcshell for hardened support, only used for startupcache creation.
366 pax-mark m "${BUILD_OBJ_DIR}"/mozilla/dist/bin/xpcshell
367
368 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
369 emake DESTDIR="${D}" install
370
371 # Install language packs
372 mozlinguas_src_install
373
374 if ! use bindist; then
375 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
376 domenu "${FILESDIR}"/icon/${PN}.desktop
377 else
378 newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
379 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
380 ${PN}.desktop
381
382 sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
383 "${ED}"/usr/share/applications/${PN}.desktop
384 fi
385
386 if use crypt ; then
387 local enigmail_xpipath="${WORKDIR}/enigmail/build"
388 cd "${T}" || die
389 unzip "${enigmail_xpipath}"/enigmail*.xpi install.rdf || die
390 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
391
392 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
393 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
394 unzip "${enigmail_xpipath}"/enigmail*.xpi || die
395 fi
396
397 if use lightning ; then
398 local l c
399 mozlinguas_export
400
401 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
402 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
403 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
404 unzip "${BUILD_OBJ_DIR}"/mozilla/dist/xpi-stage/gdata-provider-*.xpi
405 # Install locales for gdata-provider -- each locale is a directory tree
406 insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
407 cd "${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}/chrome
408 for l in "${mozlinguas[@]}"; do if [[ -d gdata-provider-${l} ]]; then
409 doins -r gdata-provider-${l}
410 echo "locale gdata-provider ${l} chrome/gdata-provider-${l}/locale/${l}/" \
411 >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
412 || die "Error adding gdata-provider-${l} to chrome.manifest"
413 else
414 ewarn "Sorry, but lightning gdata-provider in ${P} does not support the ${l} locale"
415 fi; done
416
417 emid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
418 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
419 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
420 unzip "${BUILD_OBJ_DIR}"/mozilla/dist/xpi-stage/lightning-*.xpi \
421 || die
422 # Install locales for lightning - each locale is a jar file
423 insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
424 cd "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER}/chrome || die
425 for l in "${mozlinguas[@]}"; do if [[ -e calendar-${l}.jar ]]; then
426 for c in calendar lightning; do
427 doins ${c}-${l}.jar
428 echo "locale ${c} $l jar:chrome/${c}-${l}.jar!/locale/${l}/${c}/" \
429 >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
430 || die "Error adding ${c}-${l} to chrome.manifest"
431 done
432 else
433 ewarn "Sorry, but lightning calendar in ${P} does not support the ${l} locale"
434 fi; done
435
436 # Fix mimetype so it shows up as a calendar application in GNOME 3
437 # This requires that the .desktop file was already installed earlier
438 sed -e "s:^\(MimeType=\):\1text/calendar;:" \
439 -e "s:^\(Categories=\):\1Calendar;:" \
440 -i "${ED}"/usr/share/applications/${PN}.desktop || die
441 fi
442
443 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/{thunderbird-bin,thunderbird}
444
445 # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
446 # continue to work as expected.
447 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
448
449 if use minimal; then
450 rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \
451 die "Failed to remove sdk and headers"
452 fi
453 }
454
455 pkg_postinst() {
456 if use crypt; then
457 local peimpl=$(eselect --brief --colour=no pinentry show)
458 case "${peimpl}" in
459 *gtk*|*qt*) ;;
460 *) ewarn "The pinentry front-end currently selected is not one supported by thunderbird."
461 ewarn "You may be prompted for your password in an inaccessible shell!!"
462 ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
463 ;;
464 esac
465 fi
466 elog
467 elog "If you experience problems with plugins please issue the"
468 elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
469 elog "then restart thunderbird"
470 }
471
472
473
474 1.1 mail-client/thunderbird/thunderbird-24.8.0.ebuild
475
476 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-24.8.0.ebuild?rev=1.1&view=markup
477 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/thunderbird/thunderbird-24.8.0.ebuild?rev=1.1&content-type=text/plain
478
479 Index: thunderbird-24.8.0.ebuild
480 ===================================================================
481 # Copyright 1999-2014 Gentoo Foundation
482 # Distributed under the terms of the GNU General Public License v2
483 # $Header: /var/cvsroot/gentoo-x86/mail-client/thunderbird/thunderbird-24.8.0.ebuild,v 1.1 2014/09/03 22:11:38 axs Exp $
484
485 EAPI=5
486 WANT_AUTOCONF="2.1"
487 MOZ_ESR=""
488 MOZ_LIGHTNING_VER="2.6.5"
489 MOZ_LIGHTNING_GDATA_VER="2.6.3"
490
491 # This list can be updated using scripts/get_langs.sh from the mozilla overlay
492 MOZ_LANGS=(ar ast be bg bn-BD br ca cs da de el en en-GB en-US es-AR
493 es-ES et eu fi fr fy-NL ga-IE gd gl he hr hu hy-AM id is it ja ko lt nb-NO
494 nl nn-NO pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta-LK tr uk vi
495 zh-CN zh-TW )
496
497 # Convert the ebuild version to th firefox-24.0-patches-0.4.tar.xze upstream mozilla version, used by mozlinguas
498 MOZ_PV="${PV/_beta/b}"
499 # ESR releases have slightly version numbers
500 if [[ ${MOZ_ESR} == 1 ]]; then
501 MOZ_PV="${MOZ_PV}esr"
502 fi
503 MOZ_P="${PN}-${MOZ_PV}"
504
505 # Enigmail version
506 EMVER="1.6"
507 # Upstream ftp release URI that's used by mozlinguas.eclass
508 # We don't use the http mirror because it deletes old tarballs.
509 MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
510 MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases/"
511
512 inherit flag-o-matic toolchain-funcs mozconfig-3 makeedit multilib autotools pax-utils check-reqs nsplugins mozlinguas
513
514 DESCRIPTION="Thunderbird Mail Client"
515 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
516
517 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
518 SLOT="0"
519 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
520 IUSE="bindist crypt gstreamer +jit ldap +lightning +minimal mozdom pulseaudio selinux system-cairo system-icu system-jpeg system-sqlite"
521
522 PATCH="thunderbird-24.0-patches-0.1"
523 PATCHFF="firefox-24.0-patches-0.9"
524
525 SRC_URI="${SRC_URI}
526 ${MOZ_FTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
527 ${MOZ_HTTP_URI}${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
528 crypt? ( http://www.enigmail.net/download/source/enigmail-${EMVER}.tar.gz )
529 lightning? (
530 ${MOZ_HTTP_URI/${PN}/calendar/lightning}${MOZ_LIGHTNING_VER}/linux/lightning.xpi -> lightning-${MOZ_LIGHTNING_VER}.xpi
531 ${MOZ_HTTP_URI/${PN}/calendar/lightning}${MOZ_LIGHTNING_GDATA_VER}/linux/gdata-provider.xpi -> gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi
532 )
533 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
534 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz
535 http://dev.gentoo.org/~polynomial-c/mozilla/patchsets/${PATCH}.tar.xz"
536
537 ASM_DEPEND=">=dev-lang/yasm-1.1"
538
539 RDEPEND="
540 >=dev-libs/nss-3.16.2
541 >=dev-libs/nspr-4.10.4
542 >=dev-libs/glib-2.26:2
543 >=media-libs/mesa-7.10
544 >=media-libs/libpng-1.6.6[apng]
545 virtual/libffi
546 gstreamer? ( media-plugins/gst-plugins-meta:0.10[ffmpeg] )
547 pulseaudio? ( media-sound/pulseaudio )
548 system-cairo? ( >=x11-libs/cairo-1.12[X] )
549 system-icu? ( >=dev-libs/icu-51.1 )
550 system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 )
551 system-sqlite? ( >=dev-db/sqlite-3.8.0.2:3[secure-delete,debug=] )
552 >=media-libs/libvpx-1.0.0
553 kernel_linux? ( media-libs/alsa-lib )
554 selinux? ( sec-policy/selinux-thunderbird )
555 !x11-plugins/enigmail
556 crypt? ( || (
557 ( >=app-crypt/gnupg-2.0
558 || (
559 app-crypt/pinentry[gtk]
560 app-crypt/pinentry[qt4]
561 )
562 )
563 =app-crypt/gnupg-1.4*
564 ) )"
565
566 DEPEND="${RDEPEND}
567 >=sys-devel/binutils-2.16.1
568 virtual/pkgconfig
569 amd64? ( ${ASM_DEPEND}
570 virtual/opengl )
571 x86? ( ${ASM_DEPEND}
572 virtual/opengl )"
573
574 if [[ ${PV} =~ beta ]]; then
575 S="${WORKDIR}/comm-beta"
576 else
577 S="${WORKDIR}/comm-esr${PV%%.*}"
578 fi
579
580 pkg_setup() {
581 moz_pkgsetup
582
583 export MOZILLA_DIR="${S}/mozilla"
584
585 if ! use bindist ; then
586 elog "You are enabling official branding. You may not redistribute this build"
587 elog "to any users on your network or the internet. Doing so puts yourself into"
588 elog "a legal problem with Mozilla Foundation"
589 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
590 elog
591 fi
592 }
593
594 pkg_pretend() {
595 # Ensure we have enough disk space to compile
596 CHECKREQS_DISK_BUILD="4G"
597 check-reqs_pkg_setup
598 }
599
600 src_unpack() {
601 unpack ${A}
602
603 # Unpack language packs
604 mozlinguas_src_unpack
605
606 # Unpack lightning for calendar locales
607 if use lightning ; then
608 xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi
609 xpi_unpack gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi
610 fi
611 }
612
613 src_prepare() {
614 # Apply our Thunderbird patchset
615 EPATCH_SUFFIX="patch" \
616 EPATCH_FORCE="yes" \
617 epatch "${WORKDIR}/thunderbird"
618
619 # Apply our patchset from firefox to thunderbird as well
620 pushd "${S}"/mozilla &>/dev/null || die
621 EPATCH_SUFFIX="patch" \
622 EPATCH_FORCE="yes" \
623 epatch "${WORKDIR}/firefox"
624 popd &>/dev/null || die
625
626 if use crypt ; then
627 mv "${WORKDIR}"/enigmail "${S}"/mailnews/extensions/enigmail
628 pushd "${S}"/mailnews/extensions/enigmail &>/dev/null || die
629 epatch "${FILESDIR}"/enigmail-1.6.0-parallel-fix.patch
630 popd &>/dev/null || die
631 fi
632
633 # Ensure that are plugins dir is enabled as default
634 sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
635 "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
636 sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
637 "${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
638
639 # Don't exit with error when some libs are missing which we have in
640 # system.
641 sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
642 -i "${S}"/mail/installer/Makefile.in || die
643
644 # Don't error out when there's no files to be removed:
645 sed 's@\(xargs rm\)$@\1 -f@' \
646 -i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
647
648 # Shell scripts sometimes contain DOS line endings; bug 391889
649 grep -rlZ --include="*.sh" $'\r$' . |
650 while read -r -d $'\0' file ; do
651 einfo edos2unix "${file}"
652 edos2unix "${file}"
653 done
654
655 # Confirm the version of lightning being grabbed for langpacks is the same
656 # as that used in thunderbird
657 local THIS_MOZ_LIGHTNING_VER=$(cat "${S}"/calendar/sunbird/config/version.txt)
658 if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then
659 eqawarn "The version of lightning used for localization differs from the version"
660 eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}"
661 eqawarn "to ${THIS_MOZ_LIGHTNING_VER}"
662 fi
663
664 # Allow user to apply any additional patches without modifing ebuild
665 epatch_user
666
667 eautoreconf
668 # Ensure we run eautoreconf in mozilla to regenerate configure
669 cd "${S}"/mozilla
670 eautoconf
671 }
672
673 src_configure() {
674 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
675 MEXTENSIONS="default"
676
677 ####################################
678 #
679 # mozconfig, CFLAGS and CXXFLAGS setup
680 #
681 ####################################
682
683 mozconfig_init
684 mozconfig_config
685
686 # It doesn't compile on alpha without this LDFLAGS
687 use alpha && append-ldflags "-Wl,--no-relax"
688
689 # We must force enable jemalloc 3 threw .mozconfig
690 echo "export MOZ_JEMALLOC=1" >> ${S}/.mozconfig
691
692 mozconfig_annotate '' --enable-jemalloc
693 mozconfig_annotate '' --enable-replace-malloc
694 mozconfig_annotate '' --prefix="${EPREFIX}"/usr
695 mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
696 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
697 mozconfig_annotate '' --disable-gconf
698 mozconfig_annotate '' --disable-mailnews
699 mozconfig_annotate '' --with-system-png
700 mozconfig_annotate '' --enable-system-ffi
701
702 # Other ff-specific settings
703 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
704 mozconfig_annotate '' --with-user-appdir=.thunderbird
705 mozconfig_annotate '' --target="${CTARGET:-${CHOST}}"
706 mozconfig_annotate '' --build="${CTARGET:-${CHOST}}"
707
708 # Use enable features
709 mozconfig_use_enable gstreamer
710 mozconfig_use_enable pulseaudio
711 mozconfig_use_enable system-cairo
712 mozconfig_use_enable system-sqlite
713 mozconfig_use_with system-jpeg
714 mozconfig_use_with system-icu
715 mozconfig_use_enable system-icu intl-api
716 mozconfig_use_enable lightning calendar
717 mozconfig_use_enable ldap
718 # Feature is know to cause problems on hardened
719 mozconfig_use_enable jit ion
720
721 # Bug #72667
722 if use mozdom; then
723 MEXTENSIONS="${MEXTENSIONS},inspector"
724 fi
725
726 # Use an objdir to keep things organized.
727 echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird" >> "${S}"/.mozconfig
728
729 # Finalize and report settings
730 mozconfig_final
731
732 ####################################
733 #
734 # Configure and build
735 #
736 ####################################
737
738 # Disable no-print-directory
739 MAKEOPTS=${MAKEOPTS/--no-print-directory/}
740
741 if [[ $(gcc-major-version) -lt 4 ]]; then
742 append-cxxflags -fno-stack-protector
743 elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
744 if use amd64 || use x86; then
745 append-flags -mno-avx
746 fi
747 fi
748 }
749
750 src_compile() {
751 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
752 MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL}" \
753 emake -f client.mk
754
755 # Only build enigmail extension if crypt enabled.
756 if use crypt ; then
757 cd "${S}"/mailnews/extensions/enigmail || die
758 ./makemake -r 2&> /dev/null
759 cd "${S}"/tbird/mailnews/extensions/enigmail
760 emake
761 emake xpi
762 fi
763 }
764
765 src_install() {
766 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
767 DICTPATH="\"${EPREFIX}/usr/share/myspell\""
768
769 declare emid
770 local obj_dir="tbird"
771 cd "${S}/${obj_dir}"
772
773 # Copy our preference before omnijar is created.
774 cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
775 "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
776 || die
777
778 # Set default path to search for dictionaries.
779 echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
780 >> "${S}/${obj_dir}/mozilla/dist/bin/defaults/pref/all-gentoo.js" \
781 || die
782
783 # Pax mark xpcshell for hardened support, only used for startupcache creation.
784 pax-mark m "${S}"/${obj_dir}/mozilla/dist/bin/xpcshell
785
786 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
787 emake DESTDIR="${D}" install
788
789 # Install language packs
790 mozlinguas_src_install
791
792 if ! use bindist; then
793 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
794 domenu "${FILESDIR}"/icon/${PN}.desktop
795 else
796 newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
797 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
798 ${PN}.desktop
799
800 sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
801 "${ED}"/usr/share/applications/${PN}.desktop
802 fi
803
804 if use crypt ; then
805 cd "${T}" || die
806 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi install.rdf \
807 || die
808 emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
809
810 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
811 cd "${D}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
812 unzip "${S}"/${obj_dir}/mozilla/dist/bin/enigmail*.xpi || die
813 fi
814
815 if use lightning ; then
816 local l c
817 mozlinguas_export
818
819 emid="{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"
820 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
821 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid}
822 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/gdata-provider-*.xpi
823 # Install locales for gdata-provider -- each locale is a directory tree
824 insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
825 cd "${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}/chrome
826 for l in "${mozlinguas[@]}"; do if [[ -d gdata-provider-${l} ]]; then
827 doins -r gdata-provider-${l}
828 echo "locale gdata-provider ${l} chrome/gdata-provider-${l}/locale/${l}/" \
829 >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
830 || die "Error adding gdata-provider-${l} to chrome.manifest"
831 else
832 ewarn "Sorry, but lightning gdata-provider in ${P} does not support the ${l} locale"
833 fi; done
834
835 emid="{e2fda1a4-762b-4020-b5ad-a41df1933103}"
836 dodir ${MOZILLA_FIVE_HOME}/extensions/${emid}
837 cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
838 unzip "${S}"/${obj_dir}/mozilla/dist/xpi-stage/lightning-*.xpi \
839 || die
840 # Install locales for lightning - each locale is a jar file
841 insinto ${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome
842 cd "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER}/chrome || die
843 for l in "${mozlinguas[@]}"; do if [[ -e calendar-${l}.jar ]]; then
844 for c in calendar lightning; do
845 doins ${c}-${l}.jar
846 echo "locale ${c} $l jar:chrome/${c}-${l}.jar!/locale/${l}/${c}/" \
847 >> "${ED}"/${MOZILLA_FIVE_HOME}/extensions/${emid}/chrome.manifest \
848 || die "Error adding ${c}-${l} to chrome.manifest"
849 done
850 else
851 ewarn "Sorry, but lightning calendar in ${P} does not support the ${l} locale"
852 fi; done
853
854 # Fix mimetype so it shows up as a calendar application in GNOME 3
855 # This requires that the .desktop file was already installed earlier
856 sed -e "s:^\(MimeType=\):\1text/calendar;:" \
857 -e "s:^\(Categories=\):\1Calendar;:" \
858 -i "${ED}"/usr/share/applications/${PN}.desktop || die
859 fi
860
861 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/{thunderbird-bin,thunderbird}
862
863 # Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
864 # continue to work as expected.
865 pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
866
867 if use minimal; then
868 rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \
869 die "Failed to remove sdk and headers"
870 fi
871 }
872
873 pkg_postinst() {
874 elog
875 elog "If you experience problems with plugins please issue the"
876 elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
877 elog "then restart thunderbird"
878 }