# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= thunderbird VERSION= 115.9.0 KEYWORDS= mail net_im news VARIANTS= standard SDESC[standard]= Mozilla Thunderbird mail/newsgroup client HOMEPAGE= https://www.thunderbird.net/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= MOZILLA/thunderbird/releases/115.9.0/source DISTFILE[1]= thunderbird-115.9.0.source.tar.xz:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= aom:dev:standard autoconf213:single:standard botan2:dev:standard cbindgen:single:standard clang17:complete:standard dav1d:dev:standard evdev-proto:single:standard ffmpeg:dev:standard icu:dev:standard libcanberra:dev:standard libevent:dev:standard libnotify:dev:standard libproxy:dev:standard llvm17:tools:standard nasm:primary:standard nodejs:primary:standard nss:dev:standard python-sqlite3:single:python_used rust:single:standard sccache:primary:standard WebP:dev:standard yasm:single:standard zip:single:standard BUILDRUN_DEPENDS= aom:primary:standard botan2:primary:standard dav1d:primary:standard dbus-glib:primary:standard ffmpeg:primary:standard harfbuzz:primary:standard icu:primary:standard libcanberra:primary:standard libevent:primary:standard libffi:primary:standard libnotify:primary:standard libproxy:primary:standard nss:primary:standard startup-notification:single:standard WebP:primary:standard B_DEPS[linux]= alsa-lib:dev:standard BR_DEPS[linux]= sndio:single:standard alsa-lib:primary:standard BR_DEPS[netbsd]= sndio:single:standard USES= cpe desktop-utils:single gmake jpeg png zlib perl:build pkgconfig iconv bz2 python:v11,build GNOME_COMPONENTS= gconf gtk2 gtk3 gdkpixbuf pango XORG_COMPONENTS= x11 xcb xcomposite xdamage xext xfixes xrender xt pixman LICENSE= MPL:single LICENSE_TERMS= single:{{WRKSRC}}/toolkit/content/license.html LICENSE_FILE= MPL:stock LICENSE_SCHEME= solo CPE_VENDOR= mozilla FPC_EQUIVALENT= mail/thunderbird MUST_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes CONFIGURE_ENV= PYTHON3={{PYTHON_CMD}} SETUPTOOLS_USE_DISTUTILS=stdlib MAKE_ENV= PYTHON3={{PYTHON_CMD}} CXXSTDLIB="stdc++" QMAKE_ARGS= --prefix="{{PREFIX}}" --with-system-nss --with-system-nspr --with-system-zlib --with-system-icu --with-system-png --with-system-jpeg --with-system-libevent --with-system-harfbuzz --with-system-graphite2 --with-system-av1 --with-system-webp --with-system-botan --enable-system-ffi --enable-system-pixman --enable-install-strip --enable-strip --enable-libproxy --enable-release --enable-optimize --enable-official-branding --enable-application=comm/mail --enable-update-channel=release --enable-rust-simd --with-intl-api --disable-alsa --disable-debug --disable-debug-symbols --disable-dtrace --disable-jack --disable-webrtc --disable-profiling --disable-pulseaudio --disable-tests --disable-updater --disable-hardening --without-wasm-sandboxed-libraries VAR_OPSYS[linux]= QMAKE_ARGS=--disable-elf-hack QMAKE_ARGS=--enable-audio-backends=sndio CONFIGURE_ENV=PKG_CONFIG_LIBDIR={{LOCALBASE}}/lib/pkgconfig VAR_OPSYS[netbsd]= QMAKE_ARGS=--enable-audio-backends=sndio VAR_OPSYS[midnightbsd]= MAKEFILE_LINE=CONFIGURE_TARGET=x86_64-raven-freebsd12.3 post-patch: ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/comm/mail/app/nsMailApp.cpp \ ${WRKSRC}/browser/app/nsBrowserApp.cpp (cd ${WRKSRC}/gfx/angle/checkout/src/compiler/translator && \ ${REINPLACE_CMD} -e 's|||' \ InfoSink.h IntermNode.cpp) # disable SCTP ${REINPLACE_CMD} -e 's|MOZ_SCTP|MOZ_DISABLE_SCTP|' \ ${WRKSRC}/netwerk/moz.build # alsa headers use 'u_int32_t' and other BerkeleyDB/nvi # fixed types (_XOPEN_SOURCE) ${REINPLACE_CMD} -e 's@_XOPEN_SOURCE@&___@g' \ ${WRKSRC}/media/libcubeb/src/cubeb_alsa.c ${REINPLACE_CMD} -e 's@_POSIX_SOURCE@&___@g' \ ${WRKSRC}/media/libcubeb/src/cubeb_jack.cpp # Set mozilla options @${ECHO_CMD} "--=> Setting configuration <=--" @for arg in ${QMAKE_ARGS}; do \ ${ECHO_CMD} ".mozconfig << $$arg" ;\ ${ECHO_CMD} ac_add_options $$arg >> ${WRKSRC}/.mozconfig ;\ done @${ECHO_CMD} LDFLAGS=\"-Wl,-rpath,${PREFIX}/lib/thunderbird\" \ >> ${WRKSRC}/.mozconfig # disable rust checksums .for RD in mp4parse ${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \ ${WRKSRC}/third_party/rust/${RD}/.cargo-checksum.json .endfor pre-configure-netbsd: # Fix error: expected constructor __RCSID("$NetBSD: keyring.c,v 1.50 2011/06/25 00:37:44 agc Exp $"); ${REINPLACE_CMD} -e 's/__NetBSD__/__NEVER__/' \ ${WRKSRC}/comm/third_party/rnp/src/librekey/key_store_pgp.cpp post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/applications ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${INSTALL_DATA} ${FILESDIR}/thunderbird.desktop \ ${STAGEDIR}${PREFIX}/share/applications (cd ${STAGEDIR}${PREFIX}/share/pixmaps && ${LN} -sf \ ../../lib/thunderbird/chrome/icons/default/default48.png \ thunderbird.png) # regenerate symlink to avoid absolute paths ${RM} ${STAGEDIR}${PREFIX}/bin/thunderbird (cd ${STAGEDIR}${PREFIX}/bin && \ ${LN} -sf ../lib/thunderbird/thunderbird thunderbird) pre-configure: ${REINPLACE_CMD} -e "s|%%MBSD64_TGT%%|x86_64-raven-freebsd12.3|" \ ${WRKSRC}/build/autoconf/config.guess post-install-netbsd: ${PAXCTL} +m ${STAGEDIR}${PREFIX}/lib/thunderbird/thunderbird ${PAXCTL} +m ${STAGEDIR}${PREFIX}/lib/thunderbird/thunderbird-bin [FILE:391:descriptions/desc.single] Thunderbird is a free and open source email, newsfeed, chat, and calendaring client, that's easy to set up and customize. One of the core principles of Thunderbird is the use and promotion of open standards - this focus is a rejection of our world of closed platforms and services that can't communicate with each other. We want our users to have freedom and choice in how they communicate. [FILE:112:distinfo] 2aeb77ca7038df6f3d306f9c3d2a4ea615af0edcf0f7290215ca5f30c1290e57 535516012 thunderbird-115.9.0.source.tar.xz [FILE:1046:manifests/plist.single] %%ONLY-LINUX%%lib/thunderbird/ Throbber-small.gif crashreporter crashreporter.ini libmozsandbox.so minidump-analyzer %%ONLY-LINUX%%lib/thunderbird/fonts/TwemojiMozilla.ttf bin/thunderbird lib/thunderbird/ application.ini dependentlibs.list glxtest liblgpllibs.so libmozavcodec.so libmozavutil.so libmozgtk.so libmozsqlite3.so librnp.so libxul.so omni.ja pingsender platform.ini plugin-container removed-files rnp-cli rnpkeys thunderbird thunderbird-bin lib/thunderbird/chrome/icons/default/ calendar-alarm-dialog.png calendar-general-dialog.png default128.png default16.png default22.png default24.png default256.png default32.png default48.png default64.png msgcomposeWindow16.png msgcomposeWindow24.png msgcomposeWindow32.png msgcomposeWindow48.png lib/thunderbird/defaults/messenger/mailViews.dat lib/thunderbird/defaults/pref/channel-prefs.js lib/thunderbird/isp/ Bogofilter.sfd DSPAM.sfd POPFile.sfd SpamAssassin.sfd SpamPal.sfd share/applications/thunderbird.desktop share/pixmaps/thunderbird.png [FILE:5428:patches/patch-addon-search] https://github.com/mozilla/addons/issues/708 https://github.com/mozilla/addons-frontend/issues/4610 --- comm/mail/app/profile/all-thunderbird.js.orig 2023-09-18 22:38:56.049701000 +0200 +++ comm/mail/app/profile/all-thunderbird.js 2023-09-18 22:41:26.840390000 +0200 @@ -207,10 +207,10 @@ pref("extensions.getAddons.compatOverides.url", "https://services.addons.thunderbird.net/api/v3/addons/compat-override/?guid=%IDS%&lang=%LOCALE%"); pref("extensions.getAddons.link.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/"); pref("browser.dictionaries.download.url", "https://addons.thunderbird.net/%LOCALE%/%APP%/language-tools/"); -pref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=thunderbird"); -pref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%&appver=%VERSION%&platform=%OS%"); -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"); -pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%"); +pref("extensions.getAddons.recommended.url", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/Linux/%VERSION%?src=thunderbird"); +pref("extensions.getAddons.search.browseURL", "https://addons.thunderbird.net/%LOCALE%/%APP%/search/?q=%TERMS%&appver=%VERSION%&platform=Linux"); +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"); +pref("extensions.webservice.discoverURL", "https://services.addons.thunderbird.net/%LOCALE%/%APP%/discovery/pane/%VERSION%/Linux"); pref("extensions.getAddons.langpacks.url", "https://services.addons.thunderbird.net/api/v3/addons/language-tools/?app=thunderbird&type=language&appversion=%VERSION%"); pref("extensions.getAddons.discovery.api_url", "https://services.addons.thunderbird.net/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%"); @@ -242,9 +242,9 @@ // .. etc .. // pref("extensions.update.enabled", true); -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%"); +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%"); -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%"); +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%"); pref("extensions.update.interval", 86400); // Check for updates to Extensions and // Themes every day --- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs.orig 2023-09-18 22:35:42.082170000 +0200 +++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs 2023-09-18 22:36:14.313490000 +0200 @@ -596,7 +596,7 @@ addon.version = String(aEntry.current_version.version); if (Array.isArray(aEntry.current_version.files)) { for (let file of aEntry.current_version.files) { - if (file.platform == "all" || file.platform == lazy.PLATFORM) { + if (file.platform == "all" || file.platform == "linux" || file.platform == lazy.PLATFORM) { if (file.url) { addon.sourceURI = lazy.NetUtil.newURI(file.url); } --- toolkit/mozapps/extensions/internal/XPIDatabase.jsm.orig 2023-09-18 22:36:52.473447000 +0200 +++ toolkit/mozapps/extensions/internal/XPIDatabase.jsm 2023-09-18 22:37:26.177990000 +0200 @@ -634,7 +634,7 @@ // Something is causing errors in here try { for (let platform of this.targetPlatforms) { - if (platform.os == Services.appinfo.OS) { + if (platform.os == "Linux" || platform.os == Services.appinfo.OS) { if (platform.abi) { needsABI = true; if (platform.abi === abi) { [FILE:445:patches/patch-browser-app-nsBrowserApp.cpp] --- browser/app/nsBrowserApp.cpp.orig 2016-09-19 16:19:28 UTC +++ browser/app/nsBrowserApp.cpp @@ -324,6 +324,9 @@ int main(int argc, char* argv[], char* e { mozilla::TimeStamp start = mozilla::TimeStamp::Now(); + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + #ifdef HAS_DLL_BLOCKLIST DllBlocklist_Initialize(); [FILE:4128:patches/patch-bug1559213] commit 717bba28411c Author: Jory A. Pratt Date: Thu Jun 13 11:53:00 2019 -0700 Bug 1559213 - Allow to use system av1 libs instead of bundled. --- config/external/moz.build | 5 +++-- config/system-headers.mozbuild | 8 ++++++++ dom/media/platforms/moz.build | 5 +++++ toolkit/moz.configure | 19 ++++++++++++++++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git config/external/moz.build config/external/moz.build index ab77121..75595d9 100644 --- config/external/moz.build +++ config/external/moz.build @@ -49,8 +49,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]: external_dirs += ["media/libvpx"] if CONFIG["MOZ_AV1"]: - external_dirs += ["media/libaom"] - external_dirs += ["media/libdav1d"] + if not CONFIG["MOZ_SYSTEM_AV1"]: + external_dirs += ["media/libaom"] + external_dirs += ["media/libdav1d"] if not CONFIG["MOZ_SYSTEM_PNG"]: external_dirs += ["media/libpng"] diff --git config/system-headers.mozbuild config/system-headers.mozbuild index a1b58eb..65729f9 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild @@ -1289,6 +1289,14 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: 'proxy.h', ] +if CONFIG['MOZ_SYSTEM_AV1']: + system_headers += [ + 'aom/aom_decoder.h', + 'aom/aomdx.h', + 'aom/aom_image.h', + 'dav1d/dav1d.h', + ] + if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build index 8509aec..eb6f129 100644 --- dom/media/platforms/moz.build +++ dom/media/platforms/moz.build @@ -78,6 +78,11 @@ if CONFIG["MOZ_AV1"]: "agnostic/AOMDecoder.cpp", "agnostic/DAV1DDecoder.cpp", ] + if CONFIG['MOZ_SYSTEM_AV1']: + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS'] + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] if CONFIG["MOZ_OMX"]: EXPORTS += [ diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build index 0069865..e806fc8 100644 --- media/ffvpx/libavcodec/moz.build.orig +++ media/ffvpx/libavcodec/moz.build @@ -108,10 +108,14 @@ 'vp9prob.c', 'vp9recon.c' ] - USE_LIBS += [ - 'dav1d', - 'media_libdav1d_asm', - ] + if CONFIG["MOZ_SYSTEM_AV1"]: + CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] + OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] + else: + USE_LIBS += [ + 'dav1d', + 'media_libdav1d_asm', + ] if CONFIG['MOZ_WAYLAND']: LOCAL_INCLUDES += ['/media/mozva'] SOURCES += [ diff --git toolkit/moz.configure toolkit/moz.configure index 0069865..e806fc8 100644 --- toolkit/moz.configure +++ toolkit/moz.configure @@ -523,7 +523,23 @@ def av1(value): return True -@depends(target, when=av1 & compile_environment) +option("--with-system-av1", + help="Use system av1 (located with pkgconfig)") + +system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0", + when="--with-system-av1") + +system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1", + when="--with-system-av1") + +@depends(system_libaom_info, system_libdav1d_info) +def system_av1(system_libaom_info, system_libdav1d_info): + has_av1_libs = False + if system_libaom_info and system_libdav1d_info: + has_av1_libs = True + return has_av1_libs + +@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) def dav1d_asm(target): if target.cpu in ("aarch64", "x86", "x86_64"): return True @@ -539,6 +555,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm) set_define("MOZ_DAV1D_ASM", dav1d_asm) set_config("MOZ_AV1", av1) set_define("MOZ_AV1", av1) +set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True)) # JXL Image Codec Support # ============================================================== [FILE:2223:patches/patch-bug1659612] 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] r = snprintf(node_name, sizeof(node_name), "pcm.%s", string); ^ media/libcubeb/src/cubeb_alsa.c:613:9: note: include the header or explicitly provide a declaration for 'snprintf' media/libcubeb/src/cubeb_alsa.c:1168:3: error: implicitly declaring library function 'alloca' with type 'void *(unsigned int)' [-Werror,-Wimplicit-function-declaration] snd_pcm_hw_params_alloca(&hw_params); ^ /usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca' #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params) ^ /usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca' #define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0) ^ media/libcubeb/src/cubeb_alsa.c:1168:3: note: include the header or explicitly provide a declaration for 'alloca' /usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca' #define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params) ^ /usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca' #define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0) ^ 2 errors generated. --- media/libcubeb/src/cubeb_alsa.c.orig 2023-03-29 20:51:00.139281000 +0200 +++ media/libcubeb/src/cubeb_alsa.c 2023-03-29 20:51:46.219013000 +0200 @@ -5,12 +5,16 @@ * accompanying file LICENSE for details. */ #undef NDEBUG +#if defined(__FreeBSD__) +#define _GNU_SOURCE +#else #define _DEFAULT_SOURCE #define _BSD_SOURCE #if defined(__NetBSD__) #define _NETBSD_SOURCE /* timersub() */ #endif #define _XOPEN_SOURCE 500 +#endif #include "cubeb-internal.h" #include "cubeb/cubeb.h" #include "cubeb_tracing.h" [FILE:2089:patches/patch-bug1859752] # HG changeset patch # User AndrĂ© Bargull # Date 1699346749 0 # Node ID 0e7eefda24250041d7f008cc77dfa79045afa791 # Parent 1e39572cb1c784039a9e14b8c36396c66cf58a5d Bug 1859752 - Part 9: Add new line break classes. r=platform-i18n-reviewers,dminor Use `CLASS_CHARACTER` because that matches the previous character class for most characters which are now part of the new character classes. Depends on D192733 Differential Revision: https://phabricator.services.mozilla.com/D192734 diff --git intl/lwbrk/LineBreaker.cpp intl/lwbrk/LineBreaker.cpp --- intl/lwbrk/LineBreaker.cpp +++ intl/lwbrk/LineBreaker.cpp @@ -443,17 +443,23 @@ static int8_t GetClass(uint32_t u, LineB /* JT = 34, [JT] */ CLASS_CHARACTER, /* JV = 35, [JV] */ CLASS_CHARACTER, /* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER, /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE, /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER, /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, - /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER}; + /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, + /* AKSARA = 43, [AK] */ CLASS_CHARACTER, + /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER, + /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER, + /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER, + /* VIRAMA = 47, [VI] */ CLASS_CHARACTER, + }; static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), "Gecko vs ICU LineBreak class mismatch"); auto cls = GetLineBreakClass(u); MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass)); // Overrides based on rules for the different line-break values given in [FILE:9458:patches/patch-bug847568] # Allow building against system-wide graphite2/harfbuzz. diff --git config/system-headers.mozbuild config/system-headers.mozbuild index a1b58eb..a0a0943 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild @@ -1289,6 +1289,19 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']: 'proxy.h', ] +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + system_headers += [ + 'graphite2/Font.h', + 'graphite2/Segment.h', + ] + +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + system_headers += [ + 'harfbuzz/hb-glib.h', + 'harfbuzz/hb-ot.h', + 'harfbuzz/hb.h', + ] + if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', diff --git dom/base/moz.build dom/base/moz.build index d390adf..4508f19 100644 --- dom/base/moz.build +++ dom/base/moz.build @@ -576,6 +576,9 @@ FINAL_LIBRARY = "xul" if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + GeneratedFile( "UseCounterList.h", script="gen-usecounters.py", diff --git gfx/graphite2/geckoextra/moz.build gfx/graphite2/geckoextra/moz.build new file mode 100644 index 0000000..24e8d7a --- /dev/null +++ gfx/graphite2/geckoextra/moz.build @@ -0,0 +1,21 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +EXPORTS.graphite2 += [ + 'include/GraphiteExtra.h', + 'include/GraphiteStructsForRLBox.h', +] + +UNIFIED_SOURCES += [ + '../geckoextra/src/GraphiteExtra.cpp', +] + +CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] + +# Match bundled graphite2 configuration +AllowCompilerWarnings() + +FINAL_LIBRARY = 'gkmedias' diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh index b91d9c1..a97e6eb 100755 --- gfx/graphite2/moz-gr-update.sh +++ gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ #!/bin/bash # Script used to update the Graphite2 library in the mozilla source tree +# and bump version for --with-system-graphite2 # This script lives in gfx/graphite2, along with the library source, # but must be run from the top level of the mozilla-central tree. @@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; +# chase version for --with-system-graphite2 +perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \ + if /GR2_VERSION_REQUIRE/" old-configure.in + # summarize what's been touched echo Updated to $RELEASE. echo Here is what changed in the gfx/graphite2 directory: echo -hg stat gfx/graphite2 +hg stat old-configure.in gfx/graphite2 echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla index 3180257..4587a3b 100644 --- /dev/null +++ gfx/harfbuzz/README-mozilla.fbsd @@ -0,0 +1,4 @@ +The in-tree copy may be omitted during build by --with-system-harfbuzz. +Make sure to keep pkg-config version check within toolkit/moz.configure in sync +with checkout version or increment latest tag by one if it's not based +on upstream release. diff --git gfx/moz.build gfx/moz.build index 4d6d63d..cd57b0c 100644 --- gfx/moz.build +++ gfx/moz.build @@ -10,6 +10,14 @@ with Files("**"): with Files("wr/**"): BUG_COMPONENT = ("Core", "Graphics: WebRender") +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + DIRS += ["graphite2/geckoextra"] +else: + DIRS += ["graphite2/src" ] + +if not CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + DIRS += ["harfbuzz/src"] + DIRS += [ "cairo", "2d", @@ -19,8 +27,6 @@ DIRS += [ "qcms", "gl", "layers", - "graphite2/src", - "harfbuzz/src", "ots/src", "thebes", "ipc", diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py index 5e0fd17..860b80a 100755 --- gfx/skia/generate_mozbuild.py +++ gfx/skia/generate_mozbuild.py @@ -96,6 +96,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git gfx/skia/moz.build gfx/skia/moz.build index 524bd28..615c93b 100755 --- gfx/skia/moz.build +++ gfx/skia/moz.build @@ -488,6 +488,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'): '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk', 'android'): LOCAL_INCLUDES += [ "/gfx/cairo/cairo/src", diff --git gfx/thebes/moz.build gfx/thebes/moz.build index baa6f09..4f02a9e 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build @@ -286,7 +286,13 @@ if CONFIG["MOZ_WAYLAND"]: LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] -DEFINES["GRAPHITE2_STATIC"] = True +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"] +else: + DEFINES["GRAPHITE2_STATIC"] = True + +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] if CONFIG["CC_TYPE"] == "clang": # Suppress warnings from Skia header files. diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build index 301eb9a..7cece5e 100644 --- intl/unicharutil/util/moz.build +++ intl/unicharutil/util/moz.build @@ -25,6 +25,9 @@ UNIFIED_SOURCES += [ "nsUnicodeProperties.cpp", ] +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + include("/ipc/chromium/chromium-config.mozbuild") GeneratedFile( diff --git netwerk/dns/moz.build netwerk/dns/moz.build index f769e27..315bdd4 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build @@ -102,6 +102,9 @@ GeneratedFile( "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"] ) +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + CXXFLAGS += CONFIG["MOZ_HARFBUZZ_CFLAGS"] + # need to include etld_data.inc LOCAL_INCLUDES += [ "/netwerk/base", diff --git old-configure.in old-configure.in index d147957..d332b34 100644 --- old-configure.in +++ old-configure.in @@ -1335,6 +1335,27 @@ fi AC_DEFINE_UNQUOTED(MOZ_MACBUNDLE_ID,$MOZ_MACBUNDLE_ID) AC_SUBST(MOZ_MACBUNDLE_ID) +dnl ======================================================== +dnl Check for graphite2 +dnl ======================================================== +if test -n "$MOZ_SYSTEM_GRAPHITE2"; then + dnl graphite2.pc has bogus version, check manually + _SAVE_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS" + AC_TRY_COMPILE([ #include + #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ + ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ + * 100 + GR2_VERSION_BUGFIX >= \ + (major) * 10000 + (minor) * 100 + (bugfix) ) + ], [ + #if !GR2_VERSION_REQUIRE(1,3,14) + #error "Insufficient graphite2 version." + #endif + ], [], + [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) + CFLAGS=$_SAVE_CFLAGS +fi + dnl ======================================================== dnl = Child Process Name for IPC dnl ======================================================== diff --git toolkit/library/moz.build toolkit/library/moz.build index 2c3f869..e8a9d23 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build @@ -269,6 +269,12 @@ if CONFIG["MOZ_SYSTEM_PNG"]: if CONFIG["MOZ_SYSTEM_WEBP"]: OS_LIBS += CONFIG["MOZ_WEBP_LIBS"] +if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + OS_LIBS += CONFIG["MOZ_GRAPHITE2_LIBS"] + +if CONFIG["MOZ_SYSTEM_HARFBUZZ"]: + OS_LIBS += CONFIG["MOZ_HARFBUZZ_LIBS"] + if CONFIG["MOZ_SYSTEM_LIBEVENT"]: OS_LIBS += CONFIG["MOZ_LIBEVENT_LIBS"] diff --git toolkit/moz.configure toolkit/moz.configure index 0069865..9bb1864 100644 --- toolkit/moz.configure +++ toolkit/moz.configure @@ -1058,6 +1058,25 @@ def geckodriver_default(enable_tests, target, cross_compile, hazard, asan, autom return False return True +# Graphite2 +# ============================================================== +option("--with-system-graphite2", + help="Use system graphite2 (located with pkgconfig)") + +system_graphite2 = pkg_check_modules("MOZ_GRAPHITE2", "graphite2", + when="--with-system-graphite2") + +set_config("MOZ_SYSTEM_GRAPHITE2", depends_if(system_graphite2)(lambda _: True)) + +# HarfBuzz +# ============================================================== +option("--with-system-harfbuzz", + help="Use system harfbuzz (located with pkgconfig)") + +system_harfbuzz = pkg_check_modules("MOZ_HARFBUZZ", "harfbuzz >= 2.7.4", + when="--with-system-harfbuzz") + +set_config("MOZ_SYSTEM_HARFBUZZ", depends_if(system_harfbuzz)(lambda _: True)) option( "--enable-geckodriver", [FILE:402:patches/patch-build_autoconf_config.guess] --- build/autoconf/config.guess.orig 2023-03-10 22:19:01 UTC +++ build/autoconf/config.guess @@ -284,7 +284,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + GUESS=%%MBSD64_TGT%% ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE [FILE:416:patches/patch-comm__third_party__rnpdefs.mozbuild] --- comm/third_party/rnpdefs.mozbuild.orig 2021-08-11 20:13:25.176921000 +0200 +++ comm/third_party/rnpdefs.mozbuild 2021-08-11 20:14:08.855374000 +0200 @@ -43,6 +43,6 @@ OS_LIBS += [static_libdir, "-l:libc++.a", "-l:libc++abi.a"] -if CONFIG["OS_ARCH"] in ("Linux", "SunOS"): +if CONFIG["OS_ARCH"] in ("Linux", "FreeBSD", "DragonFly", "SunOS", "NetBSD"): CFLAGS += ["-fPIC"] CXXFLAGS += ["-fPIC"] [FILE:421:patches/patch-comm_mail_app_nsMailApp.cpp] --- comm/mail/app/nsMailApp.cpp.orig 2020-07-13 18:10:03 UTC +++ comm/mail/app/nsMailApp.cpp @@ -306,6 +306,9 @@ int main(int argc, char* argv[], char* e } #endif + setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + #ifdef HAS_DLL_BLOCKLIST DllBlocklist_Initialize(gBlocklistInitFlags); #endif [FILE:914:patches/patch-env-api-keys] # Accept API keys from environment like before bug 1294585 --- build/moz.configure/keyfiles.configure +++ build/moz.configure/keyfiles.configure @@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x): @checking("for the %s key" % desc, lambda x: x and x is not no_key) @imports(_from="__builtin__", _import="open") @imports(_from="__builtin__", _import="IOError") + @imports(_from="os", _import="environ") def keyfile(value): if value: try: @@ -29,7 +30,7 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x): raise FatalCheckError("'%s' is empty." % value[0]) except IOError as e: raise FatalCheckError("'%s': %s." % (value[0], e.strerror)) - return no_key + return environ.get("MOZ_%s_KEY" % desc.upper().replace(" ", "_")) or no_key return keyfile [FILE:1188:patches/patch-gfx_skia_skia_src_base_SkContainers.cpp] DragonFly eventually gets malloc_usable_size, check again when sysroot updates --- gfx/skia/skia/src/base/SkContainers.cpp.orig 2023-06-08 22:09:35 UTC +++ gfx/skia/skia/src/base/SkContainers.cpp @@ -14,7 +14,7 @@ #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) #include -#elif defined(SK_BUILD_FOR_ANDROID) || (defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__)) +#elif defined(SK_BUILD_FOR_ANDROID) || (defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__)) #include #elif defined(SK_BUILD_FOR_WIN) #include @@ -38,7 +38,7 @@ SkSpan complete_size(void* pt #elif defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 17 completeSize = malloc_usable_size(ptr); SkASSERT(completeSize >= size); - #elif defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) + #elif defined(SK_BUILD_FOR_UNIX) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) completeSize = malloc_usable_size(ptr); SkASSERT(completeSize >= size); #elif defined(SK_BUILD_FOR_WIN) [FILE:742:patches/patch-i386-protobuf-alignment] # On FreeBSD/i386's LLVM, actual alignment for atomic types requires # stricter alignment rules, mostly on 8 byte boundaries instead of 4 byte # as indicated by max_align_t. --- ./toolkit/components/protobuf/src/google/protobuf/arena_impl.h.orig 2022-08-20 20:07:57.096818000 +0200 +++ ./toolkit/components/protobuf/src/google/protobuf/arena_impl.h 2022-08-20 21:40:47.821690000 +0200 @@ -640,7 +640,7 @@ #ifdef _MSC_VER #pragma warning(disable : 4324) #endif - struct alignas(kCacheAlignment) CacheAlignedLifecycleIdGenerator { + struct alignas(alignof(std::atomic)) CacheAlignedLifecycleIdGenerator { std::atomic id; }; static CacheAlignedLifecycleIdGenerator lifecycle_id_generator_; [FILE:1584:patches/patch-js_public_Utility.h] commit 57b30241311091b5a6a5a0bb1c19a8e073860fc3 Author: Christoph Moench-Tegeder do not assert on alignment when not having the bits the underlying issue seemed to be win-only anyways? diff --git js/public/Utility.h js/public/Utility.h index 0d745e9df785..f0ca7ea37162 100644 --- js/public/Utility.h +++ js/public/Utility.h @@ -480,6 +480,7 @@ static inline void js_free(void* p) { * Note: Do not add a ; at the end of a use of JS_DECLARE_NEW_METHODS, * or the build will break. */ +#if !defined(__i386__) #define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \ template \ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \ @@ -490,6 +491,15 @@ static inline void js_free(void* p) { return MOZ_LIKELY(memory) ? new (memory) T(std::forward(args)...) \ : nullptr; \ } +#else +#define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \ + template \ + QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \ + void* memory = ALLOCATOR(sizeof(T)); \ + return MOZ_LIKELY(memory) ? new (memory) T(std::forward(args)...) \ + : nullptr; \ + } +#endif /* * Given a class which should provide a 'new' method that takes an arena as [FILE:736:patches/patch-modules_fdlibm_src_math__private.h] commit 7a20fbf537ee0867244109d1ea48a8ad9de2e4ea Author: Christoph Moench-Tegeder align typedefs with our libm for historical CPUs diff --git modules/fdlibm/src/math_private.h modules/fdlibm/src/math_private.h index f4373f27834a..3b898241660f 100644 --- modules/fdlibm/src/math_private.h +++ modules/fdlibm/src/math_private.h @@ -30,9 +30,17 @@ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t */ +#ifdef __LP64__ typedef double __double_t; +#else +typedef long double __double_t; +#endif typedef __double_t double_t; +#ifdef __LP64__ typedef float __float_t; +#else +typedef long double __float_t; +#endif /* * The original fdlibm code used statements like: [FILE:2083:patches/patch-python_mozbuild_mozbuild_gn__processor.py] commit 0c96c599752d8d8f68b5ed8a6344888d1b505773 Author: Christoph Moench-Tegeder fixup gn_processor.py for FreeBSD diff --git python/mozbuild/mozbuild/gn_processor.py python/mozbuild/mozbuild/gn_processor.py index b6c51ee010a8..15b4bda9df6e 100644 --- python/mozbuild/mozbuild/gn_processor.py +++ python/mozbuild/mozbuild/gn_processor.py @@ -185,6 +185,7 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target): } oses = { "android": "Android", + "freebsd": "FreeBSD", "linux": "Linux", "mac": "Darwin", "openbsd": "OpenBSD", @@ -735,16 +736,16 @@ def main(): vars_set = [] for is_debug in (True, False): - for target_os in ("android", "linux", "mac", "openbsd", "win"): + for target_os in ("freebsd",): target_cpus = ["x64"] - if target_os in ("android", "linux", "mac", "win", "openbsd"): + if target_os in ("android", "freebsd", "linux", "mac", "win", "openbsd"): target_cpus.append("arm64") if target_os in ("android", "linux"): target_cpus.append("arm") - if target_os in ("android", "linux", "win"): + if target_os in ("android", "freebsd", "linux", "win"): target_cpus.append("x86") - if target_os == "linux": - target_cpus.extend(["ppc64", "riscv64", "mipsel", "mips64el"]) + if target_os in ("freebsd", "linux"): + target_cpus.extend(["ppc64", "mipsel", "mips64el"]) for target_cpu in target_cpus: vars = { "host_cpu": "x64", @@ -752,7 +753,7 @@ def main(): "target_cpu": target_cpu, "target_os": target_os, } - if target_os == "linux": + if target_os in ("freebsd", "linux"): for use_x11 in (True, False): vars["use_x11"] = use_x11 vars_set.append(vars.copy()) [FILE:468:patches/patch-testing_mozbase_mozinfo_mozinfo_mozinfo.py] --- testing/mozbase/mozinfo/mozinfo/mozinfo.py.orig 2023-03-10 22:19:09 UTC +++ testing/mozbase/mozinfo/mozinfo/mozinfo.py @@ -133,7 +133,7 @@ elif system == "Linux": info["os"] = "linux" info["linux_distro"] = distribution -elif system in ["DragonFly", "FreeBSD", "NetBSD", "OpenBSD"]: +elif system in ["DragonFly", "FreeBSD", "NetBSD", "OpenBSD", "MidnightBSD"]: info["os"] = "bsd" version = os_version = sys.platform elif system == "Darwin": [FILE:361:patches/patch-third__party_libwebrtc_build_build__config.h] --- third_party/libwebrtc/build/build_config.h.orig 2022-09-12 16:44:50 UTC +++ third_party/libwebrtc/build/build_config.h @@ -72,7 +72,7 @@ #define OS_WIN 1 #elif defined(__Fuchsia__) #define OS_FUCHSIA 1 -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) #define OS_FREEBSD 1 #elif defined(__NetBSD__) #define OS_NETBSD 1 [FILE:521:patches/patch-third__party_sqlite3_src_moz.build] --- third_party/sqlite3/src/moz.build.old 2021-08-09 16:08:59.381182000 -0500 +++ third_party/sqlite3/src/moz.build 2021-08-09 16:10:25.370954000 -0500 @@ -92,7 +92,8 @@ # Enabling sqlite math functions DEFINES['SQLITE_ENABLE_MATH_FUNCTIONS'] = True -if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "Android": +if CONFIG["OS_TARGET"] == "Linux" or CONFIG["OS_TARGET"] == "Android" or \ + CONFIG["OS_TARGET"] == "FreeBSD" or CONFIG["OS_TARGET"] == "DragonFly": OS_LIBS += [ "m" ] [FILE:498:patches/patch-toolkit_components_protobuf_src_google_protobuf_stubs_port.h] --- toolkit/components/protobuf/src/google/protobuf/stubs/port.h.orig 2023-09-28 22:51:59 UTC +++ toolkit/components/protobuf/src/google/protobuf/stubs/port.h @@ -59,7 +59,7 @@ #else #ifdef __APPLE__ #include // __BYTE_ORDER -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) #include // __BYTE_ORDER #elif (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) #include // __BYTE_ORDER [FILE:545:patches/patch-toolkit_xre_glxtest.cpp] --- toolkit/xre/glxtest/glxtest.cpp.orig 2023-05-28 22:08:21.663847000 +0200 +++ toolkit/xre/glxtest/glxtest.cpp 2023-05-28 22:09:33.647075000 +0200 @@ -195,9 +195,14 @@ static void get_pci_status() { log("GLX_TEST: get_pci_status start\n"); +#if defined(__FreeBSD__) + if (access("/dev/pci", F_OK) != 0) { + record_warning("cannot access /dev/pci"); +#else if (access("/sys/bus/pci/", F_OK) != 0 && access("/sys/bus/pci_express/", F_OK) != 0) { record_warning("cannot access /sys/bus/pci"); +#endif return; } [FILE:1490:patches/patch-tools_profiler_core_platform.cpp] commit 45a7951cb6a9b1735b9b6cec89db69b5933715c7 Author: Christoph Moench-Tegeder Date: Mon Mar 28 21:54:35 2022 +0200 FreeBSD can use sched_getcpu() from 1400046/1300524 on diff --git tools/profiler/core/platform.cpp tools/profiler/core/platform.cpp index 92bcc1100687..2f17a88942a8 100644 --- tools/profiler/core/platform.cpp +++ tools/profiler/core/platform.cpp @@ -111,6 +111,20 @@ # include #endif +#if defined(GP_OS_freebsd) +#include +// "after making CPU_SET macros compatible with glibc" +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000) +# include +# else +# if __x86_64__ || __i386__ +// similar cpuid_count() trick as on Darwin, using LLVM +// but not for all CPUs +# include +# endif +# endif +#endif + #if defined(GP_OS_windows) # include @@ -6368,6 +6382,19 @@ void profiler_mark_thread_awake() { cpuId = ebx >> 24; } # endif +#elif defined(GP_OS_freebsd) +# if __FreeBSD_version > 1400045 || (__FreeBSD_version > 1300523 && __FreeBSD_version < 1400000) + cpuId = sched_getcpu(); +# elif defined(__amd64__) + unsigned int eax, ebx, ecx, edx; + __cpuid_count(1, 0, eax, ebx, ecx, edx); + // Check if we have an APIC. + if ((edx & (1 << 9))) { + // APIC ID is bits 24-31 of EBX + cpuId = ebx >> 24; + } +# endif +// the fallthrough is cpuID = 0 #else cpuId = sched_getcpu(); #endif [FILE:187:files/special.mk] .if defined(BUILD_WITH_CCACHE) # QMAKE_ARGS+= --with-ccache=${LOCALBASE}/bin/sccache MAKE_ENV+= SCCACHE_DIR=${CCACHE_DIR}/sccache MAKE_ENV+= RUSTC_WRAPPER=${LOCALBASE}/bin/sccache .endif [FILE:290:files/thunderbird.desktop] [Desktop Entry] Encoding=UTF-8 Name=Thunderbird GenericName=Mail Client Comment=Mail client and News Reader Exec=thunderbird %u Icon=thunderbird.png StartupNotify=true Terminal=false Type=Application Categories=Network;Email;News;InstantMessaging; MimeType=application/mbox;message/rfc822;