summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLlewelyn Trahaearn2017-05-26 21:25:08 -0700
committerLlewelyn Trahaearn2017-05-26 21:25:08 -0700
commit037feb15a9a69faf95f07df9fef893e220998dbc (patch)
tree2f1876adca4beba212f8971f3ac3f4593c5b2b7a
downloadaur-037feb15a9a69faf95f07df9fef893e220998dbc.tar.gz
Initial commit: Resources added to the AUR.
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD93
-rw-r--r--fix-execinfo.patch20
-rw-r--r--fix-mallinfo.patch11
-rw-r--r--fix-saturated_arithmetic.patch20
-rw-r--r--qtwebkit-gcc5.patch81
-rw-r--r--qwebview.patch21
-rw-r--r--use-python2.patch57
8 files changed, 341 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d0cd46646e24
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+# Generated by mksrcinfo v8
+# Sat May 27 04:23:18 UTC 2017
+pkgbase = lib32-qtwebkit
+ pkgdesc = An open source web browser engine (Qt4 port) (32-bit)
+ pkgver = 2.3.4
+ pkgrel = 1
+ url = http://trac.webkit.org/wiki/QtWebKit
+ arch = x86_64
+ license = LGPL2.1
+ license = GPL3
+ makedepends = gperf
+ makedepends = python2
+ makedepends = ruby
+ makedepends = git
+ makedepends = lib32-mesa
+ depends = qtwebkit
+ depends = lib32-qt4
+ depends = lib32-systemd
+ depends = lib32-gst-plugins-base-libs
+ source = https://sources.archlinux.org/other/packages/qtwebkit/qtwebkit-2.3.4.tar.xz
+ source = http://download.qt-project.org/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
+ source = use-python2.patch
+ source = qtwebkit-gcc5.patch
+ source = fix-execinfo.patch
+ source = fix-mallinfo.patch
+ source = fix-saturated_arithmetic.patch
+ source = qwebview.patch
+ sha512sums = 026378b18e91351def37c667e383a3c9f4fc07be92522957038afde66a5bc42d79c5bec0cbcbd800a575a88aa4b93f4e7fca1fe05312355bb05b1eec2b9742ce
+ sha512sums = f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125
+ sha512sums = 725f6a033ebc19b0b95eb830a3177b902182c97e5eaa108f7a75c717c68640ef4fb643fbc5e20279f605a0d181f711078da382f734c187796b600c279bf23db0
+ sha512sums = b65bcb72418908bd4de8a2e6750b774d0d2f1a4f28259b57cfb438c35eee6feefe368a8225bb449db56e3da9b4a5e16521dabf08ae8fdad20eb981231ae7b73b
+ sha512sums = 2d6ff61589f1a0f472de180144725786c8bb82f6f5e50a16c4043a7576529f3a84104c6aef2eecf4b92daa43a9ce12afb8bc28382de655b4d544daf2b6db1640
+ sha512sums = 00c7be18755a52c7b2b5e7b115f1a117e6147b2537386697517471a31dadb3391ed7e7391c7a7e66819ed0803b51e78cd62e9ab2242a20ca17f2166d0a24e039
+ sha512sums = 5e0271a8edcc74d7ffdaace4086fcbcaa8c3133e42b22bd35a5b4d6a7fc47677b49f072807829425c24520395eccb7c3bc323e2de4984bdc0029b81999a75037
+ sha512sums = f3d936f7c3ef1751a2c7cf52dd7f7e4da64158ae3298f4cb598957aa7fd05db566ebefc55a124d26e241c6814a55eb3bbe717c5ae265dcfd4c56a0fae3df1241
+
+pkgname = lib32-qtwebkit
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3dd0eb95f245
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,93 @@
+# Maintainer: Llewelyn Trahaearn <woefulderelict [at] gmail [dot] com>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=lib32-qtwebkit
+pkgver=2.3.4
+pkgrel=1
+pkgdesc='An open source web browser engine (Qt4 port) (32-bit)'
+arch=('x86_64')
+url='http://trac.webkit.org/wiki/QtWebKit'
+license=('LGPL2.1' 'GPL3')
+depends=("${pkgname#lib32-}" 'lib32-qt4' 'lib32-systemd' 'lib32-gst-plugins-base-libs')
+makedepends=('gperf' 'python2' 'ruby' 'git' 'lib32-mesa')
+_qtver=4.8.7
+source=("https://sources.archlinux.org/other/packages/${pkgname#lib32-}/${pkgname#lib32-}-${pkgver}.tar.xz"
+ "http://download.qt-project.org/official_releases/qt/4.8/${_qtver}/qt-everywhere-opensource-src-${_qtver}.tar.gz"
+ 'use-python2.patch'
+ 'qtwebkit-gcc5.patch'
+ 'fix-execinfo.patch'
+ 'fix-mallinfo.patch'
+ 'fix-saturated_arithmetic.patch'
+ 'qwebview.patch')
+sha512sums=('026378b18e91351def37c667e383a3c9f4fc07be92522957038afde66a5bc42d79c5bec0cbcbd800a575a88aa4b93f4e7fca1fe05312355bb05b1eec2b9742ce'
+ 'f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125'
+ '725f6a033ebc19b0b95eb830a3177b902182c97e5eaa108f7a75c717c68640ef4fb643fbc5e20279f605a0d181f711078da382f734c187796b600c279bf23db0'
+ 'b65bcb72418908bd4de8a2e6750b774d0d2f1a4f28259b57cfb438c35eee6feefe368a8225bb449db56e3da9b4a5e16521dabf08ae8fdad20eb981231ae7b73b'
+ '2d6ff61589f1a0f472de180144725786c8bb82f6f5e50a16c4043a7576529f3a84104c6aef2eecf4b92daa43a9ce12afb8bc28382de655b4d544daf2b6db1640'
+ '00c7be18755a52c7b2b5e7b115f1a117e6147b2537386697517471a31dadb3391ed7e7391c7a7e66819ed0803b51e78cd62e9ab2242a20ca17f2166d0a24e039'
+ '5e0271a8edcc74d7ffdaace4086fcbcaa8c3133e42b22bd35a5b4d6a7fc47677b49f072807829425c24520395eccb7c3bc323e2de4984bdc0029b81999a75037'
+ 'f3d936f7c3ef1751a2c7cf52dd7f7e4da64158ae3298f4cb598957aa7fd05db566ebefc55a124d26e241c6814a55eb3bbe717c5ae265dcfd4c56a0fae3df1241')
+
+prepare() {
+ cd ${pkgname#lib32-}-${pkgver}
+ patch -p1 -i "${srcdir}"/use-python2.patch
+
+ # Fix build with GCC ≥ 5, private browsing and rpath derp (LFS/Fedora)
+ patch -p1 -i "$srcdir"/qtwebkit-gcc5.patch
+
+ # Include patches from Void Linux to fix additional issues and appease GCC 6.
+ patch -p1 -i "$srcdir"/fix-execinfo.patch
+ patch -p1 -i "$srcdir"/fix-mallinfo.patch
+ patch -p1 -i "$srcdir"/fix-saturated_arithmetic.patch
+
+ cd ../qt-everywhere-opensource-src-${_qtver}
+ patch -p1 -i "${srcdir}"/qwebview.patch
+}
+
+build() {
+ # Modify environment to generate 32-bit ELF. Respects flags defined in makepkg.conf
+ export CFLAGS="-m32 ${CFLAGS}"
+ export CXXFLAGS="-m32 ${CXXFLAGS}"
+ export CXXFLAGS+=" -std=gnu++98" # Mirror QT4
+ export LDFLAGS="-m32 ${LDFLAGS}"
+ export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+# export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig'
+
+ cd ${pkgname#lib32-}-${pkgver}
+
+ export QTDIR=/usr
+ export PATH="/usr/lib/qt4/bin:$PATH"
+ Tools/Scripts/build-webkit --qt --release \
+ --makeargs="${MAKEFLAGS}" \
+ --prefix=/usr \
+ --install-libs=/usr/lib32 \
+ --no-webkit2 \
+ --qmakearg="QMAKE_CFLAGS_ISYSTEM= " \
+ --qmakearg="QMAKE_CFLAGS_RELEASE='$CFLAGS'" \
+ --qmakearg="QMAKE_CXXFLAGS_RELEASE='$CXXFLAGS'" \
+ --qmakearg="QMAKE_LFLAGS_RELEASE='$LDFLAGS'"
+
+ # Build the QWebView plugin (FS#27914)
+ cd ../qt-everywhere-opensource-src-${_qtver}/tools/designer/src/plugins/qwebview
+ qmake-qt4 QMAKE_CFLAGS_ISYSTEM= \
+ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
+ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
+ QMAKE_LFLAGS_RELEASE="${LDFLAGS}"
+ make
+}
+
+package() {
+ cd ${pkgname#lib32-}-${pkgver}
+ make INSTALL_ROOT="${pkgdir}" -C WebKitBuild/Release install
+
+ cd ../qt-everywhere-opensource-src-${_qtver}/tools/designer/src/plugins/qwebview
+ make INSTALL_ROOT="${pkgdir}" install
+ # Move plugin to final destination.
+ mv ${pkgdir}/usr/lib/* ${pkgdir}/usr/lib32
+
+ # Remove conflicting files.
+ rm -rf "${pkgdir}"/usr/{include,lib,share}
+
+ # Fix wrong path in prl file
+ sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' "${pkgdir}"/usr/lib32/libQtWebKit.prl
+}
diff --git a/fix-execinfo.patch b/fix-execinfo.patch
new file mode 100644
index 000000000000..93a4dec73fab
--- /dev/null
+++ b/fix-execinfo.patch
@@ -0,0 +1,20 @@
+--- qtwebkit-2.3.4/Source/WTF/wtf/Assertions.cpp 2014-09-24 13:42:05.000000000 +0200
++++ qtwebkit-2.3.4/Source/WTF/wtf/Assertions.cpp 2016-09-17 23:37:12.846758706 +0200
+@@ -58,7 +58,7 @@
+ #include <windows.h>
+ #endif
+
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__))) && !OS(ANDROID)
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -242,7 +242,7 @@
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__))) && !OS(ANDROID)
+ *size = backtrace(stack, *size);
+ #elif OS(WINDOWS) && !OS(WINCE)
+ // The CaptureStackBackTrace function is available in XP, but it is not defined
diff --git a/fix-mallinfo.patch b/fix-mallinfo.patch
new file mode 100644
index 000000000000..60c5d085fe0a
--- /dev/null
+++ b/fix-mallinfo.patch
@@ -0,0 +1,11 @@
+--- qtwebkit-2.3.4/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp 2014-09-24 13:42:05.000000000 +0200
++++ qtwebkit-2.3.4/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp 2016-09-17 23:48:23.558775636 +0200
+@@ -31,7 +31,7 @@
+
+ namespace WebCore {
+
+-#if OS(LINUX)
++#if OS(LINUX) && defined(__GLIBC__)
+ static size_t mallocMemoryUsage(bool inuse)
+ {
+ // Return how much memory (in bytes) has been allocated on the system heap.
diff --git a/fix-saturated_arithmetic.patch b/fix-saturated_arithmetic.patch
new file mode 100644
index 000000000000..f9a18220a99b
--- /dev/null
+++ b/fix-saturated_arithmetic.patch
@@ -0,0 +1,20 @@
+--- qtwebkit-2.3.4/Source/WTF/wtf/SaturatedArithmetic.h 2014-09-24 13:42:05.000000000 +0200
++++ qtwebkit-2.3.4/Source/WTF/wtf/SaturatedArithmetic.h 2017-02-19 16:27:58.343676787 +0100
+@@ -43,7 +43,7 @@
+
+ // Can only overflow if the signed bit of the two values match. If the signed
+ // bit of the result and one of the values differ it did overflow.
+- if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31)
++ if (~((ua ^ ub) >> 31) & ((result ^ ua) >> 31))
+ result = std::numeric_limits<int>::max() + (ua >> 31);
+
+ return result;
+@@ -57,7 +57,7 @@
+
+ // Can only overflow if the signed bit of the two values do not match. If the
+ // signed bit of the result and the first value differ it did overflow.
+- if ((ua ^ ub) >> 31 & (result ^ ua) >> 31)
++ if (((ua ^ ub) >> 31) & ((result ^ ua) >> 31))
+ result = std::numeric_limits<int>::max() + (ua >> 31);
+
+ return result;
diff --git a/qtwebkit-gcc5.patch b/qtwebkit-gcc5.patch
new file mode 100644
index 000000000000..593fd52a035f
--- /dev/null
+++ b/qtwebkit-gcc5.patch
@@ -0,0 +1,81 @@
+Submitted By: Bruce Dubbs <bdubbs_AT_linuxfromscratch_DOT_org>
+Date: 2015-07-07
+Origin: https://bugreports.qt.io/browse/QTBUG-44829
+Initial Package Version: 2.3.4
+Description: Allow qtwebkit to build with gcc-5.
+Upstream Status: In repository
+
+--- a/Source/JavaScriptCore/runtime/JSObject.cpp 2014-09-24 13:42:05.000000000 +0200
++++ b/Source/JavaScriptCore/runtime/JSObject.cpp 2015-05-26 21:01:40.708178176 +0200
+@@ -1922,6 +1922,10 @@
+ }
+ }
+
++template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(ExecState* exec, unsigned i, JSValue value);
++template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(ExecState* exec, unsigned i, JSValue value);
++template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(ExecState* exec, unsigned i, JSValue value);
++
+ void JSObject::putByIndexBeyondVectorLengthWithArrayStorage(ExecState* exec, unsigned i, JSValue value, bool shouldThrow, ArrayStorage* storage)
+ {
+ JSGlobalData& globalData = exec->globalData();
+--- a/Source/WebCore/loader/icon/IconController.cpp 2014-09-24 13:42:05.000000000 +0200
++++ b/Source/WebCore/loader/icon/IconController.cpp 2015-05-26 21:01:51.583361817 +0200
+@@ -163,6 +163,10 @@
+ }
+
+ if (iconDatabase().supportsAsynchronousMode()) {
++ // FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
++ if (m_frame->page()->settings()->privateBrowsingEnabled())
++ return;
++
+ m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString);
+ // Commit the icon url mapping to the database just in case we don't end up loading later.
+ commitToDatabase(iconURL);
+@@ -206,10 +210,6 @@
+ {
+ ASSERT(iconLoadDecision != IconLoadUnknown);
+
+- // FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode.
+- if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled())
+- return;
+-
+ if (iconLoadDecision == IconLoadNo) {
+ KURL iconURL(url());
+ String urlString(iconURL.string());
+--- a/Source/WebKit/qt/declarative/experimental/experimental.pri 2014-09-24 13:42:05.000000000 +0200
++++ b/Source/WebKit/qt/declarative/experimental/experimental.pri 2015-05-26 21:01:14.413735319 +0200
+@@ -29,8 +29,8 @@
+
+ DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
+
+-CONFIG += rpath
+-RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
++#CONFIG += rpath
++#RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
+
+ SOURCES += plugin.cpp
+
+--- a/Source/WebKit/qt/declarative/public.pri 2014-09-24 13:42:05.000000000 +0200
++++ b/Source/WebKit/qt/declarative/public.pri 2015-05-26 21:01:14.413735319 +0200
+@@ -36,8 +36,8 @@
+
+ DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
+
+-CONFIG += rpath
+-RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
++#CONFIG += rpath
++#RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
+
+ SOURCES += plugin.cpp
+
+--- a/Tools/qmake/mkspecs/features/rpath.prf 2014-09-24 13:42:05.000000000 +0200
++++ b/Tools/qmake/mkspecs/features/rpath.prf 2015-05-26 21:01:14.414735336 +0200
+@@ -6,7 +6,7 @@
+
+ equals(ROOT_BUILD_DIR, $$dirname(DESTDIR)): RPATHDIR_RELATIVE_TO_DESTDIR = ../lib
+
+-linux-*:!isEmpty(RPATHDIR_RELATIVE_TO_DESTDIR) {
++linux-rpath_me_harder_no_no_no:!isEmpty(RPATHDIR_RELATIVE_TO_DESTDIR) {
+ # Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
+ # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var.
+ QMAKE_RPATHDIR = \$\$ORIGIN/$${RPATHDIR_RELATIVE_TO_DESTDIR} $${QMAKE_RPATHDIR}
diff --git a/qwebview.patch b/qwebview.patch
new file mode 100644
index 000000000000..066bc798b5d6
--- /dev/null
+++ b/qwebview.patch
@@ -0,0 +1,21 @@
+--- qt-everywhere-opensource-src-4.8.4/tools/designer/src/plugins/plugins.pri~ 2013-01-09 12:56:08.915412090 +0000
++++ qt-everywhere-opensource-src-4.8.4/tools/designer/src/plugins/plugins.pri 2013-01-09 12:58:06.911391299 +0000
+@@ -1,3 +1,6 @@
++INCLUDEPATH += ../../../../../../qtwebkit-2.3.4/WebKitBuild/Release/include
++LIBS += -L../../../../../../qtwebkit-2.3.4/WebKitBuild/Release/lib
++
+ CONFIG += designer
+ win32|mac: CONFIG+= debug_and_release
+ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+--- qt-everywhere-opensource-src-4.8.4/tools/designer/src/plugins/plugins.pro~ 2013-01-09 12:55:43.598892405 +0000
++++ qt-everywhere-opensource-src-4.8.4/tools/designer/src/plugins/plugins.pro 2013-01-09 12:55:53.352169136 +0000
+@@ -2,9 +2,4 @@
+ CONFIG += ordered
+
+ REQUIRES = !CONFIG(static,shared|static)
+-contains(QT_CONFIG, qt3support): SUBDIRS += widgets
+-win32: SUBDIRS += activeqt
+-# contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d
+ contains(QT_CONFIG, webkit): SUBDIRS += qwebview
+-contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets
+-contains(QT_CONFIG, declarative): SUBDIRS += qdeclarativeview
diff --git a/use-python2.patch b/use-python2.patch
new file mode 100644
index 000000000000..b1444435b194
--- /dev/null
+++ b/use-python2.patch
@@ -0,0 +1,57 @@
+--- webkit-qtwebkit-23/Source/JavaScriptCore/DerivedSources.pri~ 2013-01-09 11:29:16.452266719 +0000
++++ webkit-qtwebkit-23/Source/JavaScriptCore/DerivedSources.pri 2013-01-09 11:30:18.188538725 +0000
+@@ -85,14 +85,14 @@
+ retgen.output = RegExpJitTables.h
+ retgen.script = $$PWD/create_regex_tables
+ retgen.input = retgen.script
+-retgen.commands = python $$retgen.script > ${QMAKE_FILE_OUT}
++retgen.commands = python2 $$retgen.script > ${QMAKE_FILE_OUT}
+ GENERATORS += retgen
+
+ #GENERATOR: "KeywordLookup.h": decision tree used by the lexer
+ klgen.output = KeywordLookup.h
+ klgen.script = $$PWD/KeywordLookupGenerator.py
+ klgen.input = KEYWORDLUT_FILES
+-klgen.commands = python $$klgen.script ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
++klgen.commands = python2 $$klgen.script ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
+ GENERATORS += klgen
+
+ EXTRACTOR_BINARY = LLIntOffsetsExtractor$$BIN_EXTENSION
+@@ -117,7 +117,7 @@
+ disassembler.input = DISASSEMBLER_FILES
+ disassembler.script = $$PWD/disassembler/udis86/itab.py
+ disassembler.depends = $$DISASSEMBLER_DEPENDENCY
+- disassembler.commands = python $$disassembler.script ${QMAKE_FILE_NAME} --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
++ disassembler.commands = python2 $$disassembler.script ${QMAKE_FILE_NAME} --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+ disassembler.CONFIG += no_link
+ GENERATORS += disassembler
+ }
+--- webkit-qtwebkit-23/Source/WebCore/DerivedSources.pri~ 2013-01-09 11:46:01.165612894 +0000
++++ webkit-qtwebkit-23/Source/WebCore/DerivedSources.pri 2013-01-09 11:46:27.465404725 +0000
+@@ -779,7 +779,7 @@
+ inspectorValidate.output = InspectorProtocolVersion.h
+ inspectorValidate.input = INSPECTOR_JSON
+ inspectorValidate.script = $$PWD/inspector/generate-inspector-protocol-version
+-inspectorValidate.commands = python $$inspectorValidate.script -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
++inspectorValidate.commands = python2 $$inspectorValidate.script -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ inspectorValidate.depends = $$PWD/inspector/generate-inspector-protocol-version
+ inspectorValidate.add_output_to_sources = false
+ GENERATORS += inspectorValidate
+@@ -787,7 +787,7 @@
+ inspectorJSON.output = InspectorFrontend.cpp InspectorBackendDispatcher.cpp InspectorTypeBuilder.cpp
+ inspectorJSON.input = INSPECTOR_JSON
+ inspectorJSON.script = $$PWD/inspector/CodeGeneratorInspector.py
+-inspectorJSON.commands = python $$inspectorJSON.script $$PWD/inspector/Inspector.json --output_h_dir ${QMAKE_FUNC_FILE_OUT_PATH} --output_cpp_dir ${QMAKE_FUNC_FILE_OUT_PATH}
++inspectorJSON.commands = python2 $$inspectorJSON.script $$PWD/inspector/Inspector.json --output_h_dir ${QMAKE_FUNC_FILE_OUT_PATH} --output_cpp_dir ${QMAKE_FUNC_FILE_OUT_PATH}
+ inspectorJSON.depends = $$inspectorJSON.script
+ GENERATORS += inspectorJSON
+
+@@ -908,7 +908,7 @@
+ entities.output = HTMLEntityTable.cpp
+ entities.input = HTML_ENTITIES
+ entities.script = $$PWD/html/parser/create-html-entity-table
+-entities.commands = python $$entities.script -o ${QMAKE_FILE_OUT} $$HTML_ENTITIES
++entities.commands = python2 $$entities.script -o ${QMAKE_FILE_OUT} $$HTML_ENTITIES
+ entities.clean = ${QMAKE_FILE_OUT}
+ entities.depends = $$PWD/html/parser/create-html-entity-table
+ GENERATORS += entities