diff --git a/www/firefox/Makefile b/www/firefox/Makefile index f4ad170160ea..b527c8c9f908 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,76 +1,76 @@ PORTNAME= firefox -DISTVERSION= 104.0.2 +DISTVERSION= 105.0 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.mozilla.com/firefox BUILD_DEPENDS= nspr>=4.32:devel/nspr \ nss>=3.81:security/nss \ icu>=71.1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=4.4.1:print/harfbuzz \ graphite2>=1.3.14:graphics/graphite2 \ png>=1.6.37:graphics/png \ dav1d>=1.0.0:multimedia/dav1d \ libvpx>=1.12.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+= --disable-webrtc --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 pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf2.13) (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf2.13) 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 4ce8555571eb..e5bf6760abeb 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1662375435 -SHA256 (firefox-104.0.2.source.tar.xz) = 72bba06f04e7745f6b02951906413eb1c15a7e253e06e373302162c6219f286a -SIZE (firefox-104.0.2.source.tar.xz) = 478270500 +TIMESTAMP = 1663006996 +SHA256 (firefox-105.0.source.tar.xz) = df3e6077fcfbd785f21e12292687b2b06563e37168d2861d557a49b5d2b038e3 +SIZE (firefox-105.0.source.tar.xz) = 482490432 diff --git a/www/firefox/files/patch-bug1664115 b/www/firefox/files/patch-bug1664115 index 3be934a8c04e..72b25acd1a6c 100644 --- a/www/firefox/files/patch-bug1664115 +++ b/www/firefox/files/patch-bug1664115 @@ -1,82 +1,82 @@ Revert bug 1647717 to workaround the issue of occational tab crashing when using any cubeb backends other than pulse-rust to play media. The loss of such change will be that users will not be able to do profiling on threads created by libcubeb. ---- dom/media/AudioStream.cpp.orig 2022-04-19 19:43:36.505544000 +0200 -+++ dom/media/AudioStream.cpp 2022-04-19 19:47:53.111474000 +0200 +--- dom/media/AudioStream.cpp.orig 2022-09-08 21:05:37.835865000 +0200 ++++ dom/media/AudioStream.cpp 2022-09-08 21:12:51.417935000 +0200 @@ -27,7 +27,6 @@ #endif #include "Tracing.h" #include "webaudio/blink/DenormalDisabler.h" -#include "AudioThreadRegistry.h" #include "mozilla/StaticPrefs_media.h" // Use abort() instead of exception in SoundTouch. @@ -144,8 +143,6 @@ mOutChannels(aOutputChannels), mState(INITIALIZED), mDataSource(aSource), - mAudioThreadId(ProfilerThreadId{}), - mSandboxed(CubebUtils::SandboxEnabled()), mPlaybackComplete(false), mPlaybackRate(1.0f), - mPreservesPitch(true) {} -@@ -552,17 +549,6 @@ + mPreservesPitch(true), +@@ -554,17 +551,6 @@ aWriter.Available()); } -bool AudioStream::CheckThreadIdChanged() { - ProfilerThreadId id = profiler_current_thread_id(); - if (id != mAudioThreadId) { - mAudioThreadId = id; - mAudioThreadChanged = true; - return true; - } - mAudioThreadChanged = false; - return false; -} - void AudioStream::AssertIsOnAudioThread() const { // This can be called right after CheckThreadIdChanged, because the audio // thread can change when not sandboxed. -@@ -591,9 +577,6 @@ +@@ -593,9 +579,6 @@ } long AudioStream::DataCallback(void* aBuffer, long aFrames) { - if (CheckThreadIdChanged() && !mSandboxed) { - CubebUtils::GetAudioThreadRegistry()->Register(mAudioThreadId); - } WebCore::DenormalDisabler disabler; - - TRACE_AUDIO_CALLBACK_BUDGET(aFrames, mAudioClock.GetInputRate()); -@@ -648,9 +631,6 @@ + if (!mCallbacksStarted) { + mCallbacksStarted = true; +@@ -653,9 +636,6 @@ mDumpFile.Write(static_cast(aBuffer), aFrames * mOutChannels); - if (!mSandboxed && writer.Available() != 0) { - CubebUtils::GetAudioThreadRegistry()->Unregister(mAudioThreadId); - } return aFrames - writer.Available(); } ---- dom/media/AudioStream.h.orig 2022-04-19 19:43:45.457171000 +0200 -+++ dom/media/AudioStream.h 2022-04-19 19:45:30.463633000 +0200 -@@ -329,7 +329,6 @@ +--- dom/media/AudioStream.h.orig 2022-09-08 21:13:08.562133000 +0200 ++++ dom/media/AudioStream.h 2022-09-08 21:15:22.121196000 +0200 +@@ -339,7 +339,6 @@ template - int InvokeCubeb(Function aFunction, Args&&... aArgs) REQUIRES(mMonitor); + int InvokeCubeb(Function aFunction, Args&&... aArgs) MOZ_REQUIRES(mMonitor); - bool CheckThreadIdChanged(); void AssertIsOnAudioThread() const; soundtouch::SoundTouch* mTimeStretcher; -@@ -368,9 +367,6 @@ +@@ -378,9 +377,6 @@ // the default device is used. It is set // during the Init() in decoder thread. RefPtr mSinkInfo; - // Contains the id of the audio thread, from profiler_get_thread_id. - std::atomic mAudioThreadId; - const bool mSandboxed = false; - MozPromiseHolder mEndedPromise GUARDED_BY(mMonitor); - std::atomic mPlaybackComplete; + MozPromiseHolder mEndedPromise + MOZ_GUARDED_BY(mMonitor); diff --git a/www/firefox/files/patch-bug1729459_comment12 b/www/firefox/files/patch-bug1729459_comment12 deleted file mode 100644 index dda42170f71b..000000000000 --- a/www/firefox/files/patch-bug1729459_comment12 +++ /dev/null @@ -1,93 +0,0 @@ ---- modules/fdlibm/src/math_private.h.orig 2021-09-30 19:32:33.764224000 +0200 -+++ modules/fdlibm/src/math_private.h 2021-10-02 22:15:33.265122000 +0200 -@@ -30,7 +30,11 @@ - * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t - */ - --typedef double __double_t; -+#ifdef __LP64__ -+typedef double __double_t; -+#else -+typedef long double __double_t; -+#endif - typedef __double_t double_t; - - /* -@@ -630,7 +634,37 @@ - return ((double)(x + 0x1.8p52) - 0x1.8p52); - } - -+static inline float -+rnintf(__float_t x) -+{ -+ /* -+ * As for rnint(), except we could just call that to handle the -+ * extra precision case, usually without losing efficiency. -+ */ -+ return ((float)(x + 0x1.8p23F) - 0x1.8p23F); -+} -+ -+#ifdef LDBL_MANT_DIG - /* -+ * The complications for extra precision are smaller for rnintl() since it -+ * can safely assume that the rounding precision has been increased from -+ * its default to FP_PE on x86. We don't exploit that here to get small -+ * optimizations from limiting the rangle to double. We just need it for -+ * the magic number to work with long doubles. ld128 callers should use -+ * rnint() instead of this if possible. ld80 callers should prefer -+ * rnintl() since for amd64 this avoids swapping the register set, while -+ * for i386 it makes no difference (assuming FP_PE), and for other arches -+ * it makes little difference. -+ */ -+static inline long double -+rnintl(long double x) -+{ -+ return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 - -+ __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2); -+} -+#endif /* LDBL_MANT_DIG */ -+ -+/* - * irint() and i64rint() give the same result as casting to their integer - * return type provided their arg is a floating point integer. They can - * sometimes be more efficient because no rounding is required. -@@ -644,6 +678,39 @@ - sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x)) - #else - #define irint(x) ((int)(x)) -+#endif -+ -+#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ -+ -+#if defined(__i386__) && defined(__GNUCLIKE_ASM) -+static __inline int -+irintf(float x) -+{ -+ int n; -+ -+ __asm("fistl %0" : "=m" (n) : "t" (x)); -+ return (n); -+} -+ -+static __inline int -+irintd(double x) -+{ -+ int n; -+ -+ __asm("fistl %0" : "=m" (n) : "t" (x)); -+ return (n); -+} -+#endif -+ -+#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) -+static __inline int -+irintl(long double x) -+{ -+ int n; -+ -+ __asm("fistl %0" : "=m" (n) : "t" (x)); -+ return (n); -+} - #endif - - #ifdef DEBUG diff --git a/www/firefox/files/patch-i386-protobuf-alignment b/www/firefox/files/patch-i386-protobuf-alignment deleted file mode 100644 index de5cdb723ce2..000000000000 --- a/www/firefox/files/patch-i386-protobuf-alignment +++ /dev/null @@ -1,29 +0,0 @@ -# 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. -# Patch for arenastring.cc borrowed from devel/protobuf/files/patch-i386 - ---- toolkit/components/protobuf/src/google/protobuf/arenastring.cc.orig 2022-08-20 22:07:01.600662000 +0200 -+++ toolkit/components/protobuf/src/google/protobuf/arenastring.cc 2022-08-20 22:07:55.969192000 +0200 -@@ -64,7 +64,8 @@ - #endif - constexpr size_t kStringAlign = alignof(std::string); - --static_assert((kStringAlign > kNewAlign ? kStringAlign : kNewAlign) >= 8, ""); -+// this does not hold with llvm on FreeBSD/i386 -+// static_assert((kStringAlign > kNewAlign ? kStringAlign : kNewAlign) >= 8, ""); - static_assert(alignof(ExplicitlyConstructedArenaString) >= 8, ""); - - } // namespace - ---- ./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_;