diff --git a/www/tor-browser/Makefile b/www/tor-browser/Makefile index 528cde7a3288..f6da165b5414 100644 --- a/www/tor-browser/Makefile +++ b/www/tor-browser/Makefile @@ -1,125 +1,125 @@ PORTNAME= tor-browser -DISTVERSION= 13.5a8 +DISTVERSION= 13.5a9 CATEGORIES= www net security wayland MASTER_SITES= TOR \ https://build-sources.tbb.torproject.org/:source1 \ LOCAL/jsm:source2 MASTER_SITE_SUBDIR= torbrowser/${DISTVERSION} -DISTNAME= src-firefox-tor-browser-115.11.0esr-13.5-1-build2 +DISTNAME= src-firefox-tor-browser-115.12.0esr-13.5-1-build2 DISTFILES= ${DISTNAME}.tar.xz \ manual_112141.zip:source1 \ firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar:source2 MAINTAINER= freebsd@sysctl.cz COMMENT= Tor Browser for FreeBSD WWW= https://www.torproject.org/ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= nspr>=4.32:devel/nspr \ nss>=3.94:security/nss \ icu>=73.1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=8.2.2:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.39:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ libvpx>=1.13.1: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_GITLAB=nodefault GL_SITE= https://gitlab.torproject.org/ GL_ACCOUNT= tpo GL_PROJECT= translation:basebrowser translation:torbrowser GL_TAGNAME= 3faf7dcd545109f7bbd8a6374838e139ca422d6c:basebrowser 51bc08246d73990d461f747fb3c8cc7b6f66c1f4:torbrowser RUN_DEPENDS= tor:security/tor \ obfs4proxy:security/obfs4proxy-tor USES= compiler:c++11-lib libtool \ perl5 pkgconfig python shebangfix localbase:ldflags tar:xz python:3 USE_GECKO= gecko SSP_UNSAFE= yes SUB_FILES= torrc-defaults tor-browser.desktop BUNDLE_LIBS= yes USE_MOZILLA= -sqlite MOZILLA_VER=115.4.0 CFLAGS_powerpc64le= -DSQLITE_BYTEORDER=1234 CONFIGURE_ENV+= BINDGEN_CFLAGS="-I${LOCALBASE}/include" \ MOZ_CHROME_MULTILOCALE="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW en-US" MAKE_ENV+= AB_CD="multi" \ LOCALES="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW en-US" MOZ_EXPORT+= MOZ_TELEMETRY_REPORTING="" \ MOZILLA_OFFICIAL="1" \ MOZ_OFFICIAL_BRANDING="1" \ MOZ_APP_DISPLAYNAME="Tor Browser" \ MOZ_APP_NAME="tor-browser" \ MOZ_CHROME_MULTILOCALE="ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW en-US" MOZ_OPTIONS= --with-base-browser-version=${DISTVERSION} \ --enable-official-branding \ --enable-optimize \ --enable-bundled-fonts \ --disable-tests \ --disable-debug \ --disable-crashreporter \ --disable-webrtc \ --disable-parental-controls \ --enable-proxy-bypass-protection \ --disable-system-policies \ --disable-backgroundtasks \ --with-distribution-id=org.torproject \ --with-branding=browser/branding/tb-release WRKSRC= ${WRKDIR}/${DISTNAME:S/src-//} SHEBANG_FILES+= mach .include "${.CURDIR}/../../www/firefox/Makefile.options" .include .if ${ARCH} == amd64 MOZ_OPTIONS+= --enable-rust-simd .endif .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${LLVM_VERSION} \ ${LOCALBASE}/share/wasi-sysroot/lib/wasm32-wasi/libc.a:devel/wasi-libc \ wasi-compiler-rt${LLVM_VERSION}>0:devel/wasi-compiler-rt${LLVM_VERSION} MOZILLA_PLIST_DIRS= bin lib share/pixmaps share/applications share/tor-browser MOZ_OPTIONS+= --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot .endif post-patch: @${REINPLACE_CMD} 's|LOCALBASE|${LOCALBASE}|g' "${WRKSRC}/browser/app/profile/000-tor-browser.js" ${MKDIR} ${WRKSRC}/tmp-manual unzip -d ${WRKSRC}/tmp-manual ${DISTDIR}/manual_112141.zip ${MKDIR} ${WRKSRC}/tmp-l10n-central tar -C ${WRKSRC}/tmp-l10n-central -xf ${DISTDIR}/firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar pre-configure: @${REINPLACE_CMD} 's|export MOZ_GOOGLE_.*||g' ${WRKSRC}/.mozconfig ${PYTHON_CMD} ${FILESDIR}/packagemanual.py ${WRKSRC}/tmp-manual/public ${WRKSRC}/browser/base/content/manual post-build: ${MKDIR} -p ${WRKSRC}/../.mozbuild/l10n-central find ${WRKSRC}/tmp-l10n-central -name "*.tar.xz" -exec tar -C ${WRKSRC}/../.mozbuild/l10n-central -xvf {} \; cd ${WRKSRC}/../.build/ && MOZBUILD_STATE_PATH=${WRKSRC}/../.mozbuild MOZ_AUTOMATION="1" ${WRKSRC}/mach package-multi-locale --locales ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW .for i in ar ca cs da de el es-ES fa fi fr ga-IE he hu id is it ja ka ko lt mk ms my nb-NO nl pl pt-BR ro ru sq sv-SE th tr uk vi zh-CN zh-TW ${CP} ${WRKDIR}/translation-3faf7dcd545109f7bbd8a6374838e139ca422d6c/${i}/base-browser.ftl ${WRKDIR}/.build/dist/bin/browser/localization/${i}/browser/base-browser.ftl ${CP} ${WRKDIR}/translation-3faf7dcd545109f7bbd8a6374838e139ca422d6c/${i}/newIdentity.properties ${WRKDIR}/.build/dist/bin/browser/chrome/${i}/locale/browser/newIdentity.properties ${CP} ${WRKDIR}/translation-3faf7dcd545109f7bbd8a6374838e139ca422d6c/${i}/securityLevel.properties ${WRKDIR}/.build/dist/bin/browser/chrome/${i}/locale/browser/securityLevel.properties ${MKDIR} ${WRKDIR}/.build/dist/bin/chrome/torbutton/locale/${i}/browser test -f ${WRKDIR}/translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4/${i}/tor-browser.ftl && ${CP} ${WRKDIR}/translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4/${i}/tor-browser.ftl ${WRKDIR}/.build/dist/bin/browser/localization/${i}/browser/tor-browser.ftl ${CP} ${WRKDIR}/translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4/${i}/cryptoSafetyPrompt.properties ${WRKDIR}/.build/dist/bin/browser/chrome/${i}/locale/browser/cryptoSafetyPrompt.properties .for j in brand.dtd aboutDialog.dtd aboutTBUpdate.dtd torbutton.dtd onboarding.properties brand.properties torlauncher.properties branding/brand.ftl rulesets.properties settings.properties torConnect.properties onionLocation.properties aboutTor.dtd torbutton.properties browserOnboarding.properties ${MKDIR} ${WRKDIR}/.build/dist/bin/chrome/torbutton/locale/${i}/branding ${CP} ${WRKDIR}/translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4/${i}/${j} ${WRKDIR}/.build/dist/bin/chrome/torbutton/locale/${i}/${j} .endfor .endfor post-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKDIR}/torrc-defaults ${STAGEDIR}${DATADIR}/torrc-defaults ${INSTALL_DATA} ${WRKDIR}/tor-browser.desktop ${STAGEDIR}${PREFIX}/share/applications/tor-browser.desktop .include diff --git a/www/tor-browser/distinfo b/www/tor-browser/distinfo index 19573ec93f4b..f8dded9a07c7 100644 --- a/www/tor-browser/distinfo +++ b/www/tor-browser/distinfo @@ -1,11 +1,11 @@ -TIMESTAMP = 1716961934 -SHA256 (src-firefox-tor-browser-115.11.0esr-13.5-1-build2.tar.xz) = da56a1386c6779387f309e45287b799e2beca69d2c4ea44a9c6d2e01f1161121 -SIZE (src-firefox-tor-browser-115.11.0esr-13.5-1-build2.tar.xz) = 552025576 +TIMESTAMP = 1718132378 +SHA256 (src-firefox-tor-browser-115.12.0esr-13.5-1-build2.tar.xz) = 989d7c6f829ba33b7d908ecb74b437b423da8193c45f5e23050500810da8756c +SIZE (src-firefox-tor-browser-115.12.0esr-13.5-1-build2.tar.xz) = 552055468 SHA256 (manual_112141.zip) = f767bc5f655f1263623b7af588cfb045d3e41ee019dc7ecd713decc5c1a0ea9b SIZE (manual_112141.zip) = 26293073 SHA256 (firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar) = bbd290cd134e3a114241077ba82582617ab6c5117ff2226381943c504bd09775 SIZE (firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar) = 18848768 SHA256 (tpo-translation-3faf7dcd545109f7bbd8a6374838e139ca422d6c_GL0.tar.gz) = e6fdc79f74d2c438a44e5ffb6404e3d64bab879cf146e88a170ccdcef3596d9b SIZE (tpo-translation-3faf7dcd545109f7bbd8a6374838e139ca422d6c_GL0.tar.gz) = 108057 SHA256 (tpo-translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4_GL0.tar.gz) = a57dd8210d347ca69f5731cd768862673d692c0a5a3364f411cc5fa1fb88c98e SIZE (tpo-translation-51bc08246d73990d461f747fb3c8cc7b6f66c1f4_GL0.tar.gz) = 1059523 diff --git a/www/tor-browser/files/patch-llvm18 b/www/tor-browser/files/patch-llvm18 new file mode 100644 index 000000000000..f88e1eb079a8 --- /dev/null +++ b/www/tor-browser/files/patch-llvm18 @@ -0,0 +1,199 @@ +From cd10f3ba0d83f34ca978cc4c7a552b72fdd068aa Mon Sep 17 00:00:00 2001 +From: David Tolnay +Date: Tue, 28 Nov 2023 11:18:39 -0800 +Subject: [PATCH 1/2] Flatten cursor.kind() matching in Item::parse down to one + match + +--- + bindgen/ir/item.rs | 84 ++++++++++++++++++++++------------------------ + 1 file changed, 41 insertions(+), 43 deletions(-) + +diff --git bindgen/ir/item.rs bindgen/ir/item.rs +index 0556452bfa..4f2d361e51 100644 +--- third_party/rust/bindgen/ir/item.rs ++++ third_party/rust/bindgen/ir/item.rs +@@ -1427,53 +1427,52 @@ + } + } + +- // Guess how does clang treat extern "C" blocks? +- if cursor.kind() == CXCursor_UnexposedDecl { +- Err(ParseError::Recurse) +- } else { ++ match cursor.kind() { ++ // Guess how does clang treat extern "C" blocks? ++ CXCursor_UnexposedDecl => Err(ParseError::Recurse), ++ + // We allowlist cursors here known to be unhandled, to prevent being + // too noisy about this. +- match cursor.kind() { +- CXCursor_MacroDefinition | +- CXCursor_MacroExpansion | +- CXCursor_UsingDeclaration | +- CXCursor_UsingDirective | +- CXCursor_StaticAssert | +- CXCursor_FunctionTemplate => { +- debug!( +- "Unhandled cursor kind {:?}: {:?}", +- cursor.kind(), +- cursor +- ); +- } +- CXCursor_InclusionDirective => { +- let file = cursor.get_included_file_name(); +- match file { +- None => { +- warn!( +- "Inclusion of a nameless file in {:?}", +- cursor +- ); +- } +- Some(filename) => { +- ctx.include_file(filename); +- } +- } +- } +- _ => { +- // ignore toplevel operator overloads +- let spelling = cursor.spelling(); +- if !spelling.starts_with("operator") { ++ CXCursor_MacroDefinition | ++ CXCursor_MacroExpansion | ++ CXCursor_UsingDeclaration | ++ CXCursor_UsingDirective | ++ CXCursor_StaticAssert | ++ CXCursor_FunctionTemplate => { ++ debug!( ++ "Unhandled cursor kind {:?}: {:?}", ++ cursor.kind(), ++ cursor ++ ); ++ Err(ParseError::Continue) ++ } ++ CXCursor_InclusionDirective => { ++ let file = cursor.get_included_file_name(); ++ match file { ++ None => { + warn!( +- "Unhandled cursor kind {:?}: {:?}", +- cursor.kind(), ++ "Inclusion of a nameless file in {:?}", + cursor + ); + } ++ Some(filename) => { ++ ctx.include_file(filename); ++ } + } ++ Err(ParseError::Continue) ++ } ++ _ => { ++ // ignore toplevel operator overloads ++ let spelling = cursor.spelling(); ++ if !spelling.starts_with("operator") { ++ warn!( ++ "Unhandled cursor kind {:?}: {:?}", ++ cursor.kind(), ++ cursor ++ ); ++ } ++ Err(ParseError::Continue) + } +- +- Err(ParseError::Continue) + } + } + + +From 2997017b5a3065b83e9d76f0080d6cb99c94c0c1 Mon Sep 17 00:00:00 2001 +From: David Tolnay +Date: Tue, 28 Nov 2023 11:21:18 -0800 +Subject: [PATCH 2/2] Handle CXCursor_LinkageSpec in Clang 18+ + +--- + bindgen/ir/item.rs | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git bindgen/ir/item.rs bindgen/ir/item.rs +index 4f2d361e51..dd587b088b 100644 +--- third_party/rust/bindgen/ir/item.rs ++++ third_party/rust/bindgen/ir/item.rs +@@ -1433,8 +1433,11 @@ impl Item { + } + + match cursor.kind() { +- // Guess how does clang treat extern "C" blocks? +- CXCursor_UnexposedDecl => Err(ParseError::Recurse), ++ // On Clang 18+, extern "C" is reported accurately as a LinkageSpec. ++ // Older LLVM treat it as UnexposedDecl. ++ CXCursor_LinkageSpec | CXCursor_UnexposedDecl => { ++ Err(ParseError::Recurse) ++ } + + // We allowlist cursors here known to be unhandled, to prevent being + // too noisy about this. +diff --git dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp +--- dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp ++++ dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp +@@ -97,11 +97,11 @@ + uint32_t width_; + uint32_t height_; + uint8_t y_; + uint8_t u_; + uint8_t v_; +- uint32_t timestamp_; ++ uint64_t timestamp_; + } idr_nalu; + }; + #pragma pack(pop) + + #define ENCODED_FRAME_MAGIC 0x004000b8 +diff --git dom/media/gtest/TestGMPRemoveAndDelete.cpp dom/media/gtest/TestGMPRemoveAndDelete.cpp +--- dom/media/gtest/TestGMPRemoveAndDelete.cpp ++++ dom/media/gtest/TestGMPRemoveAndDelete.cpp +@@ -359,11 +359,11 @@ + uint32_t width_; + uint32_t height_; + uint8_t y_; + uint8_t u_; + uint8_t v_; +- uint32_t timestamp_; ++ uint64_t timestamp_; + } idr_nalu; + }; + #pragma pack(pop) + + GMPVideoFrame* absFrame; +diff --git dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h +--- dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h ++++ dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h +@@ -300,11 +300,11 @@ + + struct InputImageData { + int64_t timestamp_us; + }; + // Map rtp time -> input image data +- DataMutex> mInputImageMap; ++ DataMutex> mInputImageMap; + + MediaEventProducer mInitPluginEvent; + MediaEventProducer mReleasePluginEvent; + }; + +diff --git dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp +--- dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp ++++ dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.cpp +@@ -538,11 +538,11 @@ + return; + } + + webrtc::VideoFrameType ft; + GmpFrameTypeToWebrtcFrameType(aEncodedFrame->FrameType(), &ft); +- uint32_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000; ++ uint64_t timestamp = (aEncodedFrame->TimeStamp() * 90ll + 999) / 1000; + + GMP_LOG_DEBUG("GMP Encoded: %" PRIu64 ", type %d, len %d", + aEncodedFrame->TimeStamp(), aEncodedFrame->BufferType(), + aEncodedFrame->Size()); + + diff --git a/www/tor-browser/files/patch-rust-1.78.0-arm b/www/tor-browser/files/patch-rust-1.78.0-arm deleted file mode 100644 index 7db8038cfaeb..000000000000 --- a/www/tor-browser/files/patch-rust-1.78.0-arm +++ /dev/null @@ -1,64 +0,0 @@ -Relevant bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1882291 - - -diff --git a/Cargo.lock b/Cargo.lock ---- Cargo.lock -+++ Cargo.lock -@@ -4274,10 +4274,11 @@ - [[package]] - name = "qcms" - version = "0.2.0" - dependencies = [ - "libc", -+ "version_check", - ] - - [[package]] - name = "qlog" - version = "0.4.0" -diff --git a/gfx/qcms/Cargo.toml b/gfx/qcms/Cargo.toml ---- gfx/qcms/Cargo.toml -+++ gfx/qcms/Cargo.toml -@@ -18,5 +18,8 @@ - iccv4-enabled = [] - cmyk = [] - - [dependencies] - libc = {version = "0.2", optional = true } -+ -+[build-dependencies] -+version_check = "0.9" -diff --git a/gfx/qcms/build.rs b/gfx/qcms/build.rs -new file mode 100644 ---- /dev/null -+++ gfx/qcms/build.rs -@@ -0,0 +1,7 @@ -+extern crate version_check as rustc; -+ -+fn main() { -+ if rustc::is_min_version("1.78.0").unwrap_or(false) { -+ println!("cargo:rustc-cfg=stdsimd_split"); -+ } -+} -diff --git a/gfx/qcms/src/lib.rs b/gfx/qcms/src/lib.rs ---- gfx/qcms/src/lib.rs -+++ gfx/qcms/src/lib.rs -@@ -5,13 +5,15 @@ - #![allow(non_camel_case_types)] - #![allow(non_snake_case)] - #![allow(non_upper_case_globals)] - // These are needed for the neon SIMD code and can be removed once the MSRV supports the - // instrinsics we use --#![cfg_attr(feature = "neon", feature(stdsimd))] -+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_neon_intrinsics))] -+#![cfg_attr(all(stdsimd_split, target_arch = "arm", feature = "neon"), feature(stdarch_arm_feature_detection))] -+#![cfg_attr(all(not(stdsimd_split), target_arch = "arm", feature = "neon"), feature(stdsimd))] - #![cfg_attr( -- feature = "neon", -+ all(target_arch = "arm", feature = "neon"), - feature(arm_target_feature, raw_ref_op) - - )] - - /// These values match the Rendering Intent values from the ICC spec -