diff --git a/chromium-119-system-ffmpeg-4.4.patch b/chromium-119-system-ffmpeg-4.4.patch new file mode 100644 index 0000000000000000000000000000000000000000..45444beec41f3186ddd60b3327f901136a6bfb45 --- /dev/null +++ b/chromium-119-system-ffmpeg-4.4.patch @@ -0,0 +1,54 @@ +From: 52c3e9c0f140a8742034e107fb0f371c0d73bf1d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 12 Sep 2021 04:20:11 +0200 +Subject: [PATCH] chromium-93: fix building with system-ffmpeg +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The version of ffmpeg bundled in Chromium changed ABI a little, which +affected the code in that the type of the last parameter of +av_packet_get_side_data() is now size_t instead of int. + +This causes Chromium to fail to build with system-ffmpeg if the system +ffmpeg's version does not yet have this ABI change. + +Fix the code to be able to compile with older ffmpeg as well. + +Signed-off-by: Marek BehĂșn + +squidf: for Mageia and Chromium 100, chromium-ffmpeg-lp152.patch merged here. +--- + + +diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc +--- a/media/filters/audio_decoder_unittest.cc ++++ b/media/filters/audio_decoder_unittest.cc +@@ -109,7 +109,11 @@ void SetDiscardPadding(AVPacket* packet, + } + + // If the timestamp is positive, try to use FFmpeg's discard data. ++#if LIBAVUTIL_VERSION_MAJOR < 57 ++ int skip_samples_size = 0; ++#else + size_t skip_samples_size = 0; ++#endif + const uint32_t* skip_samples_ptr = + reinterpret_cast(av_packet_get_side_data( + packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); +--- a/media/filters/ffmpeg_demuxer.cc ++++ b/media/filters/ffmpeg_demuxer.cc +@@ -50,7 +50,13 @@ + #include "media/formats/webm/webm_crypto_helpers.h" + #include "media/media_buildflags.h" + #include "third_party/ffmpeg/ffmpeg_features.h" ++#include ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 78, 100) + #include "third_party/ffmpeg/libavcodec/packet.h" ++#else ++#include "third_party/ffmpeg/libavcodec/avcodec.h" ++#endif ++ + + #if BUILDFLAG(ENABLE_PLATFORM_HEVC) + #include "media/filters/ffmpeg_h265_to_annex_b_bitstream_converter.h" diff --git a/chromium.spec b/chromium.spec index 432f0ba843ffc048ef8c32cc432cad0d8c3f872a..99622b16f0732f518aa07070358a8f80451ed510 100644 --- a/chromium.spec +++ b/chromium.spec @@ -1,9 +1,10 @@ %define _lto_cflags %{nil} -# enable|disable system build flags +# enable | disable system build flags # official builds have less debugging and go faster... but we have to shut some things off. %global official_build 1 %global enable_thin_lto 0 -# enable|disble bootstrap +# enable | disable bootstrap +# If this is 1, we enable bootstrap %global bootstrap 1 %global esbuild 1 %global esbuild_version 0.19.11 @@ -18,13 +19,13 @@ %global build_target() \ export NINJA_STATUS="[%2:%f/%t] " ; \ ninja -v -j %{numjobs} -C '%1' '%2' -# enable|disable headless client build +# enable | disable headless client build %global build_headless 1 # enable|disable chrome-remote-desktop build %global build_remoting 0 %global system_nodejs 1 -# enable|disable system brotli +# enable | disable system brotli # disable system brotli due to old system brotli %global bundlebrotli 1 # Chromium's fork of ICU is now something we can't unbundle. @@ -126,6 +127,7 @@ ### Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) +# Currently we do not provide API key unless somebody need this %if %{useapikey} %global api_key %nil %else @@ -234,8 +236,9 @@ Patch402: chromium-119-nvidia-use-separate-bo-to-verify-modifier.patch # hide UseChromeOSDirectVideoDecoder flag on VA-API devices to avoid crashes Patch403: chromium-119-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch -Patch404: miss_limits.patch -Patch405: fix-ldflags.patch +Patch404: fix-headers-ldflags.patch +# Fix fatal error: 'libavcodec/version_major.h' file not found when building with ffmpeg 4.4 +Patch405: chromium-119-system-ffmpeg-4.4.patch # RISC-V Support Patch1001: riscv-base.patch @@ -252,7 +255,7 @@ Source0: chromium-%{version}.tar.xz Source2: chromium.conf Source3: chromium-browser.sh Source4: %{chromium_browser_channel}.desktop -Source5: chromium-browser.xml +Source5: chromium-browser.xml Source6: chrome-remote-desktop@.service Source7: master_preferences @@ -290,21 +293,21 @@ BuildRequires: ffmpeg-devel BuildRequires: libaom-devel %endif -BuildRequires: alsa-lib-devel -BuildRequires: atk-devel -BuildRequires: bison -BuildRequires: cups-devel -BuildRequires: dbus-devel -BuildRequires: desktop-file-utils -BuildRequires: expat-devel -BuildRequires: flex -BuildRequires: fontconfig-devel -BuildRequires: glib2-devel -BuildRequires: glibc-devel -BuildRequires: gperf -BuildRequires: snappy-devel -BuildRequires: pkgconfig(dri) -BuildRequires: pkgconfig(epoxy) +BuildRequires: alsa-lib-devel +BuildRequires: atk-devel +BuildRequires: bison +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: expat-devel +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: glib2-devel +BuildRequires: glibc-devel +BuildRequires: gperf +BuildRequires: snappy-devel +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(epoxy) %if %{use_qt} BuildRequires: pkgconfig(Qt5Core) @@ -312,29 +315,29 @@ BuildRequires: pkgconfig(Qt5Widgets) %endif %if ! %{bundleharfbuzz} -BuildRequires: harfbuzz-devel >= 2.4.0 +BuildRequires: harfbuzz-devel >= 2.4.0 %endif BuildRequires: libatomic -BuildRequires: libcap-devel -BuildRequires: libcurl-devel +BuildRequires: libcap-devel +BuildRequires: libcurl-devel %if ! %{bundlelibdrm} -BuildRequires: libdrm-devel +BuildRequires: libdrm-devel %endif -BuildRequires: libgcrypt-devel -BuildRequires: libudev-devel -BuildRequires: libuuid-devel -BuildRequires: libusb-devel -BuildRequires: libutempter-devel -BuildRequires: libXdamage-devel -BuildRequires: libXtst-devel -BuildRequires: xcb-proto -BuildRequires: mesa-libgbm-devel +BuildRequires: libgcrypt-devel +BuildRequires: libudev-devel +BuildRequires: libuuid-devel +BuildRequires: libusb-devel +BuildRequires: libutempter-devel +BuildRequires: libXdamage-devel +BuildRequires: libXtst-devel +BuildRequires: xcb-proto +BuildRequires: mesa-libgbm-devel %if ! %{bundlezlib} -BuildRequires: pkgconfig(zlib) minizip-ng-devel +BuildRequires: pkgconfig(zlib) minizip-ng-devel %endif %if %{system_nodejs} @@ -345,12 +348,12 @@ BuildRequires: nodejs BuildRequires: gn %endif -BuildRequires: nss-devel >= 3.26 -BuildRequires: pciutils-devel -BuildRequires: pulseaudio-libs-devel +BuildRequires: nss-devel >= 3.26 +BuildRequires: pciutils-devel +BuildRequires: pulseaudio-libs-devel # For screen sharing on Wayland -BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(libpipewire-0.3) # for /usr/bin/appstream-util BuildRequires: libappstream-glib @@ -360,12 +363,12 @@ BuildRequires: libstdc++-static %endif # Tries to use system libs whenever it can. -BuildRequires: bzip2-devel -BuildRequires: dbus-glib-devel +BuildRequires: bzip2-devel +BuildRequires: dbus-glib-devel # For eu-strip -BuildRequires: elfutils -BuildRequires: elfutils-libelf-devel -BuildRequires: flac-devel +BuildRequires: elfutils +BuildRequires: elfutils-libelf-devel +BuildRequires: flac-devel BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(flac++) @@ -374,53 +377,53 @@ BuildRequires: pkgconfig(theora) BuildRequires: pkgconfig(sqlite3) %if ! %{bundlefreetype} -BuildRequires: freetype-devel +BuildRequires: freetype-devel %endif -BuildRequires: git -BuildRequires: hwdata -BuildRequires: kernel-headers -BuildRequires: libevent-devel -BuildRequires: libffi-devel -BuildRequires: fdupes +BuildRequires: git +BuildRequires: hwdata +BuildRequires: kernel-headers +BuildRequires: libevent-devel +BuildRequires: libffi-devel +BuildRequires: fdupes %if ! %{bundlelibjpeg} -BuildRequires: libjpeg-devel +BuildRequires: libjpeg-devel %endif %if ! %{bundlelibpng} -BuildRequires: libpng-devel +BuildRequires: libpng-devel %endif -BuildRequires: libudev-devel +BuildRequires: libudev-devel %if ! %{bundlelibusbx} Requires: libusbx >= 1.0.21-0.1.git448584a BuildRequires: libusbx-devel >= 1.0.21-0.1.git448584a %endif %if %{use_vaapi} -BuildRequires: libva-devel +BuildRequires: libva-devel %endif %if ! %{bundlelibwebp} -BuildRequires: libwebp-devel +BuildRequires: libwebp-devel %endif %if ! %{bundlezstd} -BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libzstd) %endif -BuildRequires: libxslt-devel -BuildRequires: libxshmfence-devel +BuildRequires: libxslt-devel +BuildRequires: libxshmfence-devel -BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGL-devel %if ! %{bundleopus} -BuildRequires: opus-devel +BuildRequires: opus-devel %endif -BuildRequires: perl(Switch) +BuildRequires: perl(Switch) BuildRequires: python3 -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: python3-devel +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: python3-devel BuildRequires: python3-zipp BuildRequires: python3-simplejson BuildRequires: python3-importlib-metadata @@ -448,15 +451,15 @@ BuildRequires: yasm BuildRequires: zlib-devel # remote desktop needs this -BuildRequires: pam-devel -BuildRequires: systemd +BuildRequires: pam-devel +BuildRequires: systemd # using the built from source version on aarch64 BuildRequires: ninja-build # Yes, java is needed as well.. %if %{build_headless} -BuildRequires: java-17-openjdk-headless +BuildRequires: java-17-openjdk-headless %endif BuildRequires: libevdev-devel @@ -655,7 +658,7 @@ implements WebDriver's wire protocol for Chromium. It is being developed by members of the Chromium and WebDriver teams. %package headless -Summary: A minimal headless shell built from Chromium +Summary: A minimal headless shell built from Chromium Requires: chromium-common%{_isa} = %{version}-%{release} %description headless @@ -738,8 +741,8 @@ udev. %patch -P401 -p1 -b .nullptr_t-without-namespace-std %patch -P402 -p1 -b .nvidia-use-separate-bo-to-verify-modifiers %patch -P403 -p1 -b .UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices -%patch -P404 -p1 -b .miss_limits -%patch -P405 -p1 -b .fix-ldflags +%patch -P404 -p1 -b .fix-headers-ldflags +%patch -P405 -p1 -b .system-ffmpeg-4.4 # riscv patch @@ -855,7 +858,6 @@ export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions=all" export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions -fno-omit-frame-pointer" %endif %endif -%endif # Core defines are flags that are true for both the browser and headless. CHROMIUM_CORE_GN_DEFINES="" @@ -1114,6 +1116,7 @@ mkdir -p %{buildroot}%{_bindir} \ cp -a %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf %endif cp -a %{SOURCE3} %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh +chmod +x %{buildroot}%{chromium_path}/%{chromium_browser_channel}.sh %if ! %{use_vaapi} # remove vaapi flags @@ -1449,3 +1452,5 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %{chromium_path}/chromedriver %changelog +* Wed Mar 06 2024 misaka00251 - 119.0.6045.159-1 +- Init chromium version 119 diff --git a/fix-ldflags.patch b/fix-headers-ldflags.patch similarity index 45% rename from fix-ldflags.patch rename to fix-headers-ldflags.patch index 8c87f2b639db977cfe8c2e14edced304edba3945..c98f034f3f5b4ffe7df718f074d08161a9f2d750 100644 --- a/fix-ldflags.patch +++ b/fix-headers-ldflags.patch @@ -1,3 +1,13 @@ +From 93f423aff6a293ff5212c1d870963c87c7b7823c Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Mon, 29 Jan 2024 16:36:54 +0800 +Subject: [PATCH] Fix headers & ldflags + +--- + build/config/compiler/BUILD.gn | 2 +- + v8/src/compiler/turboshaft/utils.h | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 6d05512ae3..b04747fd19 100644 --- a/build/config/compiler/BUILD.gn @@ -11,3 +21,18 @@ index 6d05512ae3..b04747fd19 100644 } } +diff --git a/v8/src/compiler/turboshaft/utils.h b/v8/src/compiler/turboshaft/utils.h +index 232c7a6dbd..8b70a15a88 100644 +--- a/v8/src/compiler/turboshaft/utils.h ++++ b/v8/src/compiler/turboshaft/utils.h +@@ -8,6 +8,7 @@ + #include + #include + ++#include + #include "src/base/logging.h" + + namespace v8::internal::compiler::turboshaft { +-- +2.39.3 (Apple Git-145) + diff --git a/miss_limits.patch b/miss_limits.patch deleted file mode 100644 index 98d0113107a2fb6f579866a8a79ceedefe67369d..0000000000000000000000000000000000000000 --- a/miss_limits.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/v8/src/compiler/turboshaft/utils.h b/v8/src/compiler/turboshaft/utils.h -index 232c7a6dbd..8b70a15a88 100644 ---- a/v8/src/compiler/turboshaft/utils.h -+++ b/v8/src/compiler/turboshaft/utils.h -@@ -8,6 +8,7 @@ - #include - #include - -+#include - #include "src/base/logging.h" - - namespace v8::internal::compiler::turboshaft {