git » qt5-webengine.git » commit 6b0c0e7

ICU 75 rebuild

author Antonio Rojas
2024-05-09 17:19:18 UTC
committer Antonio Rojas
2024-05-09 17:19:18 UTC
parent 1c20ad1d542176610ec676352a650c40ce0d1341

ICU 75 rebuild

.SRCINFO +2 -2
PKGBUILD +15 -6
python3.12-imp.patch +50 -0
python3.12-six.patch +58 -0
qt5-webengine-icu-75.patch +74 -0

diff --git a/.SRCINFO b/.SRCINFO
index ba7a75d..b05ecd4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = qt5-webengine
 	pkgdesc = Provides support for web applications using the Chromium browser project
 	pkgver = 5.15.16
-	pkgrel = 6
+	pkgrel = 7
 	url = https://www.qt.io
 	arch = x86_64
 	groups = qt5
@@ -35,7 +35,7 @@ pkgbase = qt5-webengine
 	depends = libxtst
 	depends = ttf-font
 	optdepends = pipewire: WebRTC desktop sharing under Wayland
-	source = git+https://code.qt.io/qt/qtwebengine.git#tag=v5.15.16-lts
+	source = kde-qtwebengine::git+https://code.qt.io/qt/qtwebengine.git#tag=v5.15.16-lts
 	source = git+https://code.qt.io/qt/qtwebengine-chromium.git
 	source = qt5-webengine-python3.patch
 	source = qt5-webengine-chromium-python3.patch
diff --git a/PKGBUILD b/PKGBUILD
index cc58910..dd6b7f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 pkgname=qt5-webengine
 _basever=5.15.13
 pkgver=5.15.16
-pkgrel=6
+pkgrel=7
 arch=('x86_64')
 url='https://www.qt.io'
 license=('LGPL3' 'LGPL2.1' 'BSD')
