Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 572808
Collapse All | Expand All

(-)a/mail-client/thunderbird/Manifest (+2 lines)
Lines 1-5 Link Here
1
DIST enigmail-1.8.2.tar.gz 1604159 SHA256 1d2700799bc52aaa8e8c9f7a0f5111281ff9fbdffc093cdff070657d574eb2a6 SHA512 51eece988f466aeb4a343719a86dc7d95ec41dfc3ec7e3d8d2f360528675c605f8f2154f10aeea6ef82ed87c784f1d13bfc978e052a9ede0072b5137f6294b11 WHIRLPOOL e12a703899e0e4c98adc58b5f4bf1f74e24a2cf09c1a706a6edca6aca06140041b293f23e6e5b05c507177b4148533ebc3431fb75592aae07d791a899ba2c45c
1
DIST enigmail-1.8.2.tar.gz 1604159 SHA256 1d2700799bc52aaa8e8c9f7a0f5111281ff9fbdffc093cdff070657d574eb2a6 SHA512 51eece988f466aeb4a343719a86dc7d95ec41dfc3ec7e3d8d2f360528675c605f8f2154f10aeea6ef82ed87c784f1d13bfc978e052a9ede0072b5137f6294b11 WHIRLPOOL e12a703899e0e4c98adc58b5f4bf1f74e24a2cf09c1a706a6edca6aca06140041b293f23e6e5b05c507177b4148533ebc3431fb75592aae07d791a899ba2c45c
2
DIST firefox-38.0-patches-05.tar.xz 18412 SHA256 d2a2be8359c15d42fd2355bb54048db88af2288f9f9b69acbd742c29bd10be16 SHA512 0556531fa5685bf04438df22b0e35ffd22c27e31a2d1d264b9401af8f3c79604577fc71f71e2bf338dc5465471152067ce1a30ba2813c612e062e20c4b5b7ea2 WHIRLPOOL cc9aa2174395c8a70a9fc7010fc48d2f4e35c64c73deda38934a42ded5def14f7ccf6c3be8700ab3bea02bdd93bb4b98b40ff44176e4cfccd0b68b70d9deed61
2
DIST firefox-38.0-patches-05.tar.xz 18412 SHA256 d2a2be8359c15d42fd2355bb54048db88af2288f9f9b69acbd742c29bd10be16 SHA512 0556531fa5685bf04438df22b0e35ffd22c27e31a2d1d264b9401af8f3c79604577fc71f71e2bf338dc5465471152067ce1a30ba2813c612e062e20c4b5b7ea2 WHIRLPOOL cc9aa2174395c8a70a9fc7010fc48d2f4e35c64c73deda38934a42ded5def14f7ccf6c3be8700ab3bea02bdd93bb4b98b40ff44176e4cfccd0b68b70d9deed61
3
DIST firefox-44.0-patches-0.4.tar.xz 14240 SHA256 cf17d24e19c8e64501582c77e010a10bf8cc65fc1d7620f7a8dd98706195eda0 SHA512 4f597f9885366a6ccbd7cf424fd68bc7d2377eeb5de4741b21d6f51272a9f4f6a57ff2b5a848593097e79d51a7ae7e6e261aea9155f4b3d719e74ebbdf7279f1 WHIRLPOOL 097eb79a5aba97f76d50f5f51da8b089c3d85b34c6a41d6ca782a85381f024d8865062d95ff4bb2235426e3806b660344d3ddf067da0889cda66f0b24cb97912
3
DIST gdata-provider-1.9.tar.xz 80812 SHA256 8e60960999c752c49d6414d14c35c2d0cc474d4a199ec99e531453d4d60bc5a3 SHA512 b1411b0a8614eb5e9fbdc0a41eb5ed38e8d4c90832e2a356fd0412b554af46bde4b766b213d9da3cafd85206da44d333354c9f6b469c95ddb190fa04fe14a54a WHIRLPOOL df7451e55f937c604d92faed82a16bddd6ca87a7c03981324c5409ab5824ac1c631ec767f10eaedc6f7128cd1f9001eca599c848d39e116d9722f26811b01092
4
DIST gdata-provider-1.9.tar.xz 80812 SHA256 8e60960999c752c49d6414d14c35c2d0cc474d4a199ec99e531453d4d60bc5a3 SHA512 b1411b0a8614eb5e9fbdc0a41eb5ed38e8d4c90832e2a356fd0412b554af46bde4b766b213d9da3cafd85206da44d333354c9f6b469c95ddb190fa04fe14a54a WHIRLPOOL df7451e55f937c604d92faed82a16bddd6ca87a7c03981324c5409ab5824ac1c631ec767f10eaedc6f7128cd1f9001eca599c848d39e116d9722f26811b01092
4
DIST lightning-4.0.5.tar.xz 2312932 SHA256 8386208ecb915172a48d77fc758f5040933c13619c0f9d820903ce37ba610184 SHA512 9f1fbec0520d24158af78ffe8a790502fd2843facd17bac2e278006d7b1998067b5803e1fa2e3172511d298cebb4e0b7047edb7b0aa18a8dc4712d0f1e2e08d3 WHIRLPOOL 8f6074f6038fda3a4946ea8fe788194cb2eda0c7e4a6c68a7c349781b8acb7602a70baf66bd5148ebd712e197cf4974268b5f40cedec520280c355e4f03de701
5
DIST lightning-4.0.5.tar.xz 2312932 SHA256 8386208ecb915172a48d77fc758f5040933c13619c0f9d820903ce37ba610184 SHA512 9f1fbec0520d24158af78ffe8a790502fd2843facd17bac2e278006d7b1998067b5803e1fa2e3172511d298cebb4e0b7047edb7b0aa18a8dc4712d0f1e2e08d3 WHIRLPOOL 8f6074f6038fda3a4946ea8fe788194cb2eda0c7e4a6c68a7c349781b8acb7602a70baf66bd5148ebd712e197cf4974268b5f40cedec520280c355e4f03de701
5
DIST thunderbird-38.0-patches-0.1.tar.xz 684 SHA256 cd2a347b72a104e72d38e56bb92df3464e8820485119b4114dbd0bbda131a808 SHA512 52c83af301be959e861dfec55b3c4bc60035387c606976bd29232c4cba077230edcadef242491e699fba10027d0408dd4f33fa320bcf96727afe149166ca02de WHIRLPOOL a378a0fa1b152f17681a5e389662fedfacd45a137b224f038d3c98ab4a024bcf9e753fb2fe018cdb7126fb710ee8baabdf7882540450ead2985070d0d1f12eb0
6
DIST thunderbird-38.0-patches-0.1.tar.xz 684 SHA256 cd2a347b72a104e72d38e56bb92df3464e8820485119b4114dbd0bbda131a808 SHA512 52c83af301be959e861dfec55b3c4bc60035387c606976bd29232c4cba077230edcadef242491e699fba10027d0408dd4f33fa320bcf96727afe149166ca02de WHIRLPOOL a378a0fa1b152f17681a5e389662fedfacd45a137b224f038d3c98ab4a024bcf9e753fb2fe018cdb7126fb710ee8baabdf7882540450ead2985070d0d1f12eb0
Lines 60-62 DIST thunderbird-38.5.0-vi.xpi 519843 SHA256 43d25bbbf7d16c0d789ae2f98c16835b2ac Link Here
60
DIST thunderbird-38.5.0-zh-CN.xpi 466412 SHA256 5a655ebd5fbba862542973834b4d6cc2f8a13c065f734bbc490f8d838d71dc6e SHA512 876e597c511721d3d83c74d1ad6cda7f73268ec7d5a91de312a11927986b9384886f42a2ac6ce0fb68fb0d9d7ce8aca081f5a90b116d5b9286ee3cbeaeac1a51 WHIRLPOOL 2d154a00f88ae784f4e51988d384f31bb18b2743f25ff78abb35f16f70ec6034598282467e43f105b41acd42fa11f2266c86645340fb9c537095cb4467ffb76e
61
DIST thunderbird-38.5.0-zh-CN.xpi 466412 SHA256 5a655ebd5fbba862542973834b4d6cc2f8a13c065f734bbc490f8d838d71dc6e SHA512 876e597c511721d3d83c74d1ad6cda7f73268ec7d5a91de312a11927986b9384886f42a2ac6ce0fb68fb0d9d7ce8aca081f5a90b116d5b9286ee3cbeaeac1a51 WHIRLPOOL 2d154a00f88ae784f4e51988d384f31bb18b2743f25ff78abb35f16f70ec6034598282467e43f105b41acd42fa11f2266c86645340fb9c537095cb4467ffb76e
61
DIST thunderbird-38.5.0-zh-TW.xpi 466661 SHA256 87019d3d21edc402110fe3c18091f855e1946643b4e51392abecdd25ad775ffc SHA512 957bce9dd781e8b8aa17778e12c3335d0a3823bbf9f54a9ed4837ab724e27cc03feb6b7e1d2d85069a9ed2d480c9939c9f68bd3797d45f02c6d65bfabdd2f0ab WHIRLPOOL 4d79a8c4aa496c81af1751bb2830ed9e31886677a3b3aef58154cda37af7827ae355eb0a0de88a80ae765b071eb673e02c33851a65e21d41c8d9d5b25836e71a
62
DIST thunderbird-38.5.0-zh-TW.xpi 466661 SHA256 87019d3d21edc402110fe3c18091f855e1946643b4e51392abecdd25ad775ffc SHA512 957bce9dd781e8b8aa17778e12c3335d0a3823bbf9f54a9ed4837ab724e27cc03feb6b7e1d2d85069a9ed2d480c9939c9f68bd3797d45f02c6d65bfabdd2f0ab WHIRLPOOL 4d79a8c4aa496c81af1751bb2830ed9e31886677a3b3aef58154cda37af7827ae355eb0a0de88a80ae765b071eb673e02c33851a65e21d41c8d9d5b25836e71a
62
DIST thunderbird-38.5.0.source.tar.bz2 204393357 SHA256 7da187d4d5df17b1457bd93b584f78f5e41d2094f87c14e74ee9d8064de25d0d SHA512 fed8376375c3ad7df8b773ced7944fb07edbd28e82c907dc6451ad538b8944d6f2a1d5632399f255ab1c7f74a40a9170912fefdbb2fdf423d7dc35108d1baa65 WHIRLPOOL 93853218ce7bb585e1515e62ea02bbe51e723d0071f8bfcddd5da9c4ea0a888a5c78fe86afbd46ab049a2e59424dc5f2a04d3157ef720e524ad6e2bf99614e01
63
DIST thunderbird-38.5.0.source.tar.bz2 204393357 SHA256 7da187d4d5df17b1457bd93b584f78f5e41d2094f87c14e74ee9d8064de25d0d SHA512 fed8376375c3ad7df8b773ced7944fb07edbd28e82c907dc6451ad538b8944d6f2a1d5632399f255ab1c7f74a40a9170912fefdbb2fdf423d7dc35108d1baa65 WHIRLPOOL 93853218ce7bb585e1515e62ea02bbe51e723d0071f8bfcddd5da9c4ea0a888a5c78fe86afbd46ab049a2e59424dc5f2a04d3157ef720e524ad6e2bf99614e01
64
DIST thunderbird-44.0b1.source.tar.xz 199016060 SHA256 335d2af71bd3767b643a09b558800ebf2182688f9e61fbf98b713a2b43fa418c SHA512 677119247061b6b89f781952c287d924fa77f841f6c67313808f5bfc9b7088322c22170a4981c5666b9f5b9779792f055394b18e077a1cbfc2076f2beddaf960 WHIRLPOOL b543f2fff5efdce908e4fe1b74485ce48c61cf494c69a716365a5d4fd0e97ab58bcf3f91c3a1690df4e27d1c1fcf5b99db4bf6c1ac1d710d8688acb449d02949
(-)a/mail-client/thunderbird/thunderbird-44.0_beta1.ebuild (+398 lines)
Line 0 Link Here
1
# HG changeset patch
2
# User Felix Janda <felix.janda@posteo.de>
3
# Date 1428142217 -7200
4
#      Sat Apr 04 12:10:17 2015 +0200
5
# Node ID c04cc88f3bb26e254356df6de06583a542ae6796
6
# Parent  90adc073cbc6398f4fab9b1cd07b685368559f34
7
# https://bugzilla.mozilla.org/show_bug.cgi?id=1157850
8
updater: no fts.h and MAXNAMLEN
9
10
diff -r 90adc073cbc6 -r c04cc88f3bb2 toolkit/mozapps/update/common/updatedefines.h
11
--- a/mozilla/toolkit/mozapps/update/common/updatedefines.h	Thu Apr 02 08:10:00 2015 -0400
Line 0 Link Here
1
Trim included libevent's hard-wired usage of sysctl as musl doesn't support it
2
--- thunderbird-44.0b1/mozilla/ipc/chromium/src/third_party/libevent/arc4random.c.orig	2016-01-24 12:09:11.209680105 +0100
Line 0 Link Here
1
--- a/mail/installer/package-manifest.in	2012-02-12 09:04:32.000000000 -0600
Line 0 Link Here
1
# Copyright 1999-2016 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Id$
4
5
EAPI=5
6
WANT_AUTOCONF="2.1"
7
MOZ_ESR=""
8
MOZ_LIGHTNING_VER="4.0.5"
9
MOZ_LIGHTNING_GDATA_VER="1.9"
10
11
# This list can be updated using scripts/get_langs.sh from the mozilla overlay
12
MOZ_LANGS=(ar ast be bg bn-BD br ca cs cy da de el en en-GB en-US es-AR
13
es-ES et eu fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM id is it ja ko lt
14
nb-NO nl nn-NO pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE ta-LK tr
15
uk vi zh-CN zh-TW )
16
17
# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
18
MOZ_PV="${PV/_beta/b}"
19
# ESR releases have slightly version numbers
20
if [[ ${MOZ_ESR} == 1 ]]; then
21
	MOZ_PV="${MOZ_PV}esr"
