Files
marfrit-packages/arch/qt6-base-fourier/PKGBUILD
T
claude-noether 75dadb2925 qt6-base-fourier: rebase 6.11.0 -> 6.11.1 to track upstream extra
Triggered by 'pacman -Syu' on fresnel showing local 1:6.11.0-2 newer
than (then-)extra 6.11.0-4. By the time of this commit Arch has moved
on to 6.11.1-1; rebase straight to that.

Diff against Arch's qt6-base 6.11.1 PKGBUILD reduced:
- _pkgver 6.11.0 -> 6.11.1
- pkgrel 3 -> 1 (reset on pkgver bump)
- sha256 of git tag updated to 2eafe504... (matches Arch's 6.11.1 PKGBUILD)
- Drop cherry-pick of 8b54513cdcf6 (qdbus crash fix landed upstream
  in 6.11.1; Arch dropped it from theirs as well)
- depends: gcc-libs replaced by libgcc + libstdc++ (Arch split these
  into separate packages between 6.11.0 and 6.11.1)
- Build flag: -DFEATURE_sql_ibase=OFF removed, -DFEATURE_mimetype_database=OFF
  added (Arch toggled in 6.11.1)

Kept (the reason this fork exists):
- 0001/0002/0003 GL_R8-on-ES3 patches (Mali GLES3 KWin compositor stall fix)
- qt6-base-cflags.patch + qt6-base-nostrip.patch (system CFLAGS + skip strip)
- qt6-xcb-private-headers-fourier sub-package (depended on by other fork pkgs)
- epoch=1 (precedence guarantee until upstream lands GL_R8/ES3 fix)

Patches NOT dry-run-verified against 6.11.1 source (qt clone is multi-GB
and impractical to fetch for a quick check). They touch glyph cache and
RHI gles2 paths that have been stable since Qt 6.10; expected to apply
cleanly. Will revert pkgrel and re-pin if first build hits hunk failures.
2026-05-15 10:57:02 +00:00

200 lines
6.5 KiB
Bash

# Maintainer: Markus Fritsche <mfritsche@reauktion.de>
# Upstream maintainer: Antonio Rojas <arojas@archlinux.org>
# Upstream contributor: Andrea Scarpino <andrea@archlinux.org>
#
# qt6-base-fourier — Qt 6 base with the GL_TEXTURE_*_OPENGL_ES_3 fix
# unlocked. Adds three small runtime checks so that
# QOpenGLTextureGlyphCache, QRhiGles2 (RED_OR_ALPHA8 path) and
# QOpenGLTextureUploader (Format_Alpha8 / Format_Grayscale8) pick
# GL_R8 instead of GL_ALPHA when the live OpenGL context advertises
# ES 3.x or newer. Without those patches Qt 6 emits
# `glTexImage2D(internalFormat=GL_ALPHA)` on Mali-class GLES3
# hardware (mesa panfrost / panthor) — every call returns
# GL_INVALID_VALUE, every dependent glTexSubImage2D errors at level
# 0, and KWin's compositor frame-callback path stalls so badly that
# every Wayland video client deadlocks. Discovered while validating
# chromium-fourier patch 3/3 (NV12 zero-copy) on ohm (PineTab2 /
# RK3566 / hantro mainline) and the chrome+VLC+mpv stalls turned out
# to share a Qt root cause. See ../chromium-fourier/KWIN_PIVOT.md
# for the diagnosis story and the upstream-targetable patch set.
# pkgbase stays as qt6-base so $_pkgfn (= ${pkgbase/6-/} = "qtbase")
# resolves correctly. The "-fourier" suffix lives only in the
# directory name and the commit history; epoch=1 gives our local
# build strict precedence over upstream pkgrel=N until upstream lands
# the GL_R8/ES3 fix and we can drop the epoch.
pkgbase=qt6-base
pkgname=(qt6-base-fourier
qt6-xcb-private-headers-fourier)
_pkgver=6.11.1
pkgver=${_pkgver/-/}
pkgrel=1
epoch=1
arch=(aarch64 x86_64)
url='https://www.qt.io'
license=(GPL-3.0-only
LGPL-3.0-only
LicenseRef-Qt-Commercial
Qt-GPL-exception-1.0)
pkgdesc='A cross-platform application and UI framework'
depends=(brotli
dbus
double-conversion
fontconfig
freetype2
glib2
glibc
harfbuzz
icu
krb5
libb2
libcups
libdrm
libgcc
libgl
libice
libinput
libjpeg-turbo
libpng
libproxy
libsm
libstdc++
liburing
libx11
libxcb
libxkbcommon
libxkbcommon-x11
md4c
mesa
mtdev
openssl
pcre2
shared-mime-info
sqlite
systemd-libs
tslib
wayland
xcb-util-cursor
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil
xcb-util-wm
xdg-utils
zlib
zstd)
makedepends=(alsa-lib
cmake
cups
freetds
git
gst-plugins-base-libs
gtk3
jemalloc
libfbclient
libpulse
mariadb-libs
ninja
postgresql
renderdoc
unixodbc
vulkan-headers
xmlstarlet)
optdepends=('freetds: MS SQL driver'
'gdk-pixbuf2: GTK platform plugin'
'gtk3: GTK platform plugin'
'libfbclient: Firebird/iBase driver'
'mariadb-libs: MariaDB driver'
'pango: GTK platform plugin'
'perl: for syncqt'
'postgresql-libs: PostgreSQL driver'
'unixodbc: ODBC driver')
groups=(qt6)
_pkgfn=qtbase
source=(git+https://code.qt.io/qt/$_pkgfn#tag=v$_pkgver
qt6-base-cflags.patch
qt6-base-nostrip.patch
0001-qopengltextureglyphcache-pick-GL_R8-on-ES3.patch
0002-qrhigles2-RED_OR_ALPHA8-pick-GL_R8-on-ES3.patch
0003-qopengltextureuploader-pick-GL_R8-on-ES3.patch)
sha256sums=('2eafe504fae873d20f206b5661e2e10506879455cb2d370f42c5bb72ccf7a8a1'
'5411edbe215c24b30448fac69bd0ba7c882f545e8cf05027b2b6e2227abc5e78'
'4b93f6a79039e676a56f9d6990a324a64a36f143916065973ded89adc621e094'
'SKIP'
'SKIP'
'SKIP')
prepare() {
patch -d $_pkgfn -p1 < qt6-base-cflags.patch # Use system CFLAGS
patch -d $_pkgfn -p1 < qt6-base-nostrip.patch # Don't strip binaries with qmake
# 8b54513cdcf6 (qdbus crash fix) cherry-pick removed: landed upstream
# in 6.11.1. Re-add if qdbus regressions re-surface.
# qt6-base-fourier — three small runtime-checks that pick GL_R8 over
# GL_ALPHA when the live GL context is ES 3 or newer. See the
# individual patch headers for per-site diagnosis. The
# chromium-fourier KWIN_PIVOT.md writeup carries the discovery thread.
patch -d $_pkgfn -p1 < 0001-qopengltextureglyphcache-pick-GL_R8-on-ES3.patch
patch -d $_pkgfn -p1 < 0002-qrhigles2-RED_OR_ALPHA8-pick-GL_R8-on-ES3.patch
patch -d $_pkgfn -p1 < 0003-qopengltextureuploader-pick-GL_R8-on-ES3.patch
}
build() {
# Set no_direct_extern_access based on architecture
if [[ $CARCH == "aarch64" || $CARCH == "riscv64" ]]; then
_no_direct_extern_access=OFF
else
_no_direct_extern_access=ON
fi
cmake -B build -S $_pkgfn -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DINSTALL_BINDIR=lib/qt6/bin \
-DINSTALL_PUBLICBINDIR=bin \
-DINSTALL_LIBEXECDIR=lib/qt6 \
-DINSTALL_DOCDIR=share/doc/qt6 \
-DINSTALL_ARCHDATADIR=lib/qt6 \
-DINSTALL_DATADIR=share/qt6 \
-DINSTALL_INCLUDEDIR=include/qt6 \
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
-DFEATURE_journald=ON \
-DFEATURE_libproxy=ON \
-DFEATURE_openssl_linked=ON \
-DFEATURE_system_sqlite=ON \
-DFEATURE_system_xcb_xinput=ON \
-DFEATURE_no_direct_extern_access=$_no_direct_extern_access \
-DFEATURE_mimetype_database=OFF \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DCMAKE_MESSAGE_LOG_LEVEL=STATUS
cmake --build build
}
package_qt6-base-fourier() {
pkgdesc='A cross-platform application and UI framework'
provides=(qt6-base)
conflicts=(qt6-base)
replaces=(qt6-base)
depends+=(qt6-translations)
DESTDIR="$pkgdir" cmake --install build
install -Dm644 $_pkgfn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgbase
}
package_qt6-xcb-private-headers-fourier() {
pkgdesc='Private headers for Qt6 Xcb'
provides=(qt6-xcb-private-headers)
conflicts=(qt6-xcb-private-headers)
replaces=(qt6-xcb-private-headers)
depends=("qt6-base-fourier=$pkgver")
optdepends=()
groups=()
cd $_pkgfn
install -d -m755 "$pkgdir"/usr/include/qt6xcb-private/gl_integrations
cp -r src/plugins/platforms/xcb/*.h "$pkgdir"/usr/include/qt6xcb-private/
cp -r src/plugins/platforms/xcb/gl_integrations/*.h "$pkgdir"/usr/include/qt6xcb-private/gl_integrations/
}