1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
5 KEYWORDS= mail net_im news
7 SDESC[standard]= Mozilla Thunderbird mail/newsgroup client
8 HOMEPAGE= https://www.thunderbird.net/
12 SITES[main]= MOZILLA/thunderbird/releases/102.5.1/source
13 DISTFILE[1]= thunderbird-102.5.1.source.tar.xz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
20 BUILD_DEPENDS= rust:single:standard
21 cbindgen:single:standard
22 autoconf213:single:standard
26 nodejs:primary:standard
27 libvpx:single:standard
28 evdev-proto:single:standard
29 python-sqlite3:single:python_used
30 BUILDRUN_DEPENDS= nss:primary:standard
32 libffi:single:standard
33 libproxy:single:standard
34 libevent:single:standard
35 libcanberra:primary:standard
36 libnotify:primary:standard
37 harfbuzz:primary:standard
41 ffmpeg:primary:standard
42 dbus-glib:primary:standard
43 startup-notification:single:standard
44 botan:primary:standard
45 BR_DEPS[linux]= sndio:single:standard
47 USES= cpe desktop-utils:single gmake jpeg png zlib
48 perl:build pkgconfig iconv bz2 python:build
49 gettext-runtime clang:keepcc
50 GNOME_COMPONENTS= gconf gtk2 gtk3 gdkpixbuf pango
51 XORG_COMPONENTS= x11 xcb xcomposite xdamage xext xfixes xrender xt
55 LICENSE_TERMS= single:{{WRKSRC}}/toolkit/content/license.html
56 LICENSE_FILE= MPL:stock
60 FPC_EQUIVALENT= mail/thunderbird
63 CONFIGURE_OUTSOURCE= yes
64 CONFIGURE_ENV= PYTHON3={{PYTHON_CMD}}
65 SETUPTOOLS_USE_DISTUTILS=stdlib
67 MAKE_ENV= PYTHON3={{PYTHON_CMD}}
70 QMAKE_ARGS= --prefix="{{PREFIX}}"
77 --with-system-libevent
78 --with-system-harfbuzz
79 --with-system-graphite2
84 --enable-system-pixman
85 --enable-install-strip
90 --enable-official-branding
91 --enable-application=comm/mail
92 --enable-update-channel=release
97 --disable-debug-symbols
106 --without-wasm-sandboxed-libraries
107 VAR_OPSYS[linux]= QMAKE_ARGS=--disable-elf-hack
108 QMAKE_ARGS=--enable-audio-backends=sndio
111 ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
112 ${WRKSRC}/comm/mail/app/nsMailApp.cpp \
113 ${WRKSRC}/browser/app/nsBrowserApp.cpp
114 (cd ${WRKSRC}/gfx/angle/checkout/src/compiler/translator && \
115 ${REINPLACE_CMD} -e 's|<math.h>|<cmath>|' \
116 InfoSink.h IntermNode.cpp)
118 ${REINPLACE_CMD} -e 's|MOZ_SCTP|MOZ_DISABLE_SCTP|' \
119 ${WRKSRC}/netwerk/moz.build
120 # alsa headers use 'u_int32_t' and other BerkeleyDB/nvi
121 # fixed types (_XOPEN_SOURCE)
122 ${REINPLACE_CMD} -e 's@_XOPEN_SOURCE@&___@g' \
123 ${WRKSRC}/media/libcubeb/src/cubeb_alsa.c
124 ${REINPLACE_CMD} -e 's@_POSIX_SOURCE@&___@g' \
125 ${WRKSRC}/media/libcubeb/src/cubeb_jack.cpp
126 # Set mozilla options
127 @${ECHO_CMD} "--=> Setting configuration <=--"
128 @for arg in ${QMAKE_ARGS}; do \
129 ${ECHO_CMD} ".mozconfig << $$arg" ;\
130 ${ECHO_CMD} ac_add_options $$arg >> ${WRKSRC}/.mozconfig ;\
132 @${ECHO_CMD} LDFLAGS=\"-Wl,-rpath,${PREFIX}/lib/thunderbird\" \
133 >> ${WRKSRC}/.mozconfig
134 # disable rust checksums
135 ${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \
136 ${WRKSRC}/third_party/rust/packed_simd_2/.cargo-checksum.json
139 ${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
140 ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
141 ${INSTALL_DATA} ${FILESDIR}/thunderbird.desktop \
142 ${STAGEDIR}${PREFIX}/share/applications
143 (cd ${STAGEDIR}${PREFIX}/share/pixmaps && ${LN} -sf \
144 ../../lib/thunderbird/chrome/icons/default/default48.png \
146 # regenerate symlink to avoid absolute paths
147 ${RM} ${STAGEDIR}${PREFIX}/bin/thunderbird
148 (cd ${STAGEDIR}${PREFIX}/bin && \
149 ${LN} -sf ../lib/thunderbird/thunderbird thunderbird)
152 (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
153 (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
155 [FILE:391:descriptions/desc.single]
156 Thunderbird is a free and open source email, newsfeed, chat, and
157 calendaring client, that's easy to set up and customize. One of the core
158 principles of Thunderbird is the use and promotion of open standards -
159 this focus is a rejection of our world of closed platforms and services
160 that can't communicate with each other. We want our users to have
161 freedom and choice in how they communicate.
165 d8de843fffcd10b23c348c5726bff7215c983220ab9e63a5eb7e25aa33901528 509550884 thunderbird-102.5.1.source.tar.xz
168 [FILE:850:manifests/plist.single]
169 %%ONLY-LINUX%%lib/thunderbird/
175 %%ONLY-LINUX%%lib/thunderbird/fonts/TwemojiMozilla.ttf
194 lib/thunderbird/chrome/icons/default/
203 lib/thunderbird/defaults/messenger/mailViews.dat
204 lib/thunderbird/defaults/pref/channel-prefs.js
211 share/applications/thunderbird.desktop
212 share/pixmaps/thunderbird.png
215 [FILE:5405:patches/patch-addon-search]
216 https://github.com/mozilla/addons/issues/708
217 https://github.com/mozilla/addons-frontend/issues/4610
219 --- comm/mail/app/profile/all-thunderbird.js.orig 2022-09-10 23:48:23.616215000 +0200
220 +++ comm/mail/app/profile/all-thunderbird.js 2022-09-11 00:01:06.140736000 +0200
221 @@ -167,10 +167,10 @@
222 pref("extensions.getAddons.compatOverides.url", "https://services.addons.thunderbird.net/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%");
223 pref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/");
224 pref("browser.dictionaries.download.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/language-tools/");
225 -pref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=thunderbird");
226 -pref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%&appver=%VERSION%&platform=%OS%");
227 -pref("extensions.getAddons.search.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=thunderbird");
228 -pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%");
229 +pref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/Linux/%VERSION%?src=thunderbird");
230 +pref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%&appver=%VERSION%&platform=Linux");
231 +pref("extensions.getAddons.search.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/Linux/%VERSION%/%COMPATIBILITY_MODE%?src=thunderbird");
232 +pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/Linux");
233 pref("extensions.getAddons.langpacks.url", "https://services.addons.thunderbird.net/api/v3/addons/language-tools/?app=thunderbird&type=language&appversion=%VERSION%");
234 pref("extensions.getAddons.discovery.api_url", "https://services.addons.thunderbird.net/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%");
239 pref("extensions.update.enabled", true);
240 -pref("extensions.update.url", "https://versioncheck.addons.thunderbird.net/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
241 +pref("extensions.update.url", "https://versioncheck.addons.thunderbird.net/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
243 -pref("extensions.update.background.url", "https://versioncheck-bg.addons.thunderbird.net/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
244 +pref("extensions.update.background.url", "https://versioncheck-bg.addons.thunderbird.net/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
246 pref("extensions.update.interval", 86400); // Check for updates to Extensions and
248 --- toolkit/mozapps/extensions/internal/AddonRepository.jsm.orig 2022-09-11 00:01:40.212952000 +0200
249 +++ toolkit/mozapps/extensions/internal/AddonRepository.jsm 2022-09-11 00:07:14.587890000 +0200
251 addon.version = String(aEntry.current_version.version);
252 if (Array.isArray(aEntry.current_version.files)) {
253 for (let file of aEntry.current_version.files) {
254 - if (file.platform == "all" || file.platform == PLATFORM) {
255 + if (file.platform == "all" || file.platform == "linux" || file.platform == PLATFORM) {
257 addon.sourceURI = NetUtil.newURI(file.url);
259 --- toolkit/mozapps/extensions/internal/XPIDatabase.jsm.orig 2022-09-11 00:08:09.244518000 +0200
260 +++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm 2022-09-11 00:09:56.387390000 +0200
262 // Something is causing errors in here
264 for (let platform of this.targetPlatforms) {
265 - if (platform.os == Services.appinfo.OS) {
266 + if (platform.os == "Linux" || platform.os == Services.appinfo.OS) {
269 if (platform.abi === abi) {
272 [FILE:445:patches/patch-browser-app-nsBrowserApp.cpp]
273 --- browser/app/nsBrowserApp.cpp.orig 2016-09-19 16:19:28 UTC
274 +++ browser/app/nsBrowserApp.cpp
275 @@ -324,6 +324,9 @@ int main(int argc, char* argv[], char* e
277 mozilla::TimeStamp start = mozilla::TimeStamp::Now();
279 + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
280 + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
282 #ifdef HAS_DLL_BLOCKLIST
283 DllBlocklist_Initialize();
287 [FILE:4140:patches/patch-bug1559213]
289 Author: Jory A. Pratt <anarchy@gentoo.org>
290 Date: Thu Jun 13 11:53:00 2019 -0700
292 Bug 1559213 - Allow to use system av1 libs instead of bundled.
294 config/external/moz.build | 5 +++--
295 config/system-headers.mozbuild | 8 ++++++++
296 dom/media/platforms/moz.build | 5 +++++
297 toolkit/moz.configure | 19 ++++++++++++++++++-
298 4 files changed, 34 insertions(+), 3 deletions(-)
300 diff --git config/external/moz.build config/external/moz.build
301 index ab77121..75595d9 100644
302 --- config/external/moz.build
303 +++ config/external/moz.build
304 @@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
305 external_dirs += ["media/libvpx"]
307 if CONFIG["MOZ_AV1"]:
308 - external_dirs += ["media/libaom"]
309 - external_dirs += ["media/libdav1d"]
310 + if not CONFIG["MOZ_SYSTEM_AV1"]:
311 + external_dirs += ["media/libaom"]
312 + external_dirs += ["media/libdav1d"]
314 if not CONFIG["MOZ_SYSTEM_PNG"]:
315 external_dirs += ["media/libpng"]
316 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
317 index a1b58eb..65729f9 100644
318 --- config/system-headers.mozbuild
319 +++ config/system-headers.mozbuild
320 @@ -1289,6 +1289,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
324 +if CONFIG['MOZ_SYSTEM_AV1']:
325 + system_headers += [
326 + 'aom/aom_decoder.h',
332 if CONFIG['MOZ_SYSTEM_LIBVPX']:
335 diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
336 index 8509aec..eb6f129 100644
337 --- dom/media/platforms/moz.build
338 +++ dom/media/platforms/moz.build
339 @@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]:
340 "agnostic/AOMDecoder.cpp",
341 "agnostic/DAV1DDecoder.cpp",
343 + if CONFIG['MOZ_SYSTEM_AV1']:
344 + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
345 + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
346 + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
347 + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
349 if CONFIG["MOZ_OMX"]:
351 diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
352 index 0069865..e806fc8 100644
353 --- media/ffvpx/libavcodec/moz.build
354 +++ media/ffvpx/libavcodec/moz.build
355 @@ -112,9 +112,15 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
359 + if CONFIG["MOZ_SYSTEM_AV1"]:
360 + CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
361 + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
365 + 'media_libdav1d_asm',
369 - 'media_libdav1d_asm',
373 diff --git toolkit/moz.configure toolkit/moz.configure
374 index 0069865..e806fc8 100644
375 --- toolkit/moz.configure
376 +++ toolkit/moz.configure
377 @@ -523,7 +523,23 @@ def av1(value):
381 -@depends(target, when=av1 & compile_environment)
382 +option("--with-system-av1",
383 + help="Use system av1 (located with pkgconfig)")
385 +system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
386 + when="--with-system-av1")
388 +system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1",
389 + when="--with-system-av1")
391 +@depends(system_libaom_info, system_libdav1d_info)
392 +def system_av1(system_libaom_info, system_libdav1d_info):
393 + has_av1_libs = False
394 + if system_libaom_info and system_libdav1d_info:
395 + has_av1_libs = True
396 + return has_av1_libs
398 +@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
399 def dav1d_asm(target):
400 if target.cpu in ("aarch64", "x86", "x86_64"):
402 @@ -539,6 +555,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
403 set_define("MOZ_DAV1D_ASM", dav1d_asm)
404 set_config("MOZ_AV1", av1)
405 set_define("MOZ_AV1", av1)
406 +set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
408 # JXL Image Codec Support
409 # ==============================================================
412 [FILE:2109:patches/patch-bug1659612]
413 media/libcubeb/src/cubeb_alsa.c:613:9: error: implicitly declaring library function 'snprintf' with type 'int (char *, unsigned int, const char *, ...)' [-Werror,-Wimplicit-function-declaration]
414 r = snprintf(node_name, sizeof(node_name), "pcm.%s", string);
416 media/libcubeb/src/cubeb_alsa.c:613:9: note: include the header <stdio.h> or explicitly provide a declaration for 'snprintf'
417 media/libcubeb/src/cubeb_alsa.c:1168:3: error: implicitly declaring library function 'alloca' with type 'void *(unsigned int)' [-Werror,-Wimplicit-function-declaration]
418 snd_pcm_hw_params_alloca(&hw_params);
420 /usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
421 #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
423 /usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
424 #define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
426 media/libcubeb/src/cubeb_alsa.c:1168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'alloca'
427 /usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
428 #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
430 /usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
431 #define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
435 --- media/libcubeb/src/cubeb_alsa.c.orig 2021-08-31 14:26:24.530548000 +0200
436 +++ media/libcubeb/src/cubeb_alsa.c 2021-08-31 14:26:43.081470000 +0200
438 * accompanying file LICENSE for details.
441 -#define _DEFAULT_SOURCE
443 -#define _XOPEN_SOURCE 500
444 +#define _GNU_SOURCE 1
445 #include "cubeb-internal.h"
446 #include "cubeb/cubeb.h"
447 #include <alsa/asoundlib.h>
450 [FILE:1328:patches/patch-bug1773070]
451 In file included from Unified_cpp_accessible_html0.cpp:29:
452 In file included from accessible/html/HTMLImageMapAccessible.cpp:14:
453 In file included from layout/generic/nsImageFrame.h:17:
454 In file included from ../.build/dist/include/nsDisplayList.h:50:
455 In file included from ../.build/dist/include/nsCSSRenderingBorders.h:20:
456 In file included from ../.build/dist/include/gfxUtils.h:22:
457 In file included from ../.build/dist/include/mozilla/webrender/WebRenderTypes.h:11:
458 In file included from ../.build/dist/include/mozilla/webrender/webrender_ffi.h:108:
459 ../.build/dist/include/mozilla/webrender/webrender_ffi_generated.h:gmake[4]: Leaving directory '../.build/accessible/aom'
460 24:33: error: redefinition of 'ROOT_CLIP_CHAIN'
461 constexpr static const uint64_t ROOT_CLIP_CHAIN = ~0;
463 ../.build/dist/include/mozilla/webrender/webrender_ffi.h:80:16: note: previous definition is here
464 const uint64_t ROOT_CLIP_CHAIN = ~0;
467 --- gfx/webrender_bindings/webrender_ffi.h.orig 2022-05-23 17:12:36 UTC
468 +++ gfx/webrender_bindings/webrender_ffi.h
469 @@ -77,8 +77,6 @@ using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpo
470 struct WrPipelineIdAndEpoch;
471 using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
473 -const uint64_t ROOT_CLIP_CHAIN = ~0;
476 } // namespace mozilla
480 [FILE:9644:patches/patch-bug847568]
481 # Allow building against system-wide graphite2/harfbuzz.
483 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
484 index a1b58eb..a0a0943 100644
485 --- config/system-headers.mozbuild
486 +++ config/system-headers.mozbuild
487 @@ -1289,6 +1289,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
491 +if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
492 + system_headers += [
493 + 'graphite2/Font.h',
494 + 'graphite2/Segment.h',
497 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
498 + system_headers += [
499 + 'harfbuzz/hb-glib.h',
500 + 'harfbuzz/hb-ot.h',
504 if CONFIG['MOZ_SYSTEM_LIBVPX']:
507 diff --git dom/base/moz.build dom/base/moz.build
508 index d390adf..4508f19 100644
509 --- dom/base/moz.build
510 +++ dom/base/moz.build
511 @@ -576,6 +576,9 @@ FINAL_LIBRARY = "xul"
512 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
513 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
515 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
516 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
520 script="gen-usecounters.py",
521 diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
523 index 0000000..24e8d7a
525 +++ gfx/graphite2/geckoextra/moz.build
527 +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
528 +# vim: set filetype=python:
529 +# This Source Code Form is subject to the terms of the Mozilla Public
530 +# License, v. 2.0. If a copy of the MPL was not distributed with this
531 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
533 +EXPORTS.graphite2 += [
534 + 'include/GraphiteExtra.h',
535 + 'include/GraphiteStructsForRLBox.h',
538 +UNIFIED_SOURCES += [
539 + '../geckoextra/src/GraphiteExtra.cpp',
542 +CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
544 +# Match bundled graphite2 configuration
545 +AllowCompilerWarnings()
547 +FINAL_LIBRARY = 'gkmedias'
548 diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
549 index b91d9c1..a97e6eb 100755
550 --- gfx/graphite2/moz-gr-update.sh
551 +++ gfx/graphite2/moz-gr-update.sh
555 # Script used to update the Graphite2 library in the mozilla source tree
556 +# and bump version for --with-system-graphite2
558 # This script lives in gfx/graphite2, along with the library source,
559 # but must be run from the top level of the mozilla-central tree.
560 @@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
561 #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
562 #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
564 +# chase version for --with-system-graphite2
565 +perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
566 + if /GR2_VERSION_REQUIRE/" old-configure.in
568 # summarize what's been touched
569 echo Updated to $RELEASE.
570 echo Here is what changed in the gfx/graphite2 directory:
573 -hg stat gfx/graphite2
574 +hg stat old-configure.in gfx/graphite2
577 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
578 diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
579 index 3180257..4587a3b 100644
580 --- gfx/harfbuzz/README-mozilla
581 +++ gfx/harfbuzz/README-mozilla
582 @@ -21,3 +21,8 @@ from within the gfx/harfbuzz directory.
584 If the collection of source files changes, manual updates to moz.build may be
585 needed as we don't use the upstream makefiles.
587 +The in-tree copy may be omitted during build by --with-system-harfbuzz.
588 +Make sure to keep pkg-config version check within toolkit/moz.configure in sync
589 +with checkout version or increment latest tag by one if it's not based
590 +on upstream release.
591 diff --git gfx/moz.build gfx/moz.build
592 index 4d6d63d..cd57b0c 100644
595 @@ -10,6 +10,14 @@ with Files("**"):
597 BUG_COMPONENT = ("Core", "Graphics: WebRender")
599 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
600 + DIRS += ["graphite2/geckoextra"]
602 + DIRS += ["graphite2/src" ]
604 +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
605 + DIRS += ["harfbuzz/src"]
610 @@ -19,8 +27,6 @@ DIRS += [
619 diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
620 index 5e0fd17..860b80a 100755
621 --- gfx/skia/generate_mozbuild.py
622 +++ gfx/skia/generate_mozbuild.py
623 @@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
624 '-Wno-unused-private-field',
627 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
628 + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
630 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
632 "/gfx/cairo/cairo/src",
633 diff --git gfx/skia/moz.build gfx/skia/moz.build
634 index 524bd28..615c93b 100755
635 --- gfx/skia/moz.build
636 +++ gfx/skia/moz.build
637 @@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
638 '-Wno-unused-private-field',
641 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
642 + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
644 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
646 "/gfx/cairo/cairo/src",
647 diff --git gfx/thebes/moz.build gfx/thebes/moz.build
648 index baa6f09..4f02a9e 100644
649 --- gfx/thebes/moz.build
650 +++ gfx/thebes/moz.build
651 @@ -286,7 +286,13 @@ if CONFIG["MOZ_WAYLAND"]:
653 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
655 -DEFINES["GRAPHITE2_STATIC"] = True
656 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
657 + CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
659 + DEFINES["GRAPHITE2_STATIC"] = True
661 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
662 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
664 if CONFIG["CC_TYPE"] == "clang":
665 # Suppress warnings from Skia header files.
666 diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
667 index 301eb9a..7cece5e 100644
668 --- intl/unicharutil/util/moz.build
669 +++ intl/unicharutil/util/moz.build
670 @@ -25,6 +25,9 @@ UNIFIED_SOURCES += [
671 "nsUnicodeProperties.cpp",
674 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
675 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
677 include("/ipc/chromium/chromium-config.mozbuild")
680 diff --git netwerk/dns/moz.build netwerk/dns/moz.build
681 index f769e27..315bdd4 100644
682 --- netwerk/dns/moz.build
683 +++ netwerk/dns/moz.build
684 @@ -102,6 +102,9 @@ GeneratedFile(
685 "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
688 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
689 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
691 # need to include etld_data.inc
694 diff --git old-configure.in old-configure.in
695 index d147957..d332b34 100644
698 @@ -1335,6 +1335,27 @@ fi
699 AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
700 AC_SUBST(MOZ_MACBUNDLE_ID)
702 +dnl ========================================================
703 +dnl Check for graphite2
704 +dnl ========================================================
705 +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
706 + dnl graphite2.pc has bogus version, check manually
707 + _SAVE_CFLAGS=$CFLAGS
708 + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
709 + AC_TRY_COMPILE([ #include <graphite2/Font.h>
710 + #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
711 + ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
712 + * 100 + GR2_VERSION_BUGFIX >= \
713 + (major) * 10000 + (minor) * 100 + (bugfix) )
715 + #if !GR2_VERSION_REQUIRE(1,3,14)
716 + #error "Insufficient graphite2 version."
719 + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
720 + CFLAGS=$_SAVE_CFLAGS
723 dnl ========================================================
724 dnl = Child Process Name for IPC
725 dnl ========================================================
726 diff --git toolkit/library/moz.build toolkit/library/moz.build
727 index 2c3f869..e8a9d23 100644
728 --- toolkit/library/moz.build
729 +++ toolkit/library/moz.build
730 @@ -269,6 +269,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
731 if CONFIG["MOZ_SYSTEM_WEBP"]:
732 OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
734 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
735 + OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
737 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
738 + OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
740 if CONFIG["MOZ_SYSTEM_LIBEVENT"]:
741 OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
743 diff --git toolkit/moz.configure toolkit/moz.configure
744 index 0069865..9bb1864 100644
745 --- toolkit/moz.configure
746 +++ toolkit/moz.configure
747 @@ -1058,6 +1058,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom
752 +# ==============================================================
753 +option("--with-system-graphite2",
754 + help="Use system graphite2 (located with pkgconfig)")
756 +system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2",
757 + when="--with-system-graphite2")
759 +set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True))
762 +# ==============================================================
763 +option("--with-system-harfbuzz",
764 + help="Use system harfbuzz (located with pkgconfig)")
766 +system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4",
767 + when="--with-system-harfbuzz")
769 +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
772 "--enable-geckodriver",
775 [FILE:406:patches/patch-comm__third_party__rnpdefs.mozbuild]
776 --- comm/third_party/rnpdefs.mozbuild.orig 2021-08-11 20:13:25.176921000 +0200
777 +++ comm/third_party/rnpdefs.mozbuild 2021-08-11 20:14:08.855374000 +0200
779 OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"]
782 -if CONFIG["OS_ARCH"] in ("Linux", "SunOS"):
783 +if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly", "SunOS"):
785 CXXFLAGS += ["-fPIC"]
788 [FILE:421:patches/patch-comm_mail_app_nsMailApp.cpp]
789 --- comm/mail/app/nsMailApp.cpp.orig 2020-07-13 18:10:03 UTC
790 +++ comm/mail/app/nsMailApp.cpp
791 @@ -306,6 +306,9 @@ int main(int argc, char* argv[], char* e
795 + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
796 + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
798 #ifdef HAS_DLL_BLOCKLIST
799 DllBlocklist_Initialize(gBlocklistInitFlags);
803 [FILE:914:patches/patch-env-api-keys]
804 # Accept API keys from environment like before bug 1294585
806 --- build/moz.configure/keyfiles.configure
807 +++ build/moz.configure/keyfiles.configure
808 @@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
809 @checking("for the %s key" % desc, lambda x: x and x is not no_key)
810 @imports(_from="__builtin__", _import="open")
811 @imports(_from="__builtin__", _import="IOError")
812 + @imports(_from="os", _import="environ")
816 @@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
817 raise FatalCheckError("'%s' is empty." % value[0])
819 raise FatalCheckError("'%s': %s." % (value[0], e.strerror))
821 + return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key
827 [FILE:890:patches/patch-gfx_skia_skia_src_core_SkCpu.cpp]
828 Regressed by https://svnweb.freebsd.org/changeset/base/324815
830 gfx/skia/skia/src/core/SkCpu.cpp:81:27: error: use of undeclared identifier 'getauxval'
831 uint32_t hwcaps = getauxval(AT_HWCAP);
834 --- gfx/skia/skia/src/core/SkCpu.cpp.orig 2020-07-13 18:06:57 UTC
835 +++ gfx/skia/skia/src/core/SkCpu.cpp
840 +#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__)
841 + #include <machine/armreg.h>
843 + static uint32_t read_cpu_features() {
844 + uint32_t features = 0;
845 + uint64_t id_aa64isar0;
847 + id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
848 + if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) {
849 + features |= SkCpu::CRC32;
854 #elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
855 #include <sys/auxv.h>
859 [FILE:361:patches/patch-third__party_libwebrtc_build_build__config.h]
860 --- third_party/libwebrtc/build/build_config.h.orig 2022-09-12 16:44:50 UTC
861 +++ third_party/libwebrtc/build/build_config.h
864 #elif defined(__Fuchsia__)
866 -#elif defined(__FreeBSD__)
867 +#elif defined(__FreeBSD__) || defined(__DragonFly__)
869 #elif defined(__NetBSD__)
873 [FILE:1490:patches/patch-tools_profiler_core_patform.cpp]
874 commit 45a7951cb6a9b1735b9b6cec89db69b5933715c7
875 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
876 Date: Mon Mar 28 21:54:35 2022 +0200
878 FreeBSD can use sched_getcpu() from 1400046/1300524 on
880 diff --git tools/profiler/core/platform.cpp tools/profiler/core/platform.cpp
881 index 92bcc1100687..2f17a88942a8 100644
882 --- tools/profiler/core/platform.cpp
883 +++ tools/profiler/core/platform.cpp
888 +#if defined(GP_OS_freebsd)
889 +#include <sys/param.h>
890 +// "after making CPU_SET macros compatible with glibc"
891 +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000)
894 +# if __x86_64__ || __i386__
895 +// similar cpuid_count() trick as on Darwin, using LLVM
896 +// but not for all CPUs
902 #if defined(GP_OS_windows)
903 # include <processthreadsapi.h>
905 @@ -6368,6 +6382,19 @@ void profiler_mark_thread_awake() {
909 +#elif defined(GP_OS_freebsd)
910 +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000)
911 + cpuId = sched_getcpu();
912 +# elif defined(__amd64__)
913 + unsigned int eax, ebx, ecx, edx;
914 + __cpuid_count(1, 0, eax, ebx, ecx, edx);
915 + // Check if we have an APIC.
916 + if ((edx & (1 << 9))) {
917 + // APIC ID is bits 24-31 of EBX
921 +// the fallthrough is cpuID = 0
923 cpuId = sched_getcpu();
927 [FILE:290:files/thunderbird.desktop]
931 GenericName=Mail Client
932 Comment=Mail client and News Reader
938 Categories=Network;Email;News;InstantMessaging;
939 MimeType=application/mbox;message/rfc822;