22
fi
23
MOZ_P="${PN}-${MOZ_PV}"
24
25
# Enigmail version
26
EMVER="1.8.2"
27
28
# Patches
29
PATCHFF="firefox-44.0-patches-0.4"
30
31
MOZ_HTTP_URI="http://ftp.mozilla.org/pub/${PN}/releases"
32
33
MOZCONFIG_OPTIONAL_JIT="enabled"
34
inherit flag-o-matic toolchain-funcs mozconfig-v6.44 makeedit multilib autotools pax-utils check-reqs nsplugins mozlinguas
35
36
DESCRIPTION="Thunderbird Mail Client"
37
HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
38
39
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
40
SLOT="0"
41
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
42
IUSE="bindist crypt hardened ldap lightning +minimal mozdom selinux"
43
RESTRICT="!bindist? ( bindist )"
44
45
# URI for upstream lightning package (when it is available)
46
#${MOZ_HTTP_URI/${PN}/calendar/lightning}/${MOZ_LIGHTNING_VER}/linux/lightning.xpi -> lightning-${MOZ_LIGHTNING_VER}.xpi
47
PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCHFF}.tar.xz )
48
SRC_URI="${SRC_URI}
49
	${MOZ_HTTP_URI}/${MOZ_PV}/source/${MOZ_P}.source.tar.xz
