firefox: Bump to 112.0

This commit is contained in:
Tee KOBAYASHI 2023-04-07 01:07:44 +09:00 committed by xtkoba
parent e57631ebed
commit 24386441e8
3 changed files with 5 additions and 144 deletions

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.mozilla.org/firefox
TERMUX_PKG_DESCRIPTION="Mozilla Firefox web browser"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=111.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=112.0
TERMUX_PKG_SRCURL=https://ftp.mozilla.org/pub/firefox/releases/${TERMUX_PKG_VERSION}/source/firefox-${TERMUX_PKG_VERSION}.source.tar.xz
TERMUX_PKG_SHA256=e1006c0872aa7eb30fb5a689413957f1e5fc8d2048b1637bf6f6fafdbd4ea55f
TERMUX_PKG_SHA256=eb19185f7bfa5c3b0c73edaa57160b44bf3bb2139db83539809607486b8075d9
# ffmpeg and pulseaudio are dependencies through dlopen(3):
TERMUX_PKG_DEPENDS="at-spi2-atk, ffmpeg, fontconfig, freetype, gdk-pixbuf, glib, gtk3, libandroid-shmem, libandroid-sysv-semaphore, libc++, libcairo, libevent, libffi, libice, libicu, libjpeg-turbo, libnspr, libnss, libpixman, libsm, libvpx, libwebp, libx11, libxcb, libxcomposite, libxcursor, libxdamage, libxext, libxfixes, libxi, libxrandr, libxrender, libxtst, pango, pulseaudio"
TERMUX_PKG_BUILD_DEPENDS="libcpufeatures"
@ -15,33 +14,6 @@ termux_step_post_get_source() {
local f="media/ffvpx/config_unix_aarch64.h"
echo "Applying sed substitution to ${f}"
sed -i -E '/^#define (CONFIG_LINUX_PERF|HAVE_SYSCTL) /s/1$/0/' ${f}
# Add support for FFmpeg 6.0 (please remove when added upstream)
local _FFMPEG60_DIR=$TERMUX_PKG_SRCDIR/dom/media/platforms/ffmpeg/ffmpeg60
if [ -d "${_FFMPEG60_DIR}" ]; then
termux_error_exit "Directory ${_FFMPEG60_DIR} already exists."
fi
rm -rf ${_FFMPEG60_DIR}
mkdir -p ${_FFMPEG60_DIR}
cd ${_FFMPEG60_DIR}
cp ../ffmpeg59/moz.build ./
mkdir -p include
cd include
mkdir -p libav{codec,util}
for f in avcodec.h avfft.h bsf.h codec.h codec_desc.h codec_id.h codec_par.h defs.h packet.h vdpau.h version.h version_major.h; do
cp $TERMUX_PREFIX/include/libavcodec/${f} ./libavcodec/
done
for f in attributes.h avutil.h buffer.h channel_layout.h common.h cpu.h dict.h error.h frame.h hwcontext.h hwcontext_vaapi.h intfloat.h log.h macros.h mathematics.h mem.h pixfmt.h rational.h samplefmt.h version.h avconfig.h; do
cp $TERMUX_PREFIX/include/libavutil/${f} ./libavutil/
done
if [ $TERMUX_ARCH = "i686" ]; then
sed -i -E '/^#define AV_HAVE_FAST_UNALIGNED /s/0$/1/' \
./libavutil/avconfig.h
fi
local s=$(find . -type f -print0 | xargs -0 sha256sum | LC_ALL=C sort | sha256sum)
if [[ "${s}" != "66d7de01c50d46b588021d1b7be87056b95ec295aeb98b3f37adad1ba9154319 "* ]]; then
termux_error_exit "Checksum mismatch for ffmpeg60 header files."
fi
}
termux_step_pre_configure() {

View File

@ -1,111 +0,0 @@
Delete me when FFmpeg 6.0 is supported upstream.
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
@@ -66,6 +66,7 @@
AV_FUNC_57 = 1 << 4,
AV_FUNC_58 = 1 << 5,
AV_FUNC_59 = 1 << 6,
+ AV_FUNC_60 = 1 << 7,
AV_FUNC_AVUTIL_53 = AV_FUNC_53 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_54 = AV_FUNC_54 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_55 = AV_FUNC_55 | AV_FUNC_AVUTIL_MASK,
@@ -73,8 +74,9 @@
AV_FUNC_AVUTIL_57 = AV_FUNC_57 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_58 = AV_FUNC_58 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVUTIL_59 = AV_FUNC_59 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVUTIL_60 = AV_FUNC_60 | AV_FUNC_AVUTIL_MASK,
AV_FUNC_AVCODEC_ALL = AV_FUNC_53 | AV_FUNC_54 | AV_FUNC_55 | AV_FUNC_56 |
- AV_FUNC_57 | AV_FUNC_58 | AV_FUNC_59,
+ AV_FUNC_57 | AV_FUNC_58 | AV_FUNC_59 | AV_FUNC_60,
AV_FUNC_AVUTIL_ALL = AV_FUNC_AVCODEC_ALL | AV_FUNC_AVUTIL_MASK
};
@@ -100,6 +102,9 @@
case 59:
version = AV_FUNC_59;
break;
+ case 60:
+ version = AV_FUNC_60;
+ break;
default:
FFMPEG_LOG("Unknown avcodec version");
Unlink();
@@ -155,10 +160,10 @@
AV_FUNC(avcodec_alloc_frame, (AV_FUNC_53 | AV_FUNC_54))
AV_FUNC(avcodec_get_frame_defaults, (AV_FUNC_53 | AV_FUNC_54))
AV_FUNC(avcodec_free_frame, AV_FUNC_54)
- AV_FUNC(avcodec_send_packet, AV_FUNC_58 | AV_FUNC_59)
- AV_FUNC(avcodec_receive_frame, AV_FUNC_58 | AV_FUNC_59)
+ AV_FUNC(avcodec_send_packet, AV_FUNC_58 | AV_FUNC_59 | AV_FUNC_60)
+ AV_FUNC(avcodec_receive_frame, AV_FUNC_58 | AV_FUNC_59 | AV_FUNC_60)
AV_FUNC(avcodec_default_get_buffer2,
- (AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57 | AV_FUNC_58 | AV_FUNC_59))
+ (AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57 | AV_FUNC_58 | AV_FUNC_59 | AV_FUNC_60))
AV_FUNC_OPTION(av_rdft_init, AV_FUNC_AVCODEC_ALL)
AV_FUNC_OPTION(av_rdft_calc, AV_FUNC_AVCODEC_ALL)
AV_FUNC_OPTION(av_rdft_end, AV_FUNC_AVCODEC_ALL)
@@ -167,27 +172,27 @@
AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL)
AV_FUNC(av_frame_alloc,
(AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
- AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59))
+ AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60))
AV_FUNC(av_frame_free,
(AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
- AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59))
+ AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60))
AV_FUNC(av_frame_unref,
(AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
- AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59))
+ AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60))
AV_FUNC(av_image_check_size, AV_FUNC_AVUTIL_ALL)
AV_FUNC(av_image_get_buffer_size, AV_FUNC_AVUTIL_ALL)
AV_FUNC_OPTION(av_buffer_get_opaque, (AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
- AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59))
+ AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60))
AV_FUNC(av_buffer_create,
(AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
- AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59))
+ AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60))
AV_FUNC_OPTION(av_frame_get_colorspace,
AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
AV_FUNC_AVUTIL_58)
AV_FUNC_OPTION(av_frame_get_color_range,
AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 |
AV_FUNC_AVUTIL_58)
- AV_FUNC(av_strerror, AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59)
+ AV_FUNC(av_strerror, AV_FUNC_AVUTIL_58 | AV_FUNC_AVUTIL_59 | AV_FUNC_AVUTIL_60)
#ifdef MOZ_WAYLAND
AV_FUNC_OPTION_SILENT(avcodec_get_hw_config, AV_FUNC_58 | AV_FUNC_59)
--- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
@@ -38,6 +38,7 @@
"libavcodec.so", // OpenBSD hardly controls the major/minor library version
// of ffmpeg and update it regulary on ABI/API changes
#else
+ "libavcodec.so.60",
"libavcodec.so.59",
"libavcodec.so.58",
"libavcodec-ffmpeg.so.58",
@@ -160,6 +161,9 @@
case 59:
module = FFmpegDecoderModule<59>::Create(&sLibAV);
break;
+ case 60:
+ module = FFmpegDecoderModule<60>::Create(&sLibAV);
+ break;
default:
module = nullptr;
}
--- a/dom/media/platforms/ffmpeg/moz.build
+++ b/dom/media/platforms/ffmpeg/moz.build
@@ -15,6 +15,7 @@
"ffmpeg57",
"ffmpeg58",
"ffmpeg59",
+ "ffmpeg60",
]
UNIFIED_SOURCES += [

View File

@ -24,9 +24,9 @@ diff -uNr firefox-105.0.3/build/autoconf/android.m4 firefox-105.0.3.mod/build/au
case "$target" in
-*-android*|*-linuxandroid*)
+no-android)
dnl $android_* will be set for us by Python configure.
directory_include_args="-isystem $android_system -isystem $android_sysroot/usr/include"
dnl $extra_android_flags will be set for us by Python configure.
LDFLAGS="$extra_android_flags $LDFLAGS"
CPPFLAGS="$extra_android_flags $CPPFLAGS"
diff -uNr firefox-105.0.3/build/moz.configure/init.configure firefox-105.0.3.mod/build/moz.configure/init.configure
--- firefox-105.0.3/build/moz.configure/init.configure 2022-10-08 00:40:07.000000000 +0900
+++ firefox-105.0.3.mod/build/moz.configure/init.configure 2022-10-15 09:48:55.153535797 +0900