diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 4de237ef04d8..0ca96afd6008 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,72 +1,73 @@ PORTNAME= firefox DISTVERSION= 117.0 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= www wayland MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}${DISTVERSIONSUFFIX}-candidates/build1/source + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}${DISTVERSIONSUFFIX}-candidates/build2/source DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla WWW= https://www.mozilla.com/firefox BUILD_DEPENDS= nspr>=4.32:devel/nspr \ nss>=3.92:security/nss \ icu>=73.1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=8.0.1:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.39:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ libvpx>=1.13.0:multimedia/libvpx \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf2.13:devel/autoconf2.13 \ nasm:devel/nasm \ yasm:devel/yasm \ zip:archivers/zip USE_GECKO= gecko CONFLICTS_INSTALL= firefox-esr USE_MOZILLA= -sqlite CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 # work around bindgen not finding ICU, e.g. # dist/include/mozilla/intl/ICU4CGlue.h:8:10: fatal error: 'unicode/uenum.h' file not found, err: true CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" USES= tar:xz # helpful when testing beta WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png FIREFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/${MOZILLA}-snap/${MOZILLA}.desktop MOZ_OPTIONS= --enable-application=browser \ --enable-official-branding .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${ARCH} == powerpc64 MOZ_OPTIONS+= --without-wasm-sandboxed-libraries .else BUILD_DEPENDS+= ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a:devel/wasi-libcxx \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \ ${LOCALBASE}/llvm${LLVM_DEFAULT}/lib/clang/${LLVM_VERSION}/lib/wasi/libclang_rt.builtins-wasm32.a:devel/wasi-compiler-rt${LLVM_DEFAULT} MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .endif post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e '/^Icon/s/=.*/=${FIREFOX_ICON:R}/' \ ${FIREFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp post-install: ${INSTALL_DATA} ${FIREFOX_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/ ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${FIREFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${FIREFOX_ICON} .include diff --git a/www/firefox/distinfo b/www/firefox/distinfo index 1672d14d103d..8e56e7a40813 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1692633856 -SHA256 (firefox-117.0.source.tar.xz) = fd1f968731d190167f319a6b1fe2db73f6c79e0d651075332b0f561a6c4659bd -SIZE (firefox-117.0.source.tar.xz) = 511181236 +TIMESTAMP = 1692906603 +SHA256 (firefox-117.0.source.tar.xz) = fa524cb9a63334d74ef996f3cbaf1559b5836f6c8ef6e890fa20846029242ac7 +SIZE (firefox-117.0.source.tar.xz) = 505712192 diff --git a/www/firefox/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn b/www/firefox/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn index a6b48ed2d169..331a94015301 100644 --- a/www/firefox/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn +++ b/www/firefox/files/patch-third__party_libwebrtc_build_config_BUILDCONFIG.gn @@ -1,136 +1,141 @@ +commit 93615ae859d1d819b33bbe0e32c5260a467b3625 +Author: Christoph Moench-Tegeder + + enable pipewire on bsd + diff --git third_party/libwebrtc/BUILD.gn third_party/libwebrtc/BUILD.gn index 6eb14773b0a7..d63fd1d5529f 100644 --- third_party/libwebrtc/BUILD.gn +++ third_party/libwebrtc/BUILD.gn @@ -106,7 +106,7 @@ if (!build_with_chromium && !build_with_mozilla) { "tools_webrtc/perf:webrtc_dashboard_upload", ] } - if ((is_linux || is_chromeos) && rtc_use_pipewire) { + if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { deps += [ "modules/desktop_capture:shared_screencast_stream_test" ] } if (is_fuchsia) { diff --git third_party/libwebrtc/build/config/BUILDCONFIG.gn third_party/libwebrtc/build/config/BUILDCONFIG.gn index 571ae5f0d60d..863d428fc676 100644 --- third_party/libwebrtc/build/config/BUILDCONFIG.gn +++ third_party/libwebrtc/build/config/BUILDCONFIG.gn @@ -132,6 +132,7 @@ declare_args() { # Set to true when compiling with the Clang compiler. is_clang = current_os != "linux" || current_os == "openbsd" || + current_os == "freebsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64" && @@ -184,7 +185,7 @@ if (host_toolchain == "") { # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). - if (host_os == "linux" || host_os == "openbsd") { + if (host_os == "linux" || host_os == "openbsd" || host_os == "freebsd") { if (target_os != "linux") { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" } else if (is_clang) { @@ -222,7 +223,7 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd") { +} else if (target_os == "chromeos" || target_os == "linux" || target_os == "openbsd" || target_os == "freebsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" @@ -288,7 +289,7 @@ is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" is_linux = current_os == "linux" -is_bsd = current_os == "openbsd" +is_bsd = current_os == "openbsd" || current_os == "freebsd" is_mac = current_os == "mac" is_nacl = current_os == "nacl" is_win = current_os == "win" || current_os == "winuwp" diff --git third_party/libwebrtc/modules/desktop_capture/BUILD.gn third_party/libwebrtc/modules/desktop_capture/BUILD.gn index c184e2fbbcac..e1af29734d8b 100644 --- third_party/libwebrtc/modules/desktop_capture/BUILD.gn +++ third_party/libwebrtc/modules/desktop_capture/BUILD.gn @@ -75,7 +75,7 @@ if (rtc_include_tests) { "window_finder_unittest.cc", ] - if ((is_linux || is_chromeos) && rtc_use_pipewire) { + if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { configs += [ "../portal:gio" ] } @@ -87,7 +87,7 @@ if (rtc_include_tests) { } } - if ((is_linux || is_chromeos) && rtc_use_pipewire) { + if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { rtc_test("shared_screencast_stream_test") { testonly = true @@ -146,7 +146,7 @@ if (rtc_include_tests) { "test_utils_unittest.cc", ] - if ((is_linux || is_chromeos) && rtc_use_pipewire) { + if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { configs += [ "../portal:gio" ] } @@ -255,7 +255,7 @@ if (rtc_include_tests) { "mock_desktop_capturer_callback.h", ] - if ((is_linux || is_chromeos) && rtc_use_pipewire) { + if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { configs += [ "../portal:gio" ] } @@ -268,7 +268,7 @@ if (rtc_include_tests) { } # TODO(bugs.webrtc.org/14187): remove when all users are gone -if ((is_linux || is_chromeos) && rtc_use_pipewire) { +if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { config("pipewire_config") { configs = [ "../portal:pipewire_config" ] } @@ -326,7 +326,7 @@ rtc_library("desktop_capture") { "window_finder.cc", "window_finder.h", ] - if (is_linux && !is_castos && rtc_use_pipewire) { + if ((is_linux || is_bsd) && !is_castos && rtc_use_pipewire) { sources += [ "desktop_capture_metadata.h" ] } if (is_mac) { diff --git third_party/libwebrtc/modules/portal/BUILD.gn third_party/libwebrtc/modules/portal/BUILD.gn index d7768b2323c9..3593a6959277 100644 --- third_party/libwebrtc/modules/portal/BUILD.gn +++ third_party/libwebrtc/modules/portal/BUILD.gn @@ -10,7 +10,7 @@ import("//build/config/linux/pkg_config.gni") import("//tools/generate_stubs/rules.gni") import("../../webrtc.gni") -if ((is_linux || is_chromeos) && rtc_use_pipewire) { +if ((is_linux || is_chromeos || is_bsd) && rtc_use_pipewire) { if (!build_with_mozilla) { pkg_config("gio") { packages = [ diff --git third_party/libwebrtc/webrtc.gni third_party/libwebrtc/webrtc.gni index b1db8ff88415..64e0cb8f7c79 100644 --- third_party/libwebrtc/webrtc.gni +++ third_party/libwebrtc/webrtc.gni @@ -153,7 +153,7 @@ declare_args() { # By default it's only enabled on desktop Linux (excludes ChromeOS) and # only when using the sysroot as PipeWire is not available in older and # supported Ubuntu and Debian distributions. - rtc_use_pipewire = is_linux && use_sysroot + rtc_use_pipewire = (is_linux || is_bsd) && use_sysroot # Set this to link PipeWire and required libraries directly instead of using the dlopen. rtc_link_pipewire = false diff --git a/www/firefox/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc b/www/firefox/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc index fecacd30e209..e83c56760a7c 100644 --- a/www/firefox/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc +++ b/www/firefox/files/patch-third__party_libwebrtc_modules_desktop__capture_linux_wayland__egl__dmabuf.cc @@ -1,21 +1,26 @@ +commit 3524023ca1d2184ab9a5a7cc61695923e6834cc1 +Author: Christoph Moench-Tegeder + + avoid linux-only includes + diff --git third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc index 6a019c64b4b3..18bb43d797dd 100644 --- third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +++ third_party/libwebrtc/modules/desktop_capture/linux/wayland/egl_dmabuf.cc @@ -10,12 +10,16 @@ #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" +#if !defined(__FreeBSD__) #include +#endif #include #include #include #include +#if !defined(__FreeBSD__) #include +#endif #include #include #include