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.6.1/source
13 DISTFILE[1]= thunderbird-102.6.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 8b8cb5d7532ad8ee65061d2f284ae9f0470e7614dfcfc3c37ca945bcb96d1183 508826308 thunderbird-102.6.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:9644:patches/patch-bug847568]
451 # Allow building against system-wide graphite2/harfbuzz.
453 diff --git config/system-headers.mozbuild config/system-headers.mozbuild
454 index a1b58eb..a0a0943 100644
455 --- config/system-headers.mozbuild
456 +++ config/system-headers.mozbuild
457 @@ -1289,6 +1289,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
461 +if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
462 + system_headers += [
463 + 'graphite2/Font.h',
464 + 'graphite2/Segment.h',
467 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
468 + system_headers += [
469 + 'harfbuzz/hb-glib.h',
470 + 'harfbuzz/hb-ot.h',
474 if CONFIG['MOZ_SYSTEM_LIBVPX']:
477 diff --git dom/base/moz.build dom/base/moz.build
478 index d390adf..4508f19 100644
479 --- dom/base/moz.build
480 +++ dom/base/moz.build
481 @@ -576,6 +576,9 @@ FINAL_LIBRARY = "xul"
482 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
483 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
485 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
486 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
490 script="gen-usecounters.py",
491 diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build
493 index 0000000..24e8d7a
495 +++ gfx/graphite2/geckoextra/moz.build
497 +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
498 +# vim: set filetype=python:
499 +# This Source Code Form is subject to the terms of the Mozilla Public
500 +# License, v. 2.0. If a copy of the MPL was not distributed with this
501 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
503 +EXPORTS.graphite2 += [
504 + 'include/GraphiteExtra.h',
505 + 'include/GraphiteStructsForRLBox.h',
508 +UNIFIED_SOURCES += [
509 + '../geckoextra/src/GraphiteExtra.cpp',
512 +CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
514 +# Match bundled graphite2 configuration
515 +AllowCompilerWarnings()
517 +FINAL_LIBRARY = 'gkmedias'
518 diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
519 index b91d9c1..a97e6eb 100755
520 --- gfx/graphite2/moz-gr-update.sh
521 +++ gfx/graphite2/moz-gr-update.sh
525 # Script used to update the Graphite2 library in the mozilla source tree
526 +# and bump version for --with-system-graphite2
528 # This script lives in gfx/graphite2, along with the library source,
529 # but must be run from the top level of the mozilla-central tree.
530 @@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
531 #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
532 #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
534 +# chase version for --with-system-graphite2
535 +perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
536 + if /GR2_VERSION_REQUIRE/" old-configure.in
538 # summarize what's been touched
539 echo Updated to $RELEASE.
540 echo Here is what changed in the gfx/graphite2 directory:
543 -hg stat gfx/graphite2
544 +hg stat old-configure.in gfx/graphite2
547 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
548 diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
549 index 3180257..4587a3b 100644
550 --- gfx/harfbuzz/README-mozilla
551 +++ gfx/harfbuzz/README-mozilla
552 @@ -21,3 +21,8 @@ from within the gfx/harfbuzz directory.
554 If the collection of source files changes, manual updates to moz.build may be
555 needed as we don't use the upstream makefiles.
557 +The in-tree copy may be omitted during build by --with-system-harfbuzz.
558 +Make sure to keep pkg-config version check within toolkit/moz.configure in sync
559 +with checkout version or increment latest tag by one if it's not based
560 +on upstream release.
561 diff --git gfx/moz.build gfx/moz.build
562 index 4d6d63d..cd57b0c 100644
565 @@ -10,6 +10,14 @@ with Files("**"):
567 BUG_COMPONENT = ("Core", "Graphics: WebRender")
569 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
570 + DIRS += ["graphite2/geckoextra"]
572 + DIRS += ["graphite2/src" ]
574 +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
575 + DIRS += ["harfbuzz/src"]
580 @@ -19,8 +27,6 @@ DIRS += [
589 diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
590 index 5e0fd17..860b80a 100755
591 --- gfx/skia/generate_mozbuild.py
592 +++ gfx/skia/generate_mozbuild.py
593 @@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
594 '-Wno-unused-private-field',
597 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
598 + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
600 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
602 "/gfx/cairo/cairo/src",
603 diff --git gfx/skia/moz.build gfx/skia/moz.build
604 index 524bd28..615c93b 100755
605 --- gfx/skia/moz.build
606 +++ gfx/skia/moz.build
607 @@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
608 '-Wno-unused-private-field',
611 +if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
612 + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
614 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'):
616 "/gfx/cairo/cairo/src",
617 diff --git gfx/thebes/moz.build gfx/thebes/moz.build
618 index baa6f09..4f02a9e 100644
619 --- gfx/thebes/moz.build
620 +++ gfx/thebes/moz.build
621 @@ -286,7 +286,13 @@ if CONFIG["MOZ_WAYLAND"]:
623 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
625 -DEFINES["GRAPHITE2_STATIC"] = True
626 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
627 + CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"]
629 + DEFINES["GRAPHITE2_STATIC"] = True
631 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
632 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
634 if CONFIG["CC_TYPE"] == "clang":
635 # Suppress warnings from Skia header files.
636 diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
637 index 301eb9a..7cece5e 100644
638 --- intl/unicharutil/util/moz.build
639 +++ intl/unicharutil/util/moz.build
640 @@ -25,6 +25,9 @@ UNIFIED_SOURCES += [
641 "nsUnicodeProperties.cpp",
644 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
645 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
647 include("/ipc/chromium/chromium-config.mozbuild")
650 diff --git netwerk/dns/moz.build netwerk/dns/moz.build
651 index f769e27..315bdd4 100644
652 --- netwerk/dns/moz.build
653 +++ netwerk/dns/moz.build
654 @@ -102,6 +102,9 @@ GeneratedFile(
655 "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"]
658 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
659 + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"]
661 # need to include etld_data.inc
664 diff --git old-configure.in old-configure.in
665 index d147957..d332b34 100644
668 @@ -1335,6 +1335,27 @@ fi
669 AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID)
670 AC_SUBST(MOZ_MACBUNDLE_ID)
672 +dnl ========================================================
673 +dnl Check for graphite2
674 +dnl ========================================================
675 +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
676 + dnl graphite2.pc has bogus version, check manually
677 + _SAVE_CFLAGS=$CFLAGS
678 + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
679 + AC_TRY_COMPILE([ #include <graphite2/Font.h>
680 + #define GR2_VERSION_REQUIRE(major,minor,bugfix) \
681 + ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
682 + * 100 + GR2_VERSION_BUGFIX >= \
683 + (major) * 10000 + (minor) * 100 + (bugfix) )
685 + #if !GR2_VERSION_REQUIRE(1,3,14)
686 + #error "Insufficient graphite2 version."
689 + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
690 + CFLAGS=$_SAVE_CFLAGS
693 dnl ========================================================
694 dnl = Child Process Name for IPC
695 dnl ========================================================
696 diff --git toolkit/library/moz.build toolkit/library/moz.build
697 index 2c3f869..e8a9d23 100644
698 --- toolkit/library/moz.build
699 +++ toolkit/library/moz.build
700 @@ -269,6 +269,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]:
701 if CONFIG["MOZ_SYSTEM_WEBP"]:
702 OS_LIBS += CONFIG["MOZ_WEBP_LIBS"]
704 +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]:
705 + OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"]
707 +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]:
708 + OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"]
710 if CONFIG["MOZ_SYSTEM_LIBEVENT"]:
711 OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"]
713 diff --git toolkit/moz.configure toolkit/moz.configure
714 index 0069865..9bb1864 100644
715 --- toolkit/moz.configure
716 +++ toolkit/moz.configure
717 @@ -1058,6 +1058,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom
722 +# ==============================================================
723 +option("--with-system-graphite2",
724 + help="Use system graphite2 (located with pkgconfig)")
726 +system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2",
727 + when="--with-system-graphite2")
729 +set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True))
732 +# ==============================================================
733 +option("--with-system-harfbuzz",
734 + help="Use system harfbuzz (located with pkgconfig)")
736 +system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4",
737 + when="--with-system-harfbuzz")
739 +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True))
742 "--enable-geckodriver",
745 [FILE:406:patches/patch-comm__third_party__rnpdefs.mozbuild]
746 --- comm/third_party/rnpdefs.mozbuild.orig 2021-08-11 20:13:25.176921000 +0200
747 +++ comm/third_party/rnpdefs.mozbuild 2021-08-11 20:14:08.855374000 +0200
749 OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"]
752 -if CONFIG["OS_ARCH"] in ("Linux", "SunOS"):
753 +if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly", "SunOS"):
755 CXXFLAGS += ["-fPIC"]
758 [FILE:421:patches/patch-comm_mail_app_nsMailApp.cpp]
759 --- comm/mail/app/nsMailApp.cpp.orig 2020-07-13 18:10:03 UTC
760 +++ comm/mail/app/nsMailApp.cpp
761 @@ -306,6 +306,9 @@ int main(int argc, char* argv[], char* e
765 + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
766 + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
768 #ifdef HAS_DLL_BLOCKLIST
769 DllBlocklist_Initialize(gBlocklistInitFlags);
773 [FILE:914:patches/patch-env-api-keys]
774 # Accept API keys from environment like before bug 1294585
776 --- build/moz.configure/keyfiles.configure
777 +++ build/moz.configure/keyfiles.configure
778 @@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
779 @checking("for the %s key" % desc, lambda x: x and x is not no_key)
780 @imports(_from="__builtin__", _import="open")
781 @imports(_from="__builtin__", _import="IOError")
782 + @imports(_from="os", _import="environ")
786 @@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
787 raise FatalCheckError("'%s' is empty." % value[0])
789 raise FatalCheckError("'%s': %s." % (value[0], e.strerror))
791 + return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key
797 [FILE:890:patches/patch-gfx_skia_skia_src_core_SkCpu.cpp]
798 Regressed by https://svnweb.freebsd.org/changeset/base/324815
800 gfx/skia/skia/src/core/SkCpu.cpp:81:27: error: use of undeclared identifier 'getauxval'
801 uint32_t hwcaps = getauxval(AT_HWCAP);
804 --- gfx/skia/skia/src/core/SkCpu.cpp.orig 2020-07-13 18:06:57 UTC
805 +++ gfx/skia/skia/src/core/SkCpu.cpp
810 +#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__)
811 + #include <machine/armreg.h>
813 + static uint32_t read_cpu_features() {
814 + uint32_t features = 0;
815 + uint64_t id_aa64isar0;
817 + id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
818 + if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) {
819 + features |= SkCpu::CRC32;
824 #elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
825 #include <sys/auxv.h>
829 [FILE:361:patches/patch-third__party_libwebrtc_build_build__config.h]
830 --- third_party/libwebrtc/build/build_config.h.orig 2022-09-12 16:44:50 UTC
831 +++ third_party/libwebrtc/build/build_config.h
834 #elif defined(__Fuchsia__)
836 -#elif defined(__FreeBSD__)
837 +#elif defined(__FreeBSD__) || defined(__DragonFly__)
839 #elif defined(__NetBSD__)
843 [FILE:1490:patches/patch-tools_profiler_core_patform.cpp]
844 commit 45a7951cb6a9b1735b9b6cec89db69b5933715c7
845 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
846 Date: Mon Mar 28 21:54:35 2022 +0200
848 FreeBSD can use sched_getcpu() from 1400046/1300524 on
850 diff --git tools/profiler/core/platform.cpp tools/profiler/core/platform.cpp
851 index 92bcc1100687..2f17a88942a8 100644
852 --- tools/profiler/core/platform.cpp
853 +++ tools/profiler/core/platform.cpp
858 +#if defined(GP_OS_freebsd)
859 +#include <sys/param.h>
860 +// "after making CPU_SET macros compatible with glibc"
861 +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000)
864 +# if __x86_64__ || __i386__
865 +// similar cpuid_count() trick as on Darwin, using LLVM
866 +// but not for all CPUs
872 #if defined(GP_OS_windows)
873 # include <processthreadsapi.h>
875 @@ -6368,6 +6382,19 @@ void profiler_mark_thread_awake() {
879 +#elif defined(GP_OS_freebsd)
880 +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000)
881 + cpuId = sched_getcpu();
882 +# elif defined(__amd64__)
883 + unsigned int eax, ebx, ecx, edx;
884 + __cpuid_count(1, 0, eax, ebx, ecx, edx);
885 + // Check if we have an APIC.
886 + if ((edx & (1 << 9))) {
887 + // APIC ID is bits 24-31 of EBX
891 +// the fallthrough is cpuID = 0
893 cpuId = sched_getcpu();
897 [FILE:290:files/thunderbird.desktop]
901 GenericName=Mail Client
902 Comment=Mail client and News Reader
908 Categories=Network;Email;News;InstantMessaging;
909 MimeType=application/mbox;message/rfc822;