# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= firefox VERSION= 151.0.2 KEYWORDS= www VARIANTS= std SDESC[std]= Mozilla web browser HOMEPAGE= https://www.mozilla.org/en-US/firefox/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= MOZILLA/firefox/releases/151.0.2/source DISTFILE[1]= firefox-151.0.2.source.tar.xz:main DF_INDEX= 1 SPKGS[std]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= cbindgen:single:std clang:set:std dav1d:dev:std evdev-proto:single:std ffmpeg:dev:std harfbuzz:dev:std icu:dev:std libcanberra:dev:std libevent:dev:std libnotify:dev:std libproxy:dev:std llvm:tools:std nasm:primary:std nodejs:primary:std nss:dev:std pciutils:dev:std rust:single:std yasm:primary:std zip:primary:std BUILDRUN_DEPENDS= dav1d:primary:std dbus-glib:primary:std ffmpeg:primary:std harfbuzz:primary:std icu:primary:std libcanberra:primary:std libdrm:primary:std libevent:primary:std libffi:primary:std libnotify:primary:std libproxy:primary:std nss:primary:std pciutils:primary:std RUN_DEPENDS= icu:data:std B_DEPS[linux]= alsa-lib:dev:std sndio:dev:std B_DEPS[netbsd]= sndio:dev:std BR_DEPS[linux]= sndio:primary:std alsa-lib:primary:std BR_DEPS[netbsd]= sndio:primary:std USES= cpe desktop-utils:single gmake jpeg perl:build pkgconfig png python:build,sqlite zlib GNOME_COMPONENTS= gdkpixbuf gtk3 XORG_COMPONENTS= pixman xcb ice sm LICENSE= MPL:single LICENSE_TERMS= single:{{WRKSRC}}/toolkit/content/license.html LICENSE_FILE= MPL:stock LICENSE_SCHEME= solo CPE_VENDOR= mozilla FPC_EQUIVALENT= www/firefox MUST_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes CONFIGURE_ENV= PYTHON3={{PYTHON_CMD}} SETUPTOOLS_USE_DISTUTILS=stdlib BINDGEN_CFLAGS="-I{{LOCALBASE}}/include" MAKE_ENV= PYTHON3={{PYTHON_CMD}} CXXSTDLIB="stdc++" SUB_FILES= launch MOUNT_PROCFS= yes QMAKE_ARGS= --enable-application=browser --enable-chrome-format=omni --enable-default-toolkit=cairo-gtk3 --enable-install-strip --enable-official-branding --enable-optimize --enable-release --enable-strip --enable-libproxy --enable-system-ffi --enable-system-pixman --disable-alsa --disable-debug --disable-debug-symbols --disable-jack --disable-profiling --disable-pulseaudio --disable-tests --disable-updater --disable-webrtc --disable-hardening --prefix="{{PREFIX}}" --with-intl-api --with-system-icu --with-system-jpeg --with-system-libevent --with-system-nspr --with-system-nss --with-system-png --with-system-zlib --with-system-libvpx --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 MAKEFILE_LINE=MOZLDFLAGS=-lrt VAR_OPSYS[midnightbsd]= MAKEFILE_LINE=CONFIGURE_TARGET=x86_64-raven-freebsd12.3 post-patch: ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${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 # disable rust checksums ${REINPLACE_CMD} -e 's/"files":{[^}]*}/"files":{}/' \ ${WRKSRC}/third_party/rust/mtu/.cargo-checksum.json \ ${WRKSRC}/third_party/rust/quinn-udp/.cargo-checksum.json # Fix midnight ${REINPLACE_CMD} -e "s|%%MBSD64_TGT%%|x86_64-raven-freebsd12.3|" \ ${WRKSRC}/build/autoconf/config.guess # 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=\"-lm ${MOZLDFLAGS} -Wl,-rpath,${PREFIX}/lib/firefox\" \ >> ${WRKSRC}/.mozconfig post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps \ ${STAGEDIR}${PREFIX}/share/applications ${INSTALL_DATA} ${WRKDIR}/firefox.desktop \ ${STAGEDIR}${PREFIX}/share/applications/ (cd ${STAGEDIR}${PREFIX}/share/pixmaps &&\ ${LN} -s ../../lib/firefox/browser/chrome/icons/default/default48.png firefox.png) # replace symlink with a launch script ${RM} ${STAGEDIR}${PREFIX}/bin/firefox ${INSTALL_SCRIPT} ${WRKDIR}/launch ${STAGEDIR}${PREFIX}/bin/firefox post-extract: ${SED} -e 's|@FIREFOX_ICON@|firefox|;s|@MOZILLA@|firefox|' \ < ${FILESDIR}/firefox.desktop.in \ > ${WRKDIR}/firefox.desktop post-install-netbsd: ${PAXCTL} +m ${STAGEDIR}${PREFIX}/lib/firefox/firefox ${PAXCTL} +m ${STAGEDIR}${PREFIX}/lib/firefox/firefox-bin [FILE:527:descriptions/desc.single] Firefox is a full-featured standard-compliant web browser, built on the Mozilla codebase by thousands of contributors around the world. It is extensible through thousands of user-contributed extensions, and features: * Improved Security; * Improved Tabbed Browsing, with tab grouping; * Private Browsing; * Spell Checking; * Search Suggestions; * Session Restore; * Web Feeds (RSS); * Live Titles; * Integrated Search; * Live Bookmarks; * Pop-up Blocker; * Phishing Protection; * Themes; * Search Engine Manager. [FILE:108:distinfo] 63c4267799f2618dd7ac5997d0306bbcf2a5306caaca0056795bc6c61d00f8c8 784076112 firefox-151.0.2.source.tar.xz [FILE:705:manifests/plist.single] %%ONLY-LINUX%%lib/firefox/ crashhelper crashreporter libmozsandbox.so bin/firefox lib/firefox/ application.ini dependentlibs.list firefox firefox-bin glxtest libgkcodecs.so liblgpllibs.so libmozavcodec.so libmozavutil.so libmozgtk.so libmozinference.so libmozsqlite3.so libxul.so omni.ja pingsender platform.ini removed-files vaapitest lib/firefox/browser/omni.ja lib/firefox/browser/chrome/icons/default/ default128.png default16.png default32.png default48.png default64.png lib/firefox/defaults/pref/channel-prefs.js lib/firefox/fonts/TwemojiMozilla.ttf lib/firefox/gmp-clearkey/0.1/ libclearkey.so manifest.json share/applications/firefox.desktop share/pixmaps/firefox.png [FILE:4649:patches/patch-addon-search] https://github.com/mozilla/addons/issues/708 https://github.com/mozilla/addons-frontend/issues/4610 diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js index 5964d40ca3a3..ed81b06af8d5 100644 --- browser/app/profile/firefox.js +++ browser/app/profile/firefox.js @@ -39,7 +39,7 @@ pref("extensions.postDownloadThirdPartyPrompt", true); // Preferences for AMO integration pref("extensions.getAddons.cache.enabled", true); pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v4/addons/search/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); +pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%"); pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v4/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%"); pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%"); @@ -214,8 +214,8 @@ pref("app.update.langpack.enabled", true); // .. etc .. // pref("extensions.update.enabled", true); -pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/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.mozilla.org/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.mozilla.org/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.mozilla.org/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 diff --git toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs index e854e04b3ce2..27e8247eb886 100644 --- toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs +++ toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs @@ -715,7 +715,7 @@ export var AddonRepository = { 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); } diff --git toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs index 5d1d2c19706b..4dcba06a95f4 100644 --- toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs +++ toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs @@ -632,7 +632,7 @@ export class AddonInternal { // 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:642:patches/patch-browser_app_nsBrowserApp.cpp] diff --git browser/app/nsBrowserApp.cpp browser/app/nsBrowserApp.cpp index 87c2e16..a41f1d9 100644 --- browser/app/nsBrowserApp.cpp.orig 2023-06-08 22:09:31 UTC +++ browser/app/nsBrowserApp.cpp @@ -388,6 +388,9 @@ int main(int argc, char* argv[], char* e // Register an external module to report on otherwise uncatchable exceptions. CrashReporter::RegisterRuntimeExceptionModule(); + 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:1318:patches/patch-bug1269654] commit ff13efe458e7786d8c810342d25a6ba8e90a422b Author: Christoph Moench-Tegeder based on BMO 1269654 : https://bugzilla.mozilla.org/show_bug.cgi?id=1269654#c5 : https://bug1269654.bmoattachments.org/attachment.cgi?id=8749234 : handle big-endian formats in Cairo format conversions : : HG changeset patch : User Lee Salzman : Date 1462463631 14400 : Thu May 05 11:53:51 2016 -0400 : Node ID 8da374804a09977c8f89af5e6e0cb37cb074595d : Parent 29662e28a9c93ac67ee0b8ddfb65a9f29bbf73f5 : handle big-endian formats in Cairo format conversions diff --git gfx/2d/HelpersCairo.h gfx/2d/HelpersCairo.h index a10e01bdd62b..f2007ee189fc 100644 --- gfx/2d/HelpersCairo.h +++ gfx/2d/HelpersCairo.h @@ -185,7 +185,11 @@ static inline cairo_content_t GfxFormatToCairoContent(SurfaceFormat format) { case SurfaceFormat::A8: return CAIRO_CONTENT_ALPHA; default: - gfxCriticalError() << "Unknown image content format " << (int)format; + if (format == SurfaceFormat::B8G8R8X8) { + return CAIRO_CONTENT_COLOR; + } else if (format != SurfaceFormat::B8G8R8A8) { + gfxCriticalError() << "Unknown image content format " << (int)format; + } return CAIRO_CONTENT_COLOR_ALPHA; } } [FILE:2175: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-06-08 22:09:41 UTC +++ media/libcubeb/src/cubeb_alsa.c @@ -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:7594:patches/patch-bug847568] Allow building against system-wide graphite2/harfbuzz diff --git config/system-headers.mozbuild config/system-headers.mozbuild index af44c89057fc..c0ac271917fb 100644 --- config/system-headers.mozbuild +++ config/system-headers.mozbuild @@ -1304,6 +1304,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_ICU"]: system_headers += [ "unicode/calendar.h", diff --git dom/base/moz.build dom/base/moz.build index 170d19f09aa9..a47fc8b1193c 100644 --- dom/base/moz.build +++ dom/base/moz.build @@ -620,6 +620,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 000000000000..ed0323eba9d5 --- /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 = 'xul' diff --git gfx/harfbuzz/README-mozilla.fbsd gfx/harfbuzz/README-mozilla.fbsd new file mode 100644 index 000000000000..2a10eb1e2b42 --- /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 56ea317bedfc..07dd7f66f1bc 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 b589efde1c5c..47f49e10df70 100755 --- gfx/skia/generate_mozbuild.py +++ gfx/skia/generate_mozbuild.py @@ -95,6 +95,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 7fee54534878..ba1a4038e4a0 100644 --- gfx/skia/moz.build +++ gfx/skia/moz.build @@ -623,6 +623,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 48f2849e2025..7d0a161a91b4 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build @@ -295,7 +295,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"] CXXFLAGS += ["-Werror=switch"] diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build index 2396210428ee..092baac6f79c 100644 --- intl/unicharutil/util/moz.build +++ intl/unicharutil/util/moz.build @@ -24,6 +24,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 1bb0430f01aa..0360e0f468c0 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build @@ -111,6 +111,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 security/rlbox/moz.build security/rlbox/moz.build index 7ad8d076f0f1..835b9d905e03 100644 --- security/rlbox/moz.build +++ security/rlbox/moz.build @@ -47,6 +47,8 @@ if CONFIG["MOZ_WASM_SANDBOXING_GRAPHITE"]: for k, v in graphite_defines: WASM_DEFINES[k] = v LOCAL_INCLUDES += ["/gfx/graphite2/src"] + if CONFIG["MOZ_SYSTEM_GRAPHITE2"]: + WASM_CXXFLAGS += CONFIG["MOZ_GRAPHITE2_CFLAGS"] if CONFIG["MOZ_WASM_SANDBOXING_OGG"]: include("/media/libogg/sources.mozbuild") diff --git toolkit/library/moz.build toolkit/library/moz.build index ee6051567c8e..c24a5a513bbc 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build @@ -298,6 +298,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 1f85d2831f2f..04ce56e2cc0b 100644 --- toolkit/moz.configure +++ toolkit/moz.configure @@ -1397,6 +1397,26 @@ def enable_cairo_ft(target, tree_freetype, freetype2_info): set_config("MOZ_ENABLE_CAIRO_FT", True, when=enable_cairo_ft) set_config("CAIRO_FT_CFLAGS", ft2_info.cflags, when=enable_cairo_ft) +# 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)) + # WebDriver (HTTP / BiDi) # ============================================================== [FILE:402:patches/patch-build_autoconf_config.guess] --- build/autoconf/config.guess.orig 2023-06-08 22:09:32 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:694:patches/patch-config_system-headers.mozbuild] --- config/system-headers.mozbuild.intermediate 2025-12-18 04:33:47 UTC +++ config/system-headers.mozbuild @@ -865,7 +865,6 @@ system_headers = [ "sys/shm.h", "sys/siginfo.h", "sys/signal.h", - "sys/single_threaded.h", "sys/socket.h", "sys/sockio.h", "sys/sparc/frame.h", @@ -1387,9 +1386,10 @@ if CONFIG["MOZ_WAYLAND"]: "wayland-util.h", ] -if CONFIG["OS_TARGET"] in ("Android", "Linux", "FreeBSD"): +if CONFIG["OS_TARGET"] in ("Android", "Linux", "FreeBSD", "DragonFly"): system_headers += [ "sys/auxv.h", + "sys/single_threaded.h", ] if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"].startswith("mips"): [FILE:893:patches/patch-env-api-keys] # Accept API keys from environment like before bug 1294585 --- build/moz.configure/keyfiles.configure.orig 2023-06-08 22:09:32 UTC +++ build/moz.configure/keyfiles.configure @@ -19,6 +19,7 @@ def keyfile(desc, default=None, help=Non @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=Non 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:263:patches/patch-hal_moz.build] --- hal/moz.build.orig 2026-05-23 13:30:41 UTC +++ hal/moz.build @@ -19,8 +19,7 @@ EXPORTS.mozilla += [ "HalWakeLockInformation.h", ] -if CONFIG["OS_TARGET"] == "Linux": - EXPORTS.mozilla += [ +EXPORTS.mozilla += [ "linux/UdevLib.h", ] [FILE:217:patches/patch-image_imgFrame.h] --- image/imgFrame.h.orig 2023-06-08 22:09:34 UTC +++ image/imgFrame.h @@ -9,6 +9,7 @@ #include #include +#include #include "AnimationParams.h" #include "MainThreadUtils.h" [FILE:316:patches/patch-ipc_chromium_src_base_platform__thread__posix.cc] --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2023-06-08 22:35:48 UTC +++ ipc/chromium/src/base/platform_thread_posix.cc @@ -16,6 +16,8 @@ #elif defined(OS_LINUX) # include # include +#elif defined(OS_DRAGONFLY) +# include #endif #if !defined(OS_MACOSX) [FILE:321:patches/patch-ipc_chromium_src_base_process__util__posix.cc] --- ipc/chromium/src/base/process_util_posix.cc.orig 2025-05-12 16:04:52 UTC +++ ipc/chromium/src/base/process_util_posix.cc @@ -55,6 +55,10 @@ # define LOG_AND_ASSERT CHROMIUM_LOG(ERROR) #endif +#ifndef ETIME +#define ETIME ETIMEDOUT +#endif + namespace base { ProcessId GetCurrentProcId() { return getpid(); } [FILE:1049:patches/patch-ipc_glue_ForkServer.cpp] commit cf2fba7d3f8414cfc993b6a2d9ab01b43f6669d5 Author: Christoph Moench-Tegeder we need signal.h and BinaryPath.h diff --git ipc/glue/ForkServer.cpp ipc/glue/ForkServer.cpp index d18fab02d686..837d0ac62f40 100644 --- ipc/glue/ForkServer.cpp +++ ipc/glue/ForkServer.cpp @@ -22,12 +22,15 @@ #include #include #include +#if defined(XP_FREEBSD) +#include +#endif #if defined(XP_LINUX) && defined(MOZ_SANDBOX) # include "mozilla/SandboxLaunch.h" #endif -#if defined(XP_OPENBSD) +#if defined(XP_OPENBSD) || defined(XP_FREEBSD) # include "BinaryPath.h" # include #endif @@ -76,7 +79,7 @@ ForkServer::ForkServer(int* aArgc, char*** aArgv) : mArgc(aArgc), mArgv(aArgv) { */ static void ForkServerPreload(int& aArgc, char** aArgv) { Omnijar::ChildProcessInit(aArgc, aArgv); -#if defined(XP_OPENBSD) +#if defined(XP_OPENBSD) || defined(XP_FREEBSD) char binaryPath[MAXPATHLEN]; nsresult rv = mozilla::BinaryPath::Get(binaryPath); if (NS_FAILED(rv)) { [FILE:712:patches/patch-ipc_glue_GeckoChildProcessHost.cpp] diff --git ipc/glue/GeckoChildProcessHost.cpp ipc/glue/GeckoChildProcessHost.cpp index 9bb8314bd98c..2bc0382a9385 100644 --- ipc/glue/GeckoChildProcessHost.cpp +++ ipc/glue/GeckoChildProcessHost.cpp @@ -1121,7 +1121,7 @@ Result BaseProcessLauncher::DoSetup() { #if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) geckoargs::sCrashReporter.Put(CrashReporter::GetChildNotificationPipe(), mChildArgs); -#elif defined(XP_UNIX) && !defined(XP_IOS) +#elif defined(XP_UNIX) && defined(__linux__) UniqueFileHandle childCrashFd = CrashReporter::GetChildNotificationPipe(); if (!childCrashFd) { return Err(LaunchError("DuplicateFileHandle failed")); [FILE:443:patches/patch-ipc_glue_SharedMemoryPlatform__posix.cpp] --- ipc/glue/SharedMemoryPlatform_posix.cpp.orig 2025-05-12 16:04:52 UTC +++ ipc/glue/SharedMemoryPlatform_posix.cpp @@ -449,7 +449,7 @@ bool Platform::Protect(char* aAddr, size } void* Platform::FindFreeAddressSpace(size_t aSize) { -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) constexpr int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE; #else constexpr int flags = MAP_ANONYMOUS | MAP_PRIVATE; [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:357:patches/patch-media_ffvpx_libavutil_cpu.c] --- media/ffvpx/libavutil/cpu.c.orig 2025-04-12 05:13:46 UTC +++ media/ffvpx/libavutil/cpu.c @@ -49,6 +49,13 @@ #include #endif +#if defined(__DragonFly__) +#undef HAVE_GETAUXVAL +#undef HAVE_ELF_AUX_INFO +#define HAVE_GETAUXVAL 0 +#define HAVE_ELF_AUX_INFO 0 +#endif + #if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO #include #endif [FILE:361:patches/patch-media_libcubeb_src_cubeb__jack.cpp] --- media/libcubeb/src/cubeb_jack.cpp.orig 2023-06-08 22:09:41 UTC +++ media/libcubeb/src/cubeb_jack.cpp @@ -8,7 +8,7 @@ */ #define _DEFAULT_SOURCE #define _BSD_SOURCE -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #define _POSIX_SOURCE #endif #include "cubeb-internal.h" [FILE:2549:patches/patch-mozglue_misc_SSE.h] commit 70c3be521da1296f7ba47bd07b67927e43634d1b Author: Christoph Moench-Tegeder disable SSE and friends in builds for legacy architectures diff --git gfx/thebes/moz.build gfx/thebes/moz.build index 71903756ea19..3591cc0f38e8 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build @@ -174,7 +174,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": ] # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp. -if CONFIG["INTEL_ARCHITECTURE"]: +if CONFIG["INTEL_ARCHITECTURE"] and CONFIG['TARGET_CPU'] == 'x86_64': SOURCES += ["gfxAlphaRecoverySSE2.cpp"] # The file uses SSE2 intrinsics, so it needs special compile flags on some # compilers. diff --git mozglue/misc/SSE.h mozglue/misc/SSE.h index 0b87366a8043..af0a0b38d23c 100644 --- mozglue/misc/SSE.h +++ mozglue/misc/SSE.h @@ -100,36 +100,50 @@ # define MOZILLA_PRESUME_MMX 1 # endif # ifdef __SSE__ +# if !defined(__386__) // It's ok to use SSE instructions based on the -march option (or // the default for x86_64 or for Intel Mac). # define MOZILLA_PRESUME_SSE 1 # endif +# endif # ifdef __SSE2__ +# if !defined(__386__) // It's ok to use SSE2 instructions based on the -march option (or // the default for x86_64 or for Intel Mac). # define MOZILLA_PRESUME_SSE2 1 # endif +# endif # ifdef __SSE3__ +# if !defined(__386__) // It's ok to use SSE3 instructions based on the -march option (or the // default for Intel Mac). # define MOZILLA_PRESUME_SSE3 1 # endif +# endif # ifdef __SSSE3__ +# if !defined(__386__) // It's ok to use SSSE3 instructions based on the -march option. # define MOZILLA_PRESUME_SSSE3 1 # endif +# endif # ifdef __SSE4A__ +# if !defined(__386__) // It's ok to use SSE4A instructions based on the -march option. # define MOZILLA_PRESUME_SSE4A 1 # endif +# endif # ifdef __SSE4_1__ +# if !defined(__386__) // It's ok to use SSE4.1 instructions based on the -march option. # define MOZILLA_PRESUME_SSE4_1 1 # endif +# endif # ifdef __SSE4_2__ +# if !defined(__386__) // It's ok to use SSE4.2 instructions based on the -march option. # define MOZILLA_PRESUME_SSE4_2 1 # endif +# endif # ifdef __AVX__ // It's ok to use AVX instructions based on the -march option. # define MOZILLA_PRESUME_AVX 1 @@ -144,8 +158,10 @@ # endif # ifdef HAVE_CPUID_H +# if !defined(__i386__) # define MOZILLA_SSE_HAVE_CPUID_DETECTION # endif +# endif #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64)) [FILE:877:patches/patch-mozglue_static_rust_lib.rs] --- mozglue/static/rust/lib.rs.orig 2024-07-04 17:04:21 UTC +++ mozglue/static/rust/lib.rs @@ -157,7 +157,7 @@ extern "C" { fn _aligned_free(ptr: *mut c_void); #[cfg(not(windows))] - fn memalign(align: usize, size: usize) -> *mut c_void; + fn posix_memalign(ptr: *mut *mut c_void, alignment: usize, size: usize) -> c_int; } #[cfg(windows)] @@ -177,7 +177,9 @@ fn need_memalign(layout: Layout) -> bool unsafe impl GlobalAlloc for GeckoAlloc { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { if need_memalign(layout) { - memalign(layout.align(), layout.size()) as *mut u8 + let mut ptr: *mut c_void = std::ptr::null_mut(); + let _err = posix_memalign(&mut ptr, layout.align(), layout.size()); + return ptr as *mut u8; } else { malloc(layout.size()) as *mut u8 } [FILE:4952:patches/patch-pipewire_init] Adapted from: Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs index cab90280ef40..13718b8ce83c 100644 --- third_party/libwebrtc/modules/portal/pipewire.sigs +++ third_party/libwebrtc/modules/portal/pipewire.sigs @@ -15,8 +15,8 @@ pw_loop * pw_loop_new(const spa_dict *props); // pipewire.h -void pw_init(int *argc, char **argv[]); -void pw_deinit(); +void pipewire_init(int *argc, char **argv[]); +void pipewire_deinit(); const char* pw_get_library_version(); diff --git third_party/libwebrtc/modules/portal/pipewire_utils.cc third_party/libwebrtc/modules/portal/pipewire_utils.cc index 7008696b7d20..758b21e2677c 100644 --- third_party/libwebrtc/modules/portal/pipewire_utils.cc +++ third_party/libwebrtc/modules/portal/pipewire_utils.cc @@ -108,7 +108,7 @@ PipeWireThreadLoopLock::~PipeWireThreadLoopLock() { RTC_NO_SANITIZE("cfi-icall") PipeWireInitializer::PipeWireInitializer() { - pw_init(/*argc=*/nullptr, /*argv=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr); } RTC_NO_SANITIZE("cfi-icall") @@ -116,7 +116,7 @@ PipeWireInitializer::~PipeWireInitializer() { PipeWireVersion pw_client_version = PipeWireVersion::Parse(pw_get_library_version()); if (pw_client_version >= kReentrantDeinitMinVersion) { - pw_deinit(); + pipewire_deinit(); } } diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp index 11f938b1de20..0191e557374d 100644 --- third_party/pipewire/libpipewire/mozpipewire.cpp +++ third_party/pipewire/libpipewire/mozpipewire.cpp @@ -28,8 +28,8 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size); static int (*pw_core_disconnect_fn)(struct pw_core *core); -static void (*pw_init_fn)(int *argc, char **argv[]); -static void (*pw_deinit_fn)(); +static void (*pipewire_init_fn)(int *argc, char **argv[]); +static void (*pipewire_deinit_fn)(); static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy); static void (*pw_stream_add_listener_fn)(struct pw_stream *stream, struct spa_hook *listener, @@ -74,8 +74,8 @@ bool IsPwLibraryLoaded() { IS_FUNC_LOADED(pw_context_destroy_fn) && IS_FUNC_LOADED(pw_context_new_fn) && IS_FUNC_LOADED(pw_core_disconnect_fn) && - IS_FUNC_LOADED(pw_init_fn) && - IS_FUNC_LOADED(pw_deinit_fn) && + IS_FUNC_LOADED(pipewire_init_fn) && + IS_FUNC_LOADED(pipewire_deinit_fn) && IS_FUNC_LOADED(pw_proxy_destroy_fn) && IS_FUNC_LOADED(pw_stream_add_listener_fn) && IS_FUNC_LOADED(pw_stream_connect_fn) && @@ -118,8 +118,8 @@ bool LoadPWLibrary() { GET_FUNC(pw_context_destroy, pwLib); GET_FUNC(pw_context_new, pwLib); GET_FUNC(pw_core_disconnect, pwLib); - GET_FUNC(pw_init, pwLib); - GET_FUNC(pw_deinit, pwLib); + GET_FUNC(pipewire_init, pwLib); + GET_FUNC(pipewire_deinit, pwLib); GET_FUNC(pw_stream_add_listener, pwLib); GET_FUNC(pw_stream_connect, pwLib); GET_FUNC(pw_stream_disconnect, pwLib); @@ -199,21 +199,21 @@ pw_core_disconnect(struct pw_core *core) } void -pw_init(int *argc, char **argv[]) +pipewire_init(int *argc, char **argv[]) { if (!LoadPWLibrary()) { return; } - return pw_init_fn(argc, argv); + return pipewire_init_fn(argc, argv); } void -pw_deinit() +pipewire_deinit() { if (!LoadPWLibrary()) { return; } - return pw_deinit_fn(); + return pipewire_deinit_fn(); } void diff --git third_party/pipewire/pipewire/log.h third_party/pipewire/pipewire/log.h index a95a64fef26d..e3d4ebd51285 100644 --- third_party/pipewire/pipewire/log.h +++ third_party/pipewire/pipewire/log.h @@ -31,8 +31,8 @@ extern enum spa_log_level pw_log_level; extern struct spa_log_topic * const PW_LOG_TOPIC_DEFAULT; /** Configure a logging module. This is usually done automatically - * in pw_init() but you can install a custom logger before calling - * pw_init(). */ + * in pipewire_init() but you can install a custom logger before calling + * pipewire_init(). */ void pw_log_set(struct spa_log *log); /** Get the log interface */ diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h index 870f2f178e24..2bfd4ba46dae 100644 --- third_party/pipewire/pipewire/pipewire.h +++ third_party/pipewire/pipewire/pipewire.h @@ -49,9 +49,9 @@ extern "C" { * \{ */ void -pw_init(int *argc, char **argv[]); +pipewire_init(int *argc, char **argv[]); -void pw_deinit(void); +void pipewire_deinit(void); bool pw_debug_is_category_enabled(const char *name); [FILE:762:patches/patch-python_sites_build.txt] commit 691f8469ca04b6b9d2944e73637378773820b415 Author: Christoph Moench-Tegeder taskcluster-taskgraph not available, don't try to download diff --git python/sites/build.txt python/sites/build.txt index 1654169c4a28..0000d9279345 100644 --- python/sites/build.txt +++ python/sites/build.txt @@ -1,6 +1,6 @@ requires-python:>=3.9 pth:third_party/python/vsdownload -pypi-optional:taskcluster-taskgraph==20.0.0:toolchain artifacts will not be bootstrapped +# pypi-optional:taskcluster-taskgraph==20.0.0:toolchain artifacts will not be bootstrapped vendored:testing/web-platform/tests/tools/third_party/h2/src vendored:testing/web-platform/tests/tools/third_party/hpack/src vendored:testing/web-platform/tests/tools/third_party/html5lib [FILE:1686:patches/patch-python_sites_mach.txt] commit 7c7760ecbc996ee3d1a2748b390e533298a3eb84 Author: Christoph Moench-Tegeder avoid problems with python modules in mach diff --git python/sites/mach.txt python/sites/mach.txt index b985c6b0f509..1341caba271b 100644 --- python/sites/mach.txt +++ python/sites/mach.txt @@ -58,15 +58,15 @@ pth:xpcom/geckoprocesstypes_generator pth:xpcom/idl-parser # glean-sdk may not be installable if a wheel isn't available # and it has to be built from source. -pypi-optional:glean-sdk==67.2.0:telemetry will not be collected -pypi-optional:orjson>=3.10:json operations will be slower in various tools +# pypi-optional:glean-sdk==67.2.0:telemetry will not be collected +# pypi-optional:orjson>=3.10:json operations will be slower in various tools # Mach gracefully handles the case where `psutil` is unavailable. # We aren't (yet) able to pin packages in automation, so we have to # support down to the oldest locally-installed version (5.4.2). -pypi-optional:psutil>=5.4.2:telemetry will be missing some data -pypi-optional:rtoml>=0.11.0:toml operations will be slower in various tools -pypi-optional:zstandard>=0.11.1,<=0.25.0:zstd archives will not be possible to extract -vendored-fallback:pyyaml:third_party/python/pyyaml/lib/:faster native loading is disabled +# pypi-optional:psutil>=5.4.2:telemetry will be missing some data +# pypi-optional:rtoml>=0.11.0:toml operations will be slower in various tools +# pypi-optional:zstandard>=0.11.1,<=0.25.0:zstd archives will not be possible to extract +vendored:pyyaml:third_party/python/pyyaml/lib/ vendored:third_party/python/ansicon vendored:third_party/python/appdirs vendored:third_party/python/async_timeout [FILE:369:patches/patch-security_sandbox_chromium_build_build__config.h] --- security/sandbox/chromium/build/build_config.h.orig 2024-12-09 19:17:31 UTC +++ security/sandbox/chromium/build/build_config.h @@ -51,7 +51,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:488:patches/patch-testing_mozbase_mozinfo_mozinfo_mozinfo.py] --- testing/mozbase/mozinfo/mozinfo/mozinfo.py.orig 2024-10-13 21:12:22 UTC +++ testing/mozbase/mozinfo/mozinfo/mozinfo.py @@ -106,7 +106,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" # community builds version = os_version = sys.platform elif system == "Darwin": [FILE:359:patches/patch-third__party_chromium_build_build__config.h] --- third_party/chromium/build/build_config.h.orig 2024-12-09 19:17:37 UTC +++ third_party/chromium/build/build_config.h @@ -76,7 +76,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:293:patches/patch-third__party_dav1d_src_mem.h] --- third_party/dav1d/src/mem.h.orig 2025-01-13 13:46:01 UTC +++ third_party/dav1d/src/mem.h @@ -33,7 +33,9 @@ #include #if defined(_WIN32) || HAVE_MEMALIGN +# if !defined(__DragonFly__) && !defined(__FreeBSD__) #include +# endif #endif #include "dav1d/dav1d.h" [FILE:452:patches/patch-third__party_llama.cpp_ggml_src_ggml-c.c] --- third_party/llama.cpp/ggml/src/ggml-c.c.orig 2025-12-05 17:43:19 UTC +++ third_party/llama.cpp/ggml/src/ggml-c.c @@ -16,7 +16,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include // using malloc.h with MSC/MINGW -#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) +#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include #endif [FILE:478:patches/patch-third__party_llama.cpp_ggml_src_ggml-cpu_ggml-cpu-c.c] --- third_party/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-c.c.orig 2025-10-16 03:20:41 UTC +++ third_party/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-c.c @@ -17,7 +17,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include // using malloc.h with MSC/MINGW -#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) +#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include #endif [FILE:355:patches/patch-third__party_rust_mtu_build.rs] --- third_party/rust/mtu/build.rs.orig 2025-04-14 12:07:30 UTC +++ third_party/rust/mtu/build.rs @@ -103,6 +103,7 @@ fn main() { target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", + target_os = "dragonfly", target_os = "solaris" ) } [FILE:681:patches/patch-third__party_rust_mtu_src_bsd.rs] --- third_party/rust/mtu/src/bsd.rs.orig 2025-04-14 12:07:30 UTC +++ third_party/rust/mtu/src/bsd.rs @@ -50,7 +50,7 @@ const ALIGN: usize = std::mem::size_of:: // See https://github.com/Arquivotheca/Solaris-8/blob/2ad1d32f9eeed787c5adb07eb32544276e2e2444/osnet_volume/usr/src/cmd/cmd-inet/usr.sbin/route.c#L238-L239 const ALIGN: usize = std::mem::size_of::(); -#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "openbsd", target_os = "dragonfly"))] asserted_const_with_type!(RTM_ADDRS, i32, RTA_DST, u32); #[cfg(any(target_os = "netbsd", target_os = "solaris"))] [FILE:395:patches/patch-third__party_sqlite3_ext_sqlite-vec_sqlite-vec.c] diff --git third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c index 96612e26d385..c43c46136bef 100644 --- third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c +++ third_party/sqlite3/ext/sqlite-vec/sqlite-vec.c @@ -11,6 +11,8 @@ #include #include +#include + #ifndef SQLITE_VEC_OMIT_FS #include #endif [FILE:515:patches/patch-third__party_sqlite3_src_moz.build] --- third_party/sqlite3/src/moz.build.orig 2023-06-08 22:35:48 UTC +++ third_party/sqlite3/src/moz.build @@ -92,7 +92,8 @@ DEFINES['SQLITE_TEMP_FILE_PREFIX'] = '"m # 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-06-08 22:09:52 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:1355:patches/patch-toolkit_crashreporter_google-breakpad_src_common_linux_memory__mapped__file.cc] commit d47074b830ce057d758b8d1e9200829824666cd5 Author: Christoph Moench-Tegeder disable linux-only code in crashreporter when not building on linux The crashreporter itself is not active here anyway, but parts of the code are still compiled for interface reasons. We skip the parts which are linux-only. diff --git toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc index c18ddb01f8bc..98506221e3ba 100644 --- toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc +++ toolkit/crashreporter/google-breakpad/src/common/linux/memory_mapped_file.cc @@ -58,6 +58,9 @@ MemoryMappedFile::~MemoryMappedFile() { bool MemoryMappedFile::Map(const char* path, size_t offset) { Unmap(); +#if !defined(__linux__) + return false; +#else int fd = sys_open(path, O_RDONLY, 0); if (fd == -1) { @@ -97,13 +100,16 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { content_.Set(data, file_len - offset); return true; +#endif } void MemoryMappedFile::Unmap() { +#if defined(__linux__) if (content_.data()) { sys_munmap(const_cast(content_.data()), content_.length()); content_.Set(NULL, 0); } +#endif } } // namespace google_breakpad [FILE:445:patches/patch-toolkit_library_gen__buildid.py] --- toolkit/library/gen_buildid.py.orig 2024-07-04 17:04:30 UTC +++ toolkit/library/gen_buildid.py @@ -78,7 +78,7 @@ def write_file(output, maybe_buildid): #endif struct note {{ - Elf32_Nhdr header; // Elf32 or Elf64 doesn't matter, they're the same size + Elf64_Nhdr header; // Elf32 or Elf64 doesn't matter, they're the same size char name[(sizeof(note_name) + 3) / 4 * 4]; char desc[(sizeof(note_desc) + 3) / 4 * 4]; }}; [FILE:362:patches/patch-toolkit_system_unixproxy_moz.build] --- toolkit/system/unixproxy/moz.build.orig 2024-04-19 17:45:00 UTC +++ toolkit/system/unixproxy/moz.build @@ -10,10 +10,6 @@ with Files("**"): if CONFIG["MOZ_ENABLE_LIBPROXY"]: CXXFLAGS += CONFIG["MOZ_LIBPROXY_CFLAGS"] SOURCES += [ - "nsLibProxySettings.cpp", - ] -else: - SOURCES += [ "nsUnixSystemProxySettings.cpp", ] [FILE:478:patches/patch-toolkit_system_unixproxy_nsLibProxySettings.cpp] --- toolkit/system/unixproxy/nsLibProxySettings.cpp.orig 2026-05-23 13:30:56 UTC +++ toolkit/system/unixproxy/nsLibProxySettings.cpp @@ -111,6 +111,12 @@ nsUnixSystemProxySettings::GetSystemWPAD return NS_OK; } +NS_IMETHODIMP +nsUnixSystemProxySettings::GetSystemProxyDirect(bool* aResult) { + *aResult = false; + return NS_OK; +} + NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { return do_AddRef(new nsUnixSystemProxySettings()).downcast(); } [FILE:538:patches/patch-xpcom_base_nsMemoryInfoDumper.cpp] commit e9c859ea5fcb425575a66254bdc783437bfb95bd Author: Christoph Moench-Tegeder need signal.h for signal stuff on FreeBSD diff --git xpcom/base/nsMemoryInfoDumper.cpp xpcom/base/nsMemoryInfoDumper.cpp index 480e7de2f701..eabb85218130 100644 --- xpcom/base/nsMemoryInfoDumper.cpp +++ xpcom/base/nsMemoryInfoDumper.cpp @@ -41,6 +41,9 @@ #if defined(MOZ_SUPPORTS_RT_SIGNALS) # include +#if defined(__FreeBSD__) +# include +#endif # include # include #endif [FILE:9130:files/firefox.desktop.in] [Desktop Entry] Version=1.0 Name=Firefox Web Browser Name[ar]=متصفح الويب فَيَرفُكْس Name[ast]=Restolador web Firefox Name[bn]=ফায়ারফক্স ওয়েব ব্রাউজার Name[ca]=Navegador web Firefox Name[cs]=Firefox Webový prohlížeč Name[da]=Firefox - internetbrowser Name[el]=Περιηγητής Firefox Name[es]=Navegador web Firefox Name[et]=Firefoxi veebibrauser Name[fa]=مرورگر اینترنتی Firefox Name[fi]=Firefox-selain Name[fr]=Navigateur Web Firefox Name[gl]=Navegador web Firefox Name[he]=דפדפן האינטרנט Firefox Name[hr]=Firefox web preglednik Name[hu]=Firefox webböngésző Name[it]=Firefox Browser Web Name[ja]=Firefox ウェブ・ブラウザ Name[ko]=Firefox 웹 브라우저 Name[ku]=Geroka torê Firefox Name[lt]=Firefox interneto naršyklė Name[nb]=Firefox Nettleser Name[nl]=Firefox webbrowser Name[nn]=Firefox Nettlesar Name[no]=Firefox Nettleser Name[pl]=Przeglądarka WWW Firefox Name[pt]=Firefox Navegador Web Name[pt_BR]=Navegador Web Firefox Name[ro]=Firefox – Navigator Internet Name[ru]=Веб-браузер Firefox Name[sk]=Firefox - internetový prehliadač Name[sl]=Firefox spletni brskalnik Name[sv]=Firefox webbläsare Name[tr]=Firefox Web Tarayıcısı Name[ug]=Firefox توركۆرگۈ Name[uk]=Веб-браузер Firefox Name[vi]=Trình duyệt web Firefox Name[zh_CN]=Firefox 网络浏览器 Name[zh_TW]=Firefox 網路瀏覽器 Comment=Browse the World Wide Web Comment[ar]=تصفح الشبكة العنكبوتية العالمية Comment[ast]=Restola pela Rede Comment[bn]=ইন্টারনেট ব্রাউজ করুন Comment[ca]=Navegueu per la web Comment[cs]=Prohlížení stránek World Wide Webu Comment[da]=Surf på internettet Comment[de]=Im Internet surfen Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web) Comment[es]=Navegue por la web Comment[et]=Lehitse veebi Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید Comment[fi]=Selaa Internetin WWW-sivuja Comment[fr]=Naviguer sur le Web Comment[gl]=Navegar pola rede Comment[he]=גלישה ברחבי האינטרנט Comment[hr]=Pretražite web Comment[hu]=A világháló böngészése Comment[it]=Esplora il web Comment[ja]=ウェブを閲覧します Comment[ko]=웹을 돌아 다닙니다 Comment[ku]=Li torê bigere Comment[lt]=Naršykite internete Comment[nb]=Surf på nettet Comment[nl]=Verken het internet Comment[nn]=Surf på nettet Comment[no]=Surf på nettet Comment[pl]=Przeglądanie stron WWW Comment[pt]=Navegue na Internet Comment[pt_BR]=Navegue na Internet Comment[ro]=Navigați pe Internet Comment[ru]=Доступ в Интернет Comment[sk]=Prehliadanie internetu Comment[sl]=Brskajte po spletu Comment[sv]=Surfa på webben Comment[tr]=İnternet'te Gezinin Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ Comment[uk]=Перегляд сторінок Інтернету Comment[vi]=Để duyệt các trang web Comment[zh_CN]=浏览互联网 Comment[zh_TW]=瀏覽網際網路 GenericName=Web Browser GenericName[ar]=متصفح ويب GenericName[ast]=Restolador Web GenericName[bn]=ওয়েব ব্রাউজার GenericName[ca]=Navegador web GenericName[cs]=Webový prohlížeč GenericName[da]=Webbrowser GenericName[el]=Περιηγητής διαδικτύου GenericName[es]=Navegador web GenericName[et]=Veebibrauser GenericName[fa]=مرورگر اینترنتی GenericName[fi]=WWW-selain GenericName[fr]=Navigateur Web GenericName[gl]=Navegador Web GenericName[he]=דפדפן אינטרנט GenericName[hr]=Web preglednik GenericName[hu]=Webböngésző GenericName[it]=Browser web GenericName[ja]=ウェブ・ブラウザ GenericName[ko]=웹 브라우저 GenericName[ku]=Geroka torê GenericName[lt]=Interneto naršyklė GenericName[nb]=Nettleser GenericName[nl]=Webbrowser GenericName[nn]=Nettlesar GenericName[no]=Nettleser GenericName[pl]=Przeglądarka WWW GenericName[pt]=Navegador Web GenericName[pt_BR]=Navegador Web GenericName[ro]=Navigator Internet GenericName[ru]=Веб-браузер GenericName[sk]=Internetový prehliadač GenericName[sl]=Spletni brskalnik GenericName[sv]=Webbläsare GenericName[tr]=Web Tarayıcı GenericName[ug]=توركۆرگۈ GenericName[uk]=Веб-браузер GenericName[vi]=Trình duyệt Web GenericName[zh_CN]=网络浏览器 GenericName[zh_TW]=網路瀏覽器 Keywords=Internet;WWW;Browser;Web;Explorer Keywords[ar]=انترنت;إنترنت;متصفح;ويب;وب Keywords[ast]=Internet;WWW;Restolador;Web;Esplorador Keywords[ca]=Internet;WWW;Navegador;Web;Explorador;Explorer Keywords[cs]=Internet;WWW;Prohlížeč;Web;Explorer Keywords[da]=Internet;Internettet;WWW;Browser;Browse;Web;Surf;Nettet Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen Keywords[el]=Internet;WWW;Browser;Web;Explorer;Διαδίκτυο;Περιηγητής;Firefox;Φιρεφοχ;Ιντερνετ Keywords[es]=Explorador;Internet;WWW Keywords[fi]=Internet;WWW;Browser;Web;Explorer;selain;Internet-selain;internetselain;verkkoselain;netti;surffaa Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur Keywords[he]=דפדפן;אינטרנט;רשת;אתרים;אתר;פיירפוקס;מוזילה; Keywords[hr]=Internet;WWW;preglednik;Web Keywords[hu]=Internet;WWW;Böngésző;Web;Háló;Net;Explorer Keywords[it]=Internet;WWW;Browser;Web;Navigatore Keywords[is]=Internet;WWW;Vafri;Vefur;Netvafri;Flakk Keywords[ja]=Internet;WWW;Web;インターネット;ブラウザ;ウェブ;エクスプローラ Keywords[nb]=Internett;WWW;Nettleser;Explorer;Web;Browser;Nettside Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online Keywords[pt]=Internet;WWW;Browser;Web;Explorador;Navegador Keywords[pt_BR]=Internet;WWW;Browser;Web;Explorador;Navegador Keywords[ru]=Internet;WWW;Browser;Web;Explorer;интернет;браузер;веб;файрфокс;огнелис Keywords[sk]=Internet;WWW;Prehliadač;Web;Explorer Keywords[sl]=Internet;WWW;Browser;Web;Explorer;Brskalnik;Splet Keywords[tr]=İnternet;WWW;Tarayıcı;Web;Gezgin;Web sitesi;Site;sörf;çevrimiçi;tara Keywords[uk]=Internet;WWW;Browser;Web;Explorer;Інтернет;мережа;переглядач;оглядач;браузер;веб;файрфокс;вогнелис;перегляд Keywords[vi]=Internet;WWW;Browser;Web;Explorer;Trình duyệt;Trang web Keywords[zh_CN]=Internet;WWW;Browser;Web;Explorer;网页;浏览;上网;火狐;Firefox;ff;互联网;网站; Keywords[zh_TW]=Internet;WWW;Browser;Web;Explorer;網際網路;網路;瀏覽器;上網;網頁;火狐 Exec=@MOZILLA@ %U Terminal=false Type=Application Icon=@FIREFOX_ICON@ Categories=GNOME;GTK;Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; StartupNotify=true Actions=NewWindow;NewPrivateWindow; [Desktop Action NewWindow] Name=Open a New Window Name[ar]=افتح نافذة جديدة Name[ast]=Abrir una ventana nueva Name[bn]=Abrir una ventana nueva Name[ca]=Obre una finestra nova Name[cs]=Otevřít nové okno Name[da]=Åbn et nyt vindue Name[de]=Ein neues Fenster öffnen Name[el]=Άνοιγμα νέου παραθύρου Name[es]=Abrir una ventana nueva Name[fi]=Avaa uusi ikkuna Name[fr]=Ouvrir une nouvelle fenêtre Name[gl]=Abrir unha nova xanela Name[he]=פתיחת חלון חדש Name[hr]=Otvori novi prozor Name[hu]=Új ablak nyitása Name[it]=Apri una nuova finestra Name[ja]=新しいウィンドウを開く Name[ko]=새 창 열기 Name[ku]=Paceyeke nû veke Name[lt]=Atverti naują langą Name[nb]=Åpne et nytt vindu Name[nl]=Nieuw venster openen Name[pt]=Abrir nova janela Name[pt_BR]=Abrir nova janela Name[ro]=Deschide o fereastră nouă Name[ru]=Новое окно Name[sk]=Otvoriť nové okno Name[sl]=Odpri novo okno Name[sv]=Öppna ett nytt fönster Name[tr]=Yeni pencere aç Name[ug]=يېڭى كۆزنەك ئېچىش Name[uk]=Відкрити нове вікно Name[vi]=Mở cửa sổ mới Name[zh_CN]=新建窗口 Name[zh_TW]=開啟新視窗 Exec=@MOZILLA@ -new-window [Desktop Action NewPrivateWindow] Name=Open a New Private Window Name[ar]=افتح نافذة جديدة للتصفح الخاص Name[ca]=Obre una finestra nova en mode d'incògnit Name[de]=Ein neues privates Fenster öffnen Name[es]=Abrir una ventana privada nueva Name[fi]=Avaa uusi yksityinen ikkuna Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée Name[he]=פתיחת חלון גלישה פרטית חדש Name[hu]=Új privát ablak nyitása Name[it]=Apri una nuova finestra anonima Name[nb]=Åpne et nytt privat vindu Name[ru]=Новое приватное окно Name[sl]=Odpri novo okno zasebnega brskanja Name[tr]=Yeni bir pencere aç Name[uk]=Відкрити нове вікно у потайливому режимі Name[zh_TW]=開啟新隱私瀏覽視窗 Exec=@MOZILLA@ -private-window [FILE:45:files/launch.in] #!/bin/sh %%PREFIX%%/lib/firefox/firefox $@ [FILE:1745:files/messages-single.ucl] firefox: { type: "install" message: <> .ssh/authorized_keys" The SSH server on `remote_host` must allow pub key authentication. EOM } [FILE:4952:files/patch-pipewire_init] Adapted from: Chase ABI from multimedia/pipewire/files/patch-src_pipewire_pipewire_init Ref: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1819 diff --git third_party/libwebrtc/modules/portal/pipewire.sigs third_party/libwebrtc/modules/portal/pipewire.sigs index cab90280ef40..13718b8ce83c 100644 --- third_party/libwebrtc/modules/portal/pipewire.sigs +++ third_party/libwebrtc/modules/portal/pipewire.sigs @@ -15,8 +15,8 @@ pw_loop * pw_loop_new(const spa_dict *props); // pipewire.h -void pw_init(int *argc, char **argv[]); -void pw_deinit(); +void pipewire_init(int *argc, char **argv[]); +void pipewire_deinit(); const char* pw_get_library_version(); diff --git third_party/libwebrtc/modules/portal/pipewire_utils.cc third_party/libwebrtc/modules/portal/pipewire_utils.cc index 7008696b7d20..758b21e2677c 100644 --- third_party/libwebrtc/modules/portal/pipewire_utils.cc +++ third_party/libwebrtc/modules/portal/pipewire_utils.cc @@ -108,7 +108,7 @@ PipeWireThreadLoopLock::~PipeWireThreadLoopLock() { RTC_NO_SANITIZE("cfi-icall") PipeWireInitializer::PipeWireInitializer() { - pw_init(/*argc=*/nullptr, /*argv=*/nullptr); + pipewire_init(/*argc=*/nullptr, /*argv=*/nullptr); } RTC_NO_SANITIZE("cfi-icall") @@ -116,7 +116,7 @@ PipeWireInitializer::~PipeWireInitializer() { PipeWireVersion pw_client_version = PipeWireVersion::Parse(pw_get_library_version()); if (pw_client_version >= kReentrantDeinitMinVersion) { - pw_deinit(); + pipewire_deinit(); } } diff --git third_party/pipewire/libpipewire/mozpipewire.cpp third_party/pipewire/libpipewire/mozpipewire.cpp index 11f938b1de20..0191e557374d 100644 --- third_party/pipewire/libpipewire/mozpipewire.cpp +++ third_party/pipewire/libpipewire/mozpipewire.cpp @@ -28,8 +28,8 @@ struct pw_context * (*pw_context_new_fn)(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size); static int (*pw_core_disconnect_fn)(struct pw_core *core); -static void (*pw_init_fn)(int *argc, char **argv[]); -static void (*pw_deinit_fn)(); +static void (*pipewire_init_fn)(int *argc, char **argv[]); +static void (*pipewire_deinit_fn)(); static void (*pw_proxy_destroy_fn)(struct pw_proxy *proxy); static void (*pw_stream_add_listener_fn)(struct pw_stream *stream, struct spa_hook *listener, @@ -74,8 +74,8 @@ bool IsPwLibraryLoaded() { IS_FUNC_LOADED(pw_context_destroy_fn) && IS_FUNC_LOADED(pw_context_new_fn) && IS_FUNC_LOADED(pw_core_disconnect_fn) && - IS_FUNC_LOADED(pw_init_fn) && - IS_FUNC_LOADED(pw_deinit_fn) && + IS_FUNC_LOADED(pipewire_init_fn) && + IS_FUNC_LOADED(pipewire_deinit_fn) && IS_FUNC_LOADED(pw_proxy_destroy_fn) && IS_FUNC_LOADED(pw_stream_add_listener_fn) && IS_FUNC_LOADED(pw_stream_connect_fn) && @@ -118,8 +118,8 @@ bool LoadPWLibrary() { GET_FUNC(pw_context_destroy, pwLib); GET_FUNC(pw_context_new, pwLib); GET_FUNC(pw_core_disconnect, pwLib); - GET_FUNC(pw_init, pwLib); - GET_FUNC(pw_deinit, pwLib); + GET_FUNC(pipewire_init, pwLib); + GET_FUNC(pipewire_deinit, pwLib); GET_FUNC(pw_stream_add_listener, pwLib); GET_FUNC(pw_stream_connect, pwLib); GET_FUNC(pw_stream_disconnect, pwLib); @@ -199,21 +199,21 @@ pw_core_disconnect(struct pw_core *core) } void -pw_init(int *argc, char **argv[]) +pipewire_init(int *argc, char **argv[]) { if (!LoadPWLibrary()) { return; } - return pw_init_fn(argc, argv); + return pipewire_init_fn(argc, argv); } void -pw_deinit() +pipewire_deinit() { if (!LoadPWLibrary()) { return; } - return pw_deinit_fn(); + return pipewire_deinit_fn(); } void diff --git third_party/pipewire/pipewire/log.h third_party/pipewire/pipewire/log.h index a95a64fef26d..e3d4ebd51285 100644 --- third_party/pipewire/pipewire/log.h +++ third_party/pipewire/pipewire/log.h @@ -31,8 +31,8 @@ extern enum spa_log_level pw_log_level; extern struct spa_log_topic * const PW_LOG_TOPIC_DEFAULT; /** Configure a logging module. This is usually done automatically - * in pw_init() but you can install a custom logger before calling - * pw_init(). */ + * in pipewire_init() but you can install a custom logger before calling + * pipewire_init(). */ void pw_log_set(struct spa_log *log); /** Get the log interface */ diff --git third_party/pipewire/pipewire/pipewire.h third_party/pipewire/pipewire/pipewire.h index 870f2f178e24..2bfd4ba46dae 100644 --- third_party/pipewire/pipewire/pipewire.h +++ third_party/pipewire/pipewire/pipewire.h @@ -49,9 +49,9 @@ extern "C" { * \{ */ void -pw_init(int *argc, char **argv[]); +pipewire_init(int *argc, char **argv[]); -void pw_deinit(void); +void pipewire_deinit(void); bool pw_debug_is_category_enabled(const char *name); [FILE:181:files/special.mk] .if defined(BUILD_WITH_CCACHE) # disable sccache - it freezes all the time # MAKE_ENV+= SCCACHE_DIR=${CCACHE_DIR}/sccache # MAKE_ENV+= RUSTC_WRAPPER=${LOCALBASE}/bin/sccache .endif