From 985855ca905dfb8fd479231b643dfa71041ed9d9 Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Sat, 4 May 2024 20:19:10 +0200 Subject: [PATCH] qt6-webengine: fixed build issues with ninja 1.12 (e.g. #5), other minor fixes --- qt6-webengine/.signature | 6 +++-- qt6-webengine/Pkgfile | 39 +++++++++++++++++++++++------ qt6-webengine/ninja-1.12-2.patch | 32 ++++++++++++++++++++++++ qt6-webengine/ninja-1.12.patch | 43 ++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 qt6-webengine/ninja-1.12-2.patch create mode 100644 qt6-webengine/ninja-1.12.patch diff --git a/qt6-webengine/.signature b/qt6-webengine/.signature index 754499202..c31c736e1 100644 --- a/qt6-webengine/.signature +++ b/qt6-webengine/.signature @@ -1,5 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/aBRH9MuwPvS3jXat1plrEX5MzsetwTU08PVjTt3yIKYlHzsPy17Wh2b0+pvU5oxiI0x0pVpyTASOXa7cG0BAwM= -SHA256 (Pkgfile) = 0ba4efbb303339178a795466ebde1fbb603cf6cf24d4422e497c4677295af5e3 +RWSE3ohX2g5d/destNIiXrCgehL9ruBCTB0BFDaLyPo99go2xgH6ZMopv05L+sRu6z1YkNTs+BZqefou/65BcdO6nNLkul4gWAQ= +SHA256 (Pkgfile) = 6ebffefb2f1d391f1d334d6962819c45cdd0146b6aa6b9d79036a8b7550582e8 SHA256 (.footprint) = cb430f22417f0a5acda71937ddb68fcd21826c13597768d911549d2d7556c1c2 SHA256 (qtwebengine-everywhere-src-6.7.0.tar.xz) = 1a5ba443635dc1f439ab802ac6d761b8def5ebb24e5219bb7289288e72c147de +SHA256 (ninja-1.12.patch) = 2f0eb6a69e514c834c295e413473a8cd9855e61a4774a84df001139b319663e3 +SHA256 (ninja-1.12-2.patch) = d6609b1714cd418a193f544f50685bf116be6505115cc106e9bea6a59601a701 diff --git a/qt6-webengine/Pkgfile b/qt6-webengine/Pkgfile index 2972bc2c7..396a60f8c 100644 --- a/qt6-webengine/Pkgfile +++ b/qt6-webengine/Pkgfile @@ -1,13 +1,16 @@ # Description: Provides support for web applications using the Chromium browser project # URL: https://www.qt.io/ # Maintainer: Tim Biermann, tbier at posteo dot de -# Depends on: cups ffmpeg icu libevent libva libvpx libwebp minizip nodejs nss pciutils python3-html5lib qt6-positioning qt6-tools qt6-webchannel re2 snappy xorg-libxcomposite xorg-libxcursor +# Depends on: cups ffmpeg icu libevent libva libvpx libwebp minizip nodejs nss pciutils python3-html5lib qt6-positioning qt6-tools qt6-webchannel snappy xorg-libxcomposite xorg-libxcursor # Optional: dav1d fdk-aac gnutls graphite2 keyutils krb5 lame lcms2 libpcre2 libvdpau numactl pipewire x264 x265 name=qt6-webengine version=6.7.0 release=1 -source=(https://download.qt.io/official_releases/qt/${version%.*}/$version/submodules/qtwebengine-everywhere-src-$version.tar.xz) +source=(https://download.qt.io/official_releases/qt/${version%.*}/$version/submodules/qtwebengine-everywhere-src-$version.tar.xz + ninja-1.12.patch + ninja-1.12-2.patch +) build() { # WARNING: QtWebEngine won't be built. Could not find all necessary libraries for qpa-xcb support. X11:YES LIBDRM:YES XCOMPOSITE:YES XCURSOR:YES XRANDR:YES XI:YES XPROTO:YES XSHMFENCE:YES XTST:YES @@ -31,15 +34,34 @@ that, you can attempt to build opt/qt6-webengine again. exit 1 fi - prt-get isinst krb5 && PKGMK_QT6+=' -D QT_FEATURE_webengine_kerberos=ON' - prt-get isinst pipewire && PKGMK_QT6+=' -D QT_FEATURE_webengine_webrtc_pipewire=ON' + SYSLIBS="freetype harfbuzz-ng libdrm libevent libpng libxml libxslt" - prt-get isinst ccache && echo "${PATH}" | grep '/usr/lib/ccache' && \ - PKGMK_QT6+=' -D QT_USE_CCACHE=ON' && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')" + prt-get isinst alsa-lib && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_alsa=ON' + prt-get isinst krb5 && PKGMK_QT6+=' -D QT_FEATURE_webengine_kerberos=ON' + prt-get isinst lcms2 && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_liblcms2=ON' + prt-get isinst openjpeg2 && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_libopenjpeg2=ON' + prt-get isinst opus && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_opus=ON' SYSLIBS+=' opus' + prt-get isinst openh264 && SYSLIBS+=' openh264' + prt-get isinst pipewire && PKGMK_QT6+=' -D QT_FEATURE_webengine_webrtc_pipewire=ON' + prt-get isinst poppler && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_poppler=ON' + prt-get isinst pulseaudio && PKGMK_QT6+=' -D QT_FEATURE_webengine_system_pulseaudio=ON' + + if prt-get isinst ccache; then + PKGMK_QT6+=' -D QT_USE_CCACHE=ON' + PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')" + fi sed -e 's/^#define BA_LB_COUNT.*$/#define BA_LB_COUNT 40/' \ -i qtwebengine-everywhere-src-$version/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc + patch -Np1 -d qtwebengine-everywhere-src-$version/src/3rdparty -i $SRC/ninja-1.12.patch + patch -Np1 -d qtwebengine-everywhere-src-$version -i $SRC/ninja-1.12-2.patch + + cd $SRC/qtwebengine-everywhere-src-$version/src/3rdparty/chromium + ./build/linux/unbundle/replace_gn_files.py --system-libraries $SYSLIBS + + cd $SRC + PYTHON=/usr/bin/python3 \ cmake -S qtwebengine-everywhere-src-$version -B build -G Ninja $PKGMK_QT6 \ -D CMAKE_BUILD_TYPE=Release \ @@ -50,8 +72,11 @@ that, you can attempt to build opt/qt6-webengine again. -D QT_FEATURE_webengine_system_icu=ON \ -D QT_FEATURE_webengine_system_libevent=ON \ -D QT_FEATURE_webengine_proprietary_codecs=ON \ - -D QT_FEATURE_webengine_system_re2=ON \ + -D QT_FEATURE_webengine_system_libxml=ON \ -D QT_FEATURE_webengine_ozone_x11=ON \ + -D QT_FEATURE_qtpdf_build=ON \ + -D QT_FEATURE_webengine_system_re2=OFF \ + -D QT_BUILD_EXAMPLES_BY_DEFAULT=OFF \ -Wno-dev cmake --build build DESTDIR=$PKG cmake --install build diff --git a/qt6-webengine/ninja-1.12-2.patch b/qt6-webengine/ninja-1.12-2.patch new file mode 100644 index 000000000..d47f67ed4 --- /dev/null +++ b/qt6-webengine/ninja-1.12-2.patch @@ -0,0 +1,32 @@ +diff -Naur qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/components/history/core/browser/BUILD.gn qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/components/history/core/browser/BUILD.gn +--- qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/components/history/core/browser/BUILD.gn 2024-04-30 16:38:16.186367456 +0200 ++++ qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/components/history/core/browser/BUILD.gn 2024-04-30 17:01:36.589465530 +0200 +@@ -123,6 +123,7 @@ + "//components/prefs", + "//components/query_parser", + "//components/search_engines", ++ "//components/signin/public/base:signin_buildflags", + "//components/signin/public/identity_manager", + "//components/sync", + "//components/url_formatter", +diff -Naur qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/components/webcrypto/BUILD.gn qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/components/webcrypto/BUILD.gn +--- qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/components/webcrypto/BUILD.gn 2024-05-03 10:45:41.017124797 +0200 ++++ qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/components/webcrypto/BUILD.gn 2024-05-03 12:02:10.437771428 +0200 +@@ -60,6 +60,7 @@ + deps = [ + "//base", + "//crypto", ++ "//third_party/blink/renderer/platform/heap:heap", + "//third_party/blink/public:blink_headers", + "//third_party/boringssl", + ] +diff -Naur qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn +--- qtwebengine-everywhere-src-6.7.0.orig/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn 2024-05-03 10:45:42.575116902 +0200 ++++ qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn 2024-05-03 12:05:38.809907503 +0200 +@@ -84,6 +84,7 @@ + "//third_party/blink/renderer/platform/instrumentation:instrumentation", + "//third_party/blink/renderer/platform/loader:loader", + "//third_party/blink/renderer/platform/scheduler:scheduler", ++ "//components/webcrypto:webcrypto", + ] + } diff --git a/qt6-webengine/ninja-1.12.patch b/qt6-webengine/ninja-1.12.patch new file mode 100644 index 000000000..b8e0faad4 --- /dev/null +++ b/qt6-webengine/ninja-1.12.patch @@ -0,0 +1,43 @@ +From a766045f65f934df3b5f1aa63bc86fbb3e003a09 Mon Sep 17 00:00:00 2001 +From: Anu Aliyas +Date: Wed, 17 Apr 2024 12:35:58 +0200 +Subject: [PATCH] Add missing dependencies to avoid compilation errors + +Missing dependencies are added to resolve the dependencies issues +encountered when compiling with Ninja 1.12.0 + +Fixes:QTBUG-124375 +Change-Id: I0f23ef6c60a6f01ee11bffd46121fd7f98dc022c +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/555586 +Reviewed-by: Michal Klocek +--- + chromium/content/public/browser/BUILD.gn | 1 + + chromium/extensions/browser/api/declarative_net_request/BUILD.gn | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index d38fa8d303a..c5813115e88 100644 +--- a/chromium/content/public/browser/BUILD.gn ++++ b/chromium/content/public/browser/BUILD.gn +@@ -539,6 +539,7 @@ jumbo_source_set("browser_sources") { + "//cc", + "//components/services/storage/public/cpp", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", +diff --git a/chromium/extensions/browser/api/declarative_net_request/BUILD.gn b/chromium/extensions/browser/api/declarative_net_request/BUILD.gn +index 1fc492f5a0c..13a266e22f1 100644 +--- a/chromium/extensions/browser/api/declarative_net_request/BUILD.gn ++++ b/chromium/extensions/browser/api/declarative_net_request/BUILD.gn +@@ -23,6 +23,7 @@ source_set("declarative_net_request") { + "//extensions/common", + "//extensions/common/api", + "//services/preferences/public/cpp", ++ "//components/web_cache/browser", + ] + + public_deps = [ "//extensions/browser:browser_sources" ] +-- +2.16.3