@@ -22,15 +22,21 @@ source=(kde-$_pkgfqn::git+https://code.qt.io/qt/qtwebengine.git#tag=v${pkgver}-l
         qt5-webengine-ffmpeg5.patch
         qt5-webengine-pipewire-0.3.patch
         qt5-webengine-libxml-2.12.patch
-        qt5-webengine-icu-74.patch)
-sha256sums=('SKIP'
+        qt5-webengine-icu-74.patch
+        qt5-webengine-icu-75.patch
+        python3.12-imp.patch
+        python3.12-six.patch)
+sha256sums=('a47f420bd0549b11faf70c86e97c6b696f56fd586a545b6bab8f596121c4ba17'
             'SKIP'
             '0ad5d1660886f7bbf5108b071bf5d7bbbabf1cd1258ce9d4587a01dec4a1aa89'
             'd8beb3d65a1aaf927285e6f055a9d1facd0f9c3fd851f91ba568389fb3137399'
             'c50d3019626183e753c53a997dc8a55938847543aa3178d4c51f377be741c693'
             '5e3a3c4711d964d5152a04059a2b5c1d14bb13dd29bce370120f60e85b476b6f'
             'bfae9e773edfd0ddbc617777fdd4c0609cba2b048be7afe40f97768e4eb6117e'
-            '547e092f6a20ebd15e486b31111145bc94b8709ec230da89c591963001378845')
+            '547e092f6a20ebd15e486b31111145bc94b8709ec230da89c591963001378845'
+            '10e5cf4317af304ed67e231cdb8b3dfdc36cd9f241ea58edfdfad5e2ea039b08'
+            '01e8ba57b46881d58bdea36d8b475ed0eed1ac88bdef4b54b45aefad22f7c3b2'
+            'ac87ec55ee5cbcf2d520e1ea433d041c0bf754271a17f859edbb9976f192ce3f')
 
 prepare() {
   mkdir -p build
@@ -48,6 +54,9 @@ prepare() {
   patch -p1 -d src/3rdparty -i "$srcdir"/qt5-webengine-pipewire-0.3.patch # Port to pipewire 0.3
   patch -p1 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-libxml-2.12.patch # Fix build with libxml 2.12
   patch -p1 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-icu-74.patch # Fix build with ICU 74 - patch from Alpine
+  patch -p2 -d src/3rdparty/chromium -i "$srcdir"/qt5-webengine-icu-75.patch # Fix build with ICU 75
+  patch -p1 -d src/3rdparty/chromium -i "$srcdir"/python3.12-imp.patch # Fix build with python 3.12 - patch from Debian
+  patch -p1 -d src/3rdparty/chromium -i "$srcdir"/python3.12-six.patch # Fix build with python 3.12 - patch from Debian
 }
 
 build() {
@@ -56,7 +65,7 @@ build() {
   export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
 
   cd build
-  qmake ../kde-$_pkgfqn CONFIG+=force_debug_info -- \
+  qmake ../kde-$_pkgfqn CONFIG+=force_debug_info QMAKE_CXXFLAGS="$CXXFLAGS -std=gnu++17" -- \
     -proprietary-codecs \
     -system-ffmpeg \
     -webp \
@@ -79,7 +88,7 @@ package() {
   find "$pkgdir/usr/lib" -type f -name '*.prl' \
     -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
 
-  install -Dm644 "$srcdi../kde-$_pkgfqn/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
+  install -Dm644 "$srcdir"/kde-$_pkgfqn/src/3rdparty/chromium/LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE.chromium
 
   # Fix cmake dependency versions
   sed -e "s|$pkgver\ |$_basever |" -i "$pkgdir"/usr/lib/cmake/*/*Config.cmake
diff --git a/python3.12-imp.patch b/python3.12-imp.patch
new file mode 100644
index 0000000..644cae5
--- /dev/null
+++ b/python3.12-imp.patch
@@ -0,0 +1,50 @@
+From 3664134f749f4851a14ab1953a9ee460a1fe0b68 Mon Sep 17 00:00:00 2001
+From: Bruno Pitrus <brunopitrus@hotmail.com>
+Date: Tue, 25 Jul 2023 18:34:09 +0000
+Subject: [PATCH] Remove unused python import
+
+The `imp` module has been removed in Python 3.12 causing these scripts to error out.
+
+Task-number: QTBUG-121555
+Change-Id: Ic7c038d21b86052bdda13015f80934db52a2143e
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4714859
+Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
+Reviewed-by: Ken Rockot <rockot@google.com>
+Commit-Queue: Ken Rockot <rockot@google.com>
+Cr-Commit-Position: refs/heads/main@{#1174966}
+NOKEYCHECK=True
+GitOrigin-RevId: f5f6e361d037c31630661186e7bd7b31d2784cb8
+Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/534568
+Reviewed-by: Michal Klocek <michal.klocek@qt.io>
+---
+ chromium/mojo/public/tools/mojom/mojom/fileutil.py    | 1 -
+ chromium/mojo/public/tools/mojom/mojom/parse/lexer.py | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/chromium/mojo/public/tools/mojom/mojom/fileutil.py b/chromium/mojo/public/tools/mojom/mojom/fileutil.py
+index 29daec367c5..124f12c134b 100644
+--- a/mojo/public/tools/mojom/mojom/fileutil.py
++++ b/mojo/public/tools/mojom/mojom/fileutil.py
+@@ -3,7 +3,6 @@
+ # found in the LICENSE file.
+ 
+ import errno
+-import imp
+ import os.path
+ import sys
+ 
+diff --git a/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py b/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py
+index 73ca15df94c..1083a1af7bb 100644
+--- a/mojo/public/tools/mojom/mojom/parse/lexer.py
++++ b/mojo/public/tools/mojom/mojom/parse/lexer.py
+@@ -2,7 +2,6 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-import imp
+ import os.path
+ import sys
+ 
+-- 
+2.32.0
+
diff --git a/python3.12-six.patch b/python3.12-six.patch
new file mode 100644
index 0000000..4aef50b
--- /dev/null
+++ b/python3.12-six.patch
@@ -0,0 +1,58 @@
+Patch-Source: https://sources.debian.org/data/main/q/qtwebengine-opensource-src/5.15.16+dfsg-3/debian/patches/python3.12-six.patch
+--
+Description: implement find_spec() for _SixMetaPathImporter
+Origin: upstream, https://github.com/benjaminp/six/commit/25916292d96f5f09
+Last-Update: 2024-03-17
+
+--- a/third_party/protobuf/third_party/six/six.py
++++ b/third_party/protobuf/third_party/six/six.py
+@@ -71,6 +71,11 @@ else:
+             MAXSIZE = int((1 << 63) - 1)
+         del X
+ 
++if PY34:
++    from importlib.util import spec_from_loader
++else:
++    spec_from_loader = None
++
+ 
+ def _add_doc(func, doc):
+     """Add documentation to a function."""
+@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
+             return self
+         return None
+ 
++    def find_spec(self, fullname, path, target=None):
++        if fullname in self.known_modules:
++            return spec_from_loader(fullname, self)
++        return None
++
+     def __get_module(self, fullname):
+         try:
+             return self.known_modules[fullname]
+--- a/tools/grit/third_party/six/__init__.py
++++ b/tools/grit/third_party/six/__init__.py
+@@ -71,6 +71,11 @@ else:
+             MAXSIZE = int((1 << 63) - 1)
+         del X
+ 
++if PY34:
++    from importlib.util import spec_from_loader
++else:
++    spec_from_loader = None
++
+ 
+ def _add_doc(func, doc):
+     """Add documentation to a function."""
+@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
+             return self
+         return None
+ 
++    def find_spec(self, fullname, path, target=None):
++        if fullname in self.known_modules:
++            return spec_from_loader(fullname, self)
++        return None
++
+     def __get_module(self, fullname):
+         try:
+             return self.known_modules[fullname]
diff --git a/qt5-webengine-icu-75.patch b/qt5-webengine-icu-75.patch
new file mode 100644
index 0000000..e71f0a6
--- /dev/null
+++ b/qt5-webengine-icu-75.patch
@@ -0,0 +1,74 @@
+diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
+index b511a58c5a8..abd78a74ead 100644
+--- a/chromium/build/config/compiler/BUILD.gn
++++ b/chromium/build/config/compiler/BUILD.gn
+@@ -566,7 +566,7 @@ config("compiler") {
+       # Override Chromium's default for projects that wish to stay on C++11.
+       cflags_cc += [ "-std=${standard_prefix}++11" ]
+     } else {
+-      cflags_cc += [ "-std=${standard_prefix}++14" ]
++      cflags_cc += [ "-std=${standard_prefix}++17" ]
+     }
+   } else if (!is_win && !is_nacl) {
+     if (target_os == "android") {
+diff --git a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+index f03ba1e4ab4..b1495f7ae74 100644
+--- a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
++++ b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() {
+ //
+ // __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
+ // platforms, as Chrome's requirement is C++14 as of 2020.
+-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
++#if 0
+ static constexpr size_t kAlignment =
+     std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
+ #else
+diff --git a/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+index 76e627d27a3..942435f44a0 100644
+--- a/chromium/third_party/webrtc/common_video/h264/sps_parser.h
++++ b/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+@@ -12,6 +12,7 @@
+ #define COMMON_VIDEO_H264_SPS_PARSER_H_
+ 
+ #include "absl/types/optional.h"
++#include <cstdint>
+ 
+ namespace rtc {
+ class BitBuffer;
+diff --git a/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+index d6c31b06887..d8852dfd186 100644
+--- a/chromium/third_party/webrtc/common_video/h264/pps_parser.h
++++ b/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+@@ -12,6 +12,7 @@
+ #define COMMON_VIDEO_H264_PPS_PARSER_H_
+ 
+ #include "absl/types/optional.h"
++#include <cstdint>
+ 
+ namespace rtc {
+ class BitBuffer;
+diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+index 3b9971abae1..d4458038527 100644
+--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
++++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+@@ -13,6 +13,7 @@
+ 
+ #include <array>
+ #include <vector>
++#include <memory>
+ 
+ #include "absl/types/optional.h"
+ #include "api/array_view.h"
+diff --git a/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+index 345e45ce127..e686e5d691a 100644
+--- a/chromium/third_party/webrtc/modules/include/module_common_types_public.h
++++ b/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+@@ -12,6 +12,7 @@
+ #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+ 
+ #include <limits>
++#include <cstdint>
+ 
+ #include "absl/types/optional.h"
+