upgpkg: sbcl 2.2.11-1
[arch-packages.git] / qt5-webengine / repos / extra-x86_64 / qt5-webengine-python3.patch
blob0b757271502f0768552dacae5393f4bdfb3f26d4
1 diff --git a/configure.pri b/configure.pri
2 index 8705ad93..6723bffe 100644
3 --- a/configure.pri
4 +++ b/configure.pri
5 @@ -7,20 +7,7 @@ QTWEBENGINE_SOURCE_TREE = $$PWD
6 equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
8 defineTest(isPythonVersionSupported) {
9 - python = $$system_quote($$system_path($$1))
10 - python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"')
11 - python_version ~= s/[()]//g
12 - python_version = $$split(python_version, ',')
13 - python_major_version = $$first(python_version)
14 - greaterThan(python_major_version, 2) {
15 - qtLog("Python version 3 is not supported by Chromium.")
16 - return(false)
17 - }
18 - python_minor_version = $$member(python_version, 1)
19 - python_patch_version = $$member(python_version, 2)
20 - greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
21 - qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
22 - return(false)
23 + return(true)
26 defineTest(qtConfTest_detectJumboBuild) {
27 @@ -52,10 +48,10 @@ defineTest(qtConfReport_jumboBuild) {
28 qtConfReportPadded($${1}, $$mergeLimit)
31 -defineTest(qtConfTest_detectPython2) {
32 - python = $$qtConfFindInPath("python2$$EXE_SUFFIX")
33 +defineTest(qtConfTest_detectPython) {
34 + python = $$qtConfFindInPath("python$$EXE_SUFFIX")
35 isEmpty(python) {
36 - qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
37 + qtLog("'python$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
38 python = $$qtConfFindInPath("python$$EXE_SUFFIX")
40 isEmpty(python) {
41 @@ -63,11 +59,11 @@ defineTest(qtConfTest_detectPython2) {
42 return(false)
44 !isPythonVersionSupported($$python) {
45 - qtLog("A suitable Python 2 executable could not be located.")
46 + qtLog("A suitable Python executable could not be located.")
47 return(false)
50 - # Make tests.python2.location available in configure.json.
51 + # Make tests.python.location available in configure.json.
52 $${1}.location = $$clean_path($$python)
53 export($${1}.location)
54 $${1}.cache += location
55 diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
56 index 2750d707..9fda13d0 100644
57 --- a/mkspecs/features/functions.prf
58 +++ b/mkspecs/features/functions.prf
59 @@ -39,11 +39,11 @@ defineReplace(which) {
61 # Returns the unquoted path to the python executable.
62 defineReplace(pythonPath) {
63 - isEmpty(QMAKE_PYTHON2) {
64 + isEmpty(QMAKE_PYTHON) {
65 # Fallback for building QtWebEngine with Qt < 5.8
66 - QMAKE_PYTHON2 = python
67 + QMAKE_PYTHON = python
69 - return($$QMAKE_PYTHON2)
70 + return($$QMAKE_PYTHON)
73 # Returns the python executable for use with shell / make targets.
74 diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
75 index e7f869a1..1bf2c5d7 100644
76 --- a/src/buildtools/config/support.pri
77 +++ b/src/buildtools/config/support.pri
78 @@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) {
79 !qtwebengine_checkForGperf(QtWebEngine):return(false)
80 !qtwebengine_checkForBison(QtWebEngine):return(false)
81 !qtwebengine_checkForFlex(QtWebEngine):return(false)
82 - !qtwebengine_checkForPython2(QtWebEngine):return(false)
83 + !qtwebengine_checkForPython(QtWebEngine):return(false)
84 !qtwebengine_checkForNodejs(QtWebEngine):return(false)
85 !qtwebengine_checkForSanitizer(QtWebEngine):return(false)
86 linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
87 @@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) {
88 !qtwebengine_checkForGperf(QtPdf):return(false)
89 !qtwebengine_checkForBison(QtPdf):return(false)
90 !qtwebengine_checkForFlex(QtPdf):return(false)
91 - !qtwebengine_checkForPython2(QtPdf):return(false)
92 + !qtwebengine_checkForPython(QtPdf):return(false)
93 !qtwebengine_checkForSanitizer(QtPdf):return(false)
94 linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
95 linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
96 @@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) {
97 return(true)
100 -defineTest(qtwebengine_checkForPython2) {
101 +defineTest(qtwebengine_checkForPython) {
102 module = $$1
103 - !qtConfig(webengine-python2) {
104 - qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.")
105 + !qtConfig(webengine-python) {
106 + qtwebengine_skipBuild("Python is required to build $${module}.")
107 return(false)
109 return(true)
110 diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
111 index 88d1790c..032aa665 100644
112 --- a/src/buildtools/configure.json
113 +++ b/src/buildtools/configure.json
114 @@ -295,9 +295,9 @@
115 "label": "system ninja",
116 "type": "detectNinja"
118 - "webengine-python2": {
119 - "label": "python2",
120 - "type": "detectPython2",
121 + "webengine-python": {
122 + "label": "python",
123 + "type": "detectPython",
124 "log": "location"
126 "webengine-winversion": {
127 @@ -374,7 +374,7 @@
128 && features.webengine-gperf
129 && features.webengine-bison
130 && features.webengine-flex
131 - && features.webengine-python2
132 + && features.webengine-python
133 && features.webengine-nodejs
134 && (!config.sanitizer || features.webengine-sanitizer)
135 && (!config.linux || features.pkg-config)
136 @@ -400,7 +400,7 @@
137 && features.webengine-gperf
138 && features.webengine-bison
139 && features.webengine-flex
140 - && features.webengine-python2
141 + && features.webengine-python
142 && (!config.sanitizer || features.webengine-sanitizer)
143 && (!config.linux || features.pkg-config)
144 && (!config.linux || features.webengine-host-pkg-config)
145 @@ -423,12 +423,12 @@
146 "autoDetect": "features.private_tests",
147 "output": [ "privateFeature" ]
149 - "webengine-python2": {
150 - "label": "python2",
151 - "condition": "tests.webengine-python2",
152 + "webengine-python": {
153 + "label": "python",
154 + "condition": "tests.webengine-python",
155 "output": [
156 "privateFeature",
157 - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
158 + { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" }
161 "webengine-gperf": {