diff --git a/www/firefox/Makefile b/www/firefox/Makefile index eb96b4484e28..3d3147a9ff2c 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,64 +1,65 @@ PORTNAME= firefox DISTVERSION= 151.0 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= www wayland MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \ MOZILLA/${PORTNAME}/candidates/${DISTVERSION}${DISTVERSIONSUFFIX}-candidates/build1/source DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla WWW= https://www.firefox.com/ BUILD_DEPENDS= nspr>=4.32:devel/nspr \ nss>=3.123.1:security/nss \ libevent>=2.1.8:devel/libevent \ harfbuzz>=10.1.0:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.45:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ libvpx>=1.15.0:multimedia/libvpx \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ nasm:devel/nasm \ yasm:devel/yasm \ zip:archivers/zip \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasip1/libc++abi.a:devel/wasi-libcxx${LLVM_VERSION} \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasip1/libc.a:devel/wasi-libc@${LLVM_VERSION} \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} USE_GECKO= gecko CONFLICTS_INSTALL= firefox-esr USE_MOZILLA= -sqlite # 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 MOZ_OPTIONS= --enable-application=browser \ --enable-official-branding \ --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .include "${.CURDIR}/../../www/firefox/Makefile.options" post-extract: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON:R}|;s|@MOZILLA@|${MOZILLA}|' \ <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp @${REINPLACE_CMD} -e 's|wasm32-wasi|&p1|' \ ${WRKSRC}/build/moz.configure/toolchain.configure post-install: ${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.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/files/patch-bug2040125 b/www/firefox/files/patch-bug2040125 new file mode 100644 index 000000000000..22f1854608b2 --- /dev/null +++ b/www/firefox/files/patch-bug2040125 @@ -0,0 +1,38 @@ +commit 40a17bafb1d1c647b2548c53cf948f900a43fae0 +Author: Christoph Moench-Tegeder + + Bug 2040125 - add GetSystemProxyDirect() to libproxy path r=kershaw,valentin,#necko-reviewers + + In bmo #2028356 a "fast-path to skip proxy resolution[...]" was added, + but the required method GetSystemProxyDirect() was not added for + libproxy-enabled builds (all other cases - general Unix without + libproxy, OSX, Windows - got that function). + + This makes a "--enable-libproxy" build (MOZ_ENABLE_LIBPROXY) fail at + startup, as the symbol for nsUnixSystemProxySettings::GetSystemProxyDirect() + does not resolve. + + This adds GetSystemProxyDirect() to the MOZ_ENABLE_LIBPROXY case - it's + trivial, as we cannot know what libproxy will return for a specific URL, + thus the fast-path does not apply and we can just return "false". + + Differential Revision: https://phabricator.services.mozilla.com/D300937 + +diff --git a/toolkit/system/unixproxy/nsLibProxySettings.cpp b/toolkit/system/unixproxy/nsLibProxySettings.cpp +index 3de1b7ce9b8f..8b063d446c1e 100644 +--- a/toolkit/system/unixproxy/nsLibProxySettings.cpp ++++ b/toolkit/system/unixproxy/nsLibProxySettings.cpp +@@ -111,6 +111,13 @@ nsUnixSystemProxySettings::GetSystemWPADSetting(bool* aSystemWPADSetting) { + return NS_OK; + } + ++// we do not know if libproxy would return DIRECT or PROXY ++NS_IMETHODIMP ++nsUnixSystemProxySettings::GetSystemProxyDirect(bool* aResult) { ++ *aResult = false; ++ return NS_OK; ++} ++ + NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { + return do_AddRef(new nsUnixSystemProxySettings()).downcast(); + }