50
	lightning? (
51
		https://dev.gentoo.org/~axs/distfiles/lightning-${MOZ_LIGHTNING_VER}.tar.xz
52
		https://dev.gentoo.org/~axs/distfiles/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.tar.xz
53
	)
54
	crypt? ( http://www.enigmail.net/download/source/enigmail-${EMVER}.tar.gz )
55
	${PATCH_URIS[@]}"
56
57
ASM_DEPEND=">=dev-lang/yasm-1.1"
58
59
CDEPEND="
60
	>=dev-libs/nss-3.19.2
61
	>=dev-libs/nspr-4.10.10
62
	!x11-plugins/enigmail
63
	elibc_musl? ( sys-libs/queue )
64
	crypt?  ( || (
65
		( >=app-crypt/gnupg-2.1.8
66
			|| (
67
				app-crypt/pinentry[gtk]
68
				app-crypt/pinentry[qt4]
69
			)
70
		)
71
		=app-crypt/gnupg-1.4*
72
	) )"
73
74
DEPEND="${CDEPEND}
75
	amd64? ( ${ASM_DEPEND}
76
		virtual/opengl )
77
	x86? ( ${ASM_DEPEND}
78
		virtual/opengl )"
79
80
RDEPEND="${CDEPEND}
81
	selinux? ( sec-policy/selinux-thunderbird )
82
"
83
84
if [[ ${PV} =~ beta ]]; then
85
	S="${WORKDIR}/${PN}-${MOZ_PV}"
86
else
87
	S="${WORKDIR}/comm-esr${PV%%.*}"
88
fi
89
90
BUILD_OBJ_DIR="${S}/tbird"
91
92
pkg_setup() {
93
	moz_pkgsetup
94
95
	export MOZILLA_DIR="${S}/mozilla"
96
97
	if ! use bindist ; then
98
		elog "You are enabling official branding. You may not redistribute this build"
99
		elog "to any users on your network or the internet. Doing so puts yourself into"
100
		elog "a legal problem with Mozilla Foundation"
101
		elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
102
		elog
103
	fi
104
}
105
106
pkg_pretend() {
107
	# Ensure we have enough disk space to compile
108
	CHECKREQS_DISK_BUILD="4G"
109
	check-reqs_pkg_setup
110
111
	if use jit && [[ -n ${PROFILE_IS_HARDENED} ]]; then
112
		ewarn "You are emerging this package on a hardened profile with USE=jit enabled."
113
		ewarn "This is horribly insecure as it disables all PAGEEXEC restrictions."
114
		ewarn "Please ensure you know what you are doing.  If you don't, please consider"
115
		ewarn "emerging the package with USE=-jit"
116
	fi
117
}
118
119
src_unpack() {
120
	unpack ${A}
121
122
	# Unpack language packs
123
	mozlinguas_src_unpack
124
125
	# this version of lightning is a .tar.xz, no xpi needed
126
	#xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi
127
128
	# this version of gdata-provider is a .tar.xz , no xpi needed
129
	#use lightning && xpi_unpack gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi
130
}
131
132
src_prepare() {
133
	# Apply our patchset from firefox to thunderbird as well
134
	pushd "${S}"/mozilla &>/dev/null || die
135
	EPATCH_SUFFIX="patch" \
136
	EPATCH_FORCE="yes" \
137
	epatch "${WORKDIR}/firefox"
138
	popd &>/dev/null || die
139
140
	epatch "${FILESDIR}"/thunderbird-44.0_beta1-fix-preferences-gentoo.patch
141
142
	## patches for building with musl libc
143
	if use elibc_musl; then
144
		epatch "${FILESDIR}"/musl/thunderbird-38.3.0-updater.patch		# bug 1157850, not fixed as of today
145
		epatch "${FILESDIR}"/musl/thunderbird-44.0b1-remove-libevent-sysctl.patch
146
	fi
147
148
	# Ensure that are plugins dir is enabled as default
149
	sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
150
		"${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
151
	sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
152
		"${S}"/mozilla/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
153
154
	# Don't exit with error when some libs are missing which we have in
155
	# system.
156
	sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
157
		-i "${S}"/mail/installer/Makefile.in || die
158
159
	# Don't error out when there's no files to be removed:
160
	sed 's@\(xargs rm\)$@\1 -f@' \
161
		-i "${S}"/mozilla/toolkit/mozapps/installer/packager.mk || die
162
163
	# Shell scripts sometimes contain DOS line endings; bug 391889
164
	grep -rlZ --include="*.sh" $'\r$' . |
165
	while read -r -d $'\0' file ; do
166
		einfo edos2unix "${file}"
167
		edos2unix "${file}"
168
	done
169
170
	# Allow user to apply any additional patches without modifing ebuild
171
	epatch_user
172
173
	# Confirm the version of lightning being grabbed for langpacks is the same
174
	# as that used in thunderbird
175
	local THIS_MOZ_LIGHTNING_VER=$(python "${S}"/calendar/lightning/build/makeversion.py ${PV})
176
	if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then
177
		eqawarn "The version of lightning used for localization differs from the version"
178
		eqawarn "in thunderbird.  Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}"
179
		eqawarn "to ${THIS_MOZ_LIGHTNING_VER}"
180
	fi
181
182
	eautoreconf
183
	# Ensure we run eautoreconf in mozilla to regenerate configure
184
	cd "${S}"/mozilla || die
185
	eautoconf
186
	cd "${S}"/mozilla/js/src || die
187
	eautoconf
188
}
189
190
src_configure() {
191
	declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
192
	MEXTENSIONS="default"
193
194
	####################################
195
	#
196
	# mozconfig, CFLAGS and CXXFLAGS setup
197
	#
198
	####################################
199
200
	mozconfig_init
201
	mozconfig_config
202
203
	# It doesn't compile on alpha without this LDFLAGS
204
	use alpha && append-ldflags "-Wl,--no-relax"
205
206
	# Add full relro support for hardened
207
	use hardened && append-ldflags "-Wl,-z,relro,-z,now"
208
209
	mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
210
	mozconfig_annotate '' --disable-mailnews
211
	mozconfig_annotate '' --enable-calendar
212
213
	# Other tb-specific settings
214
	mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
215
	mozconfig_annotate '' --with-user-appdir=.thunderbird
216
217
	mozconfig_use_enable ldap
218
219
	mozlinguas_mozconfig
220
221
	# Bug #72667
222
	if use mozdom; then
223
		MEXTENSIONS="${MEXTENSIONS},inspector"
224
	fi
225
226
	# Use an objdir to keep things organized.
227
	echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
228
229
	# Finalize and report settings
230
	mozconfig_final
231
232
	####################################
233
	#
234
	#  Configure and build
235
	#
236
	####################################
237
238
	# Disable no-print-directory
239
	MAKEOPTS=${MAKEOPTS/--no-print-directory/}
240
241
	if [[ $(gcc-major-version) -lt 4 ]]; then
242
		append-cxxflags -fno-stack-protector
243
	fi
244
245
	if use crypt; then
246
		pushd "${WORKDIR}"/enigmail &>/dev/null ||die
247
		econf
248
		popd &>/dev/null ||die
249
	fi
250
}
251
252
src_compile() {
253
	mkdir -p "${BUILD_OBJ_DIR}" && cd "${BUILD_OBJ_DIR}" || die
254
255
	CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
256
	MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX%/}/bin/bash}" \
257
	emake -f "${S}"/client.mk
