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 |
} |