Evangelos Foutras pushed to branch main at Arch Linux / Packaging / Packages / 
chromium


Commits:
53eba715 by Antonio Rojas at 2024-04-24T07:07:47+00:00
Build Qt6 shim

Makes Chromium work on Plasma with --ozone-platform=wayland without
needing to install Qt5.

Also drop obsolete mention to -enable-features=AllowQt in optdepends,
this is now enabled by default.

Fixes #7

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + qt-6.7.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -15,6 +15,7 @@ pkgbase = chromium
        makedepends = pipewire
        makedepends = rust
        makedepends = qt5-base
+       makedepends = qt6-base
        makedepends = java-runtime-headless
        makedepends = git
        depends = gtk3
@@ -59,11 +60,13 @@ pkgbase = chromium
        source = drop-flag-unsupported-by-clang17.patch
        source = compiler-rt-adjust-paths.patch
        source = use-oauth2-client-switches-as-default.patch
+       source = qt-6.7.patch
        sha256sums = 
ebd553527149cb8477a522df90acd6cea2388a6f431e2db589a0301df1d0cae2
        sha256sums = 
213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
        sha256sums = 
c2bc4e65ed2a4e23528dd10d5c15bf99f880b7bbb789cc720d451b78098a7e12
        sha256sums = 
3bd35dab1ded5d9e1befa10d5c6c4555fe0a76d909fb724ac57d0bf10cb666c1
        sha256sums = 
b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961
        sha256sums = 
e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
+       sha256sums = 
e30623f36c54f4af3a8aa7d9400f7d2bed6ef560f15d665d2aa8fd777cb2565f
 
 pkgname = chromium


=====================================
PKGBUILD
=====================================
@@ -17,10 +17,9 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 
'libcups' 'libgcrypt'
          'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
          'libffi' 'desktop-file-utils' 'hicolor-icon-theme')
 makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
-             'rust' 'qt5-base' 'java-runtime-headless' 'git')
+             'rust' 'qt5-base' 'qt6-base' 'java-runtime-headless' 'git')
 optdepends=('pipewire: WebRTC desktop sharing under Wayland'
             'kdialog: support for native dialogs in Plasma'
-            'qt5-base: enable Qt5 with --enable-features=AllowQt'
             'gtk4: for --gtk-version=4 (GTK4 IME might work better on Wayland)'
             'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
             'kwallet: support for storing passwords in KWallet on Plasma')
@@ -30,12 +29,14 @@ 
source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom
         
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${pkgver%%.*}/chromium-patches-${pkgver%%.*}.tar.bz2
         drop-flag-unsupported-by-clang17.patch
         compiler-rt-adjust-paths.patch
+        qt-6.7.patch
         use-oauth2-client-switches-as-default.patch)
 sha256sums=('ebd553527149cb8477a522df90acd6cea2388a6f431e2db589a0301df1d0cae2'
             '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
             'c2bc4e65ed2a4e23528dd10d5c15bf99f880b7bbb789cc720d451b78098a7e12'
             '3bd35dab1ded5d9e1befa10d5c6c4555fe0a76d909fb724ac57d0bf10cb666c1'
             'b3de01b7df227478687d7517f61a777450dca765756002c80c4915f271e2d961'
+            'e30623f36c54f4af3a8aa7d9400f7d2bed6ef560f15d665d2aa8fd777cb2565f'
             'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
 
 if (( _manual_clone )); then
@@ -113,6 +114,9 @@ prepare() {
   # Allow libclang_rt.builtins from compiler-rt >= 16 to be used
   patch -Np1 -i ../compiler-rt-adjust-paths.patch
 
+  # Fix build with Qt 6.7
+  patch -Np1 -i ../qt-6.7.patch
+
   # Fixes for building with libstdc++ instead of libc++
   patch -Np1 -i ../chromium-patches-*/chromium-117-material-color-include.patch
 
@@ -183,6 +187,8 @@ build() {
     'enable_hangout_services_extension=true'
     'enable_widevine=true'
     'enable_nacl=false'
+    'use_qt6=true'
+    'moc_qt6_path="/usr/lib/qt6"'
     "google_api_key=\"$_google_api_key\""
   )
 
@@ -279,6 +285,7 @@ package() {
     chrome_200_percent.pak
     chrome_crashpad_handler
     libqt5_shim.so
+    libqt6_shim.so
     resources.pak
     v8_context_snapshot.bin
 


=====================================
qt-6.7.patch
=====================================
@@ -0,0 +1,31 @@
+From 3a812de6e7e0b285eda21ebbb670ca809c4db2b5 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <Matt.Jolly@footclan.ninja>
+Date: Thu, 11 Apr 2024 12:42:17 +1000
+Subject: [PATCH] Add QtGui to the list of Qt modules
+
+Re: https://bugreports.qt.io/browse/QTBUG-124135 - certain versions of QT
+(6.6.3, 6.7.0) produce pkg-config files that no longer emit dependencies.
+This causes Chromium builds to fail as due to not seeing QtGui as a dependency
+of QtWidgets:
+
+    `gen/qt6/../../../../ui/qt/qt_shim.h:11:10: fatal error: 'QImage' file not 
found`
+
+While this has been resolved upstream, there will certainly be some users
+that are still using these versions of QT. This patch adds QtGui to the list of
+Qt modules that are required to build the Chromium UI.
+
+Bug: https://bugs.gentoo.org/928299
+Suggested-by: Chris Pritchard <ch...@christopherpritchard.co.uk>
+Signed-off-by: Matt Jolly <kan...@gentoo.org>
+--- a/ui/qt/BUILD.gn
++++ b/ui/qt/BUILD.gn
+@@ -60,6 +60,7 @@ template("qt_shim") {
+   pkg_config("qt" + invoker.qt_version + "_config") {
+     packages = [
+       "Qt" + invoker.qt_version + "Core",
++      "Qt" + invoker.qt_version + "Gui",
+       "Qt" + invoker.qt_version + "Widgets",
+     ]
+   }
+-- 
+2.44.0



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/commit/53eba715ef8d7df79eda1a9f564dd7d74a5c411d

-- 
This project does not include diff previews in email notifications.
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/commit/53eba715ef8d7df79eda1a9f564dd7d74a5c411d
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to