258
259
	# Only build enigmail extension if crypt enabled.
260
	if use crypt ; then
261
		einfo "Building enigmail"
262
		pushd "${WORKDIR}"/enigmail &>/dev/null || die
263
		emake -j1
264
		emake -j1 xpi
265
		popd &>/dev/null || die
266
	fi
267
}
268
269
src_install() {
270
	declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
271
	DICTPATH="\"${EPREFIX}/usr/share/myspell\""
272
273
	declare emid
274
	cd "${BUILD_OBJ_DIR}" || die
275
276
	# Copy our preference before omnijar is created.
277
	cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \
278
		"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
279
		|| die
280
281
	# Set default path to search for dictionaries.
282
	echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \
283
		>> "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
284
		|| die
285
286
	# Pax mark xpcshell for hardened support, only used for startupcache creation.
287
	pax-mark m "${BUILD_OBJ_DIR}"/mozilla/dist/bin/xpcshell
288
289
	MOZ_MAKE_FLAGS="${MAKEOPTS}" \
290
	emake DESTDIR="${D}" install
291
292
	# Install language packs
293
	mozlinguas_src_install
294
295
	if ! use bindist; then
296
		newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
297
		domenu "${FILESDIR}"/icon/${PN}.desktop
298
	else
299
		newicon "${S}"/mail/branding/aurora/content/icon48.png thunderbird-icon-unbranded.png
300
		newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
301
			${PN}.desktop
302
303
		sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
304
			"${ED}"/usr/share/applications/${PN}.desktop
305
	fi
306
307
	local emid
308
	# stage extra locales for lightning and install over existing
309
	mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/lightning \
310
		"${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER} lightning calendar
311
312
	emid='{e2fda1a4-762b-4020-b5ad-a41df1933103}'
313
	mkdir -p "${T}/${emid}" || die
314
	cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/lightning/* || die
315
	insinto ${MOZILLA_FIVE_HOME}/distribution/extensions
316
	doins -r "${T}/${emid}"
317
318
	if use lightning; then
319
		# move lightning out of distribution/extensions and into extensions for app-global install
320
		mv "${ED}"/${MOZILLA_FIVE_HOME}/{distribution,}/extensions/${emid} || die
321
322
		# stage extra locales for gdata-provider and install app-global
323
		mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider \
324
			"${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}
325
		emid='{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}'
326
		mkdir -p "${T}/${emid}" || die
327
		cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider/* || die
328
		insinto ${MOZILLA_FIVE_HOME}/extensions
329
		doins -r "${T}/${emid}"
330
	fi
331
332
	if use crypt ; then
333
		local enigmail_xpipath="${WORKDIR}/enigmail/build"
334
		cd "${T}" || die
335
		unzip "${enigmail_xpipath}"/enigmail*.xpi install.rdf || die
336
		emid=$(sed -n '/<em:id>/!d; s/.*\({.*}\).*/\1/; p; q' install.rdf)
337
338
		dodir ${MOZILLA_FIVE_HOME}/extensions/${emid} || die
339
		cd "${ED}"${MOZILLA_FIVE_HOME}/extensions/${emid} || die
340
		unzip "${enigmail_xpipath}"/enigmail*.xpi || die
341
	fi
342
343
	# Required in order for jit to work on hardened, for mozilla-31 and above
344
	use jit && pax-mark pm "${ED}"${MOZILLA_FIVE_HOME}/{thunderbird,thunderbird-bin}
345
346
	# Plugin-container needs to be pax-marked for hardened to ensure plugins such as flash
347
	# continue to work as expected.
348
	pax-mark m "${ED}"${MOZILLA_FIVE_HOME}/plugin-container
349
350
	if use minimal; then
351
		rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \
352
			die "Failed to remove sdk and headers"
353
	fi
354
355
	# workaround to make thunderbird find libmozalloc.so on musl
356
	into /
357
	echo "LDPATH=${MOZILLA_FIVE_HOME}" > "${T}"/20thunderbird
358
	doenvd "${T}"/20thunderbird || die
359
360
}
361
362
pkg_postinst() {
363
	if use crypt; then
364
		local peimpl=$(eselect --brief --colour=no pinentry show)
365
		case "${peimpl}" in
366
		*gtk*|*qt*) ;;
367
		*)	ewarn "The pinentry front-end currently selected is not one supported by thunderbird."
368
			ewarn "You may be prompted for your password in an inaccessible shell!!"
369
			ewarn "Please use 'eselect pinentry' to select either the gtk or qt front-end"
370
			;;
371
		esac
372
	fi
373
	elog
374
	elog "If you experience problems with plugins please issue the"
375
	elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ,"
376
	elog "then restart thunderbird"
377
	if ! use lightning; then
378
		elog
379
		elog "If calendar fails to show up in extensions please open config editor"
380
		elog "and set extensions.lastAppVersion to 38.0.0 to force a reload. If this"
381
		elog "fails to show the calendar extension after restarting with above change"
382
		elog "please file a bug report."
383
	fi
384
}

Return to bug 572808