archrelease: copy trunk to extra-x86_64
[arch-packages.git] / qt5-doc / repos / extra-any / qt5-webengine-python3.patch
blob1e871361f5a04c9777f1c2c67e6b6d5ff746716f
1 diff --git a/configure.pri b/configure.pri
2 index e072961f..5efe30bc 100644
3 --- a/configure.pri
4 +++ b/configure.pri
5 @@ -12,10 +12,6 @@ defineTest(isPythonVersionSupported) {
6 python_version ~= s/[()]//g
7 python_version = $$split(python_version, ',')
8 python_major_version = $$first(python_version)
9 - greaterThan(python_major_version, 2) {
10 - qtLog("Python version 3 is not supported by Chromium.")
11 - return(false)
12 - }
13 python_minor_version = $$member(python_version, 1)
14 python_patch_version = $$member(python_version, 2)
15 greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
16 @@ -52,10 +48,10 @@ defineTest(qtConfReport_jumboBuild) {
17 qtConfReportPadded($${1}, $$mergeLimit)
20 -defineTest(qtConfTest_detectPython2) {
21 - python = $$qtConfFindInPath("python2$$EXE_SUFFIX")
22 +defineTest(qtConfTest_detectPython) {
23 + python = $$qtConfFindInPath("python$$EXE_SUFFIX")
24 isEmpty(python) {
25 - qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
26 + qtLog("'python$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.")
27 python = $$qtConfFindInPath("python$$EXE_SUFFIX")
29 isEmpty(python) {
30 @@ -63,11 +59,11 @@ defineTest(qtConfTest_detectPython2) {
31 return(false)
33 !isPythonVersionSupported($$python) {
34 - qtLog("A suitable Python 2 executable could not be located.")
35 + qtLog("A suitable Python executable could not be located.")
36 return(false)
39 - # Make tests.python2.location available in configure.json.
40 + # Make tests.python.location available in configure.json.
41 $${1}.location = $$clean_path($$python)
42 export($${1}.location)
43 $${1}.cache += location
44 diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
45 index 2750d707..9fda13d0 100644
46 --- a/mkspecs/features/functions.prf
47 +++ b/mkspecs/features/functions.prf
48 @@ -39,11 +39,11 @@ defineReplace(which) {
50 # Returns the unquoted path to the python executable.
51 defineReplace(pythonPath) {
52 - isEmpty(QMAKE_PYTHON2) {
53 + isEmpty(QMAKE_PYTHON) {
54 # Fallback for building QtWebEngine with Qt < 5.8
55 - QMAKE_PYTHON2 = python
56 + QMAKE_PYTHON = python
58 - return($$QMAKE_PYTHON2)
59 + return($$QMAKE_PYTHON)
62 # Returns the python executable for use with shell / make targets.
63 diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
64 index e7f869a1..1bf2c5d7 100644
65 --- a/src/buildtools/config/support.pri
66 +++ b/src/buildtools/config/support.pri
67 @@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) {
68 !qtwebengine_checkForGperf(QtWebEngine):return(false)
69 !qtwebengine_checkForBison(QtWebEngine):return(false)
70 !qtwebengine_checkForFlex(QtWebEngine):return(false)
71 - !qtwebengine_checkForPython2(QtWebengine):return(false)
72 + !qtwebengine_checkForPython(QtWebengine):return(false)
73 !qtwebengine_checkForSanitizer(QtWebEngine):return(false)
74 linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
75 linux:!qtwebengine_checkForHostPkgCfg(QtWebEngine):return(false)
76 @@ -50,7 +50,7 @@ defineReplace(qtwebengine_checkPdfError) {
77 !qtwebengine_checkForGperf(QtPdf):return(false)
78 !qtwebengine_checkForBison(QtPdf):return(false)
79 !qtwebengine_checkForFlex(QtPdf):return(false)
80 - !qtwebengine_checkForPython2(QtPdf):return(false)
81 + !qtwebengine_checkForPython(QtPdf):return(false)
82 !qtwebengine_checkForSanitizer(QtPdf):return(false)
83 linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
84 linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
85 @@ -142,10 +142,10 @@ defineTest(qtwebengine_checkForFlex) {
86 return(true)
89 -defineTest(qtwebengine_checkForPython2) {
90 +defineTest(qtwebengine_checkForPython) {
91 module = $$1
92 - !qtConfig(webengine-python2) {
93 - qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.")
94 + !qtConfig(webengine-python) {
95 + qtwebengine_skipBuild("Python is required to build $${module}.")
96 return(false)
98 return(true)
99 diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
100 index 88d1790c..032aa665 100644
101 --- a/src/buildtools/configure.json
102 +++ b/src/buildtools/configure.json
103 @@ -294,9 +294,9 @@
104 "label": "system ninja",
105 "type": "detectNinja"
107 - "webengine-python2": {
108 - "label": "python2",
109 - "type": "detectPython2",
110 + "webengine-python": {
111 + "label": "python",
112 + "type": "detectPython",
113 "log": "location"
115 "webengine-winversion": {
116 @@ -372,7 +372,7 @@
117 && features.webengine-gperf
118 && features.webengine-bison
119 && features.webengine-flex
120 - && features.webengine-python2
121 + && features.webengine-python
122 && (!config.sanitizer || features.webengine-sanitizer)
123 && (!config.linux || features.pkg-config)
124 && (!config.linux || features.webengine-host-pkg-config)
125 @@ -397,7 +397,7 @@
126 && features.webengine-gperf
127 && features.webengine-bison
128 && features.webengine-flex
129 - && features.webengine-python2
130 + && features.webengine-python
131 && (!config.sanitizer || features.webengine-sanitizer)
132 && (!config.linux || features.pkg-config)
133 && (!config.linux || features.webengine-host-pkg-config)
134 @@ -420,12 +420,12 @@
135 "autoDetect": "features.private_tests",
136 "output": [ "privateFeature" ]
138 - "webengine-python2": {
139 - "label": "python2",
140 - "condition": "tests.webengine-python2",
141 + "webengine-python": {
142 + "label": "python",
143 + "condition": "tests.webengine-python",
144 "output": [
145 "privateFeature",
146 - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
147 + { "type": "varAssign", "name": "QMAKE_PYTHON", "value": "tests.webengine-python.location" }
150 "webengine-gperf": {