Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-client/thunderbird/files/, mail-client/thunderbird/
Date: Mon, 03 Dec 2018 20:13:31
Message-Id: 1543867998.9159b311064b20d1b0b3f8aa5723b9a8d7506cd8.axs@gentoo
1 commit: 9159b311064b20d1b0b3f8aa5723b9a8d7506cd8
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 3 20:12:33 2018 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 3 20:13:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9159b311
7
8 mail-client/thunderbird: drop 60.3.2
9
10 Cleaned up the sqlite3 patch for upstream and removed old patch and
11 v60.3.2 ebuild in favour of -r1
12
13 Signed-off-by: Ian Stakenvicius <axs <AT> gentoo.org>
14 Package-Manager: Portage-2.3.49, Repoman-2.3.11
15
16 .../thunderbird/files/sqlite3-fts3-tokenizer.patch | 87 ----
17 .../thunderbird-60-sqlite3-fts3-tokenizer.patch | 53 +-
18 mail-client/thunderbird/thunderbird-60.3.2.ebuild | 562 ---------------------
19 3 files changed, 33 insertions(+), 669 deletions(-)
20
21 diff --git a/mail-client/thunderbird/files/sqlite3-fts3-tokenizer.patch b/mail-client/thunderbird/files/sqlite3-fts3-tokenizer.patch
22 deleted file mode 100644
23 index 4e45b139268..00000000000
24 --- a/mail-client/thunderbird/files/sqlite3-fts3-tokenizer.patch
25 +++ /dev/null
26 @@ -1,87 +0,0 @@
27 -# HG changeset patch
28 -# User Arfrever Frehtes Taifersar Arahesis <Arfrever@××××××.Org>
29 -# Date 1543532530 0
30 -# Thu Nov 29 23:02:10 2018 +0000
31 -# Node ID 1c480085935783bd1d240860bb44f410e2d36322
32 -# Parent 6453222232be364fb8ce3fd29b6cbcd480e5f2e3
33 -Bug 1270882 - Enable support for SQLite custom FTS3 tokenizers at run time.
34 -
35 -Do not require that SQLite has been built with support for custom FTS3
36 -tokenizers enabled by default. This allows to use system SQLite in
37 -distributions which provide SQLite configured in this way (which is SQLite
38 -upstream's default configuration due to security concerns).
39 -
40 -Disable no longer needed setting of SQLITE_ENABLE_FTS3_TOKENIZER macro in
41 -bundled SQLite build.
42 -
43 ---- a/db/sqlite3/src/moz.build Thu Nov 29 19:08:28 2018 +0000
44 -+++ b/db/sqlite3/src/moz.build Thu Nov 29 23:02:10 2018 +0000
45 -@@ -58,10 +58,6 @@
46 - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
47 - DEFINES['SQLITE_ENABLE_LOCKING_STYLE'] = 0
48 -
49 --# Thunderbird needs the 2-argument version of fts3_tokenizer()
50 --if CONFIG['MOZ_THUNDERBIRD'] or CONFIG['MOZ_SUITE']:
51 -- DEFINES['SQLITE_ENABLE_FTS3_TOKENIZER'] = 1
52 --
53 - # Turn on SQLite's assertions in debug builds.
54 - if CONFIG['MOZ_DEBUG']:
55 - DEFINES['SQLITE_DEBUG'] = 1
56 ---- a/storage/mozStorageConnection.cpp Thu Nov 29 19:08:28 2018 +0000
57 -+++ b/storage/mozStorageConnection.cpp Thu Nov 29 23:02:10 2018 +0000
58 -@@ -679,6 +679,10 @@
59 - return convertResultCode(srv);
60 - }
61 -
62 -+#ifdef INIT_SQLITE_FTS3_TOKENIZER
63 -+ ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
64 -+#endif
65 -+
66 - // Do not set mDatabaseFile or mFileURL here since this is a "memory"
67 - // database.
68 -
69 -@@ -715,6 +719,10 @@
70 - return convertResultCode(srv);
71 - }
72 -
73 -+#ifdef INIT_SQLITE_FTS3_TOKENIZER
74 -+ ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
75 -+#endif
76 -+
77 - // Do not set mFileURL here since this is database does not have an associated
78 - // URL.
79 - mDatabaseFile = aDatabaseFile;
80 -@@ -746,6 +754,10 @@
81 - return convertResultCode(srv);
82 - }
83 -
84 -+#ifdef INIT_SQLITE_FTS3_TOKENIZER
85 -+ ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
86 -+#endif
87 -+
88 - // Set both mDatabaseFile and mFileURL here.
89 - mFileURL = aFileURL;
90 - mDatabaseFile = databaseFile;
91 ---- a/storage/moz.build 2018-11-14 10:14:14.000000000 -0500
92 -+++ b/storage/moz.build 2018-11-29 17:05:42.106058951 -0500
93 -@@ -101,16 +101,20 @@
94 - #
95 - # Note: On Windows our sqlite build assumes we use jemalloc. If you disable
96 - # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
97 - # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
98 - if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
99 - if CONFIG['OS_TARGET'] != 'Android':
100 - DEFINES['MOZ_STORAGE_MEMORY'] = True
101 -
102 -+# Thunderbird needs the 2-argument version of fts3_tokenizer()
103 -+if CONFIG['MOZ_THUNDERBIRD'] or CONFIG['MOZ_SUITE']:
104 -+ DEFINES['INIT_SQLITE_FTS3_TOKENIZER'] = 1
105 -+
106 - # This is the default value. If we ever change it when compiling sqlite, we
107 - # will need to change it here as well.
108 - DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
109 -
110 - # See Sqlite moz.build for reasoning about TEMP_STORE.
111 - # For system sqlite we cannot use the compile time option, so we use a pragma.
112 - if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android'
113 - or CONFIG['HAVE_64BIT_BUILD']):
114
115 diff --git a/mail-client/thunderbird/files/thunderbird-60-sqlite3-fts3-tokenizer.patch b/mail-client/thunderbird/files/thunderbird-60-sqlite3-fts3-tokenizer.patch
116 index 2909c6cf476..48ebbf154a3 100644
117 --- a/mail-client/thunderbird/files/thunderbird-60-sqlite3-fts3-tokenizer.patch
118 +++ b/mail-client/thunderbird/files/thunderbird-60-sqlite3-fts3-tokenizer.patch
119 @@ -11,10 +11,11 @@ tokenizers enabled by default. This allows to use system SQLite in
120 distributions which provide SQLite configured in this way (which is SQLite
121 upstream's default configuration due to security concerns).
122
123 +Requires exposing the sqlite3_db_config symbol in bundled SQLite.
124 +
125 Disable no longer needed setting of SQLITE_ENABLE_FTS3_TOKENIZER macro in
126 bundled SQLite build.
127
128 -diff -r 6453222232be -r 1c4800859357 db/sqlite3/src/moz.build
129 --- a/db/sqlite3/src/moz.build Thu Nov 29 19:08:28 2018 +0000
130 +++ b/db/sqlite3/src/moz.build Thu Nov 29 23:02:10 2018 +0000
131 @@ -58,10 +58,6 @@
132 @@ -28,9 +29,8 @@ diff -r 6453222232be -r 1c4800859357 db/sqlite3/src/moz.build
133 # Turn on SQLite's assertions in debug builds.
134 if CONFIG['MOZ_DEBUG']:
135 DEFINES['SQLITE_DEBUG'] = 1
136 -diff -r 6453222232be -r 1c4800859357 db/sqlite3/src/sqlite.symbols
137 ---- a/db/sqlite3/src/sqlite.symbols Thu Nov 29 19:08:28 2018 +0000
138 -+++ b/db/sqlite3/src/sqlite.symbols Thu Nov 29 23:02:10 2018 +0000
139 +--- a/db/sqlite3/src/sqlite.symbols Thu Nov 29 19:08:28 2018 +0000
140 ++++ b/db/sqlite3/src/sqlite.symbols Thu Nov 29 23:02:10 2018 +0000
141 @@ -45,6 +45,7 @@
142 sqlite3_create_function16
143 sqlite3_create_module
144 @@ -39,48 +39,61 @@ diff -r 6453222232be -r 1c4800859357 db/sqlite3/src/sqlite.symbols
145 sqlite3_db_filename
146 sqlite3_db_handle
147 sqlite3_db_mutex
148 -diff -r 6453222232be -r 1c4800859357 storage/mozStorageConnection.cpp
149 --- a/storage/mozStorageConnection.cpp Thu Nov 29 19:08:28 2018 +0000
150 +++ b/storage/mozStorageConnection.cpp Thu Nov 29 23:02:10 2018 +0000
151 -@@ -679,6 +679,13 @@
152 +@@ -679,6 +679,10 @@
153 return convertResultCode(srv);
154 }
155
156 -+#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
157 -+ // Thunderbird needs support for custom FTS3 tokenizers
158 -+ // (used by the 2-argument version of fts3_tokenizer() function).
159 -+ // https://sqlite.org/fts3.html#custom_application_defined_tokenizers
160 ++#ifdef INIT_SQLITE_FTS3_TOKENIZER
161 + ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
162 +#endif
163 +
164 // Do not set mDatabaseFile or mFileURL here since this is a "memory"
165 // database.
166
167 -@@ -715,6 +722,13 @@
168 +@@ -715,6 +719,10 @@
169 return convertResultCode(srv);
170 }
171
172 -+#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
173 -+ // Thunderbird needs support for custom FTS3 tokenizers
174 -+ // (used by the 2-argument version of fts3_tokenizer() function).
175 -+ // https://sqlite.org/fts3.html#custom_application_defined_tokenizers
176 ++#ifdef INIT_SQLITE_FTS3_TOKENIZER
177 + ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
178 +#endif
179 +
180 // Do not set mFileURL here since this is database does not have an associated
181 // URL.
182 mDatabaseFile = aDatabaseFile;
183 -@@ -746,6 +760,13 @@
184 +@@ -746,6 +754,10 @@
185 return convertResultCode(srv);
186 }
187
188 -+#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
189 -+ // Thunderbird needs support for custom FTS3 tokenizers
190 -+ // (used by the 2-argument version of fts3_tokenizer() function).
191 -+ // https://sqlite.org/fts3.html#custom_application_defined_tokenizers
192 ++#ifdef INIT_SQLITE_FTS3_TOKENIZER
193 + ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
194 +#endif
195 +
196 // Set both mDatabaseFile and mFileURL here.
197 mFileURL = aFileURL;
198 mDatabaseFile = databaseFile;
199 +--- a/storage/moz.build 2018-11-14 10:14:14.000000000 -0500
200 ++++ b/storage/moz.build 2018-11-29 17:05:42.106058951 -0500
201 +@@ -101,16 +101,20 @@
202 + #
203 + # Note: On Windows our sqlite build assumes we use jemalloc. If you disable
204 + # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
205 + # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
206 + if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
207 + if CONFIG['OS_TARGET'] != 'Android':
208 + DEFINES['MOZ_STORAGE_MEMORY'] = True
209 +
210 ++# Thunderbird needs the 2-argument version of fts3_tokenizer()
211 ++if CONFIG['MOZ_THUNDERBIRD'] or CONFIG['MOZ_SUITE']:
212 ++ DEFINES['INIT_SQLITE_FTS3_TOKENIZER'] = 1
213 ++
214 + # This is the default value. If we ever change it when compiling sqlite, we
215 + # will need to change it here as well.
216 + DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
217 +
218 + # See Sqlite moz.build for reasoning about TEMP_STORE.
219 + # For system sqlite we cannot use the compile time option, so we use a pragma.
220 + if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android'
221 + or CONFIG['HAVE_64BIT_BUILD']):
222
223 diff --git a/mail-client/thunderbird/thunderbird-60.3.2.ebuild b/mail-client/thunderbird/thunderbird-60.3.2.ebuild
224 deleted file mode 100644
225 index 315316cc54c..00000000000
226 --- a/mail-client/thunderbird/thunderbird-60.3.2.ebuild
227 +++ /dev/null
228 @@ -1,562 +0,0 @@
229 -# Copyright 1999-2018 Gentoo Authors
230 -# Distributed under the terms of the GNU General Public License v2
231 -
232 -EAPI=6
233 -VIRTUALX_REQUIRED="pgo"
234 -WANT_AUTOCONF="2.1"
235 -MOZ_ESR=""
236 -MOZ_LIGHTNING_VER="6.2.2.1"
237 -MOZ_LIGHTNING_GDATA_VER="4.4.1"
238 -
239 -PYTHON_COMPAT=( python3_{5,6,7} )
240 -PYTHON_REQ_USE='ncurses,sqlite,ssl,threads(+)'
241 -
242 -# This list can be updated using scripts/get_langs.sh from the mozilla overlay
243 -MOZ_LANGS=(ar ast be bg br ca cs cy da de el en en-GB en-US es-AR
244 -es-ES et eu fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM id is it ja ko lt
245 -nb-NO nl nn-NO pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE tr
246 -uk vi zh-CN zh-TW )
247 -
248 -# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
249 -MOZ_PV="${PV/_beta/b}"
250 -
251 -# Patches
252 -PATCHTB="thunderbird-60.0-patches-0"
253 -PATCHFF="firefox-60.0-patches-04"
254 -
255 -MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases"
256 -
257 -# ESR releases have slightly version numbers
258 -if [[ ${MOZ_ESR} == 1 ]]; then
259 - MOZ_PV="${MOZ_PV}esr"
260 -fi
261 -MOZ_P="${PN}-${MOZ_PV}"
262 -
263 -inherit check-reqs flag-o-matic toolchain-funcs gnome2-utils llvm mozcoreconf-v6 pax-utils xdg-utils autotools mozlinguas-v2
264 -
265 -DESCRIPTION="Thunderbird Mail Client"
266 -HOMEPAGE="https://www.mozilla.org/thunderbird"
267 -
268 -KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
269 -SLOT="0"
270 -LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
271 -IUSE="bindist clang dbus debug hardened jack lightning neon pulseaudio
272 - selinux startup-notification system-harfbuzz system-icu system-jpeg
273 - system-libevent system-libvpx system-sqlite wifi"
274 -RESTRICT="!bindist? ( bindist )"
275 -
276 -PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c,whissi}/mozilla/patchsets/{${PATCHTB},${PATCHFF}}.tar.xz )
277 -SRC_URI="${SRC_URI}
278 - ${MOZ_HTTP_URI}/${MOZ_PV}/source/${MOZ_P}.source.tar.xz
279 - https://dev.gentoo.org/~axs/distfiles/lightning-${MOZ_LIGHTNING_VER}.tar.xz
280 - lightning? ( https://dev.gentoo.org/~axs/distfiles/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.tar.xz )
281 - ${PATCH_URIS[@]}"
282 -
283 -ASM_DEPEND=">=dev-lang/yasm-1.1"
284 -
285 -CDEPEND="
286 - >=dev-libs/nss-3.36.4
287 - >=dev-libs/nspr-4.19
288 - >=app-text/hunspell-1.5.4:=
289 - dev-libs/atk
290 - dev-libs/expat
291 - >=x11-libs/cairo-1.10[X]
292 - >=x11-libs/gtk+-2.18:2
293 - >=x11-libs/gtk+-3.4.0:3
294 - x11-libs/gdk-pixbuf
295 - >=x11-libs/pango-1.22.0
296 - >=media-libs/libpng-1.6.34:0=[apng]
297 - >=media-libs/mesa-10.2:*
298 - media-libs/fontconfig
299 - >=media-libs/freetype-2.4.10
300 - kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) )
301 - virtual/freedesktop-icon-theme
302 - dbus? (
303 - >=sys-apps/dbus-0.60
304 - >=dev-libs/dbus-glib-0.72
305 - )
306 - startup-notification? ( >=x11-libs/startup-notification-0.8 )
307 - >=x11-libs/pixman-0.19.2
308 - >=dev-libs/glib-2.26:2
309 - >=sys-libs/zlib-1.2.3
310 - >=virtual/libffi-3.0.10:=
311 - virtual/ffmpeg
312 - x11-libs/libX11
313 - x11-libs/libXcomposite
314 - x11-libs/libXdamage
315 - x11-libs/libXext
316 - x11-libs/libXfixes
317 - x11-libs/libXrender
318 - x11-libs/libXt
319 - system-harfbuzz? (
320 - >=media-libs/harfbuzz-1.4.2:0=
321 - >=media-gfx/graphite2-1.3.9-r1
322 - )
323 - system-icu? ( >=dev-libs/icu-59.1:= )
324 - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1:= )
325 - system-libevent? ( >=dev-libs/libevent-2.0:0= )
326 - system-libvpx? ( >=media-libs/libvpx-1.5.0:0=[postproc] )
327 - system-sqlite? ( >=dev-db/sqlite-3.23.1:3[secure-delete,debug=] )
328 - wifi? (
329 - kernel_linux? (
330 - >=sys-apps/dbus-0.60
331 - >=dev-libs/dbus-glib-0.72
332 - net-misc/networkmanager
333 - )
334 - )
335 - jack? ( virtual/jack )"
336 -
337 -DEPEND="${CDEPEND}
338 - app-arch/zip
339 - app-arch/unzip
340 - >=sys-devel/binutils-2.30
341 - sys-apps/findutils
342 - >=sys-devel/llvm-4.0.1
343 - >=sys-devel/clang-4.0.1
344 - clang? (
345 - >=sys-devel/llvm-4.0.1[gold]
346 - >=sys-devel/lld-4.0.1
347 - )
348 - pulseaudio? ( media-sound/pulseaudio )
349 - elibc_glibc? (
350 - virtual/cargo
351 - virtual/rust
352 - )
353 - elibc_musl? (
354 - virtual/cargo
355 - virtual/rust
356 - )
357 - amd64? (
358 - ${ASM_DEPEND}
359 - virtual/opengl
360 - )
361 - x86? (
362 - ${ASM_DEPEND}
363 - virtual/opengl
364 - )"
365 -
366 -RDEPEND="${CDEPEND}
367 - pulseaudio? (
368 - || (
369 - media-sound/pulseaudio
370 - >=media-sound/apulse-0.1.9
371 - )
372 - )
373 - selinux? (
374 - sec-policy/selinux-mozilla
375 - sec-policy/selinux-thunderbird
376 - )"
377 -
378 -REQUIRED_USE="wifi? ( dbus )"
379 -
380 -S="${WORKDIR}/${MOZ_P%b[0-9]*}"
381 -
382 -BUILD_OBJ_DIR="${S}/tbird"
383 -
384 -pkg_setup() {
385 - moz_pkgsetup
386 -
387 - # Avoid PGO profiling problems due to enviroment leakage
388 - # These should *always* be cleaned up anyway
389 - unset DBUS_SESSION_BUS_ADDRESS \
390 - DISPLAY \
391 - ORBIT_SOCKETDIR \
392 - SESSION_MANAGER \
393 - XDG_SESSION_COOKIE \
394 - XAUTHORITY
395 -
396 - if ! use bindist ; then
397 - elog "You are enabling official branding. You may not redistribute this build"
398 - elog "to any users on your network or the internet. Doing so puts yourself into"
399 - elog "a legal problem with Mozilla Foundation"
400 - elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
401 - elog
402 - fi
403 -
404 - addpredict /proc/self/oom_score_adj
405 -
406 - llvm_pkg_setup
407 -}
408 -
409 -pkg_pretend() {
410 - # Ensure we have enough disk space to compile
411 - CHECKREQS_DISK_BUILD="4G"
412 - check-reqs_pkg_setup
413 -}
414 -
415 -src_unpack() {
416 - unpack ${A}
417 -
418 - # Unpack language packs
419 - mozlinguas_src_unpack
420 -}
421 -
422 -src_prepare() {
423 - # Apply our patchset from firefox to thunderbird as well
424 - rm -f "${WORKDIR}"/firefox/2007_fix_nvidia_latest.patch \
425 - "${WORKDIR}"/firefox/2005_ffmpeg4.patch \
426 - "${WORKDIR}"/firefox/2012_update-cc-to-honor-CC.patch \
427 - || die
428 - eapply "${WORKDIR}/firefox"
429 -
430 - eapply "${FILESDIR}"/sqlite3-fts3-tokenizer.patch
431 -
432 - # Ensure that are plugins dir is enabled as default
433 - sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
434 - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!"
435 - sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
436 - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!"
437 -
438 - # Don't error out when there's no files to be removed:
439 - sed 's@\(xargs rm\)$@\1 -f@' \
440 - -i "${S}"/toolkit/mozapps/installer/packager.mk || die
441 -
442 - # Don't exit with error when some libs are missing which we have in
443 - # system.
444 - sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \
445 - -i "${S}"/comm/mail/installer/Makefile.in || die
446 -
447 - # Apply our Thunderbird patchset
448 - pushd "${S}"/comm &>/dev/null || die
449 - eapply "${WORKDIR}"/thunderbird
450 -
451 - # NOT TRIGGERED starting with 60.3, as script just maps ${PV} without any actual
452 - # check on lightning version or changes:
453 - #
454 - # Confirm the version of lightning being grabbed for langpacks is the same
455 - # as that used in thunderbird
456 - #local THIS_MOZ_LIGHTNING_VER=$(${PYTHON} calendar/lightning/build/makeversion.py ${PV})
457 - #if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then
458 - # eqawarn "The version of lightning used for localization differs from the version"
459 - # eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}"
460 - # eqawarn "to ${THIS_MOZ_LIGHTNING_VER}"
461 - #fi
462 -
463 - popd &>/dev/null || die
464 -
465 - # Allow user to apply any additional patches without modifing ebuild
466 - eapply_user
467 -
468 - # Autotools configure is now called old-configure.in
469 - # This works because there is still a configure.in that happens to be for the
470 - # shell wrapper configure script
471 - eautoreconf old-configure.in
472 -
473 - # Must run autoconf in js/src
474 - cd "${S}"/js/src || die
475 - eautoconf old-configure.in
476 -}
477 -
478 -src_configure() {
479 - # Add information about TERM to output (build.log) to aid debugging
480 - # blessings problems
481 - if [[ -n "${TERM}" ]] ; then
482 - einfo "TERM is set to: \"${TERM}\""
483 - else
484 - einfo "TERM is unset."
485 - fi
486 -
487 - if use clang && ! tc-is-clang ; then
488 - # Force clang
489 - einfo "Enforcing the use of clang due to USE=clang ..."
490 - CC=${CHOST}-clang
491 - CXX=${CHOST}-clang++
492 - strip-unsupported-flags
493 - elif ! use clang && ! tc-is-gcc ; then
494 - # Force gcc
495 - einfo "Enforcing the use of gcc due to USE=-clang ..."
496 - CC=${CHOST}-gcc
497 - CXX=${CHOST}-g++
498 - strip-unsupported-flags
499 - fi
500 -
501 - ####################################
502 - #
503 - # mozconfig, CFLAGS and CXXFLAGS setup
504 - #
505 - ####################################
506 -
507 - mozconfig_init
508 - # common config components
509 - mozconfig_annotate 'system_libs' \
510 - --with-system-zlib \
511 - --with-system-bz2
512 -
513 - # Must pass release in order to properly select linker
514 - mozconfig_annotate 'Enable by Gentoo' --enable-release
515 -
516 - # Avoid auto-magic on linker
517 - if use clang ; then
518 - # This is upstream's default
519 - mozconfig_annotate "forcing ld=lld due to USE=clang" --enable-linker=lld
520 - elif tc-ld-is-gold ; then
521 - mozconfig_annotate "linker is set to gold" --enable-linker=gold
522 - else
523 - mozconfig_annotate "linker is set to bfd" --enable-linker=bfd
524 - fi
525 -
526 - # It doesn't compile on alpha without this LDFLAGS
527 - use alpha && append-ldflags "-Wl,--no-relax"
528 -
529 - # Add full relro support for hardened
530 - if use hardened; then
531 - append-ldflags "-Wl,-z,relro,-z,now"
532 - mozconfig_use_enable hardened hardening
533 - fi
534 -
535 - # Modifications to better support ARM, bug 553364
536 - if use neon ; then
537 - mozconfig_annotate '' --with-fpu=neon
538 -
539 - if ! tc-is-clang ; then
540 - # thumb options aren't supported when using clang, bug 666966
541 - mozconfig_annotate '' --with-thumb=yes
542 - mozconfig_annotate '' --with-thumb-interwork=no
543 - fi
544 - fi
545 - if [[ ${CHOST} == armv*h* ]] ; then
546 - mozconfig_annotate '' --with-float-abi=hard
547 - if ! use system-libvpx ; then
548 - sed -i -e "s|softfp|hard|" \
549 - "${S}"/media/libvpx/moz.build
550 - fi
551 - fi
552 -
553 - mozconfig_use_enable !bindist official-branding
554 - # Enable position independent executables
555 - mozconfig_annotate 'enabled by Gentoo' --enable-pie
556 -
557 - mozconfig_use_enable debug
558 - mozconfig_use_enable debug tests
559 - if ! use debug ; then
560 - mozconfig_annotate 'disabled by Gentoo' --disable-debug-symbols
561 - else
562 - mozconfig_annotate 'enabled by Gentoo' --enable-debug-symbols
563 - fi
564 - # These are enabled by default in all mozilla applications
565 - mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${SYSROOT}${EPREFIX}"/usr
566 - mozconfig_annotate '' --with-system-nss --with-nss-prefix="${SYSROOT}${EPREFIX}"/usr
567 - mozconfig_annotate '' --x-includes="${SYSROOT}${EPREFIX}"/usr/include \
568 - --x-libraries="${SYSROOT}${EPREFIX}"/usr/$(get_libdir)
569 - mozconfig_annotate '' --prefix="${EPREFIX}"/usr
570 - mozconfig_annotate '' --libdir="${EPREFIX}"/usr/$(get_libdir)
571 - mozconfig_annotate 'Gentoo default' --enable-system-hunspell
572 - mozconfig_annotate '' --disable-crashreporter
573 - mozconfig_annotate 'Gentoo default' --with-system-png
574 - mozconfig_annotate '' --enable-system-ffi
575 - mozconfig_annotate '' --disable-gconf
576 - mozconfig_annotate '' --with-intl-api
577 - mozconfig_annotate '' --enable-system-pixman
578 - # Instead of the standard --build= and --host=, mozilla uses --host instead
579 - # of --build, and --target intstead of --host.
580 - # Note, mozilla also has --build but it does not do what you think it does.
581 - # Set both --target and --host as mozilla uses python to guess values otherwise
582 - mozconfig_annotate '' --target="${CHOST}"
583 - mozconfig_annotate '' --host="${CBUILD:-${CHOST}}"
584 - if use system-libevent; then
585 - mozconfig_annotate '' --with-system-libevent="${SYSROOT}${EPREFIX}"/usr
586 - fi
587 -
588 - # skia has no support for big-endian platforms
589 - if [[ $(tc-endian) == "big" ]]; then
590 - mozconfig_annotate 'big endian target' --disable-skia
591 - else
592 - mozconfig_annotate '' --enable-skia
593 - fi
594 -
595 - # use the gtk3 toolkit (the only one supported at this point)
596 - mozconfig_annotate '' --enable-default-toolkit=cairo-gtk3
597 -
598 - mozconfig_use_enable startup-notification
599 - mozconfig_use_enable system-sqlite
600 - mozconfig_use_with system-jpeg
601 - mozconfig_use_with system-icu
602 - mozconfig_use_with system-libvpx
603 - mozconfig_use_with system-harfbuzz
604 - mozconfig_use_with system-harfbuzz system-graphite2
605 - mozconfig_use_enable pulseaudio
606 - # force the deprecated alsa sound code if pulseaudio is disabled
607 - if use kernel_linux && ! use pulseaudio ; then
608 - mozconfig_annotate '-pulseaudio' --enable-alsa
609 - fi
610 -
611 - mozconfig_use_enable dbus
612 -
613 - mozconfig_use_enable wifi necko-wifi
614 -
615 - # enable JACK, bug 600002
616 - mozconfig_use_enable jack
617 -
618 - # Other tb-specific settings
619 - mozconfig_annotate '' --with-user-appdir=.thunderbird
620 - mozconfig_annotate '' --enable-ldap
621 - mozconfig_annotate '' --enable-calendar
622 -
623 - # Disable built-in ccache support to avoid sandbox violation, #665420
624 - # Use FEATURES=ccache instead!
625 - mozconfig_annotate '' --without-ccache
626 - sed -i -e 's/ccache_stats = None/return None/' \
627 - python/mozbuild/mozbuild/controller/building.py || \
628 - die "Failed to disable ccache stats call"
629 -
630 - # Stylo is only broken on x86 builds
631 - use x86 && mozconfig_annotate 'Upstream bug 1341234' --disable-stylo
632 -
633 - # Stylo is horribly broken on arm, renders GUI unusable
634 - use arm && mozconfig_annotate 'breaks UI on arm' --disable-stylo
635 -
636 - if use clang ; then
637 - # libprldap60.so: terminate called after throwing an instance of 'std::runtime_error', bug 667186
638 - mozconfig_annotate 'elf-hack is broken when using clang' --disable-elf-hack
639 - elif use arm ; then
640 - mozconfig_annotate 'elf-hack is broken on arm' --disable-elf-hack
641 - fi
642 -
643 - # Use an objdir to keep things organized.
644 - echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
645 - echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
646 -
647 - mozlinguas_mozconfig
648 -
649 - # Finalize and report settings
650 - mozconfig_final
651 -
652 - ####################################
653 - #
654 - # Configure and build
655 - #
656 - ####################################
657 -
658 - # Disable no-print-directory
659 - MAKEOPTS=${MAKEOPTS/--no-print-directory/}
660 -
661 - if [[ $(gcc-major-version) -lt 4 ]]; then
662 - append-cxxflags -fno-stack-protector
663 - fi
664 -
665 - # workaround for funky/broken upstream configure...
666 - SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
667 - ./mach configure || die
668 -}
669 -
670 -src_compile() {
671 - MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
672 - ./mach build --verbose || die
673 -}
674 -
675 -src_install() {
676 - declare emid
677 - cd "${BUILD_OBJ_DIR}" || die
678 -
679 - # Pax mark xpcshell for hardened support, only used for startupcache creation.
680 - pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell
681 -
682 - # Copy our preference before omnijar is created.
683 - cp "${FILESDIR}"/thunderbird-gentoo-default-prefs.js-2 \
684 - "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \
685 - || die
686 -
687 - # set dictionary path, to use system hunspell
688 - echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \
689 - >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
690 -
691 - # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it
692 - if use system-harfbuzz ; then
693 - echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \
694 - >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
695 - fi
696 -
697 - # force cairo as the canvas renderer on platforms without skia support
698 - if [[ $(tc-endian) == "big" ]] ; then
699 - echo "sticky_pref(\"gfx.canvas.azure.backends\",\"cairo\");" \
700 - >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
701 - echo "sticky_pref(\"gfx.content.azure.backends\",\"cairo\");" \
702 - >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
703 - fi
704 -
705 - # dev-db/sqlite does not have FTS3_TOKENIZER support.
706 - # gloda needs it to function, and bad crashes happen when its enabled and doesn't work
707 - #if use system-sqlite ; then
708 - # echo "sticky_pref(\"mailnews.database.global.indexer.enabled\", false);" \
709 - # >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die
710 - #fi
711 -
712 - cd "${S}" || die
713 - MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \
714 - DESTDIR="${D}" ./mach install || die
715 -
716 - # Install language packs
717 - MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install
718 -
719 - local size sizes icon_path icon
720 - if ! use bindist; then
721 - icon_path="${S}/comm/mail/branding/thunderbird"
722 - icon="${PN}-icon"
723 -
724 - domenu "${FILESDIR}"/icon/${PN}.desktop
725 - else
726 - icon_path="${S}/comm/mail/branding/nightly"
727 - icon="${PN}-icon-unbranded"
728 -
729 - newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
730 - ${PN}.desktop
731 -
732 - sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \
733 - "${ED}"/usr/share/applications/${PN}.desktop
734 - fi
735 -
736 - # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs
737 - newicon "${icon_path}"/default48.png "${icon}".png
738 - # Install icons for menu entry
739 - sizes="16 22 24 32 48 256"
740 - for size in ${sizes}; do
741 - newicon -s ${size} "${icon_path}/default${size}.png" "${icon}.png"
742 - done
743 -
744 - local emid
745 - # stage extra locales for lightning and install over existing
746 - emid='{e2fda1a4-762b-4020-b5ad-a41df1933103}'
747 - rm -f "${ED}"/${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die
748 - mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid} \
749 - "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER} lightning calendar
750 -
751 - mkdir -p "${T}/${emid}" || die
752 - cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid}/* || die
753 - insinto ${MOZILLA_FIVE_HOME}/distribution/extensions
754 - doins -r "${T}/${emid}"
755 -
756 - if use lightning; then
757 - # move lightning out of distribution/extensions and into extensions for app-global install
758 - mv "${ED}"/${MOZILLA_FIVE_HOME}/{distribution,}/extensions/${emid} || die
759 -
760 - # stage extra locales for gdata-provider and install app-global
761 - mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider \
762 - "${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}
763 - emid='{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}'
764 - mkdir -p "${T}/${emid}" || die
765 - cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider/* || die
766 - insinto ${MOZILLA_FIVE_HOME}/extensions
767 - doins -r "${T}/${emid}"
768 - fi
769 -
770 - # thunderbird and thunderbird-bin are identical
771 - rm "${ED%/}"${MOZILLA_FIVE_HOME}/thunderbird-bin || die
772 - dosym thunderbird ${MOZILLA_FIVE_HOME}/thunderbird-bin
773 -
774 - # Required in order to use plugins and even run thunderbird on hardened.
775 - pax-mark pm "${ED%/}"${MOZILLA_FIVE_HOME}/{thunderbird,plugin-container}
776 -}
777 -
778 -pkg_preinst() {
779 - gnome2_icon_savelist
780 -}
781 -
782 -pkg_postinst() {
783 - gnome2_icon_cache_update
784 - xdg_desktop_database_update
785 -}
786 -
787 -pkg_postrm() {
788 - gnome2_icon_cache_update
789 - xdg_desktop_database_update
790 -}