qt5-webengine: build with python3.11
This commit is contained in:
parent
2783264ed9
commit
af37ffd84a
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,195 @@
|
||||||
|
source: https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/blob/5.15.16-6/qt5-webengine-python3.patch
|
||||||
|
|
||||||
|
diff --git a/configure.pri b/configure.pri
|
||||||
|
index 8705ad93..6723bffe 100644
|
||||||
|
--- a/configure.pri
|
||||||
|
+++ b/configure.pri
|
||||||
|
@@ -7,20 +7,7 @@ QTWEBENGINE_SOURCE_TREE = $$PWD
|
||||||
|
equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
|
||||||
|
|
||||||
|
defineTest(isPythonVersionSupported) {
|
||||||
|
- python = $$system_quote($$system_path($$1))
|
||||||
|
- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"')
|
||||||
|
- python_version ~= s/[()]//g
|
||||||
|
- python_version = $$split(python_version, ',')
|
||||||
|
- python_major_version = $$first(python_version)
|
||||||
|
- greaterThan(python_major_version, 2) {
|
||||||
|
- qtLog("Python version 3 is not supported by Chromium.")
|
||||||
|
- return(false)
|
||||||
|
- }
|
||||||
|
- python_minor_version = $$member(python_version, 1)
|
||||||
|
- python_patch_version = $$member(python_version, 2)
|
||||||
|
- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
|
||||||
|
- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
|
||||||
|
- return(false)
|
||||||
|
+ return(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
defineTest(qtConfTest_detectJumboBuild) {
|
||||||
|
@@ -52,10 +48,10 @@ defineTest(qtConfReport_jumboBuild) {
|
||||||
|
qtConfReportPadded($${1}, $$mergeLimit)
|
||||||
|
}
|
||||||
|
|
||||||
|
-defineTest(qtConfTest_detectPython2) {
|
||||||
|
- python = $$qtConfFindInPath("python2$$EXE_SUFFIX")
|
||||||
|
+defineTest(qtConfTest_detectPython) {
|
||||||
|
+ python = $$qtConfFindInPath("python3.11$$EXE_SUFFIX")
|
||||||
|
isEmpty(python) {
|
||||||
|
- qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
|
||||||
|
+ qtLog("'python3.11$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
|
||||||
|
python = $$qtConfFindInPath("python$$EXE_SUFFIX")
|
||||||
|
}
|
||||||
|
isEmpty(python) {
|
||||||
|
@@ -63,11 +59,11 @@ defineTest(qtConfTest_detectPython2) {
|
||||||
|
return(false)
|
||||||
|
}
|
||||||
|
!isPythonVersionSupported($$python) {
|
||||||
|
- qtLog("A suitable Python 2 executable could not be located.")
|
||||||
|
+ qtLog("A suitable Python executable could not be located.")
|
||||||
|
return(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
- # Make tests.python2.location available in configure.json.
|
||||||
|
+ # Make tests.python.location available in configure.json.
|
||||||
|
$${1}.location = $$clean_path($$python)
|
||||||
|
export($${1}.location)
|
||||||
|
$${1}.cache += location
|
||||||
|
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
|
||||||
|
index 2750d707..9fda13d0 100644
|
||||||
|
--- a/mkspecs/features/functions.prf
|
||||||
|
+++ b/mkspecs/features/functions.prf
|
||||||
|
@@ -39,11 +39,11 @@ defineReplace(which) {
|
||||||
|
|
||||||
|
# Returns the unquoted path to the python executable.
|
||||||
|
defineReplace(pythonPath) {
|
||||||
|
- isEmpty(QMAKE_PYTHON2) {
|
||||||
|
+ isEmpty(QMAKE_PYTHON) {
|
||||||
|
# Fallback for building QtWebEngine with Qt < 5.8
|
||||||
|
- QMAKE_PYTHON2 = python
|
||||||
|
+ QMAKE_PYTHON = python
|
||||||
|
}
|
||||||
|
- return($$QMAKE_PYTHON2)
|
||||||
|
+ return($$QMAKE_PYTHON)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Returns the python executable for use with shell / make targets.
|
||||||
|
diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
|
||||||
|
index e7f869a1..1bf2c5d7 100644
|
||||||
|
--- a/src/buildtools/config/support.pri
|
||||||
|
+++ b/src/buildtools/config/support.pri
|
||||||
|
@@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) {
|
||||||
|
!qtwebengine_checkForGperf(QtWebEngine):return(false)
|
||||||
|
!qtwebengine_checkForBison(QtWebEngine):return(false)
|
||||||
|
!qtwebengine_checkForFlex(QtWebEngine):return(false)
|
||||||
|
- !qtwebengine_checkForPython2(QtWebEngine):return(false)
|
||||||
|
+ !qtwebengine_checkForPython(QtWebEngine):return(false)
|
||||||
|
!qtwebengine_checkForNodejs(QtWebEngine):return(false)
|
||||||
|
!qtwebengine_checkForSanitizer(QtWebEngine):return(false)
|
||||||
|
linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
|
||||||
|
@@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) {
|
||||||
|
!qtwebengine_checkForGperf(QtPdf):return(false)
|
||||||
|
!qtwebengine_checkForBison(QtPdf):return(false)
|
||||||
|
!qtwebengine_checkForFlex(QtPdf):return(false)
|
||||||
|
- !qtwebengine_checkForPython2(QtPdf):return(false)
|
||||||
|
+ !qtwebengine_checkForPython(QtPdf):return(false)
|
||||||
|
!qtwebengine_checkForSanitizer(QtPdf):return(false)
|
||||||
|
linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
|
||||||
|
linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
|
||||||
|
@@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) {
|
||||||
|
return(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
-defineTest(qtwebengine_checkForPython2) {
|
||||||
|
+defineTest(qtwebengine_checkForPython) {
|
||||||
|
module = $$1
|
||||||
|
- !qtConfig(webengine-python2) {
|
||||||
|
- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.")
|
||||||
|
+ !qtConfig(webengine-python) {
|
||||||
|
+ qtwebengine_skipBuild("Python is required to build $${module}.")
|
||||||
|
return(false)
|
||||||
|
}
|
||||||
|
return(true)
|
||||||
|
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
|
||||||
|
index 88d1790c..032aa665 100644
|
||||||
|
--- a/src/buildtools/configure.json
|
||||||
|
+++ b/src/buildtools/configure.json
|
||||||
|
@@ -295,9 +295,9 @@
|
||||||
|
"label": "system ninja",
|
||||||
|
"type": "detectNinja"
|
||||||
|
},
|
||||||
|
- "webengine-python2": {
|
||||||
|
- "label": "python2",
|
||||||
|
- "type": "detectPython2",
|
||||||
|
+ "webengine-python": {
|
||||||
|
+ "label": "python",
|
||||||
|
+ "type": "detectPython",
|
||||||
|
"log": "location"
|
||||||
|
},
|
||||||
|
"webengine-winversion": {
|
||||||
|
@@ -374,7 +374,7 @@
|
||||||
|
&& features.webengine-gperf
|
||||||
|
&& features.webengine-bison
|
||||||
|
&& features.webengine-flex
|
||||||
|
- && features.webengine-python2
|
||||||
|
+ && features.webengine-python
|
||||||
|
&& features.webengine-nodejs
|
||||||
|
&& (!config.sanitizer || features.webengine-sanitizer)
|
||||||
|
&& (!config.linux || features.pkg-config)
|
||||||
|
@@ -400,7 +400,7 @@
|
||||||
|
&& features.webengine-gperf
|
||||||
|
&& features.webengine-bison
|
||||||
|
&& features.webengine-flex
|
||||||
|
- && features.webengine-python2
|
||||||
|
+ && features.webengine-python
|
||||||
|
&& (!config.sanitizer || features.webengine-sanitizer)
|
||||||
|
&& (!config.linux || features.pkg-config)
|
||||||
|
&& (!config.linux || features.webengine-host-pkg-config)
|
||||||
|
@@ -423,12 +423,12 @@
|
||||||
|
"autoDetect": "features.private_tests",
|
||||||
|
"output": [ "privateFeature" ]
|
||||||
|
},
|
||||||
|
- "webengine-python2": {
|
||||||
|
- "label": "python2",
|
||||||
|
- "condition": "tests.webengine-python2",
|
||||||
|
+ "webengine-python": {
|
||||||
|
+ "label": "python",
|
||||||
|
+ "condition": "tests.webengine-python",
|
||||||
|
"output": [
|
||||||
|
"privateFeature",
|
||||||
|
- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
|
||||||
|
+ { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"webengine-gperf": {
|
||||||
|
From b60fc250d65144532cd47eac72279e93baaec2b8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jimi Huotari <chiitoo@gentoo.org>
|
||||||
|
Date: Wed, 6 Apr 2022 14:35:14 +0300
|
||||||
|
Subject: [PATCH] Remove dependency on catapult
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/qtwebengine_resources.gni | 2 --
|
||||||
|
1 file changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/qtwebengine_resources.gni b/src/core/qtwebengine_resources.gni
|
||||||
|
index 3bf1a5d57..29fd2603c 100644
|
||||||
|
--- a/src/core/qtwebengine_resources.gni
|
||||||
|
+++ b/src/core/qtwebengine_resources.gni
|
||||||
|
@@ -27,7 +27,6 @@ repack("qtwebengine_repack_resources") {
|
||||||
|
"$root_gen_dir/components/components_resources.pak",
|
||||||
|
"$root_gen_dir/components/dev_ui_components_resources.pak",
|
||||||
|
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
||||||
|
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
|
||||||
|
"$root_gen_dir/content/content_resources.pak",
|
||||||
|
"$root_gen_dir/content/dev_ui_content_resources.pak",
|
||||||
|
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
|
||||||
|
@@ -44,7 +43,6 @@ repack("qtwebengine_repack_resources") {
|
||||||
|
"//components/resources:components_resources_grit",
|
||||||
|
"//components/resources:dev_ui_components_resources_grit",
|
||||||
|
"//content/browser/resources/media:media_internals_resources",
|
||||||
|
- "//content/browser/tracing:resources",
|
||||||
|
"//content:content_resources_grit",
|
||||||
|
"//content:dev_ui_content_resources_grit",
|
||||||
|
"//mojo/public/js:resources",
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
|
@ -15,7 +15,7 @@ configure_args="--
|
||||||
$(vopt_if pipewire '' '-no')-webengine-webrtc-pipewire"
|
$(vopt_if pipewire '' '-no')-webengine-webrtc-pipewire"
|
||||||
# Rely on auto detection (fails if forced for cross builds) -webengine-alsa
|
# Rely on auto detection (fails if forced for cross builds) -webengine-alsa
|
||||||
hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs
|
hostmakedepends="qt5-qmake gperf ninja qt5-host-tools flex pkg-config nodejs
|
||||||
which perl python protobuf nss-devel libevent-devel zlib-devel icu-devel
|
which perl python3.11 protobuf nss-devel libevent-devel zlib-devel icu-devel
|
||||||
libjpeg-turbo-devel libpng-devel libwebp-devel freetype-devel
|
libjpeg-turbo-devel libpng-devel libwebp-devel freetype-devel
|
||||||
harfbuzz-devel"
|
harfbuzz-devel"
|
||||||
makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel
|
makedepends="qt5-webchannel-devel qt5-location-devel qt5-tools-devel qt5-devel
|
||||||
|
@ -75,14 +75,13 @@ _bootstrap_gn() {
|
||||||
cd ${wrksrc}/src/3rdparty/gn
|
cd ${wrksrc}/src/3rdparty/gn
|
||||||
CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
|
CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
|
||||||
PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
|
PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
|
||||||
python2 build/gen.py --no-last-commit-position --out-path \
|
python3.11 build/gen.py --no-last-commit-position --out-path \
|
||||||
${wrksrc}/src/3rdparty/gn/out/Release --cc "${CC_host:-$CC}" \
|
${wrksrc}/src/3rdparty/gn/out/Release --cc "${CC_host:-$CC}" \
|
||||||
--cxx "${CXX_host:-$CXX}" --ld "${CXX_host:-$CXX}" --ar "${AR_host:-$AR}" $opts
|
--cxx "${CXX_host:-$CXX}" --ld "${CXX_host:-$CXX}" --ar "${AR_host:-$AR}" $opts
|
||||||
ninja -C out/Release gn
|
ninja -C out/Release gn
|
||||||
cd ${wrksrc}
|
cd ${wrksrc}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_cleanup_wrksrc_leak() {
|
_cleanup_wrksrc_leak() {
|
||||||
if [ -d "${PKGDESTDIR}/usr/lib/cmake" ]; then
|
if [ -d "${PKGDESTDIR}/usr/lib/cmake" ]; then
|
||||||
# Replace references to ${wrksrc} in cmake files
|
# Replace references to ${wrksrc} in cmake files
|
||||||
|
|
Loading…
Reference in New Issue