- enable qt backend for el >= 9 and fedora >= 35

- drop i686
- conditional BR on java-1.8.0-openjdk-headless
This commit is contained in:
Than Ngo 2023-01-10 12:32:29 +01:00
parent fafc22e12f
commit 7f6eb6da0a
3 changed files with 127 additions and 12 deletions

View File

@ -0,0 +1,12 @@
diff -up chromium-108.0.5359.124/ui/linux/linux_ui_factory.cc.e chromium-108.0.5359.124/ui/linux/linux_ui_factory.cc
--- chromium-108.0.5359.124/ui/linux/linux_ui_factory.cc.e 2023-01-10 11:40:46.836056080 +0100
+++ chromium-108.0.5359.124/ui/linux/linux_ui_factory.cc 2023-01-10 11:41:06.355411862 +0100
@@ -93,7 +93,7 @@ LinuxUiAndTheme* GetDefaultLinuxUiAndThe
} // namespace
-BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_ENABLED_BY_DEFAULT);
LinuxUi* GetDefaultLinuxUi() {
return GetDefaultLinuxUiAndTheme();

View File

@ -0,0 +1,71 @@
commit f8f456983cf238d0429ab63466d75357d79a32da
author Ted Meyer <tmathmeyer@chromium.org> Thu Dec 08 21:24:37 2022
committer Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> Thu Dec 08 21:24:37 2022
tree ebfdab985b269b73b48322db0caa594766c9bb58
parent cbf3167e80fd2dc3a87cdc7143dcdb1edfcb1f72 [diff]
Guard VaapiVideoDecoder behind more correct flags
Vulkan on linux also needs the features kVulkanFromANGLE and
kDefaultANGLEVulkan to function properly.
Additinoally, Vaapi on GL needs to be guarded behind a flag.
Bug: 1236697
Bug: 1394888
Bug: 1381114
Bug: 1383140
Change-Id: Ifb9da84b95e71fa39c1559455f25e7efcdc083f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4088731
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1081118}
diff -up chromium-108.0.5359.124/media/base/media_switches.cc.orig chromium-108.0.5359.124/media/base/media_switches.cc
--- chromium-108.0.5359.124/media/base/media_switches.cc.orig 2023-01-08 16:37:39.373874165 +0100
+++ chromium-108.0.5359.124/media/base/media_switches.cc 2023-01-10 08:16:23.492761745 +0100
@@ -577,6 +577,10 @@ BASE_FEATURE(kVaapiVideoDecodeLinux,
"VaapiVideoDecoder",
base::FEATURE_ENABLED_BY_DEFAULT);
+BASE_FEATURE(kVaapiVideoDecodeLinuxGL,
+ "VaapiVideoDecodeLinuxGL",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
BASE_FEATURE(kVaapiVideoEncodeLinux,
"VaapiVideoEncoder",
base::FEATURE_DISABLED_BY_DEFAULT);
diff -up chromium-108.0.5359.124/media/base/media_switches.h.orig chromium-108.0.5359.124/media/base/media_switches.h
--- chromium-108.0.5359.124/media/base/media_switches.h.orig 2023-01-08 16:37:39.379874227 +0100
+++ chromium-108.0.5359.124/media/base/media_switches.h 2023-01-10 08:16:23.493761763 +0100
@@ -216,6 +216,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseMe
MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseR16Texture);
#if BUILDFLAG(IS_LINUX)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux);
+MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiIgnoreDriverChecks);
#endif // BUILDFLAG(IS_LINUX)
diff -up chromium-108.0.5359.124/media/mojo/services/gpu_mojo_media_client_cros.cc.orig chromium-108.0.5359.124/media/mojo/services/gpu_mojo_media_client_cros.cc
--- chromium-108.0.5359.124/media/mojo/services/gpu_mojo_media_client_cros.cc.orig 2023-01-10 08:16:23.493761763 +0100
+++ chromium-108.0.5359.124/media/mojo/services/gpu_mojo_media_client_cros.cc 2023-01-10 08:21:55.617909016 +0100
@@ -78,10 +78,19 @@ VideoDecoderType GetActualPlatformDecode
}
case VideoDecoderType::kVaapi: {
// Allow VaapiVideoDecoder on GL.
- if (gpu_preferences.gr_context_type == gpu::GrContextType::kGL)
- return VideoDecoderType::kVaapi;
+ if (gpu_preferences.gr_context_type == gpu::GrContextType::kGL) {
+ if (base::FeatureList::IsEnabled(kVaapiVideoDecodeLinuxGL)) {
+ return VideoDecoderType::kVaapi;
+ } else {
+ return VideoDecoderType::kUnknown;
+ }
+ }
if (gpu_preferences.gr_context_type != gpu::GrContextType::kVulkan)
return VideoDecoderType::kUnknown;
+ if (!base::FeatureList::IsEnabled(features::kVulkanFromANGLE))
+ return VideoDecoderType::kUnknown;
+ if (!base::FeatureList::IsEnabled(features::kDefaultANGLEVulkan))
+ return VideoDecoderType::kUnknown;
// If Vulkan is active, check Vulkan info if VaapiVideoDecoder is allowed.
if (!gpu_info.vulkan_info.has_value())
return VideoDecoderType::kUnknown;

View File

@ -138,8 +138,12 @@ BuildRequires: libicu-devel >= 5.4
%global bundleminizip 1
%endif
# disable qt by default
# enable qt backend for el >= 9 and fedora >= 35
%if 0%{?rhel} >= 9 || 0%{?fedora} >=35
%global use_qt 1
%else
%global use_qt 0
%endif
# enable gtk3 by default
%global gtk3 1
@ -212,7 +216,7 @@ BuildRequires: libicu-devel >= 5.4
Name: chromium%{chromium_channel}
Version: 108.0.5359.124
Release: 4%{?dist}
Release: 5%{?dist}
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
@ -372,11 +376,15 @@ Patch117: chromium-108-ffmpeg-revert-new-channel-layout-api.patch
# build failure on rhel and fedora 36
Patch120: chromium-108-clang14-c++20-link-error.patch
# enable Qt
Patch121: chromium-108-enable-allowqt.patch
# VAAPI
# Upstream turned VAAPI on in Linux in 86
Patch202: chromium-104.0.5112.101-enable-hardware-accelerated-mjpeg.patch
Patch205: chromium-86.0.4240.75-fix-vaapi-on-intel.patch
Patch206: chromium-108-ozone-wayland-vaapi-support.patch
Patch207: chromium-108-vaapi-guard-vaapivideodecoder.patch
# Apply these patches to work around EPEL8 issues
Patch300: chromium-99.0.4844.51-rhel8-force-disable-use_gnome_keyring.patch
@ -465,6 +473,11 @@ BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: gperf
%if 0%{?use_qt}
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Widgets)
%endif
%if ! 0%{?bundleharfbuzz}
BuildRequires: harfbuzz-devel >= 2.4.0
%endif
@ -701,7 +714,9 @@ Source115: https://github.com/googlefonts/noto-fonts/blob/master/hinted/NotoSans
BuildRequires: ninja-build
# Yes, java is needed as well..
%if 0%{?build_headless}
BuildRequires: java-1.8.0-openjdk-headless
%endif
# There is a hardcoded check for nss 3.26 in the chromium code (crypto/nss_util.cc)
Requires: nss%{_isa} >= 3.26
@ -1029,6 +1044,11 @@ udev.
%patch202 -p1 -b .accel-mjpeg
%patch205 -p1 -b .vaapi-intel-fix
%patch206 -p1 -b .wayland-vaapi
%patch207 -p1 -b .guard-vaapiVideoDecoder
%endif
%if 0%{?use_qt}
%patch121 -p1 -b .enable-allowqt
%endif
%if 0%{?rhel} >= 8
@ -1153,6 +1173,9 @@ sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/d
# reduce debuginfos
sed -i 's|-g2|-g0|g' build/config/compiler/BUILD.gn
# change moc to moc-qt5 for fedora
sed -i 's|moc|moc-qt5|g' ui/qt/moc_wrapper.py
%build
# Turning the buildsystem up to 11.
ulimit -n 4096
@ -1427,7 +1450,7 @@ mkdir -p %{buildroot}%{_mandir}/man1/
pushd %{builddir}
cp -a chrom*.pak resources.pak icudtl.dat %{buildroot}%{chromium_path}
cp -a locales/*.pak %{buildroot}%{chromium_path}/locales/
%ifarch x86_64 i686 aarch64
%ifarch x86_64 aarch64
cp -a libvk_swiftshader.so %{buildroot}%{chromium_path}
strip %{buildroot}%{chromium_path}/libvk_swiftshader.so
cp -a libvulkan.so.1 %{buildroot}%{chromium_path}
@ -1457,18 +1480,19 @@ pushd %{builddir}
strip %{buildroot}%{chromium_path}/libEGL.so
strip %{buildroot}%{chromium_path}/libGLESv2.so
%if 0%{?use_qt}
cp -a libqt5_shim.so %{buildroot}%{chromium_path}
strip %{buildroot}%{chromium_path}/libqt5_shim.so
%endif
%if %{build_clear_key_cdm}
%ifarch i686
cp -a ClearKeyCdm/_platform_specific/linux_x86/libclearkeycdm.so %{buildroot}%{chromium_path}
%ifarch x86_64
cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
%ifarch x86_64
cp -a ClearKeyCdm/_platform_specific/linux_x64/libclearkeycdm.so %{buildroot}%{chromium_path}
%ifarch aarch64
cp -a ClearKeyCdm/_platform_specific/linux_arm64/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
%ifarch aarch64
cp -a ClearKeyCdm/_platform_specific/linux_arm64/libclearkeycdm.so %{buildroot}%{chromium_path}
%else
cp -a libclearkeycdm.so %{buildroot}%{chromium_path}
%endif
cp -a libclearkeycdm.so %{buildroot}%{chromium_path}
%endif
%endif
strip %{buildroot}%{chromium_path}/libclearkeycdm.so
@ -1633,6 +1657,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%attr(4755, root, root) %{chromium_path}/chrome-sandbox
%{chromium_path}/xdg-mime
%{chromium_path}/xdg-settings
%if 0%{?use_qt}
%{chromium_path}/libqt5_shim.so
%endif
%{_mandir}/man1/%{chromium_browser_channel}.*
%{_datadir}/icons/hicolor/*/apps/%{chromium_browser_channel}.png
%{_datadir}/applications/*.desktop
@ -1749,6 +1776,11 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%{chromium_path}/chromedriver
%changelog
* Tue Jan 10 2023 Than Ngo <than@redhat.com> - 108.0.5359.124-5
- enable qt backend for el >= 9 and fedora >= 35
- drop i686
- conditional BR on java-1.8.0-openjdk-headless
* Sun Jan 08 2023 Than Ngo <than@redhat.com> - 108.0.5359.124-4
- vaapi support for wayland