diff options
| author | Mikko Gronoff <mikko.gronoff@qt.io> | 2020-03-06 12:32:13 +0200 |
|---|---|---|
| committer | Mikko Gronoff <mikko.gronoff@qt.io> | 2020-03-10 09:03:25 +0200 |
| commit | 5114e3057ceb4afc7f2ae9f71bb351f9e5c7f553 (patch) | |
| tree | 970f133c757794bcdc024acff5e053ca621ad47d | |
| parent | c29bdf41c4494e278a17a233048205bf212e040f (diff) | |
| parent | de2ecaa13fde8f30b1a6558bbbbdfecfd3cd4bd8 (diff) | |
| download | meta-qt5-5114e3057ceb4afc7f2ae9f71bb351f9e5c7f553.tar.gz | |
Merge remote-tracking branch 'qt/5.14' into 5.15
* qt/5.14:
de2ecaa1 coin: update module_config.yaml with meta-python2 support
f9a58d62 Merge remote-tracking branch 'qt/upstream/master' into 5.14
2da972e5 qt5: update submodules
9be6548e qt5: update submodules
b5e4f925 qtquicktimeline: add recipe
abb42351 (qt/upstream/master) qtwebview: Skip if meta-python is not present
caf09cd5 Add PyQtChart.
f18d5948 qtbase: fix build with platform where FE macro are not defined
c8cd55b0 qtwebkit: build with python3
0bbd0ebe qtwebengine: Link libatomic on x86/32bit
23914740 Revert "qtwebkit: remove"
8cadcbcb qt5: upgrade to 5.14.1
f13a3cec packagegroup-qt5-toolchain-target: Use TUNE_PKGARCH instead of MACHINE_ARCH
a35403dc qtwebkit: remove
a797f85c python-pyqt5, qtwebengine, qtwebkit, qt-kiosk-browser: skip without meta-python2
b1f4f1fd Revert "recipes: Use python3 during build"
47fb26de recipes: Use python3 during build
4060f68d qt-kiosk-browser: Only support arm/x86
fd376e15 qtwebengine: Fix missing headers found in build with clang
7f324f11 gstreamer1.0-plugins-good: Adjust bbappend for meson migration in core
1365691f qttools: remove ptest installation
254576f9 qt-kiosk-browser: Add recipe
47399df9 nativesdk-packagegroup: fix cmake builds using sdk
Conflicts:
recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb
recipes-qt/qt5/nativesdk-qtbase_git.bb
recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch
recipes-qt/qt5/qt3d_git.bb
recipes-qt/qt5/qtbase-native_git.bb
recipes-qt/qt5/qtbase_git.bb
recipes-qt/qt5/qtcharts_git.bb
recipes-qt/qt5/qtcoap_git.bb
recipes-qt/qt5/qtconnectivity_git.bb
recipes-qt/qt5/qtdeclarative_git.bb
recipes-qt/qt5/qtimageformats_git.bb
recipes-qt/qt5/qtknx_git.bb
recipes-qt/qt5/qtlocation_git.bb
recipes-qt/qt5/qtmultimedia_git.bb
recipes-qt/qt5/qtquick3d_git.bb
recipes-qt/qt5/qtquickcontrols2_git.bb
recipes-qt/qt5/qtremoteobjects_git.bb
recipes-qt/qt5/qtscript_git.bb
recipes-qt/qt5/qtserialbus_git.bb
recipes-qt/qt5/qtsvg_git.bb
recipes-qt/qt5/qttools_git.bb
recipes-qt/qt5/qtwebengine_git.bb
recipes-qt/qt5/qtwebsockets_git.bb
recipes-qt/qt5/qtwebview_git.bb
Change-Id: I41b3b999dc1278342e33dda3b66af1990e8da090
71 files changed, 4308 insertions, 103 deletions
diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 6ce600eb..51579be0 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml | |||
| @@ -22,6 +22,9 @@ environment: &environment | |||
| 22 | variableName: OE_SHA1 | 22 | variableName: OE_SHA1 |
| 23 | variableValue: b2baaae2711d098c06423858662e29a8375fe6b8 | 23 | variableValue: b2baaae2711d098c06423858662e29a8375fe6b8 |
| 24 | - type: EnvironmentVariable | 24 | - type: EnvironmentVariable |
| 25 | variableName: PYTHON2_SHA1 | ||
| 26 | variableValue: 8fc9be701d430388b4c5234c97e623debd26a1df | ||
| 27 | - type: EnvironmentVariable | ||
| 25 | variableName: MACHINE | 28 | variableName: MACHINE |
| 26 | variableValue: qemuarm64 | 29 | variableValue: qemuarm64 |
| 27 | enable_if: | 30 | enable_if: |
| @@ -144,6 +147,8 @@ build_instructions: | |||
| 144 | (cd poky; git checkout ${POKY_SHA1}) | 147 | (cd poky; git checkout ${POKY_SHA1}) |
| 145 | git clone git://github.com/openembedded/meta-openembedded --reference /mnt/yocto-cache/mirror/meta-openembedded.git | 148 | git clone git://github.com/openembedded/meta-openembedded --reference /mnt/yocto-cache/mirror/meta-openembedded.git |
| 146 | (cd meta-openembedded; git checkout ${OE_SHA1}) | 149 | (cd meta-openembedded; git checkout ${OE_SHA1}) |
| 150 | git clone git://git.openembedded.org/meta-python2 --reference /mnt/yocto-cache/mirror/meta-python2.git | ||
| 151 | (cd meta-python2; git checkout ${PYTHON2_SHA1}) | ||
| 147 | 152 | ||
| 148 | source ./poky/oe-init-build-env | 153 | source ./poky/oe-init-build-env |
| 149 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR" | 154 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR" |
| @@ -151,6 +156,7 @@ build_instructions: | |||
| 151 | export BB_GENERATE_MIRROR_TARBALLS=1 | 156 | export BB_GENERATE_MIRROR_TARBALLS=1 |
| 152 | export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../poky/meta-*/conf/distro/poky.conf) | 157 | export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../poky/meta-*/conf/distro/poky.conf) |
| 153 | bitbake-layers add-layer ../meta-openembedded/meta-oe | 158 | bitbake-layers add-layer ../meta-openembedded/meta-oe |
| 159 | bitbake-layers add-layer ../meta-python2 | ||
| 154 | bitbake-layers add-layer ${SOURCE_DIR} | 160 | bitbake-layers add-layer ${SOURCE_DIR} |
| 155 | 161 | ||
| 156 | echo 'require ../world_fixes.inc' >> conf/local.conf | 162 | echo 'require ../world_fixes.inc' >> conf/local.conf |
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend index 89026193..b514e329 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | inherit qmake5_paths | 1 | inherit qmake5_paths |
| 2 | 2 | ||
| 3 | PACKAGECONFIG[qt5] = '--enable-qt \ | 3 | PACKAGECONFIG[qt5] = '-Dqt5=enabled \ |
| 4 | --with-moc="${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/moc" \ | 4 | ,-Dqt5=disabled \ |
| 5 | --with-uic="${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/uic" \ | 5 | ,gstreamer1.0-plugins-base qtbase qtdeclarative qtbase-native' |
| 6 | --with-rcc="${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}/rcc" \ | ||
| 7 | ,--disable-qt,gstreamer1.0-plugins-base qtbase qtdeclarative qtbase-native' | ||
diff --git a/recipes-python/pyqt5/python-pyqt5_5.13.2.bb b/recipes-python/pyqt5/python-pyqt5_5.13.2.bb index b8b1d086..e051b156 100644 --- a/recipes-python/pyqt5/python-pyqt5_5.13.2.bb +++ b/recipes-python/pyqt5/python-pyqt5_5.13.2.bb | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | require python-pyqt5.inc | 1 | require python-pyqt5.inc |
| 2 | 2 | ||
| 3 | inherit pythonnative python-dir | 3 | inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative python-dir", "", d)} |
| 4 | |||
| 5 | python() { | ||
| 6 | if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 7 | raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') | ||
| 8 | } | ||
| 4 | 9 | ||
| 5 | DEPENDS += "sip sip-native python" | 10 | DEPENDS += "sip sip-native python" |
| 6 | 11 | ||
diff --git a/recipes-python/pyqtchart/python-pyqtchart.inc b/recipes-python/pyqtchart/python-pyqtchart.inc new file mode 100644 index 00000000..e8dba18a --- /dev/null +++ b/recipes-python/pyqtchart/python-pyqtchart.inc | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | SUMMARY = "Python Qt Chart Bindings" | ||
| 2 | AUTHOR = "Adrian.Fiergolski@fastree3d.com" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "GPLv3" | ||
| 5 | LIC_FILES_CHKSUM = "\ | ||
| 6 | file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 7 | " | ||
| 8 | SRC_URI = "\ | ||
| 9 | https://www.riverbankcomputing.com/static/Downloads/PyQtChart/${PV}/PyQtChart-${PV}.tar.gz \ | ||
| 10 | " | ||
| 11 | SRC_URI[md5sum] = "d5d37bff46b690d6318e5e5f25dd5213" | ||
| 12 | SRC_URI[sha256sum] = "49960a1483527857b38c1527f9b6328d30bdcc84521f579c0a561a892f54130e" | ||
| 13 | |||
| 14 | S = "${WORKDIR}/PyQtChart-${PV}" | ||
| 15 | |||
| 16 | inherit qmake5 | ||
| 17 | DEPENDS = "qtbase qtdeclarative qtquickcontrols2" | ||
| 18 | |||
| 19 | export BUILD_SYS | ||
| 20 | export HOST_SYS | ||
| 21 | export STAGING_INCDIR | ||
| 22 | export STAGING_LIBDIR | ||
| 23 | |||
| 24 | PARALLEL_MAKEINST = "" | ||
| 25 | |||
| 26 | DISABLED_FEATURES = "PyQt_Desktop_OpenGL PyQt_Accessibility PyQt_SessionManager" | ||
| 27 | |||
| 28 | DISABLED_FEATURES_append_arm = " PyQt_qreal_double" | ||
| 29 | |||
| 30 | do_configure_prepend() { | ||
| 31 | cd ${S} | ||
| 32 | echo "[PyQt 5]" > pyqt.cfg | ||
| 33 | echo "py_platform = linux" >> pyqt.cfg | ||
| 34 | echo "py_inc_dir = %(sysroot)/$includedir/python%(py_major).%(py_minor)${PYTHON_ABI}" >> pyqt.cfg | ||
| 35 | echo "py_pylib_dir = %(sysroot)/${libdir}/python%(py_major).%(py_minor)" >> pyqt.cfg | ||
| 36 | echo "pyqt_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> pyqt.cfg | ||
| 37 | echo "py_sip_dir = ${STAGING_EXECPREFIXDIR}/share/sip" >> pyqt.cfg | ||
| 38 | echo "sip_module = PyQt5.sip" >> pyqt.cfg | ||
| 39 | echo "pyqt_disabled_features = ${DISABLED_FEATURES}" >> pyqt.cfg | ||
| 40 | echo yes | ${PYTHON} configure.py --verbose --qmake ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/qmake --configuration pyqt.cfg --sysroot ${STAGING_DIR_HOST} | ||
| 41 | } | ||
| 42 | |||
| 43 | do_configure_append() { | ||
| 44 | #Fix installation paths | ||
| 45 | sed -i -e s:'$(INSTALL_ROOT)'${STAGING_EXECPREFIXDIR}:'$(INSTALL_ROOT)'${D}${exec_prefix}:g ${S}/Makefile | ||
| 46 | sed -i -e s:'$(INSTALL_ROOT)'${STAGING_EXECPREFIXDIR}:'$(INSTALL_ROOT)'${D}${exec_prefix}:g ${S}/QtChart/Makefile | ||
| 47 | #Skip installed.txt creation | ||
| 48 | sed -i -e s:" install_distinfo ":" ": ${S}/Makefile | ||
| 49 | } | ||
| 50 | |||
| 51 | do_compile() { | ||
| 52 | cd ${S} | ||
| 53 | oe_runmake | ||
| 54 | } | ||
| 55 | |||
| 56 | do_install() { | ||
| 57 | cd ${S} | ||
| 58 | oe_runmake MAKEFLAGS='-j 1' install | ||
| 59 | } | ||
| 60 | |||
| 61 | |||
| 62 | FILES_${PN} += "${libdir}/${PYTHON_DIR}/site-packages ${datadir}/" | ||
| 63 | |||
| 64 | DEPENDS = "qtcharts" | ||
| 65 | |||
| 66 | RDEPENDS_${PN} = "qtbase qtdeclarative qtquickcontrols2 qtquickcontrols2-mkspecs qtcharts" | ||
diff --git a/recipes-python/pyqtchart/python3-pyqtchart_5.13.1.bb b/recipes-python/pyqtchart/python3-pyqtchart_5.13.1.bb new file mode 100644 index 00000000..899f9691 --- /dev/null +++ b/recipes-python/pyqtchart/python3-pyqtchart_5.13.1.bb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | require python-pyqtchart.inc | ||
| 2 | |||
| 3 | inherit python3native python3-dir | ||
| 4 | |||
| 5 | DEPENDS += "sip3 sip3-native python3 python3-pyqt5" | ||
| 6 | |||
| 7 | RDEPENDS_${PN} += "python3-core python3-sip3 python3-pyqt5" | ||
diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb index e92cb9d4..facd2763 100644 --- a/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt5-toolchain-host.bb | |||
| @@ -11,5 +11,6 @@ RDEPENDS_${PN} += " \ | |||
| 11 | nativesdk-packagegroup-sdk-host \ | 11 | nativesdk-packagegroup-sdk-host \ |
| 12 | nativesdk-qttools-tools \ | 12 | nativesdk-qttools-tools \ |
| 13 | nativesdk-qtbase \ | 13 | nativesdk-qtbase \ |
| 14 | nativesdk-qtbase-dev \ | ||
| 14 | nativesdk-perl-modules \ | 15 | nativesdk-perl-modules \ |
| 15 | " | 16 | " |
diff --git a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb index ef5cb01e..8c8bed30 100755 --- a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb +++ b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb | |||
| @@ -3,16 +3,11 @@ | |||
| 3 | DESCRIPTION = "Target packages for Qt5 SDK" | 3 | DESCRIPTION = "Target packages for Qt5 SDK" |
| 4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
| 5 | 5 | ||
| 6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 6 | PACKAGE_ARCH = "${TUNE_PKGARCH}" |
| 7 | inherit packagegroup | 7 | inherit packagegroup |
| 8 | 8 | ||
| 9 | PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" | 9 | PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" |
| 10 | 10 | ||
| 11 | # Requires Ruby to work | ||
| 12 | USE_RUBY ?= " \ | ||
| 13 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qtwebkit-dev', '', d)} \ | ||
| 14 | " | ||
| 15 | |||
| 16 | # Requires Wayland to work | 11 | # Requires Wayland to work |
| 17 | USE_WAYLAND = " \ | 12 | USE_WAYLAND = " \ |
| 18 | qtwayland-dev \ | 13 | qtwayland-dev \ |
| @@ -90,7 +85,6 @@ RDEPENDS_${PN} += " \ | |||
| 90 | qttools-staticdev \ | 85 | qttools-staticdev \ |
| 91 | qttools-tools \ | 86 | qttools-tools \ |
| 92 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '${USE_WAYLAND}', '', d)} \ | 87 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '${USE_WAYLAND}', '', d)} \ |
| 93 | ${USE_RUBY} \ | ||
| 94 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${USE_X11}', '', d)} \ | 88 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${USE_X11}', '', d)} \ |
| 95 | qtwebsockets-dev \ | 89 | qtwebsockets-dev \ |
| 96 | qtwebsockets-mkspecs \ | 90 | qtwebsockets-mkspecs \ |
diff --git a/recipes-qt/qt-kiosk-browser/qt-kiosk-browser/qt-kiosk-browser.conf b/recipes-qt/qt-kiosk-browser/qt-kiosk-browser/qt-kiosk-browser.conf new file mode 100644 index 00000000..4f4849b5 --- /dev/null +++ b/recipes-qt/qt-kiosk-browser/qt-kiosk-browser/qt-kiosk-browser.conf | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | { | ||
| 2 | "URL": "http://github.com/OSSystems/qt-kiosk-browser", | ||
| 3 | "RestartTimeout": 0, | ||
| 4 | "ScreenSaverTimeout": 0 | ||
| 5 | } | ||
diff --git a/recipes-qt/qt-kiosk-browser/qt-kiosk-browser_git.bb b/recipes-qt/qt-kiosk-browser/qt-kiosk-browser_git.bb new file mode 100644 index 00000000..8ae0e9ef --- /dev/null +++ b/recipes-qt/qt-kiosk-browser/qt-kiosk-browser_git.bb | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | SUMMARY = "Qt Kiosk Browser" | ||
| 2 | DESCRIPTION = "Provides a simple but highly configurable browser for use on Kiosk devices" | ||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" | ||
| 4 | LICENSE = "GPLv3" | ||
| 5 | |||
| 6 | DEPENDS = "qtwebengine" | ||
| 7 | python() { | ||
| 8 | if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 9 | raise bb.parse.SkipRecipe('qtwebengine dependency requires meta-python2 to be present.') | ||
| 10 | } | ||
| 11 | |||
| 12 | SRC_URI = " \ | ||
| 13 | git://github.com/OSSystems/qt-kiosk-browser;protocol=https \ | ||
| 14 | file://${BPN}.conf \ | ||
| 15 | " | ||
| 16 | |||
| 17 | PV = "0.0+git${SRCPV}" | ||
| 18 | SRCREV = "d42b7d9050b5445e2b9430022a46d5d583581631" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | inherit qmake5 | ||
| 23 | |||
| 24 | EXTRA_QMAKEVARS_PRE += "PREFIX=${prefix}" | ||
| 25 | |||
| 26 | do_install_append() { | ||
| 27 | install -Dm 0644 ${WORKDIR}/${PN}.conf ${D}${sysconfdir}/${PN}.conf | ||
| 28 | } | ||
| 29 | |||
| 30 | RDEPENDS_${PN} += " \ | ||
| 31 | liberation-fonts \ | ||
| 32 | qtdeclarative-qmlplugins \ | ||
| 33 | qtquickcontrols-qmlplugins \ | ||
| 34 | qtvirtualkeyboard \ | ||
| 35 | qtwebengine-qmlplugins \ | ||
| 36 | " | ||
| 37 | COMPATIBLE_MACHINE = "(-)" | ||
| 38 | COMPATIBLE_MACHINE_x86 = "(.*)" | ||
| 39 | COMPATIBLE_MACHINE_x86-64 = "(.*)" | ||
| 40 | COMPATIBLE_MACHINE_armv6 = "(.*)" | ||
| 41 | COMPATIBLE_MACHINE_armv7a = "(.*)" | ||
| 42 | COMPATIBLE_MACHINE_armv7ve = "(.*)" | ||
| 43 | COMPATIBLE_MACHINE_aarch64 = "(.*)" | ||
diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb index c0f2c565..47b0a823 100644 --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb | |||
| @@ -23,7 +23,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/qtbase:" | |||
| 23 | 23 | ||
| 24 | # common for qtbase-native, qtbase-nativesdk and qtbase | 24 | # common for qtbase-native, qtbase-nativesdk and qtbase |
| 25 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared | 25 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared |
| 26 | # 5.14.meta-qt5-shared.1 | 26 | # 5.14.meta-qt5-shared.2 |
| 27 | SRC_URI += "\ | 27 | SRC_URI += "\ |
| 28 | file://0001-Add-linux-oe-g-platform.patch \ | 28 | file://0001-Add-linux-oe-g-platform.patch \ |
| 29 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ | 29 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ |
| @@ -46,7 +46,7 @@ SRC_URI += "\ | |||
| 46 | 46 | ||
| 47 | # common for qtbase-native and nativesdk-qtbase | 47 | # common for qtbase-native and nativesdk-qtbase |
| 48 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-native | 48 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-native |
| 49 | # 5.14.meta-qt5-native.1 | 49 | # 5.14.meta-qt5-native.2 |
| 50 | SRC_URI += " \ | 50 | SRC_URI += " \ |
| 51 | file://0019-Always-build-uic-and-qvkgen.patch \ | 51 | file://0019-Always-build-uic-and-qvkgen.patch \ |
| 52 | file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \ | 52 | file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \ |
diff --git a/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch index 7e601abf..3ed1b0e7 100644 --- a/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch +++ b/recipes-qt/qt5/qt3d/0001-Allow-a-tools-only-build.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 34fabf8231972d33558ac054fa1b23661d5266a6 Mon Sep 17 00:00:00 2001 | 1 | From 01c62d4e4bf1034302834fef48a894c6b0ebe147 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Fri, 17 Aug 2018 13:23:58 +0300 | 3 | Date: Fri, 17 Aug 2018 13:23:58 +0300 |
| 4 | Subject: [PATCH] Allow a tools-only build | 4 | Subject: [PATCH] Allow a tools-only build |
diff --git a/recipes-qt/qt5/qt3d_git.bb b/recipes-qt/qt5/qt3d_git.bb index e63b8757..f3ba96f4 100644 --- a/recipes-qt/qt5/qt3d_git.bb +++ b/recipes-qt/qt5/qt3d_git.bb | |||
| @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = " \ | |||
| 11 | DEPENDS += "qtbase" | 11 | DEPENDS += "qtbase" |
| 12 | DEPENDS_class-target += "qtdeclarative qt3d-native" | 12 | DEPENDS_class-target += "qtdeclarative qt3d-native" |
| 13 | 13 | ||
| 14 | # Patches from https://github.com/meta-qt5/qt3d/commits/b5.13 | 14 | # Patches from https://github.com/meta-qt5/qt3d/commits/b5.14 |
| 15 | # 5.13.meta-qt5.1 | 15 | # 5.14.meta-qt5.1 |
| 16 | SRC_URI += " \ | 16 | SRC_URI += " \ |
| 17 | file://0001-Allow-a-tools-only-build.patch \ | 17 | file://0001-Allow-a-tools-only-build.patch \ |
| 18 | " | 18 | " |
diff --git a/recipes-qt/qt5/qt5-git.inc b/recipes-qt/qt5/qt5-git.inc index f7cd854d..b0389949 100644 --- a/recipes-qt/qt5/qt5-git.inc +++ b/recipes-qt/qt5/qt5-git.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copyright (C) 2012-2016 O.S. Systems Software LTDA. | 1 | # Copyright (C) 2012-2016 O.S. Systems Software LTDA. |
| 2 | # Copyright (C) 2013-2019 Martin Jansa <martin.jansa@gmail.com> | 2 | # Copyright (C) 2013-2020 Martin Jansa <martin.jansa@gmail.com> |
| 3 | 3 | ||
| 4 | QT_MODULE ?= "${BPN}" | 4 | QT_MODULE ?= "${BPN}" |
| 5 | QT_MODULE_BRANCH ?= "5.15" | 5 | QT_MODULE_BRANCH ?= "5.15" |
diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 489b9950..0f13be32 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb | |||
| @@ -18,7 +18,7 @@ require qt5-git.inc | |||
| 18 | 18 | ||
| 19 | # common for qtbase-native, qtbase-nativesdk and qtbase | 19 | # common for qtbase-native, qtbase-nativesdk and qtbase |
| 20 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared | 20 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared |
| 21 | # 5.14.meta-qt5-shared.1 | 21 | # 5.14.meta-qt5-shared.2 |
| 22 | SRC_URI += "\ | 22 | SRC_URI += "\ |
| 23 | file://0001-Add-linux-oe-g-platform.patch \ | 23 | file://0001-Add-linux-oe-g-platform.patch \ |
| 24 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ | 24 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ |
| @@ -41,7 +41,7 @@ SRC_URI += "\ | |||
| 41 | 41 | ||
| 42 | # common for qtbase-native and nativesdk-qtbase | 42 | # common for qtbase-native and nativesdk-qtbase |
| 43 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-native | 43 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-native |
| 44 | # 5.14.meta-qt5-native.1 | 44 | # 5.14.meta-qt5-native.2 |
| 45 | SRC_URI += " \ | 45 | SRC_URI += " \ |
| 46 | file://0019-Always-build-uic-and-qvkgen.patch \ | 46 | file://0019-Always-build-uic-and-qvkgen.patch \ |
| 47 | file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \ | 47 | file://0020-Avoid-renameeat2-for-native-sdk-builds.patch \ |
diff --git a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch index 3b71adad..95e236ae 100644 --- a/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch +++ b/recipes-qt/qt5/qtbase/0001-Add-linux-oe-g-platform.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 5668523aa073c1ef430b1662c735ead8fd64c83b Mon Sep 17 00:00:00 2001 | 1 | From 0d13aba5a2ab1794bfea5a3bbf2096da17f0cae1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
| 3 | Date: Mon, 15 Apr 2013 04:29:32 +0200 | 3 | Date: Mon, 15 Apr 2013 04:29:32 +0200 |
| 4 | Subject: [PATCH] Add linux-oe-g++ platform | 4 | Subject: [PATCH] Add linux-oe-g++ platform |
| @@ -89,10 +89,10 @@ index 3a71376029..dd6020f1fe 100644 | |||
| 89 | # run qmlimportscanner | 89 | # run qmlimportscanner |
| 90 | qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, , system) | 90 | qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner, , system) |
| 91 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf | 91 | diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf |
| 92 | index 661b7dd961..3bc73ab0c6 100644 | 92 | index 7777e615bd..8d792fa70a 100644 |
| 93 | --- a/mkspecs/features/qt_functions.prf | 93 | --- a/mkspecs/features/qt_functions.prf |
| 94 | +++ b/mkspecs/features/qt_functions.prf | 94 | +++ b/mkspecs/features/qt_functions.prf |
| 95 | @@ -76,7 +76,7 @@ defineTest(qtHaveModule) { | 95 | @@ -87,7 +87,7 @@ defineTest(qtHaveModule) { |
| 96 | defineTest(qtPrepareTool) { | 96 | defineTest(qtPrepareTool) { |
| 97 | cmd = $$eval(QT_TOOL.$${2}.binary) | 97 | cmd = $$eval(QT_TOOL.$${2}.binary) |
| 98 | isEmpty(cmd) { | 98 | isEmpty(cmd) { |
diff --git a/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch b/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch index 1a5adcaf..be51019d 100644 --- a/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch +++ b/recipes-qt/qt5/qtbase/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From b0e51c74e3f550c2d72ee4e02d1f9c3f5d2e83b5 Mon Sep 17 00:00:00 2001 | 1 | From 8409ffc14e5176595c7d591ebd07f5b49af8d245 Mon Sep 17 00:00:00 2001 |
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
| 3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 | 3 | Date: Sat, 6 Apr 2013 13:15:07 +0200 |
| 4 | Subject: [PATCH] cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS | 4 | Subject: [PATCH] cmake: Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS |
diff --git a/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch index 6891d8c4..6d8f5f96 100644 --- a/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch +++ b/recipes-qt/qt5/qtbase/0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From db95ec35c5e2a1604f82803fc5c09dc82b594175 Mon Sep 17 00:00:00 2001 | 1 | From 73c6762cc7d4c3449fc152f706c8d0efa2f7e65e Mon Sep 17 00:00:00 2001 |
| 2 | From: Holger Freyther <zecke@selfish.org> | 2 | From: Holger Freyther <zecke@selfish.org> |
| 3 | Date: Wed, 26 Sep 2012 17:22:30 +0200 | 3 | Date: Wed, 26 Sep 2012 17:22:30 +0200 |
| 4 | Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the | 4 | Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the |
diff --git a/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch b/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch index 25c3a66e..a40c0563 100644 --- a/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch +++ b/recipes-qt/qt5/qtbase/0004-configure-bump-path-length-from-256-to-512-character.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 3fa9db42f3b34f97929662a461c9a07982505178 Mon Sep 17 00:00:00 2001 | 1 | From fad25d26b6ec478d0b22bc4fbfec65a6665608c0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Denys Dmytriyenko <denys@ti.com> | 2 | From: Denys Dmytriyenko <denys@ti.com> |
| 3 | Date: Tue, 25 Aug 2015 10:05:15 -0400 | 3 | Date: Tue, 25 Aug 2015 10:05:15 -0400 |
| 4 | Subject: [PATCH] configure: bump path length from 256 to 512 characters | 4 | Subject: [PATCH] configure: bump path length from 256 to 512 characters |
| @@ -15,10 +15,10 @@ Signed-off-by: Denys Dmytriyenko <denys@ti.com> | |||
| 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | 15 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 16 | 16 | ||
| 17 | diff --git a/configure.pri b/configure.pri | 17 | diff --git a/configure.pri b/configure.pri |
| 18 | index 47882afeb6..a50aa0e176 100644 | 18 | index 81c84b28ef..bf40b68835 100644 |
| 19 | --- a/configure.pri | 19 | --- a/configure.pri |
| 20 | +++ b/configure.pri | 20 | +++ b/configure.pri |
| 21 | @@ -870,10 +870,10 @@ defineTest(qtConfOutput_preparePaths) { | 21 | @@ -872,10 +872,10 @@ defineTest(qtConfOutput_preparePaths) { |
| 22 | 22 | ||
| 23 | $${currentConfig}.output.qconfigSource = \ | 23 | $${currentConfig}.output.qconfigSource = \ |
| 24 | "/* Installation Info */" \ | 24 | "/* Installation Info */" \ |
diff --git a/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch b/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch index c27f7ac2..b8a0b716 100644 --- a/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch +++ b/recipes-qt/qt5/qtbase/0005-Disable-all-unknown-features-instead-of-erroring-out.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 1ca3511433c55755c63dfa0fb78d712c6605b37a Mon Sep 17 00:00:00 2001 | 1 | From 24c469b3c9599aa106c44d1df48fb04db5b8c904 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Mon, 24 Oct 2016 09:45:18 +0300 | 3 | Date: Mon, 24 Oct 2016 09:45:18 +0300 |
| 4 | Subject: [PATCH] Disable all unknown features instead of erroring out | 4 | Subject: [PATCH] Disable all unknown features instead of erroring out |
diff --git a/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch b/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch index 03931f5c..95df5efd 100644 --- a/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch +++ b/recipes-qt/qt5/qtbase/0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 37f7cae8d723341b12fe76bca12c4c76d98fb874 Mon Sep 17 00:00:00 2001 | 1 | From 8143b5913e50d26ef39fbbed5f1e28ff74a57d20 Mon Sep 17 00:00:00 2001 |
| 2 | From: Pascal Bach <pascal.bach@siemens.com> | 2 | From: Pascal Bach <pascal.bach@siemens.com> |
| 3 | Date: Wed, 11 May 2016 15:20:41 +0200 | 3 | Date: Wed, 11 May 2016 15:20:41 +0200 |
| 4 | Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS | 4 | Subject: [PATCH] Pretend Qt5 wasn't found if OE_QMAKE_PATH_EXTERNAL_HOST_BINS |
| @@ -30,7 +30,7 @@ Signed-off-by: Pascal Bach <pascal.bach@siemens.com> | |||
| 30 | 2 files changed, 10 insertions(+) | 30 | 2 files changed, 10 insertions(+) |
| 31 | 31 | ||
| 32 | diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 32 | diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
| 33 | index 364c23e750..670b5c71f2 100644 | 33 | index 50364765fb..e101a2e841 100644 |
| 34 | --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 34 | --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
| 35 | +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 35 | +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in |
| 36 | @@ -3,6 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0) | 36 | @@ -3,6 +3,11 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0) |
diff --git a/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch b/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch index 1a1d696f..d683d4d9 100644 --- a/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch +++ b/recipes-qt/qt5/qtbase/0007-Delete-qlonglong-and-qulonglong.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 2b0adcafba19d87ef452dad156c8fda8ec8396b0 Mon Sep 17 00:00:00 2001 | 1 | From 41d43606a50fbeae73d585ed727ec13e36f785c0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | 2 | From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> |
| 3 | Date: Wed, 7 Jun 2017 21:00:49 +0900 | 3 | Date: Wed, 7 Jun 2017 21:00:49 +0900 |
| 4 | Subject: [PATCH] Delete qlonglong and qulonglong | 4 | Subject: [PATCH] Delete qlonglong and qulonglong |
diff --git a/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch b/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch index fe3e0754..07110739 100644 --- a/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch +++ b/recipes-qt/qt5/qtbase/0008-Replace-pthread_yield-with-sched_yield.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 98fbf9fcbe29886dbc84a7e95a9f58a588a8e8ea Mon Sep 17 00:00:00 2001 | 1 | From 4d8c0a0524ceea0590f15d87a4aa604a488bedc5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 27 Jul 2017 08:02:51 -0700 | 3 | Date: Thu, 27 Jul 2017 08:02:51 -0700 |
| 4 | Subject: [PATCH] Replace pthread_yield with sched_yield | 4 | Subject: [PATCH] Replace pthread_yield with sched_yield |
| @@ -36,7 +36,7 @@ index 12c29a6e13..7d31799da6 100644 | |||
| 36 | QMetaType info(tp); | 36 | QMetaType info(tp); |
| 37 | if (!info.isValid()) { | 37 | if (!info.isValid()) { |
| 38 | diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 38 | diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp |
| 39 | index 75b9b23259..77b5bf1525 100644 | 39 | index 0546c6ba7d..f602b035d6 100644 |
| 40 | --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 40 | --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp |
| 41 | +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 41 | +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp |
| 42 | @@ -78,6 +78,7 @@ | 42 | @@ -78,6 +78,7 @@ |
| @@ -47,7 +47,7 @@ index 75b9b23259..77b5bf1525 100644 | |||
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #include "private/qhostinfo_p.h" | 49 | #include "private/qhostinfo_p.h" |
| 50 | @@ -2177,8 +2178,8 @@ public slots: | 50 | @@ -2178,8 +2179,8 @@ public slots: |
| 51 | 51 | ||
| 52 | #if defined(Q_OS_MAC) | 52 | #if defined(Q_OS_MAC) |
| 53 | pthread_yield_np(); | 53 | pthread_yield_np(); |
diff --git a/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch b/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch index fd2716ec..b30a823f 100644 --- a/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch +++ b/recipes-qt/qt5/qtbase/0009-Add-OE-specific-specs-for-clang-compiler.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 46b07eaf67735ad21b56c67a61737491c1150760 Mon Sep 17 00:00:00 2001 | 1 | From ba7dda9ef0e33103e26fee2e41f25d8c0e3bfb78 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 3 Sep 2017 09:11:44 -0700 | 3 | Date: Sun, 3 Sep 2017 09:11:44 -0700 |
| 4 | Subject: [PATCH] Add OE specific specs for clang compiler | 4 | Subject: [PATCH] Add OE specific specs for clang compiler |
diff --git a/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch b/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch index b9c95c5e..e58b1ebc 100644 --- a/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch +++ b/recipes-qt/qt5/qtbase/0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From df0f6f03af2494d7dc73035273e0a7e65780f3d7 Mon Sep 17 00:00:00 2001 | 1 | From 03e57f526db46b93b2bcbd01974446b9819e73e7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 3 Sep 2017 09:44:48 -0700 | 3 | Date: Sun, 3 Sep 2017 09:44:48 -0700 |
| 4 | Subject: [PATCH] linux-clang: Invert conditional for defining QT_SOCKLEN_T | 4 | Subject: [PATCH] linux-clang: Invert conditional for defining QT_SOCKLEN_T |
diff --git a/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch b/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch index bd835f1e..8a705415 100644 --- a/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch +++ b/recipes-qt/qt5/qtbase/0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From fab74db07a1f4f7502d37c4f4c2a04f540dbe6a5 Mon Sep 17 00:00:00 2001 | 1 | From f3befb762f2e69fa1f8a444ca9b392b4cb48ba5f Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 3 Sep 2017 10:11:50 -0700 | 3 | Date: Sun, 3 Sep 2017 10:11:50 -0700 |
| 4 | Subject: [PATCH] tst_qlocale: Enable QT_USE_FENV only on glibc | 4 | Subject: [PATCH] tst_qlocale: Enable QT_USE_FENV only on glibc |
| @@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 12 | ||
| 13 | diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 13 | diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp |
| 14 | index 20ed7500b5..90181fd078 100644 | 14 | index 8f434acb29..53dc0d9121 100644 |
| 15 | --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 15 | --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp |
| 16 | +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 16 | +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp |
| 17 | @@ -46,7 +46,7 @@ | 17 | @@ -46,7 +46,7 @@ |
diff --git a/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch b/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch index c5a2a67f..5186c2d6 100644 --- a/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch +++ b/recipes-qt/qt5/qtbase/0012-mkspecs-common-gcc-base.conf-Use-I-instead-of-isyste.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 716d70f9ac91725155f7e6c14727ab86fbdf44f4 Mon Sep 17 00:00:00 2001 | 1 | From 382e44787d366428892161881fdc3c2481cefc04 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 14 Feb 2018 17:08:43 -0800 | 3 | Date: Wed, 14 Feb 2018 17:08:43 -0800 |
| 4 | Subject: [PATCH] mkspecs/common/gcc-base.conf: Use -I instead of -isystem | 4 | Subject: [PATCH] mkspecs/common/gcc-base.conf: Use -I instead of -isystem |
diff --git a/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch b/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch index 6797e903..83f4e29c 100644 --- a/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch +++ b/recipes-qt/qt5/qtbase/0013-Disable-ltcg-for-host_build.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 63cf72b8519dd58a5fb6eeeef67b19842806cddc Mon Sep 17 00:00:00 2001 | 1 | From 8a2c2006676b0cb1a579efabb0ab24a277024b54 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Tue, 23 Oct 2018 09:54:57 +0300 | 3 | Date: Tue, 23 Oct 2018 09:54:57 +0300 |
| 4 | Subject: [PATCH] Disable ltcg for host_build | 4 | Subject: [PATCH] Disable ltcg for host_build |
diff --git a/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch b/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch index 91f12f64..f9993f51 100644 --- a/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch +++ b/recipes-qt/qt5/qtbase/0014-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 5630158766df351317ead6059ca7039cd125ab27 Mon Sep 17 00:00:00 2001 | 1 | From 73b4276844b4fadc42375f713b51031b5c7c15b1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Max Krummenacher <max.krummenacher@toradex.com> | 2 | From: Max Krummenacher <max.krummenacher@toradex.com> |
| 3 | Date: Sat, 27 Oct 2018 12:29:31 +0000 | 3 | Date: Sat, 27 Oct 2018 12:29:31 +0000 |
| 4 | Subject: [PATCH] Qt5GuiConfigExtras.cmake.in: cope with variable path to | 4 | Subject: [PATCH] Qt5GuiConfigExtras.cmake.in: cope with variable path to |
diff --git a/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch b/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch index 2906e763..71f4658f 100644 --- a/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch +++ b/recipes-qt/qt5/qtbase/0015-corelib-Include-sys-types.h-for-uint32_t.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From a1508aff41a526b900f958831a1196f2655c57e9 Mon Sep 17 00:00:00 2001 | 1 | From 3a147b314b96a3f2bd7ded41a9c5fe685985fa29 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 6 Dec 2018 11:47:52 -0800 | 3 | Date: Thu, 6 Dec 2018 11:47:52 -0800 |
| 4 | Subject: [PATCH] corelib: Include sys/types.h for uint32_t | 4 | Subject: [PATCH] corelib: Include sys/types.h for uint32_t |
| @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 14 | 1 file changed, 1 insertion(+) | 14 | 1 file changed, 1 insertion(+) |
| 15 | 15 | ||
| 16 | diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h | 16 | diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h |
| 17 | index 86e7997680..73bcd370c2 100644 | 17 | index 7418579fe0..aba29de499 100644 |
| 18 | --- a/src/corelib/global/qnumeric_p.h | 18 | --- a/src/corelib/global/qnumeric_p.h |
| 19 | +++ b/src/corelib/global/qnumeric_p.h | 19 | +++ b/src/corelib/global/qnumeric_p.h |
| 20 | @@ -55,6 +55,7 @@ | 20 | @@ -55,6 +55,7 @@ |
diff --git a/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch b/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch index eff1e0b2..a893d90d 100644 --- a/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch +++ b/recipes-qt/qt5/qtbase/0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e983e9e5451d6961a11206360aeae599f090f971 Mon Sep 17 00:00:00 2001 | 1 | From 90f1d71d609495ba305d052017df4d3fb801401c Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 6 Dec 2018 15:06:20 -0800 | 3 | Date: Thu, 6 Dec 2018 15:06:20 -0800 |
| 4 | Subject: [PATCH] Define QMAKE_CXX.COMPILER_MACROS for clang on linux | 4 | Subject: [PATCH] Define QMAKE_CXX.COMPILER_MACROS for clang on linux |
diff --git a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch index 7a5c7754..b0de9c26 100644 --- a/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch +++ b/recipes-qt/qt5/qtbase/0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From b83804eb1f9087800295cf40916577f932673dc8 Mon Sep 17 00:00:00 2001 | 1 | From 54328b4942eb8cc884bdf41d58f2408a60ea7605 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 25 Nov 2019 08:27:39 -0800 | 3 | Date: Mon, 25 Nov 2019 08:27:39 -0800 |
| 4 | Subject: [PATCH] input: Make use of timeval portable for 64bit time_t | 4 | Subject: [PATCH] input: Make use of timeval portable for 64bit time_t |
diff --git a/recipes-qt/qt5/qtbase/0019-Always-build-uic-and-qvkgen.patch b/recipes-qt/qt5/qtbase/0019-Always-build-uic-and-qvkgen.patch index 86dfac2c..e7a6d67a 100644 --- a/recipes-qt/qt5/qtbase/0019-Always-build-uic-and-qvkgen.patch +++ b/recipes-qt/qt5/qtbase/0019-Always-build-uic-and-qvkgen.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From eff8ae2d5748626dfd173fa6cb5860bb72ffeafa Mon Sep 17 00:00:00 2001 | 1 | From 71089d2dbc2becf51e419741afb5f9e2028963e7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
| 3 | Date: Sat, 16 Nov 2013 00:32:30 +0100 | 3 | Date: Sat, 16 Nov 2013 00:32:30 +0100 |
| 4 | Subject: [PATCH] Always build uic and qvkgen | 4 | Subject: [PATCH] Always build uic and qvkgen |
diff --git a/recipes-qt/qt5/qtbase/0020-Avoid-renameeat2-for-native-sdk-builds.patch b/recipes-qt/qt5/qtbase/0020-Avoid-renameeat2-for-native-sdk-builds.patch index bde4f76c..4da126d9 100644 --- a/recipes-qt/qt5/qtbase/0020-Avoid-renameeat2-for-native-sdk-builds.patch +++ b/recipes-qt/qt5/qtbase/0020-Avoid-renameeat2-for-native-sdk-builds.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 37ea0b0c40f541cf9741c064e97ec9e9327ba7a1 Mon Sep 17 00:00:00 2001 | 1 | From cbf26740eca4972824e74acbb8ca5ccb3cdde9b7 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| 3 | Date: Sun, 14 Apr 2019 13:27:58 +0200 | 3 | Date: Sun, 14 Apr 2019 13:27:58 +0200 |
| 4 | Subject: [PATCH] Avoid renameeat2 for native(sdk) builds | 4 | Subject: [PATCH] Avoid renameeat2 for native(sdk) builds |
| @@ -24,7 +24,7 @@ Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | |||
| 24 | 2 files changed, 2 insertions(+), 12 deletions(-) | 24 | 2 files changed, 2 insertions(+), 12 deletions(-) |
| 25 | 25 | ||
| 26 | diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h | 26 | diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h |
| 27 | index e6ad80525a..283ce1ce26 100644 | 27 | index c6f071bc3f..575c993e68 100644 |
| 28 | --- a/src/corelib/global/qconfig-bootstrapped.h | 28 | --- a/src/corelib/global/qconfig-bootstrapped.h |
| 29 | +++ b/src/corelib/global/qconfig-bootstrapped.h | 29 | +++ b/src/corelib/global/qconfig-bootstrapped.h |
| 30 | @@ -104,7 +104,7 @@ | 30 | @@ -104,7 +104,7 @@ |
| @@ -46,7 +46,7 @@ index e6ad80525a..283ce1ce26 100644 | |||
| 46 | # define QT_FEATURE_statx -1 | 46 | # define QT_FEATURE_statx -1 |
| 47 | #endif | 47 | #endif |
| 48 | diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp | 48 | diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp |
| 49 | index c3abec8989..6229c611b8 100644 | 49 | index 38cb6a423d..b6d5e16464 100644 |
| 50 | --- a/src/corelib/io/qfilesystemengine_unix.cpp | 50 | --- a/src/corelib/io/qfilesystemengine_unix.cpp |
| 51 | +++ b/src/corelib/io/qfilesystemengine_unix.cpp | 51 | +++ b/src/corelib/io/qfilesystemengine_unix.cpp |
| 52 | @@ -1223,16 +1223,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy | 52 | @@ -1223,16 +1223,6 @@ bool QFileSystemEngine::renameFile(const QFileSystemEntry &source, const QFileSy |
diff --git a/recipes-qt/qt5/qtbase/0021-Bootstrap-without-linkat-feature.patch b/recipes-qt/qt5/qtbase/0021-Bootstrap-without-linkat-feature.patch index 70f25ca2..dae48d59 100644 --- a/recipes-qt/qt5/qtbase/0021-Bootstrap-without-linkat-feature.patch +++ b/recipes-qt/qt5/qtbase/0021-Bootstrap-without-linkat-feature.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 7596905dbe3ff36a129b5793966da30579d877f4 Mon Sep 17 00:00:00 2001 | 1 | From 61a5dc7d949bc0f8ff3c4a1060c91c61187e5fb2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Fri, 24 Nov 2017 15:16:31 +0200 | 3 | Date: Fri, 24 Nov 2017 15:16:31 +0200 |
| 4 | Subject: [PATCH] Bootstrap without linkat feature | 4 | Subject: [PATCH] Bootstrap without linkat feature |
| @@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [OE specific] | |||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 14 | 14 | ||
| 15 | diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h | 15 | diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h |
| 16 | index 283ce1ce26..dfcbb15a6b 100644 | 16 | index 575c993e68..d0c9fdfce3 100644 |
| 17 | --- a/src/corelib/global/qconfig-bootstrapped.h | 17 | --- a/src/corelib/global/qconfig-bootstrapped.h |
| 18 | +++ b/src/corelib/global/qconfig-bootstrapped.h | 18 | +++ b/src/corelib/global/qconfig-bootstrapped.h |
| 19 | @@ -95,7 +95,7 @@ | 19 | @@ -95,7 +95,7 @@ |
diff --git a/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch b/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch new file mode 100644 index 00000000..8aeca2ef --- /dev/null +++ b/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | From 9b192df7e06992b256eb49af5a213c1b0d3e341a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nicola Lunghi <nick83ola@gmail.com> | ||
| 3 | Date: Wed, 5 Feb 2020 15:32:25 +0000 | ||
| 4 | Subject: [PATCH] tst_qpainter: FE_ macros are not defined for every platform | ||
| 5 | |||
| 6 | the FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO, FE_INVALID are defined | ||
| 7 | only for platforms with fp engine. | ||
| 8 | |||
| 9 | Signed-off-by: Nicola Lunghi <nick83ola@gmail.com> | ||
| 10 | Upstream-Status: submitted [https://codereview.qt-project.org/c/qt/qtbase/+/289447] | ||
| 11 | --- | ||
| 12 | .../gui/painting/qpainter/tst_qpainter.cpp | 50 ++++++++++++++----- | ||
| 13 | 1 file changed, 37 insertions(+), 13 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp | ||
| 16 | index 6e48439944..3566ef24be 100644 | ||
| 17 | --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp | ||
| 18 | +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp | ||
| 19 | @@ -2890,19 +2890,43 @@ void tst_QPainter::monoImages() | ||
| 20 | #if !defined(Q_OS_AIX) && !defined(Q_CC_MSVC) && !defined(Q_OS_SOLARIS) && !defined(__UCLIBC__) | ||
| 21 | #include <fenv.h> | ||
| 22 | |||
| 23 | +#if defined(FE_INEXACT) | ||
| 24 | + #define QP_FE_INEXACT (FE_INEXACT) | ||
| 25 | +#else | ||
| 26 | + #define QP_FE_INEXACT 0 | ||
| 27 | +#endif | ||
| 28 | +#if defined(FE_UNDERFLOW) | ||
| 29 | + #define QP_FE_UNDERFLOW (FE_UNDERFLOW) | ||
| 30 | +#else | ||
| 31 | + #define QP_FE_UNDERFLOW 0 | ||
| 32 | +#endif | ||
| 33 | +#if defined(FE_OVERFLOW) | ||
| 34 | + #define QP_FE_OVERFLOW (FE_OVERFLOW) | ||
| 35 | +#else | ||
| 36 | + #define QP_FE_OVERFLOW 0 | ||
| 37 | +#endif | ||
| 38 | +#if defined(FE_DIVBYZERO) | ||
| 39 | + #define QP_FE_DIVBYZERO (FE_DIVBYZERO) | ||
| 40 | +#else | ||
| 41 | + #define QP_FE_DIVBYZERO 0 | ||
| 42 | +#endif | ||
| 43 | +#if defined(FE_INVALID) | ||
| 44 | + #define QP_FE_INVALID (FE_INVALID) | ||
| 45 | +#else | ||
| 46 | + #define QP_FE_INVALID 0 | ||
| 47 | +#endif | ||
| 48 | + | ||
| 49 | static const QString fpeExceptionString(int exception) | ||
| 50 | { | ||
| 51 | -#ifdef FE_INEXACT | ||
| 52 | - if (exception & FE_INEXACT) | ||
| 53 | + if (exception & QP_FE_INEXACT) | ||
| 54 | return QLatin1String("Inexact result"); | ||
| 55 | -#endif | ||
| 56 | - if (exception & FE_UNDERFLOW) | ||
| 57 | + if (exception & QP_FE_UNDERFLOW) | ||
| 58 | return QLatin1String("Underflow"); | ||
| 59 | - if (exception & FE_OVERFLOW) | ||
| 60 | + if (exception & QP_FE_OVERFLOW) | ||
| 61 | return QLatin1String("Overflow"); | ||
| 62 | - if (exception & FE_DIVBYZERO) | ||
| 63 | + if (exception & QP_FE_DIVBYZERO) | ||
| 64 | return QLatin1String("Divide by zero"); | ||
| 65 | - if (exception & FE_INVALID) | ||
| 66 | + if (exception & QP_FE_INVALID) | ||
| 67 | return QLatin1String("Invalid operation"); | ||
| 68 | return QLatin1String("No exception"); | ||
| 69 | } | ||
| 70 | @@ -2928,7 +2952,7 @@ private: | ||
| 71 | |||
| 72 | void fpe_rasterizeLine_task232012() | ||
| 73 | { | ||
| 74 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 75 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 76 | QImage img(128, 128, QImage::Format_ARGB32_Premultiplied); | ||
| 77 | img.fill(0x0); | ||
| 78 | QPainter p(&img); | ||
| 79 | @@ -2940,7 +2964,7 @@ void fpe_rasterizeLine_task232012() | ||
| 80 | |||
| 81 | void fpe_pixmapTransform() | ||
| 82 | { | ||
| 83 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 84 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 85 | |||
| 86 | QImage img(128, 128, QImage::Format_ARGB32_Premultiplied); | ||
| 87 | |||
| 88 | @@ -2968,7 +2992,7 @@ void fpe_pixmapTransform() | ||
| 89 | |||
| 90 | void fpe_zeroLengthLines() | ||
| 91 | { | ||
| 92 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 93 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 94 | |||
| 95 | QImage img(128, 128, QImage::Format_ARGB32_Premultiplied); | ||
| 96 | |||
| 97 | @@ -2980,7 +3004,7 @@ void fpe_zeroLengthLines() | ||
| 98 | |||
| 99 | void fpe_divByZero() | ||
| 100 | { | ||
| 101 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 102 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 103 | |||
| 104 | QImage img(128, 128, QImage::Format_ARGB32_Premultiplied); | ||
| 105 | |||
| 106 | @@ -3003,7 +3027,7 @@ void fpe_divByZero() | ||
| 107 | |||
| 108 | void fpe_steepSlopes() | ||
| 109 | { | ||
| 110 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 111 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 112 | |||
| 113 | QImage img(1024, 1024, QImage::Format_ARGB32_Premultiplied); | ||
| 114 | |||
| 115 | @@ -3022,7 +3046,7 @@ void fpe_steepSlopes() | ||
| 116 | |||
| 117 | void fpe_radialGradients() | ||
| 118 | { | ||
| 119 | - FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO); | ||
| 120 | + FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO); | ||
| 121 | |||
| 122 | QImage img(21, 21, QImage::Format_ARGB32_Premultiplied); | ||
| 123 | img.fill(0); | ||
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index 90a048cb..c6b0a749 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb | |||
| @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \ | |||
| 14 | 14 | ||
| 15 | # common for qtbase-native, qtbase-nativesdk and qtbase | 15 | # common for qtbase-native, qtbase-nativesdk and qtbase |
| 16 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared | 16 | # Patches from https://github.com/meta-qt5/qtbase/commits/b5.14-shared |
| 17 | # 5.14.meta-qt5-shared.1 | 17 | # 5.14.meta-qt5-shared.2 |
| 18 | SRC_URI += "\ | 18 | SRC_URI += "\ |
| 19 | file://0001-Add-linux-oe-g-platform.patch \ | 19 | file://0001-Add-linux-oe-g-platform.patch \ |
| 20 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ | 20 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ |
| @@ -33,6 +33,7 @@ SRC_URI += "\ | |||
| 33 | file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \ | 33 | file://0015-corelib-Include-sys-types.h-for-uint32_t.patch \ |
| 34 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ | 34 | file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ |
| 35 | file://0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ | 35 | file://0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ |
| 36 | file://0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ | ||
| 36 | " | 37 | " |
| 37 | 38 | ||
| 38 | # for syncqt | 39 | # for syncqt |
diff --git a/recipes-qt/qt5/qtconnectivity/0001-Add-missing-header-for-errno.patch b/recipes-qt/qt5/qtconnectivity/0001-Add-missing-header-for-errno.patch index 4b11b405..72afac30 100644 --- a/recipes-qt/qt5/qtconnectivity/0001-Add-missing-header-for-errno.patch +++ b/recipes-qt/qt5/qtconnectivity/0001-Add-missing-header-for-errno.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 872f3db59b77c09b052733210e49c7770381d93a Mon Sep 17 00:00:00 2001 | 1 | From 000075567007d0ef76ef3c782fc4060f8ff8e647 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 29 Jan 2019 20:29:19 -0800 | 3 | Date: Tue, 29 Jan 2019 20:29:19 -0800 |
| 4 | Subject: [PATCH] Add missing header for errno | 4 | Subject: [PATCH] Add missing header for errno |
diff --git a/recipes-qt/qt5/qtdeclarative/0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch b/recipes-qt/qt5/qtdeclarative/0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch index 262ad95e..60922e74 100644 --- a/recipes-qt/qt5/qtdeclarative/0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch +++ b/recipes-qt/qt5/qtdeclarative/0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 2ca54b2296463f626f8438825907610cb22169fc Mon Sep 17 00:00:00 2001 | 1 | From d39e76b9662ea9cf236ac59749855e7da7ad29a8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Piotr Tworek <tworaz@tworaz.net> | 2 | From: Piotr Tworek <tworaz@tworaz.net> |
| 3 | Date: Wed, 3 Jul 2019 01:13:40 +0200 | 3 | Date: Wed, 3 Jul 2019 01:13:40 +0200 |
| 4 | Subject: [PATCH] Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to locate qmlcachegen | 4 | Subject: [PATCH] Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS to locate qmlcachegen |
diff --git a/recipes-qt/qt5/qtdeclarative/0001-Use-python3-explicitly.patch b/recipes-qt/qt5/qtdeclarative/0002-Use-python3-explicitly.patch index e1067016..f55812b6 100644 --- a/recipes-qt/qt5/qtdeclarative/0001-Use-python3-explicitly.patch +++ b/recipes-qt/qt5/qtdeclarative/0002-Use-python3-explicitly.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From dc94032e6132b41bd6927357e4a57c31436294eb Mon Sep 17 00:00:00 2001 | 1 | From 838fb4676f78d169dc88f87544cf1a4003302aea Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 26 Nov 2019 21:10:03 -0800 | 3 | Date: Tue, 26 Nov 2019 21:10:03 -0800 |
| 4 | Subject: [PATCH] Use python3 explicitly | 4 | Subject: [PATCH] Use python3 explicitly |
| @@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 11 | 3 files changed, 4 insertions(+), 4 deletions(-) | 11 | 3 files changed, 4 insertions(+), 4 deletions(-) |
| 12 | 12 | ||
| 13 | diff --git a/qtdeclarative.pro b/qtdeclarative.pro | 13 | diff --git a/qtdeclarative.pro b/qtdeclarative.pro |
| 14 | index 5b94da9b6..0e3496ce8 100644 | 14 | index 5b94da9b69..0e3496ce80 100644 |
| 15 | --- a/qtdeclarative.pro | 15 | --- a/qtdeclarative.pro |
| 16 | +++ b/qtdeclarative.pro | 16 | +++ b/qtdeclarative.pro |
| 17 | @@ -2,7 +2,7 @@ CONFIG += tests_need_tools examples_need_tools | 17 | @@ -2,7 +2,7 @@ CONFIG += tests_need_tools examples_need_tools |
| @@ -24,7 +24,7 @@ index 5b94da9b6..0e3496ce8 100644 | |||
| 24 | tmp = python_available | 24 | tmp = python_available |
| 25 | CONFIG += $$tmp | 25 | CONFIG += $$tmp |
| 26 | diff --git a/src/3rdparty/masm/masm.pri b/src/3rdparty/masm/masm.pri | 26 | diff --git a/src/3rdparty/masm/masm.pri b/src/3rdparty/masm/masm.pri |
| 27 | index 0e63ac2ce..7a30ab64e 100644 | 27 | index 1df4585aae..00038104ec 100644 |
| 28 | --- a/src/3rdparty/masm/masm.pri | 28 | --- a/src/3rdparty/masm/masm.pri |
| 29 | +++ b/src/3rdparty/masm/masm.pri | 29 | +++ b/src/3rdparty/masm/masm.pri |
| 30 | @@ -58,7 +58,7 @@ contains(DEFINES, WTF_USE_UDIS86=1) { | 30 | @@ -58,7 +58,7 @@ contains(DEFINES, WTF_USE_UDIS86=1) { |
| @@ -36,7 +36,7 @@ index 0e63ac2ce..7a30ab64e 100644 | |||
| 36 | QMAKE_EXTRA_COMPILERS += udis86 | 36 | QMAKE_EXTRA_COMPILERS += udis86 |
| 37 | 37 | ||
| 38 | udis86_tab_cfile.target = $$OUT_PWD/udis86_itab.c | 38 | udis86_tab_cfile.target = $$OUT_PWD/udis86_itab.c |
| 39 | @@ -113,7 +113,7 @@ retgen.output = $$GENERATEDDIR/RegExpJitTables.h | 39 | @@ -111,7 +111,7 @@ retgen.output = $$GENERATEDDIR/RegExpJitTables.h |
| 40 | retgen.script = $$PWD/yarr/create_regex_tables | 40 | retgen.script = $$PWD/yarr/create_regex_tables |
| 41 | retgen.input = retgen.script | 41 | retgen.input = retgen.script |
| 42 | retgen.CONFIG += no_link | 42 | retgen.CONFIG += no_link |
| @@ -46,7 +46,7 @@ index 0e63ac2ce..7a30ab64e 100644 | |||
| 46 | 46 | ||
| 47 | # Taken from WebKit/Tools/qmake/mkspecs/features/unix/default_post.prf | 47 | # Taken from WebKit/Tools/qmake/mkspecs/features/unix/default_post.prf |
| 48 | diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py | 48 | diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py |
| 49 | index 19551e3ba..bf3f79a45 100755 | 49 | index 19551e3ba2..bf3f79a45f 100755 |
| 50 | --- a/tests/auto/qml/ecmascripttests/test262.py | 50 | --- a/tests/auto/qml/ecmascripttests/test262.py |
| 51 | +++ b/tests/auto/qml/ecmascripttests/test262.py | 51 | +++ b/tests/auto/qml/ecmascripttests/test262.py |
| 52 | @@ -1,4 +1,4 @@ | 52 | @@ -1,4 +1,4 @@ |
| @@ -55,6 +55,3 @@ index 19551e3ba..bf3f79a45 100755 | |||
| 55 | ############################################################################# | 55 | ############################################################################# |
| 56 | ## | 56 | ## |
| 57 | ## Copyright (C) 2017 The Qt Company Ltd. | 57 | ## Copyright (C) 2017 The Qt Company Ltd. |
| 58 | -- | ||
| 59 | 2.24.0 | ||
| 60 | |||
diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb index 47122d86..9a4a264f 100644 --- a/recipes-qt/qt5/qtdeclarative_git.bb +++ b/recipes-qt/qt5/qtdeclarative_git.bb | |||
| @@ -12,9 +12,12 @@ LIC_FILES_CHKSUM = " \ | |||
| 12 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \ | 12 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \ |
| 13 | " | 13 | " |
| 14 | 14 | ||
| 15 | SRC_URI += "file://0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch \ | 15 | # Patches from https://github.com/meta-qt5/qtdeclarative/commits/b5.14 |
| 16 | file://0001-Use-python3-explicitly.patch \ | 16 | # 5.14.meta-qt5.1 |
| 17 | " | 17 | SRC_URI += " \ |
| 18 | file://0001-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-locate-qmlca.patch \ | ||
| 19 | file://0002-Use-python3-explicitly.patch \ | ||
| 20 | " | ||
| 18 | 21 | ||
| 19 | DEPENDS += "qtbase qtdeclarative-native" | 22 | DEPENDS += "qtbase qtdeclarative-native" |
| 20 | 23 | ||
diff --git a/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch index 2864cb81..32021118 100644 --- a/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch +++ b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From c39c68f73c86378897dbc6f59b48c2ced1eaa72f Mon Sep 17 00:00:00 2001 | 1 | From ac8c96da1849106b34592bab10459c854140a574 Mon Sep 17 00:00:00 2001 |
| 2 | From: Wenlin Kang <wenlin.kang@windriver.com> | 2 | From: Wenlin Kang <wenlin.kang@windriver.com> |
| 3 | Date: Thu, 8 Sep 2016 12:18:13 +0800 | 3 | Date: Thu, 8 Sep 2016 12:18:13 +0800 |
| 4 | Subject: [PATCH] qtmultimedia: fix a conflicting declaration | 4 | Subject: [PATCH] qtmultimedia: fix a conflicting declaration |
diff --git a/recipes-qt/qt5/qtmultimedia_git.bb b/recipes-qt/qt5/qtmultimedia_git.bb index 7cdf59a1..f2539ac2 100644 --- a/recipes-qt/qt5/qtmultimedia_git.bb +++ b/recipes-qt/qt5/qtmultimedia_git.bb | |||
| @@ -27,8 +27,8 @@ EXTRA_QMAKEVARS_CONFIGURE += "${@bb.utils.contains_any('PACKAGECONFIG', 'gstream | |||
| 27 | 27 | ||
| 28 | CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DMESA_EGL_NO_X11_HEADERS=1', d)}" | 28 | CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DMESA_EGL_NO_X11_HEADERS=1', d)}" |
| 29 | 29 | ||
| 30 | # Patches from https://github.com/meta-qt5/qtmultimedia/commits/b5.13 | 30 | # Patches from https://github.com/meta-qt5/qtmultimedia/commits/b5.14 |
| 31 | # 5.13.meta-qt5.1 | 31 | # 5.14.meta-qt5.1 |
| 32 | SRC_URI += "\ | 32 | SRC_URI += "\ |
| 33 | file://0001-qtmultimedia-fix-a-conflicting-declaration.patch \ | 33 | file://0001-qtmultimedia-fix-a-conflicting-declaration.patch \ |
| 34 | " | 34 | " |
diff --git a/recipes-qt/qt5/qtquicktimeline_git.bb b/recipes-qt/qt5/qtquicktimeline_git.bb new file mode 100644 index 00000000..726dce33 --- /dev/null +++ b/recipes-qt/qt5/qtquicktimeline_git.bb | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | require qt5.inc | ||
| 2 | require qt5-git.inc | ||
| 3 | |||
| 4 | DESCRIPTION = "Qt Quick Timeline" | ||
| 5 | LICENSE = "GPL-2.0+ | The-Qt-Company-Commercial" | ||
| 6 | LIC_FILES_CHKSUM = " \ | ||
| 7 | file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 8 | file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
| 9 | " | ||
| 10 | |||
| 11 | DEPENDS = "qtbase qtdeclarative" | ||
| 12 | |||
| 13 | SRCREV = "649afa13b841cdf8339cfb605ef2ecba81768846" | ||
diff --git a/recipes-qt/qt5/qtremoteobjects/0001-Allow-a-tools-only-build.patch b/recipes-qt/qt5/qtremoteobjects/0001-Allow-a-tools-only-build.patch index 41ac90f1..d3113cd4 100644 --- a/recipes-qt/qt5/qtremoteobjects/0001-Allow-a-tools-only-build.patch +++ b/recipes-qt/qt5/qtremoteobjects/0001-Allow-a-tools-only-build.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From c4b36e140b1938c19e06e20c55d0861e67763912 Mon Sep 17 00:00:00 2001 | 1 | From 5f151a2148be90ca8c4470bea7b4358659c9fff1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Wed, 7 Jun 2017 15:17:12 +0300 | 3 | Date: Wed, 7 Jun 2017 15:17:12 +0300 |
| 4 | Subject: [PATCH] Allow a tools-only build | 4 | Subject: [PATCH] Allow a tools-only build |
diff --git a/recipes-qt/qt5/qtremoteobjects/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch b/recipes-qt/qt5/qtremoteobjects/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch index 35fef269..fc052c66 100644 --- a/recipes-qt/qt5/qtremoteobjects/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch +++ b/recipes-qt/qt5/qtremoteobjects/0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 11390088fdb719ee6ccb07c5ca98bb8e44cdef23 Mon Sep 17 00:00:00 2001 | 1 | From 75050b24ee94d078a3e987535aef6cbaac561c69 Mon Sep 17 00:00:00 2001 |
| 2 | From: ibinderwolf <daniel@bluepattern.net> | 2 | From: ibinderwolf <daniel@bluepattern.net> |
| 3 | Date: Wed, 26 Jun 2019 09:46:48 +0200 | 3 | Date: Wed, 26 Jun 2019 09:46:48 +0200 |
| 4 | Subject: [PATCH] cmake Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS | 4 | Subject: [PATCH] cmake Use OE_QMAKE_PATH_EXTERNAL_HOST_BINS |
diff --git a/recipes-qt/qt5/qtremoteobjects_git.bb b/recipes-qt/qt5/qtremoteobjects_git.bb index b5d019bf..292b5c79 100644 --- a/recipes-qt/qt5/qtremoteobjects_git.bb +++ b/recipes-qt/qt5/qtremoteobjects_git.bb | |||
| @@ -11,8 +11,8 @@ require qt5-git.inc | |||
| 11 | 11 | ||
| 12 | DEPENDS += "qtbase qtdeclarative qtremoteobjects-native" | 12 | DEPENDS += "qtbase qtdeclarative qtremoteobjects-native" |
| 13 | 13 | ||
| 14 | # Patches from https://github.com/meta-qt5/qtremoteobjects/commits/b5.13 | 14 | # Patches from https://github.com/meta-qt5/qtremoteobjects/commits/b5.14 |
| 15 | # 5.13.meta-qt5.1 | 15 | # 5.14.meta-qt5.1 |
| 16 | SRC_URI += " \ | 16 | SRC_URI += " \ |
| 17 | file://0001-Allow-a-tools-only-build.patch \ | 17 | file://0001-Allow-a-tools-only-build.patch \ |
| 18 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ | 18 | file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \ |
diff --git a/recipes-qt/qt5/qtscript/0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch b/recipes-qt/qt5/qtscript/0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch index 980e79be..2637396f 100644 --- a/recipes-qt/qt5/qtscript/0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch +++ b/recipes-qt/qt5/qtscript/0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From c04b2d1f2b465e88d23b12cc70e27b6325f65b03 Mon Sep 17 00:00:00 2001 | 1 | From 0608bd81fd1f2075c2f98fb314af0111c8659afb Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 23 Aug 2018 02:58:14 +0000 | 3 | Date: Thu, 23 Aug 2018 02:58:14 +0000 |
| 4 | Subject: [PATCH] Include asm/sgidefs.h on non-glibc systems | 4 | Subject: [PATCH] Include asm/sgidefs.h on non-glibc systems |
diff --git a/recipes-qt/qt5/qtscript_git.bb b/recipes-qt/qt5/qtscript_git.bb index c989541d..4cf84b97 100644 --- a/recipes-qt/qt5/qtscript_git.bb +++ b/recipes-qt/qt5/qtscript_git.bb | |||
| @@ -11,8 +11,8 @@ LIC_FILES_CHKSUM = " \ | |||
| 11 | file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ | 11 | file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ |
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | # Patches from https://github.com/meta-qt5/qtscript/commits/b5.13 | 14 | # Patches from https://github.com/meta-qt5/qtscript/commits/b5.14 |
| 15 | # 5.13.meta-qt5.1 | 15 | # 5.14.meta-qt5.1 |
| 16 | SRC_URI += " \ | 16 | SRC_URI += " \ |
| 17 | file://0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch \ | 17 | file://0001-Include-asm-sgidefs.h-on-non-glibc-systems.patch \ |
| 18 | " | 18 | " |
diff --git a/recipes-qt/qt5/qtscxml/0001-Use-external-host-bin-path-for-cmake-file.patch b/recipes-qt/qt5/qtscxml/0001-Use-external-host-bin-path-for-cmake-file.patch index 22ec7e4f..b26d7c8b 100644 --- a/recipes-qt/qt5/qtscxml/0001-Use-external-host-bin-path-for-cmake-file.patch +++ b/recipes-qt/qt5/qtscxml/0001-Use-external-host-bin-path-for-cmake-file.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 5f311180f7f74fdb3be8efc45a99411f98a1140b Mon Sep 17 00:00:00 2001 | 1 | From 9e2ef02c25fedb6faad0d26ba2273297918f6399 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Tue, 10 Jan 2017 15:28:26 +0200 | 3 | Date: Tue, 10 Jan 2017 15:28:26 +0200 |
| 4 | Subject: [PATCH] Use external host bin path for cmake file | 4 | Subject: [PATCH] Use external host bin path for cmake file |
diff --git a/recipes-qt/qt5/qtscxml_git.bb b/recipes-qt/qt5/qtscxml_git.bb index bad7ece7..ff36414f 100644 --- a/recipes-qt/qt5/qtscxml_git.bb +++ b/recipes-qt/qt5/qtscxml_git.bb | |||
| @@ -12,8 +12,8 @@ DEPENDS += "qtbase qtdeclarative qtxmlpatterns qtscxml-native" | |||
| 12 | 12 | ||
| 13 | SRCREV = "61ed1a9e09fe54b0d52afbf865de03c8c4eaed82" | 13 | SRCREV = "61ed1a9e09fe54b0d52afbf865de03c8c4eaed82" |
| 14 | 14 | ||
| 15 | # Patches from https://github.com/meta-qt5/qtscxml/commits/b5.13 | 15 | # Patches from https://github.com/meta-qt5/qtscxml/commits/b5.14 |
| 16 | # 5.13.meta-qt5.1 | 16 | # 5.14.meta-qt5.1 |
| 17 | SRC_URI += "file://0001-Use-external-host-bin-path-for-cmake-file.patch" | 17 | SRC_URI += "file://0001-Use-external-host-bin-path-for-cmake-file.patch" |
| 18 | 18 | ||
| 19 | do_install_append_class-nativesdk() { | 19 | do_install_append_class-nativesdk() { |
diff --git a/recipes-qt/qt5/qttools/0001-add-noqtwebkit-configuration.patch b/recipes-qt/qt5/qttools/0001-add-noqtwebkit-configuration.patch index 93a67bf6..d0a9d352 100644 --- a/recipes-qt/qt5/qttools/0001-add-noqtwebkit-configuration.patch +++ b/recipes-qt/qt5/qttools/0001-add-noqtwebkit-configuration.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From a42f74d9572f785489daf2fa3de5f36269e9bfef Mon Sep 17 00:00:00 2001 | 1 | From 0835a82c0002bfadb1e3007ae75ad1159aef0906 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
| 3 | Date: Wed, 4 Jun 2014 11:28:16 +0200 | 3 | Date: Wed, 4 Jun 2014 11:28:16 +0200 |
| 4 | Subject: [PATCH] add noqtwebkit configuration | 4 | Subject: [PATCH] add noqtwebkit configuration |
diff --git a/recipes-qt/qt5/qttools/0002-linguist-tools-cmake-allow-overriding-the-location-f.patch b/recipes-qt/qt5/qttools/0002-linguist-tools-cmake-allow-overriding-the-location-f.patch index d67a1e7e..f8bde420 100644 --- a/recipes-qt/qt5/qttools/0002-linguist-tools-cmake-allow-overriding-the-location-f.patch +++ b/recipes-qt/qt5/qttools/0002-linguist-tools-cmake-allow-overriding-the-location-f.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 17e39873d9655339fa32e3b1b29ef2254c52bc2e Mon Sep 17 00:00:00 2001 | 1 | From 2d76f5a7770076eccd55dec4a3f1f63b931a566c Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Mon, 18 Feb 2019 10:45:03 +0200 | 3 | Date: Mon, 18 Feb 2019 10:45:03 +0200 |
| 4 | Subject: [PATCH] linguist-tools cmake: allow overriding the location for | 4 | Subject: [PATCH] linguist-tools cmake: allow overriding the location for |
diff --git a/recipes-qt/qt5/qttools/0003-src.pro-Add-option-noqdoc-to-disable-qdoc-builds.patch b/recipes-qt/qt5/qttools/0003-src.pro-Add-option-noqdoc-to-disable-qdoc-builds.patch index 55c6e22a..06eec226 100644 --- a/recipes-qt/qt5/qttools/0003-src.pro-Add-option-noqdoc-to-disable-qdoc-builds.patch +++ b/recipes-qt/qt5/qttools/0003-src.pro-Add-option-noqdoc-to-disable-qdoc-builds.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 623675e07231f62cdc7600dca5897a9fc70e0467 Mon Sep 17 00:00:00 2001 | 1 | From ffbd58e5a6c709592fb97a6d033820556b76ab53 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 14 Dec 2019 18:36:49 -0800 | 3 | Date: Sat, 14 Dec 2019 18:36:49 -0800 |
| 4 | Subject: [PATCH] src.pro: Add option noqdoc to disable qdoc builds | 4 | Subject: [PATCH] src.pro: Add option noqdoc to disable qdoc builds |
| @@ -23,6 +23,3 @@ index 5c256ea3..196c34c7 100644 | |||
| 23 | 23 | ||
| 24 | !android|android_app: SUBDIRS += qtpaths | 24 | !android|android_app: SUBDIRS += qtpaths |
| 25 | 25 | ||
| 26 | -- | ||
| 27 | 2.24.1 | ||
| 28 | |||
diff --git a/recipes-qt/qt5/qttools_git.bb b/recipes-qt/qt5/qttools_git.bb index 49a1790f..9662480c 100644 --- a/recipes-qt/qt5/qttools_git.bb +++ b/recipes-qt/qt5/qttools_git.bb | |||
| @@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = " \ | |||
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | DEPENDS += "qtbase qtdeclarative qtxmlpatterns" | 14 | DEPENDS += "qtbase qtdeclarative qtxmlpatterns" |
| 15 | # Patches from https://github.com/meta-qt5/qttools/commits/b5.13 | 15 | # Patches from https://github.com/meta-qt5/qttools/commits/b5.14 |
| 16 | # 5.13.meta-qt5.1 | 16 | # 5.14.meta-qt5.1 |
| 17 | SRC_URI += " \ | 17 | SRC_URI += " \ |
| 18 | file://0001-add-noqtwebkit-configuration.patch \ | 18 | file://0001-add-noqtwebkit-configuration.patch \ |
| 19 | file://0002-linguist-tools-cmake-allow-overriding-the-location-f.patch \ | 19 | file://0002-linguist-tools-cmake-allow-overriding-the-location-f.patch \ |
diff --git a/recipes-qt/qt5/qtwayland/0001-tst_seatv4-Include-array.patch b/recipes-qt/qt5/qtwayland/0001-tst_seatv4-Include-array.patch index 93f187dc..b21cb5a7 100644 --- a/recipes-qt/qt5/qtwayland/0001-tst_seatv4-Include-array.patch +++ b/recipes-qt/qt5/qtwayland/0001-tst_seatv4-Include-array.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 4df2574a86c2ce86c97da0795dec29438b0c0024 Mon Sep 17 00:00:00 2001 | 1 | From e1c8cf94727583c666efe3e6852fa60fba9a652b Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 6 Oct 2019 21:44:38 -0700 | 3 | Date: Sun, 6 Oct 2019 21:44:38 -0700 |
| 4 | Subject: [PATCH] tst_seatv4: Include <array> | 4 | Subject: [PATCH] tst_seatv4: Include <array> |
| @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 14 | 14 | ||
| 15 | diff --git a/tests/auto/client/seatv4/tst_seatv4.cpp b/tests/auto/client/seatv4/tst_seatv4.cpp | 15 | diff --git a/tests/auto/client/seatv4/tst_seatv4.cpp b/tests/auto/client/seatv4/tst_seatv4.cpp |
| 16 | index 1d6fb6b9..4c5732da 100644 | 16 | index 2e17bef8..df78ba69 100644 |
| 17 | --- a/tests/auto/client/seatv4/tst_seatv4.cpp | 17 | --- a/tests/auto/client/seatv4/tst_seatv4.cpp |
| 18 | +++ b/tests/auto/client/seatv4/tst_seatv4.cpp | 18 | +++ b/tests/auto/client/seatv4/tst_seatv4.cpp |
| 19 | @@ -36,7 +36,7 @@ | 19 | @@ -36,7 +36,7 @@ |
diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb index e583d328..bff90ee4 100644 --- a/recipes-qt/qt5/qtwayland_git.bb +++ b/recipes-qt/qt5/qtwayland_git.bb | |||
| @@ -13,6 +13,8 @@ LIC_FILES_CHKSUM = " \ | |||
| 13 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \ | 13 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \ |
| 14 | " | 14 | " |
| 15 | 15 | ||
| 16 | # Patches from https://github.com/meta-qt5/qtwayland/commits/b5.14 | ||
| 17 | # 5.14.meta-qt5.1 | ||
| 16 | SRC_URI += "file://0001-tst_seatv4-Include-array.patch" | 18 | SRC_URI += "file://0001-tst_seatv4-Include-array.patch" |
| 17 | 19 | ||
| 18 | PACKAGECONFIG ?= " \ | 20 | PACKAGECONFIG ?= " \ |
diff --git a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch index 6b3f6ba6..a1298f36 100644 --- a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch +++ b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From cdadaf40267c81ff730e90798cf486b35bb20758 Mon Sep 17 00:00:00 2001 | 1 | From fe603fbecb5731febc392b51bbbee1090be243d6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Wed, 15 Mar 2017 13:53:28 +0200 | 3 | Date: Wed, 15 Mar 2017 13:53:28 +0200 |
| 4 | Subject: [PATCH] Force host toolchain configuration | 4 | Subject: [PATCH] Force host toolchain configuration |
diff --git a/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch b/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch index 63a800e4..ea536aff 100644 --- a/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch +++ b/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 312f6955af1dc6ea61bbd48bece794c1257822fa Mon Sep 17 00:00:00 2001 | 1 | From 9f996977ebbb894aa321240cb5590bdae27f14a5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Tue, 12 Dec 2017 16:06:14 +0200 | 3 | Date: Tue, 12 Dec 2017 16:06:14 +0200 |
| 4 | Subject: [PATCH] musl: don't use pvalloc as it's not available on musl | 4 | Subject: [PATCH] musl: don't use pvalloc as it's not available on musl |
diff --git a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch b/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch index 5c8e1052..a2dce542 100644 --- a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch +++ b/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 8c66e08c65963cd2eeabe84e89445dbe557c23ae Mon Sep 17 00:00:00 2001 | 1 | From 7ed387e99975dc25ced3496c7dd98411f11d28e2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Samuli Piippo <samuli.piippo@qt.io> | 2 | From: Samuli Piippo <samuli.piippo@qt.io> |
| 3 | Date: Thu, 14 Dec 2017 11:28:10 +0200 | 3 | Date: Thu, 14 Dec 2017 11:28:10 +0200 |
| 4 | Subject: [PATCH] musl: link against libexecinfo | 4 | Subject: [PATCH] musl: link against libexecinfo |
diff --git a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch index 5c3eafb5..8f25c687 100644 --- a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch +++ b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 71d55292cdd72dcf1ed5eb4ba7299433a35a4bb0 Mon Sep 17 00:00:00 2001 | 1 | From cde19c7f959ff4ea0d2aa202b9c7a048d3c7200e Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 12 Nov 2019 19:53:59 -0800 | 3 | Date: Tue, 12 Nov 2019 19:53:59 -0800 |
| 4 | Subject: [PATCH] mkspecs: Allow builds with libc != glibc | 4 | Subject: [PATCH] mkspecs: Allow builds with libc != glibc |
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch new file mode 100644 index 00000000..32dde335 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From c2ca4923d5e534789b205968eb01779a90ec1299 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 15 Jan 2020 16:53:46 -0800 | ||
| 4 | Subject: [PATCH] chromium: Include <cstddef> and <cstdint> | ||
| 5 | |||
| 6 | These headers are needed for uintXX_t and size_t definitions | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | chromium/media/cdm/supported_cdm_versions.h | 1 + | ||
| 11 | .../third_party/perfetto/include/perfetto/base/task_runner.h | 1 + | ||
| 12 | chromium/third_party/webrtc/call/rtx_receive_stream.h | 1 + | ||
| 13 | 3 files changed, 3 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/chromium/media/cdm/supported_cdm_versions.h b/chromium/media/cdm/supported_cdm_versions.h | ||
| 16 | index 3f220da8c71..c54e3bb7d30 100644 | ||
| 17 | --- a/chromium/media/cdm/supported_cdm_versions.h | ||
| 18 | +++ b/chromium/media/cdm/supported_cdm_versions.h | ||
| 19 | @@ -6,6 +6,7 @@ | ||
| 20 | #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ | ||
| 21 | |||
| 22 | #include <array> | ||
| 23 | +#include <cstddef> | ||
| 24 | |||
| 25 | #include "media/base/media_export.h" | ||
| 26 | #include "media/cdm/api/content_decryption_module.h" | ||
| 27 | diff --git a/chromium/third_party/perfetto/include/perfetto/base/task_runner.h b/chromium/third_party/perfetto/include/perfetto/base/task_runner.h | ||
| 28 | index cf60401238f..02658e7139b 100644 | ||
| 29 | --- a/chromium/third_party/perfetto/include/perfetto/base/task_runner.h | ||
| 30 | +++ b/chromium/third_party/perfetto/include/perfetto/base/task_runner.h | ||
| 31 | @@ -18,6 +18,7 @@ | ||
| 32 | #define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_ | ||
| 33 | |||
| 34 | #include <functional> | ||
| 35 | +#include <cstdint> | ||
| 36 | |||
| 37 | #include "perfetto/base/export.h" | ||
| 38 | |||
| 39 | diff --git a/chromium/third_party/webrtc/call/rtx_receive_stream.h b/chromium/third_party/webrtc/call/rtx_receive_stream.h | ||
| 40 | index 8ffa4400a9c..a389fc2a574 100644 | ||
| 41 | --- a/chromium/third_party/webrtc/call/rtx_receive_stream.h | ||
| 42 | +++ b/chromium/third_party/webrtc/call/rtx_receive_stream.h | ||
| 43 | @@ -11,6 +11,7 @@ | ||
| 44 | #ifndef CALL_RTX_RECEIVE_STREAM_H_ | ||
| 45 | #define CALL_RTX_RECEIVE_STREAM_H_ | ||
| 46 | |||
| 47 | +#include <cstdint> | ||
| 48 | #include <map> | ||
| 49 | |||
| 50 | #include "call/rtp_packet_sink_interface.h" | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch new file mode 100644 index 00000000..3bf0c5eb --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 5b4b896c1c6c79cc7c870a398acf1baf4b6bec7b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 1 Feb 2020 12:17:23 -0800 | ||
| 4 | Subject: [PATCH] chromium: Link v8 with libatomic on x86 | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | | v8_base_without_compiler_jumbo_47.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x29a): undefined reference to `__atomic_l | ||
| 8 | oad' | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | chromium/v8/BUILD.gn | 3 ++- | ||
| 14 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/chromium/v8/BUILD.gn b/chromium/v8/BUILD.gn | ||
| 17 | index e21400265dd..7e56609b9da 100644 | ||
| 18 | --- a/chromium/v8/BUILD.gn | ||
| 19 | +++ b/chromium/v8/BUILD.gn | ||
| 20 | @@ -3310,7 +3310,8 @@ v8_source_set("v8_base_without_compiler") { | ||
| 21 | if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || | ||
| 22 | v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || | ||
| 23 | v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || | ||
| 24 | - v8_current_cpu == "s390" || v8_current_cpu == "s390x") { | ||
| 25 | + v8_current_cpu == "s390" || v8_current_cpu == "s390x" || | ||
| 26 | + v8_current_cpu == "x86") { | ||
| 27 | libs = [ "atomic" ] | ||
| 28 | } | ||
| 29 | |||
| 30 | -- | ||
| 31 | 2.25.0 | ||
| 32 | |||
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index cd083a00..f6b77b6b 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb | |||
| @@ -79,10 +79,17 @@ COMPATIBLE_MACHINE_aarch64 = "(.*)" | |||
| 79 | 79 | ||
| 80 | inherit qmake5 | 80 | inherit qmake5 |
| 81 | inherit gettext | 81 | inherit gettext |
| 82 | inherit pythonnative | ||
| 83 | inherit perlnative | 82 | inherit perlnative |
| 84 | inherit features_check | 83 | inherit features_check |
| 85 | 84 | ||
| 85 | inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)} | ||
| 86 | |||
| 87 | python() { | ||
| 88 | if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 89 | raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') | ||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 86 | # Static builds of QtWebEngine aren't supported. | 93 | # Static builds of QtWebEngine aren't supported. |
| 87 | CONFLICT_DISTRO_FEATURES = "qt5-static" | 94 | CONFLICT_DISTRO_FEATURES = "qt5-static" |
| 88 | 95 | ||
| @@ -138,7 +145,7 @@ RDEPENDS_${PN}-examples += " \ | |||
| 138 | QT_MODULE_BRANCH_CHROMIUM = "79-based" | 145 | QT_MODULE_BRANCH_CHROMIUM = "79-based" |
| 139 | 146 | ||
| 140 | # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.14 | 147 | # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.14 |
| 141 | # 5.14.meta-qt5.1 | 148 | # 5.14.meta-qt5.2 |
| 142 | SRC_URI += " \ | 149 | SRC_URI += " \ |
| 143 | ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ | 150 | ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ |
| 144 | file://0001-Force-host-toolchain-configuration.patch \ | 151 | file://0001-Force-host-toolchain-configuration.patch \ |
| @@ -150,7 +157,7 @@ SRC_URI_append_libc-musl = "\ | |||
| 150 | " | 157 | " |
| 151 | 158 | ||
| 152 | # Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/77-based | 159 | # Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/77-based |
| 153 | # 77-based.meta-qt5.1 | 160 | # 77-based.meta-qt5.2 |
| 154 | SRC_URI += " \ | 161 | SRC_URI += " \ |
| 155 | file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ | 162 | file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ |
| 156 | file://chromium/0002-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ | 163 | file://chromium/0002-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ |
| @@ -162,6 +169,8 @@ SRC_URI += " \ | |||
| 162 | file://chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \ | 169 | file://chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \ |
| 163 | file://chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch;patchdir=src/3rdparty \ | 170 | file://chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch;patchdir=src/3rdparty \ |
| 164 | file://chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ | 171 | file://chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ |
| 172 | file://chromium/0011-chromium-Include-cstddef-and-cstdint.patch;patchdir=src/3rdparty \ | ||
| 173 | file://chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch;patchdir=src/3rdparty \ | ||
| 165 | " | 174 | " |
| 166 | 175 | ||
| 167 | SRC_URI_append_libc-musl = "\ | 176 | SRC_URI_append_libc-musl = "\ |
diff --git a/recipes-qt/qt5/qtwebkit/0001-Port-build-to-python3.patch b/recipes-qt/qt5/qtwebkit/0001-Port-build-to-python3.patch new file mode 100644 index 00000000..5c925cd5 --- /dev/null +++ b/recipes-qt/qt5/qtwebkit/0001-Port-build-to-python3.patch | |||
| @@ -0,0 +1,3845 @@ | |||
| 1 | From a8bbd89d7a1d3e8ca381c025bc8dd1275c59356a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Tue, 4 Feb 2020 22:41:00 +0100 | ||
| 4 | Subject: [PATCH] Port build to python3 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Procdure: | ||
| 10 | |||
| 11 | * send all py-files through 2to3 | ||
| 12 | * find inspiration at / steel from (jsmin.py) webkitgtk | ||
| 13 | * manual fixes e.g rename builtins to mybuiltins - 'import builtins' does | ||
| 14 | not load what's defined here | ||
| 15 | |||
| 16 | Upstream-Status: Pending | ||
| 17 | |||
| 18 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 19 | --- | ||
| 20 | Source/JavaScriptCore/CMakeLists.txt | 18 +-- | ||
| 21 | Source/JavaScriptCore/DerivedSources.make | 18 +-- | ||
| 22 | .../JavaScriptCore/KeywordLookupGenerator.py | 28 ++-- | ||
| 23 | .../Scripts/builtins/builtins.py | 11 -- | ||
| 24 | .../generate-combined-inspector-json.py | 4 +- | ||
| 25 | .../Scripts/generate-js-builtins.py | 12 +- | ||
| 26 | ...line-and-minify-stylesheets-and-scripts.py | 2 +- | ||
| 27 | Source/JavaScriptCore/Scripts/jsmin.py | 23 +-- | ||
| 28 | .../Scripts/make-js-file-arrays.py | 59 +++++--- | ||
| 29 | .../{builtins => mybuiltins}/__init__.py | 2 +- | ||
| 30 | .../Scripts/mybuiltins/mybuiltins.py | 11 ++ | ||
| 31 | .../mybuiltins_generate_combined_header.py} | 4 +- | ||
| 32 | ...ltins_generate_combined_implementation.py} | 6 +- | ||
| 33 | .../mybuiltins_generate_separate_header.py} | 6 +- | ||
| 34 | ...ltins_generate_separate_implementation.py} | 6 +- | ||
| 35 | .../mybuiltins_generator.py} | 4 +- | ||
| 36 | .../mybuiltins_model.py} | 7 +- | ||
| 37 | .../mybuiltins_templates.py} | 0 | ||
| 38 | .../disassembler/udis86/ud_itab.py | 10 +- | ||
| 39 | .../disassembler/udis86/ud_opcode.py | 12 +- | ||
| 40 | Source/JavaScriptCore/generate-bytecode-files | 16 +-- | ||
| 41 | .../inspector/scripts/codegen/__init__.py | 42 +++--- | ||
| 42 | .../scripts/codegen/cpp_generator.py | 20 +-- | ||
| 43 | ...cpp_alternate_backend_dispatcher_header.py | 8 +- | ||
| 44 | .../generate_cpp_backend_dispatcher_header.py | 16 +-- | ||
| 45 | ...e_cpp_backend_dispatcher_implementation.py | 12 +- | ||
| 46 | ...generate_cpp_frontend_dispatcher_header.py | 12 +- | ||
| 47 | ..._cpp_frontend_dispatcher_implementation.py | 12 +- | ||
| 48 | .../generate_cpp_protocol_types_header.py | 38 ++--- | ||
| 49 | ...erate_cpp_protocol_types_implementation.py | 20 +-- | ||
| 50 | .../codegen/generate_js_backend_commands.py | 14 +- | ||
| 51 | ...generate_objc_backend_dispatcher_header.py | 14 +- | ||
| 52 | ..._objc_backend_dispatcher_implementation.py | 18 +-- | ||
| 53 | .../generate_objc_configuration_header.py | 6 +- | ||
| 54 | ...erate_objc_configuration_implementation.py | 6 +- | ||
| 55 | .../generate_objc_conversion_helpers.py | 12 +- | ||
| 56 | ...objc_frontend_dispatcher_implementation.py | 16 +-- | ||
| 57 | .../scripts/codegen/generate_objc_header.py | 28 ++-- | ||
| 58 | .../codegen/generate_objc_internal_header.py | 10 +- | ||
| 59 | ...rate_objc_protocol_types_implementation.py | 16 +-- | ||
| 60 | .../inspector/scripts/codegen/generator.py | 12 +- | ||
| 61 | .../inspector/scripts/codegen/models.py | 2 +- | ||
| 62 | .../scripts/codegen/objc_generator.py | 74 +++++----- | ||
| 63 | .../generate-inspector-protocol-bindings.py | 2 +- | ||
| 64 | .../scripts/CodeGeneratorReplayInputs.py | 26 ++-- | ||
| 65 | .../ANGLE/generate_winrt_projects.py | 4 +- | ||
| 66 | .../ANGLE/src/libANGLE/Float16ToFloat32.py | 26 ++-- | ||
| 67 | .../renderer/generate_new_renderer.py | 2 +- | ||
| 68 | .../gtest/scripts/fuse_gtest_files.py | 12 +- | ||
| 69 | .../gtest/scripts/gen_gtest_pred_impl.py | 12 +- | ||
| 70 | Source/ThirdParty/gtest/scripts/pump.py | 30 ++-- | ||
| 71 | Source/ThirdParty/gtest/scripts/upload.py | 134 +++++++++--------- | ||
| 72 | .../test/gtest_break_on_failure_unittest.py | 2 +- | ||
| 73 | .../ThirdParty/gtest/test/gtest_color_test.py | 66 ++++----- | ||
| 74 | .../gtest/test/gtest_env_var_test.py | 4 +- | ||
| 75 | .../gtest/test/gtest_filter_unittest.py | 14 +- | ||
| 76 | .../ThirdParty/gtest/test/gtest_help_test.py | 16 +-- | ||
| 77 | .../gtest/test/gtest_list_tests_unittest.py | 4 +- | ||
| 78 | .../gtest/test/gtest_shuffle_test.py | 40 +++--- | ||
| 79 | .../ThirdParty/gtest/test/gtest_test_utils.py | 2 +- | ||
| 80 | .../gtest/test/gtest_throw_on_failure_test.py | 4 +- | ||
| 81 | .../gtest/test/gtest_uninitialized_test.py | 4 +- | ||
| 82 | .../gtest/test/gtest_xml_outfiles_test.py | 6 +- | ||
| 83 | .../gtest/test/gtest_xml_output_unittest.py | 22 +-- | ||
| 84 | .../gtest/test/gtest_xml_test_utils.py | 26 ++-- | ||
| 85 | .../ThirdParty/gtest/test/run_tests_util.py | 26 ++-- | ||
| 86 | .../gtest/test/run_tests_util_test.py | 16 +-- | ||
| 87 | .../gtest/xcode/Scripts/versiongenerate.py | 2 +- | ||
| 88 | Source/WebCore/AVFoundationSupport.py | 14 +- | ||
| 89 | Source/WebCore/CMakeLists.txt | 16 +-- | ||
| 90 | Source/WebCore/DerivedSources.make | 16 +-- | ||
| 91 | .../network/create-http-header-name-table | 2 +- | ||
| 92 | Source/WebInspectorUI/Scripts/jsmin.py | 23 +-- | ||
| 93 | .../Scripts/generate-message-receiver.py | 2 +- | ||
| 94 | .../Scripts/generate-messages-header.py | 2 +- | ||
| 95 | .../Scripts/webkit/messages_unittest.py | 46 +++--- | ||
| 96 | Source/cmake/WebKitCommon.cmake | 3 - | ||
| 97 | Tools/jhbuild/jhbuildutils.py | 10 +- | ||
| 98 | 78 files changed, 665 insertions(+), 638 deletions(-) | ||
| 99 | delete mode 100644 Source/JavaScriptCore/Scripts/builtins/builtins.py | ||
| 100 | rename Source/JavaScriptCore/Scripts/{builtins => mybuiltins}/__init__.py (72%) | ||
| 101 | create mode 100644 Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins.py | ||
| 102 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_generate_combined_header.py => mybuiltins/mybuiltins_generate_combined_header.py} (98%) | ||
| 103 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_generate_combined_implementation.py => mybuiltins/mybuiltins_generate_combined_implementation.py} (95%) | ||
| 104 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_generate_separate_header.py => mybuiltins/mybuiltins_generate_separate_header.py} (97%) | ||
| 105 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_generate_separate_implementation.py => mybuiltins/mybuiltins_generate_separate_implementation.py} (95%) | ||
| 106 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_generator.py => mybuiltins/mybuiltins_generator.py} (97%) | ||
| 107 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_model.py => mybuiltins/mybuiltins_model.py} (97%) | ||
| 108 | rename Source/JavaScriptCore/Scripts/{builtins/builtins_templates.py => mybuiltins/mybuiltins_templates.py} (100%) | ||
| 109 | |||
| 110 | diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt | ||
| 111 | index 937b3ed00..a4b5fd432 100644 | ||
| 112 | --- a/Source/JavaScriptCore/CMakeLists.txt | ||
| 113 | +++ b/Source/JavaScriptCore/CMakeLists.txt | ||
| 114 | @@ -883,7 +883,7 @@ set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts") | ||
| 115 | set(JavaScriptCore_SCRIPTS_SOURCES_PATHS | ||
| 116 | ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl | ||
| 117 | ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py | ||
| 118 | - ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py | ||
| 119 | + ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/mybuiltins/mybuiltins*.py | ||
| 120 | ) | ||
| 121 | |||
| 122 | # Force JavaScriptCore to run scripts from the same staging path as WebCore. | ||
| 123 | @@ -1174,14 +1174,14 @@ add_custom_command( | ||
| 124 | # JSCBuiltins | ||
| 125 | |||
| 126 | set(BUILTINS_GENERATOR_SCRIPTS | ||
| 127 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins.py | ||
| 128 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py | ||
| 129 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py | ||
| 130 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py | ||
| 131 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py | ||
| 132 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py | ||
| 133 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py | ||
| 134 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py | ||
| 135 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins.py | ||
| 136 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generator.py | ||
| 137 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_model.py | ||
| 138 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_templates.py | ||
| 139 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_combined_header.py | ||
| 140 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_combined_implementation.py | ||
| 141 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_separate_header.py | ||
| 142 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_separate_implementation.py | ||
| 143 | ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py | ||
| 144 | ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py | ||
| 145 | ) | ||
| 146 | diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make | ||
| 147 | index d5a3fc159..7ef28eff3 100644 | ||
| 148 | --- a/Source/JavaScriptCore/DerivedSources.make | ||
| 149 | +++ b/Source/JavaScriptCore/DerivedSources.make | ||
| 150 | @@ -66,15 +66,15 @@ all : \ | ||
| 151 | # JavaScript builtins. | ||
| 152 | |||
| 153 | BUILTINS_GENERATOR_SCRIPTS = \ | ||
| 154 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/__init__.py \ | ||
| 155 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins.py \ | ||
| 156 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generator.py \ | ||
| 157 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_model.py \ | ||
| 158 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_templates.py \ | ||
| 159 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_header.py \ | ||
| 160 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_combined_implementation.py \ | ||
| 161 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_header.py \ | ||
| 162 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins/builtins_generate_separate_implementation.py \ | ||
| 163 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/__init__.py \ | ||
| 164 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins.py \ | ||
| 165 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_generator.py \ | ||
| 166 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_model.py \ | ||
| 167 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_templates.py \ | ||
| 168 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_generate_combined_header.py \ | ||
| 169 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_generate_combined_implementation.py \ | ||
| 170 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_generate_separate_header.py \ | ||
| 171 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins/mybuiltins_generate_separate_implementation.py \ | ||
| 172 | $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \ | ||
| 173 | $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \ | ||
| 174 | # | ||
| 175 | diff --git a/Source/JavaScriptCore/KeywordLookupGenerator.py b/Source/JavaScriptCore/KeywordLookupGenerator.py | ||
| 176 | index d13daba61..938d5d6e7 100644 | ||
| 177 | --- a/Source/JavaScriptCore/KeywordLookupGenerator.py | ||
| 178 | +++ b/Source/JavaScriptCore/KeywordLookupGenerator.py | ||
| 179 | @@ -110,7 +110,7 @@ class Trie: | ||
| 180 | |||
| 181 | def coalesce(self): | ||
| 182 | keys = {} | ||
| 183 | - for k, v in self.keys.items(): | ||
| 184 | + for k, v in list(self.keys.items()): | ||
| 185 | t = v.coalesce() | ||
| 186 | keys[t.prefix] = t | ||
| 187 | self.keys = keys | ||
| 188 | @@ -119,7 +119,7 @@ class Trie: | ||
| 189 | if len(self.keys) != 1: | ||
| 190 | return self | ||
| 191 | # Python 3: for() loop for compatibility. Use next() when Python 2.6 is the baseline. | ||
| 192 | - for (prefix, suffix) in self.keys.items(): | ||
| 193 | + for (prefix, suffix) in list(self.keys.items()): | ||
| 194 | res = Trie(self.prefix + prefix) | ||
| 195 | res.value = suffix.value | ||
| 196 | res.keys = suffix.keys | ||
| 197 | @@ -131,22 +131,22 @@ class Trie: | ||
| 198 | if self.fullPrefix in keyWordWeights: | ||
| 199 | weight = weight + keyWordWeights[self.fullPrefix] | ||
| 200 | self.selfWeight = weight | ||
| 201 | - for trie in self.keys.values(): | ||
| 202 | + for trie in list(self.keys.values()): | ||
| 203 | trie.fillOut(self.fullPrefix) | ||
| 204 | weight = weight + trie.weight | ||
| 205 | - self.keys = [(trie.prefix, trie) for trie in sorted(self.keys.values(), key=operator.attrgetter('weight'), reverse=True)] | ||
| 206 | + self.keys = [(trie.prefix, trie) for trie in sorted(list(self.keys.values()), key=operator.attrgetter('weight'), reverse=True)] | ||
| 207 | self.weight = weight | ||
| 208 | |||
| 209 | def printSubTreeAsC(self, typeName, indent): | ||
| 210 | str = makePadding(indent) | ||
| 211 | |||
| 212 | if self.value != None: | ||
| 213 | - print(str + "if (!isIdentPartIncludingEscape(code+%d, m_codeEnd)) {" % (len(self.fullPrefix))) | ||
| 214 | - print(str + " internalShift<%d>();" % len(self.fullPrefix)) | ||
| 215 | - print(str + " if (shouldCreateIdentifier)") | ||
| 216 | - print(str + (" data->ident = &m_vm->propertyNames->%sKeyword;" % self.fullPrefix)) | ||
| 217 | - print(str + " return " + self.value + ";") | ||
| 218 | - print(str + "}") | ||
| 219 | + print((str + "if (!isIdentPartIncludingEscape(code+%d, m_codeEnd)) {" % (len(self.fullPrefix)))) | ||
| 220 | + print((str + " internalShift<%d>();" % len(self.fullPrefix))) | ||
| 221 | + print((str + " if (shouldCreateIdentifier)")) | ||
| 222 | + print((str + (" data->ident = &m_vm->propertyNames->%sKeyword;" % self.fullPrefix))) | ||
| 223 | + print((str + " return " + self.value + ";")) | ||
| 224 | + print((str + "}")) | ||
| 225 | rootIndex = len(self.fullPrefix) | ||
| 226 | itemCount = 0 | ||
| 227 | for k, trie in self.keys: | ||
| 228 | @@ -163,15 +163,15 @@ class Trie: | ||
| 229 | base = "code + %d" % baseIndex | ||
| 230 | comparison = ("COMPARE_%d%sS(%s, " % (len(test), typeName, base)) + ", ".join(test) + ")" | ||
| 231 | if itemCount == 0: | ||
| 232 | - print(str + "if (" + comparison + ") {") | ||
| 233 | + print((str + "if (" + comparison + ") {")) | ||
| 234 | else: | ||
| 235 | - print(str + "} else if (" + comparison + ") {") | ||
| 236 | + print((str + "} else if (" + comparison + ") {")) | ||
| 237 | |||
| 238 | trie.printSubTreeAsC(typeName, indent + 4) | ||
| 239 | itemCount = itemCount + 1 | ||
| 240 | |||
| 241 | if itemCount == len(self.keys): | ||
| 242 | - print(str + "}") | ||
| 243 | + print((str + "}")) | ||
| 244 | |||
| 245 | def maxLength(self): | ||
| 246 | max = len(self.fullPrefix) | ||
| 247 | @@ -187,7 +187,7 @@ class Trie: | ||
| 248 | print("static ALWAYS_INLINE bool isIdentPartIncludingEscape(const LChar* code, const LChar* codeEnd);") | ||
| 249 | print("static ALWAYS_INLINE bool isIdentPartIncludingEscape(const UChar* code, const UChar* codeEnd);") | ||
| 250 | # max length + 1 so we don't need to do any bounds checking at all | ||
| 251 | - print("static const int maxTokenLength = %d;" % (self.maxLength() + 1)) | ||
| 252 | + print(("static const int maxTokenLength = %d;" % (self.maxLength() + 1))) | ||
| 253 | print("") | ||
| 254 | print("template <>") | ||
| 255 | print("template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<UChar>::parseKeyword(JSTokenData* data)") | ||
| 256 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins.py b/Source/JavaScriptCore/Scripts/builtins/builtins.py | ||
| 257 | deleted file mode 100644 | ||
| 258 | index 9349eeef6..000000000 | ||
| 259 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins.py | ||
| 260 | +++ /dev/null | ||
| 261 | @@ -1,11 +0,0 @@ | ||
| 262 | -# This file is used to simulate the builtins/ directory when generate-js-builtins.py | ||
| 263 | -# is run from JavaScriptCore framework's private headers directory, which is flattened. | ||
| 264 | - | ||
| 265 | -from builtins_model import * | ||
| 266 | -from builtins_templates import * | ||
| 267 | - | ||
| 268 | -from builtins_generator import * | ||
| 269 | -from builtins_generate_combined_header import * | ||
| 270 | -from builtins_generate_combined_implementation import * | ||
| 271 | -from builtins_generate_separate_header import * | ||
| 272 | -from builtins_generate_separate_implementation import * | ||
| 273 | diff --git a/Source/JavaScriptCore/Scripts/generate-combined-inspector-json.py b/Source/JavaScriptCore/Scripts/generate-combined-inspector-json.py | ||
| 274 | index 53660318d..6b0e95dc9 100755 | ||
| 275 | --- a/Source/JavaScriptCore/Scripts/generate-combined-inspector-json.py | ||
| 276 | +++ b/Source/JavaScriptCore/Scripts/generate-combined-inspector-json.py | ||
| 277 | @@ -29,7 +29,7 @@ import os | ||
| 278 | import sys | ||
| 279 | |||
| 280 | if len(sys.argv) < 2: | ||
| 281 | - print("usage: %s [json files or directory of json files ...]" % os.path.basename(sys.argv[0])) | ||
| 282 | + print(("usage: %s [json files or directory of json files ...]" % os.path.basename(sys.argv[0]))) | ||
| 283 | sys.exit(1) | ||
| 284 | |||
| 285 | files = [] | ||
| 286 | @@ -64,6 +64,6 @@ for file in files: | ||
| 287 | sys.stderr.write("File \"%s\" does not contain valid JSON:\n" % file) | ||
| 288 | raise | ||
| 289 | |||
| 290 | - print(string.rstrip()) | ||
| 291 | + print((string.rstrip())) | ||
| 292 | print("]}") | ||
| 293 | |||
| 294 | diff --git a/Source/JavaScriptCore/Scripts/generate-js-builtins.py b/Source/JavaScriptCore/Scripts/generate-js-builtins.py | ||
| 295 | index 554a72ccc..3dce94c5c 100644 | ||
| 296 | --- a/Source/JavaScriptCore/Scripts/generate-js-builtins.py | ||
| 297 | +++ b/Source/JavaScriptCore/Scripts/generate-js-builtins.py | ||
| 298 | @@ -25,7 +25,7 @@ | ||
| 299 | # THE POSSIBILITY OF SUCH DAMAGE. | ||
| 300 | |||
| 301 | # This script generates C++ bindings for JavaScript builtins. | ||
| 302 | -# Generators for individual files are located in the builtins/ directory. | ||
| 303 | +# Generators for individual files are located in the mybuiltins/ directory. | ||
| 304 | |||
| 305 | import fnmatch | ||
| 306 | import logging | ||
| 307 | @@ -37,8 +37,8 @@ log = logging.getLogger('global') | ||
| 308 | |||
| 309 | from lazywriter import LazyFileWriter | ||
| 310 | |||
| 311 | -import builtins | ||
| 312 | -from builtins import * | ||
| 313 | +#import mybuiltins | ||
| 314 | +from mybuiltins import * | ||
| 315 | |||
| 316 | |||
| 317 | def generate_bindings_for_builtins_files(builtins_files=[], | ||
| 318 | @@ -118,7 +118,7 @@ if __name__ == '__main__': | ||
| 319 | cli_parser.add_option("-t", "--test", action="store_true", help="Enable test mode.") | ||
| 320 | |||
| 321 | arg_options, arg_values = cli_parser.parse_args() | ||
| 322 | - if len(arg_values) is 0 and not arg_options.input_directory: | ||
| 323 | + if len(arg_values) == 0 and not arg_options.input_directory: | ||
| 324 | raise ParseException("At least one input file or directory expected.") | ||
| 325 | |||
| 326 | if not arg_options.output_directory: | ||
| 327 | @@ -132,7 +132,7 @@ if __name__ == '__main__': | ||
| 328 | for filepath in os.listdir(arg_options.input_directory): | ||
| 329 | input_filepaths.append(os.path.join(arg_options.input_directory, filepath)) | ||
| 330 | |||
| 331 | - input_filepaths = filter(lambda name: fnmatch.fnmatch(name, '*.js'), input_filepaths) | ||
| 332 | + input_filepaths = [name for name in input_filepaths if fnmatch.fnmatch(name, '*.js')] | ||
| 333 | |||
| 334 | options = { | ||
| 335 | 'output_path': arg_options.output_directory, | ||
| 336 | @@ -144,7 +144,7 @@ if __name__ == '__main__': | ||
| 337 | |||
| 338 | log.debug("Generating code for builtins.") | ||
| 339 | log.debug("Parsed options:") | ||
| 340 | - for option, value in options.items(): | ||
| 341 | + for option, value in list(options.items()): | ||
| 342 | log.debug(" %s: %s" % (option, value)) | ||
| 343 | log.debug("") | ||
| 344 | log.debug("Input files:") | ||
| 345 | diff --git a/Source/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py b/Source/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py | ||
| 346 | index 89200c84e..a4a26c2b4 100755 | ||
| 347 | --- a/Source/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py | ||
| 348 | +++ b/Source/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py | ||
| 349 | @@ -37,7 +37,7 @@ import sys | ||
| 350 | def main(argv): | ||
| 351 | |||
| 352 | if len(argv) < 2: | ||
| 353 | - print('usage: %s inputFile outputFile' % argv[0]) | ||
| 354 | + print(('usage: %s inputFile outputFile' % argv[0])) | ||
| 355 | return 1 | ||
| 356 | |||
| 357 | inputFileName = argv[1] | ||
| 358 | diff --git a/Source/JavaScriptCore/Scripts/jsmin.py b/Source/JavaScriptCore/Scripts/jsmin.py | ||
| 359 | index 372418b4d..2f9fddfce 100644 | ||
| 360 | --- a/Source/JavaScriptCore/Scripts/jsmin.py | ||
| 361 | +++ b/Source/JavaScriptCore/Scripts/jsmin.py | ||
| 362 | @@ -23,17 +23,20 @@ | ||
| 363 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 364 | # THE SOFTWARE. | ||
| 365 | |||
| 366 | +# stolen from webkitgtk 2.26.2 | ||
| 367 | |||
| 368 | import sys | ||
| 369 | is_3 = sys.version_info >= (3, 0) | ||
| 370 | if is_3: | ||
| 371 | import io | ||
| 372 | + python_text_type = str | ||
| 373 | else: | ||
| 374 | import StringIO | ||
| 375 | try: | ||
| 376 | import cStringIO | ||
| 377 | except ImportError: | ||
| 378 | cStringIO = None | ||
| 379 | + python_text_type = basestring | ||
| 380 | |||
| 381 | |||
| 382 | __all__ = ['jsmin', 'JavascriptMinify'] | ||
| 383 | @@ -79,14 +82,18 @@ class JavascriptMinify(object): | ||
| 384 | def write(char): | ||
| 385 | # all of this is to support literal regular expressions. | ||
| 386 | # sigh | ||
| 387 | - if char in 'return': | ||
| 388 | + if str(char) in 'return': | ||
| 389 | self.return_buf += char | ||
| 390 | self.is_return = self.return_buf == 'return' | ||
| 391 | self.outs.write(char) | ||
| 392 | if self.is_return: | ||
| 393 | self.return_buf = '' | ||
| 394 | |||
| 395 | - read = self.ins.read | ||
| 396 | + def read(n): | ||
| 397 | + char = self.ins.read(n) | ||
| 398 | + if not isinstance(char, python_text_type): | ||
| 399 | + raise ValueError("ERROR: The script jsmin.py can only handle text input, but it received input of type %s" % type(char)) | ||
| 400 | + return char | ||
| 401 | |||
| 402 | space_strings = "abcdefghijklmnopqrstuvwxyz"\ | ||
| 403 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\" | ||
| 404 | @@ -118,8 +125,8 @@ class JavascriptMinify(object): | ||
| 405 | write(previous) | ||
| 406 | elif not previous: | ||
| 407 | return | ||
| 408 | - elif previous >= '!': | ||
| 409 | - if previous in "'\"": | ||
| 410 | + elif str(previous) >= "!": | ||
| 411 | + if str(previous) in "'\"": | ||
| 412 | in_quote = previous | ||
| 413 | write(previous) | ||
| 414 | previous_non_space = previous | ||
| 415 | @@ -166,7 +173,7 @@ class JavascriptMinify(object): | ||
| 416 | if numslashes % 2 == 0: | ||
| 417 | in_quote = '' | ||
| 418 | write(''.join(quote_buf)) | ||
| 419 | - elif next1 in '\r\n': | ||
| 420 | + elif str(next1) in '\r\n': | ||
| 421 | if previous_non_space in newlineend_strings \ | ||
| 422 | or previous_non_space > '~': | ||
| 423 | while 1: | ||
| 424 | @@ -179,7 +186,7 @@ class JavascriptMinify(object): | ||
| 425 | or next2 > '~' or next2 == '/': | ||
| 426 | do_newline = True | ||
| 427 | break | ||
| 428 | - elif next1 < '!' and not in_re: | ||
| 429 | + elif str(next1) < '!' and not in_re: | ||
| 430 | if (previous_non_space in space_strings \ | ||
| 431 | or previous_non_space > '~') \ | ||
| 432 | and (next2 in space_strings or next2 > '~'): | ||
| 433 | @@ -217,14 +224,14 @@ class JavascriptMinify(object): | ||
| 434 | do_newline = False | ||
| 435 | |||
| 436 | write(next1) | ||
| 437 | - if not in_re and next1 in "'\"`": | ||
| 438 | + if not in_re and str(next1) in "'\"`": | ||
| 439 | in_quote = next1 | ||
| 440 | quote_buf = [] | ||
| 441 | |||
| 442 | previous = next1 | ||
| 443 | next1 = next2 | ||
| 444 | |||
| 445 | - if previous >= '!': | ||
| 446 | + if str(previous) >= '!': | ||
| 447 | previous_non_space = previous | ||
| 448 | |||
| 449 | if previous == '\\': | ||
| 450 | diff --git a/Source/JavaScriptCore/Scripts/make-js-file-arrays.py b/Source/JavaScriptCore/Scripts/make-js-file-arrays.py | ||
| 451 | index 65056646a..4bb2bfe66 100755 | ||
| 452 | --- a/Source/JavaScriptCore/Scripts/make-js-file-arrays.py | ||
| 453 | +++ b/Source/JavaScriptCore/Scripts/make-js-file-arrays.py | ||
| 454 | @@ -21,11 +21,15 @@ | ||
| 455 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 456 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 457 | |||
| 458 | +# stolen from webkitgtk 2.26.2 | ||
| 459 | + | ||
| 460 | +from __future__ import print_function | ||
| 461 | import io | ||
| 462 | import os | ||
| 463 | from optparse import OptionParser | ||
| 464 | -from StringIO import StringIO | ||
| 465 | -from jsmin import JavascriptMinify | ||
| 466 | +import sys | ||
| 467 | +from jsmin import jsmin | ||
| 468 | +is_3 = sys.version_info >= (3, 0) | ||
| 469 | |||
| 470 | |||
| 471 | def stringifyCodepoint(code): | ||
| 472 | @@ -36,7 +40,7 @@ def stringifyCodepoint(code): | ||
| 473 | |||
| 474 | |||
| 475 | def chunk(list, chunkSize): | ||
| 476 | - for i in xrange(0, len(list), chunkSize): | ||
| 477 | + for i in range(0, len(list), chunkSize): | ||
| 478 | yield list[i:i + chunkSize] | ||
| 479 | |||
| 480 | |||
| 481 | @@ -46,11 +50,11 @@ def main(): | ||
| 482 | parser.add_option('-n', '--namespace', help='Namespace to use') | ||
| 483 | (options, arguments) = parser.parse_args() | ||
| 484 | if not options.namespace: | ||
| 485 | - print 'Error: must provide a namespace' | ||
| 486 | + print('Error: must provide a namespace') | ||
| 487 | parser.print_usage() | ||
| 488 | exit(-1) | ||
| 489 | if len(arguments) < 3: | ||
| 490 | - print 'Error: must provide at least 3 arguments' | ||
| 491 | + print('Error: must provide at least 3 arguments') | ||
| 492 | parser.print_usage() | ||
| 493 | exit(-1) | ||
| 494 | |||
| 495 | @@ -60,38 +64,47 @@ def main(): | ||
| 496 | inputPaths = arguments[2:] | ||
| 497 | |||
| 498 | headerFile = open(headerPath, 'w') | ||
| 499 | - print >> headerFile, 'namespace {0:s} {{'.format(namespace) | ||
| 500 | + print('namespace {0:s} {{'.format(namespace), file=headerFile) | ||
| 501 | |||
| 502 | sourceFile = open(sourcePath, 'w') | ||
| 503 | - print >> sourceFile, '#include "{0:s}"'.format(os.path.basename(headerPath)) | ||
| 504 | - print >> sourceFile, 'namespace {0:s} {{'.format(namespace) | ||
| 505 | - | ||
| 506 | - jsm = JavascriptMinify() | ||
| 507 | + print('#include "{0:s}"'.format(os.path.basename(headerPath)), file=sourceFile) | ||
| 508 | + print('namespace {0:s} {{'.format(namespace), file=sourceFile) | ||
| 509 | |||
| 510 | for inputFileName in inputPaths: | ||
| 511 | - inputStream = io.FileIO(inputFileName) | ||
| 512 | - outputStream = StringIO() | ||
| 513 | + | ||
| 514 | + if is_3: | ||
| 515 | + inputStream = io.open(inputFileName, encoding='utf-8') | ||
| 516 | + else: | ||
| 517 | + inputStream = io.FileIO(inputFileName) | ||
| 518 | + | ||
| 519 | + data = inputStream.read() | ||
| 520 | |||
| 521 | if not options.no_minify: | ||
| 522 | - jsm.minify(inputStream, outputStream) | ||
| 523 | - characters = outputStream.getvalue() | ||
| 524 | + characters = jsmin(data) | ||
| 525 | + else: | ||
| 526 | + characters = data | ||
| 527 | + | ||
| 528 | + if is_3: | ||
| 529 | + codepoints = bytearray(characters, encoding='utf-8') | ||
| 530 | else: | ||
| 531 | - characters = inputStream.read() | ||
| 532 | + codepoints = list(map(ord, characters)) | ||
| 533 | + | ||
| 534 | + # Use the size of codepoints instead of the characters | ||
| 535 | + # because UTF-8 characters may need more than one byte. | ||
| 536 | + size = len(codepoints) | ||
| 537 | |||
| 538 | - size = len(characters) | ||
| 539 | variableName = os.path.splitext(os.path.basename(inputFileName))[0] | ||
| 540 | |||
| 541 | - print >> headerFile, 'extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size) | ||
| 542 | - print >> sourceFile, 'const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size) | ||
| 543 | + print('extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size), file=headerFile) | ||
| 544 | + print('const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size), file=sourceFile) | ||
| 545 | |||
| 546 | - codepoints = map(ord, characters) | ||
| 547 | for codepointChunk in chunk(codepoints, 16): | ||
| 548 | - print >> sourceFile, ' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))) | ||
| 549 | + print(' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))), file=sourceFile) | ||
| 550 | |||
| 551 | - print >> sourceFile, '};' | ||
| 552 | + print('};', file=sourceFile) | ||
| 553 | |||
| 554 | - print >> headerFile, '}} // namespace {0:s}'.format(namespace) | ||
| 555 | - print >> sourceFile, '}} // namespace {0:s}'.format(namespace) | ||
| 556 | + print('}} // namespace {0:s}'.format(namespace), file=headerFile) | ||
| 557 | + print('}} // namespace {0:s}'.format(namespace), file=sourceFile) | ||
| 558 | |||
| 559 | if __name__ == '__main__': | ||
| 560 | main() | ||
| 561 | diff --git a/Source/JavaScriptCore/Scripts/builtins/__init__.py b/Source/JavaScriptCore/Scripts/mybuiltins/__init__.py | ||
| 562 | similarity index 72% | ||
| 563 | rename from Source/JavaScriptCore/Scripts/builtins/__init__.py | ||
| 564 | rename to Source/JavaScriptCore/Scripts/mybuiltins/__init__.py | ||
| 565 | index fdfcba981..1b9668023 100644 | ||
| 566 | --- a/Source/JavaScriptCore/Scripts/builtins/__init__.py | ||
| 567 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/__init__.py | ||
| 568 | @@ -1,3 +1,3 @@ | ||
| 569 | # Required for Python to search this directory for module files | ||
| 570 | |||
| 571 | -from builtins import * | ||
| 572 | +from mybuiltins import * | ||
| 573 | diff --git a/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins.py | ||
| 574 | new file mode 100644 | ||
| 575 | index 000000000..1bea3da5c | ||
| 576 | --- /dev/null | ||
| 577 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins.py | ||
| 578 | @@ -0,0 +1,11 @@ | ||
| 579 | +# This file is used to simulate the builtins/ directory when generate-js-builtins.py | ||
| 580 | +# is run from JavaScriptCore framework's private headers directory, which is flattened. | ||
| 581 | + | ||
| 582 | +from mybuiltins_model import * | ||
| 583 | +from mybuiltins_templates import * | ||
| 584 | + | ||
| 585 | +from mybuiltins_generator import * | ||
| 586 | +from mybuiltins_generate_combined_header import * | ||
| 587 | +from mybuiltins_generate_combined_implementation import * | ||
| 588 | +from mybuiltins_generate_separate_header import * | ||
| 589 | +from mybuiltins_generate_separate_implementation import * | ||
| 590 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_header.py | ||
| 591 | similarity index 98% | ||
| 592 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py | ||
| 593 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_header.py | ||
| 594 | index 891bd3cb4..6520a5f16 100644 | ||
| 595 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py | ||
| 596 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_header.py | ||
| 597 | @@ -30,8 +30,8 @@ import re | ||
| 598 | import string | ||
| 599 | from string import Template | ||
| 600 | |||
| 601 | -from builtins_generator import BuiltinsGenerator | ||
| 602 | -from builtins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 603 | +from mybuiltins_generator import BuiltinsGenerator | ||
| 604 | +from mybuiltins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 605 | |||
| 606 | log = logging.getLogger('global') | ||
| 607 | |||
| 608 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_implementation.py | ||
| 609 | similarity index 95% | ||
| 610 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py | ||
| 611 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_implementation.py | ||
| 612 | index 094434b64..76eed7665 100644 | ||
| 613 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py | ||
| 614 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_combined_implementation.py | ||
| 615 | @@ -30,9 +30,9 @@ import re | ||
| 616 | import string | ||
| 617 | from string import Template | ||
| 618 | |||
| 619 | -from builtins_generator import BuiltinsGenerator | ||
| 620 | -from builtins_model import Framework, Frameworks | ||
| 621 | -from builtins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 622 | +from mybuiltins_generator import BuiltinsGenerator | ||
| 623 | +from mybuiltins_model import Framework, Frameworks | ||
| 624 | +from mybuiltins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 625 | |||
| 626 | log = logging.getLogger('global') | ||
| 627 | |||
| 628 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_header.py | ||
| 629 | similarity index 97% | ||
| 630 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py | ||
| 631 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_header.py | ||
| 632 | index b72a94bfe..6cbfbdca1 100644 | ||
| 633 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py | ||
| 634 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_header.py | ||
| 635 | @@ -30,9 +30,9 @@ import re | ||
| 636 | import string | ||
| 637 | from string import Template | ||
| 638 | |||
| 639 | -from builtins_generator import BuiltinsGenerator | ||
| 640 | -from builtins_model import Frameworks | ||
| 641 | -from builtins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 642 | +from mybuiltins_generator import BuiltinsGenerator | ||
| 643 | +from mybuiltins_model import Frameworks | ||
| 644 | +from mybuiltins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 645 | |||
| 646 | log = logging.getLogger('global') | ||
| 647 | |||
| 648 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_implementation.py | ||
| 649 | similarity index 95% | ||
| 650 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py | ||
| 651 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_implementation.py | ||
| 652 | index 0443975da..9f811df6a 100644 | ||
| 653 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py | ||
| 654 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generate_separate_implementation.py | ||
| 655 | @@ -30,9 +30,9 @@ import re | ||
| 656 | import string | ||
| 657 | from string import Template | ||
| 658 | |||
| 659 | -from builtins_generator import BuiltinsGenerator, WK_lcfirst | ||
| 660 | -from builtins_model import Framework, Frameworks | ||
| 661 | -from builtins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 662 | +from mybuiltins_generator import BuiltinsGenerator, WK_lcfirst | ||
| 663 | +from mybuiltins_model import Framework, Frameworks | ||
| 664 | +from mybuiltins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 665 | |||
| 666 | log = logging.getLogger('global') | ||
| 667 | |||
| 668 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generator.py | ||
| 669 | similarity index 97% | ||
| 670 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py | ||
| 671 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generator.py | ||
| 672 | index 21ac4c1d9..546eb2e07 100644 | ||
| 673 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py | ||
| 674 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_generator.py | ||
| 675 | @@ -30,8 +30,8 @@ import re | ||
| 676 | from string import Template | ||
| 677 | import json | ||
| 678 | |||
| 679 | -from builtins_model import BuiltinFunction, BuiltinObject | ||
| 680 | -from builtins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 681 | +from mybuiltins_model import BuiltinFunction, BuiltinObject | ||
| 682 | +from mybuiltins_templates import BuiltinsGeneratorTemplates as Templates | ||
| 683 | |||
| 684 | log = logging.getLogger('global') | ||
| 685 | |||
| 686 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_model.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_model.py | ||
| 687 | similarity index 97% | ||
| 688 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_model.py | ||
| 689 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_model.py | ||
| 690 | index cdd5f9003..68d7aed06 100755 | ||
| 691 | --- a/Source/JavaScriptCore/Scripts/builtins/builtins_model.py | ||
| 692 | +++ b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_model.py | ||
| 693 | @@ -122,7 +122,8 @@ class BuiltinFunction: | ||
| 694 | interface = interface + " [Constructor]" | ||
| 695 | |||
| 696 | return interface | ||
| 697 | - | ||
| 698 | + def __lt__(self, other): | ||
| 699 | + return self.function_name < other.function_name | ||
| 700 | |||
| 701 | class BuiltinsCollection: | ||
| 702 | def __init__(self, framework_name): | ||
| 703 | @@ -178,7 +179,7 @@ class BuiltinsCollection: | ||
| 704 | |||
| 705 | result = [] | ||
| 706 | |||
| 707 | - for owner, years in owner_to_years.items(): | ||
| 708 | + for owner, years in list(owner_to_years.items()): | ||
| 709 | sorted_years = list(years) | ||
| 710 | sorted_years.sort() | ||
| 711 | result.append("%s %s" % (', '.join(sorted_years), owner)) | ||
| 712 | @@ -271,4 +272,4 @@ class BuiltinsCollection: | ||
| 713 | functionBounds.append((start, end)) | ||
| 714 | |||
| 715 | functionStrings = [text[start:end].strip() for (start, end) in functionBounds] | ||
| 716 | - return map(BuiltinFunction.fromString, functionStrings) | ||
| 717 | + return list(map(BuiltinFunction.fromString, functionStrings)) | ||
| 718 | diff --git a/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py b/Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_templates.py | ||
| 719 | similarity index 100% | ||
| 720 | rename from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py | ||
| 721 | rename to Source/JavaScriptCore/Scripts/mybuiltins/mybuiltins_templates.py | ||
| 722 | diff --git a/Source/JavaScriptCore/disassembler/udis86/ud_itab.py b/Source/JavaScriptCore/disassembler/udis86/ud_itab.py | ||
| 723 | index ef011d2ec..205dcb1ae 100644 | ||
| 724 | --- a/Source/JavaScriptCore/disassembler/udis86/ud_itab.py | ||
| 725 | +++ b/Source/JavaScriptCore/disassembler/udis86/ud_itab.py | ||
| 726 | @@ -266,15 +266,15 @@ class UdItabGenerator: | ||
| 727 | pfx_c = [] | ||
| 728 | opr = insn.operands | ||
| 729 | for i in range(len(opr)): | ||
| 730 | - if not (opr[i] in self.OperandDict.keys()): | ||
| 731 | - print("error: invalid operand declaration: %s\n" % opr[i]) | ||
| 732 | + if not (opr[i] in list(self.OperandDict.keys())): | ||
| 733 | + print(("error: invalid operand declaration: %s\n" % opr[i])) | ||
| 734 | opr_c[i] = "O_" + opr[i] | ||
| 735 | opr = "%s %s %s %s" % (opr_c[0] + ",", opr_c[1] + ",", | ||
| 736 | opr_c[2] + ",", opr_c[3]) | ||
| 737 | |||
| 738 | for p in insn.prefixes: | ||
| 739 | - if not ( p in self.PrefixDict.keys() ): | ||
| 740 | - print("error: invalid prefix specification: %s \n" % pfx) | ||
| 741 | + if not ( p in list(self.PrefixDict.keys()) ): | ||
| 742 | + print(("error: invalid prefix specification: %s \n" % pfx)) | ||
| 743 | pfx_c.append( self.PrefixDict[p] ) | ||
| 744 | if len(insn.prefixes) == 0: | ||
| 745 | pfx_c.append( "P_none" ) | ||
| 746 | @@ -346,7 +346,7 @@ class UdItabGenerator: | ||
| 747 | # Macros defining short-names for operands | ||
| 748 | # | ||
| 749 | self.ItabC.write("\n\n/* itab entry operand definitions (for readability) */\n"); | ||
| 750 | - operands = self.OperandDict.keys() | ||
| 751 | + operands = list(self.OperandDict.keys()) | ||
| 752 | operands = sorted(operands) | ||
| 753 | for o in operands: | ||
| 754 | self.ItabC.write("#define O_%-7s { %-12s %-8s }\n" % | ||
| 755 | diff --git a/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py b/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py | ||
| 756 | index fe1833dc7..00961071c 100644 | ||
| 757 | --- a/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py | ||
| 758 | +++ b/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py | ||
| 759 | @@ -28,7 +28,7 @@ import os | ||
| 760 | # Some compatibility stuff for supporting python 2.x as well as python 3.x | ||
| 761 | def itemslist(dict): | ||
| 762 | try: | ||
| 763 | - return dict.iteritems() # python 2.x | ||
| 764 | + return iter(dict.items()) # python 2.x | ||
| 765 | except AttributeError: | ||
| 766 | return list(dict.items()) # python 3.x | ||
| 767 | |||
| 768 | @@ -180,7 +180,7 @@ class UdOpcodeTable: | ||
| 769 | return itemslist(self._entries) | ||
| 770 | |||
| 771 | def numEntries(self): | ||
| 772 | - return len(self._entries.keys()) | ||
| 773 | + return len(list(self._entries.keys())) | ||
| 774 | |||
| 775 | def label(self): | ||
| 776 | return self._TableInfo[self._typ]['label'] | ||
| 777 | @@ -248,7 +248,7 @@ class UdOpcodeTable: | ||
| 778 | @classmethod | ||
| 779 | def getLabels(cls): | ||
| 780 | """Returns a list of all labels""" | ||
| 781 | - return [cls._TableInfo[k]['label'] for k in cls._TableInfo.keys()] | ||
| 782 | + return [cls._TableInfo[k]['label'] for k in list(cls._TableInfo.keys())] | ||
| 783 | |||
| 784 | |||
| 785 | class UdOpcodeTables(object): | ||
| 786 | @@ -401,7 +401,7 @@ class UdOpcodeTables(object): | ||
| 787 | self.map(self.root, opcodes, insn) | ||
| 788 | except self.CollisionError as e: | ||
| 789 | self.pprint() | ||
| 790 | - print(opcodes, insn, str(e.obj1), str(e.obj2)) | ||
| 791 | + print((opcodes, insn, str(e.obj1), str(e.obj2))) | ||
| 792 | raise | ||
| 793 | except Exception as e: | ||
| 794 | self.pprint() | ||
| 795 | @@ -550,10 +550,10 @@ class UdOpcodeTables(object): | ||
| 796 | entries = tbl.entries() | ||
| 797 | for k, e in entries: | ||
| 798 | if isinstance(e, UdOpcodeTable): | ||
| 799 | - self.log("%s |-<%02x> %s" % (indent, k, e)) | ||
| 800 | + self.log("%s |-<%02x> %s" % (indent, int(k), e)) | ||
| 801 | printWalk(e, indent + " |") | ||
| 802 | elif isinstance(e, UdInsnDef): | ||
| 803 | - self.log("%s |-<%02x> %s" % (indent, k, e)) | ||
| 804 | + self.log("%s |-<%02x> %s" % (indent, int(k), e)) | ||
| 805 | printWalk(self.root) | ||
| 806 | |||
| 807 | |||
| 808 | diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files | ||
| 809 | index 5666a3f92..371ac5e4e 100644 | ||
| 810 | --- a/Source/JavaScriptCore/generate-bytecode-files | ||
| 811 | +++ b/Source/JavaScriptCore/generate-bytecode-files | ||
| 812 | @@ -91,14 +91,14 @@ def openOrExit(path, mode): | ||
| 813 | try: | ||
| 814 | return open(path, mode) | ||
| 815 | except IOError as e: | ||
| 816 | - print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror) | ||
| 817 | + print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) | ||
| 818 | exit(1) | ||
| 819 | |||
| 820 | def hashFile(file): | ||
| 821 | sha1 = hashlib.sha1() | ||
| 822 | file.seek(0) | ||
| 823 | for line in file: | ||
| 824 | - sha1.update(line) | ||
| 825 | + sha1.update(line.encode('utf-8')) | ||
| 826 | |||
| 827 | file.seek(0) | ||
| 828 | |||
| 829 | @@ -114,7 +114,7 @@ if __name__ == "__main__": | ||
| 830 | parser.error("missing <bytecode-json-file>") | ||
| 831 | |||
| 832 | bytecodeJSONFile = args[0] | ||
| 833 | - bytecodeFile = openOrExit(bytecodeJSONFile, "rb") | ||
| 834 | + bytecodeFile = openOrExit(bytecodeJSONFile, "r") | ||
| 835 | sha1Hash = hashFile(bytecodeFile) | ||
| 836 | |||
| 837 | hFileHashString = "// SHA1Hash: {0}\n".format(sha1Hash) | ||
| 838 | @@ -131,7 +131,7 @@ if __name__ == "__main__": | ||
| 839 | |||
| 840 | if bytecodeHFilename: | ||
| 841 | try: | ||
| 842 | - bytecodeHReadFile = open(bytecodeHFilename, "rb") | ||
| 843 | + bytecodeHReadFile = open(bytecodeHFilename, "r") | ||
| 844 | |||
| 845 | hashLine = bytecodeHReadFile.readline() | ||
| 846 | if hashLine != hFileHashString: | ||
| 847 | @@ -143,7 +143,7 @@ if __name__ == "__main__": | ||
| 848 | |||
| 849 | if initASMFileName: | ||
| 850 | try: | ||
| 851 | - initBytecodesReadFile = open(initASMFileName, "rb") | ||
| 852 | + initBytecodesReadFile = open(initASMFileName, "r") | ||
| 853 | |||
| 854 | hashLine = initBytecodesReadFile.readline() | ||
| 855 | if hashLine != asmFileHashString: | ||
| 856 | @@ -157,15 +157,15 @@ if __name__ == "__main__": | ||
| 857 | exit(0) | ||
| 858 | |||
| 859 | if bytecodeHFilename: | ||
| 860 | - bytecodeHFile = openOrExit(bytecodeHFilename, "wb") | ||
| 861 | + bytecodeHFile = openOrExit(bytecodeHFilename, "w") | ||
| 862 | |||
| 863 | if initASMFileName: | ||
| 864 | - initBytecodesFile = openOrExit(initASMFileName, "wb") | ||
| 865 | + initBytecodesFile = openOrExit(initASMFileName, "w") | ||
| 866 | |||
| 867 | try: | ||
| 868 | bytecodeSections = json.load(bytecodeFile, encoding = "utf-8") | ||
| 869 | except: | ||
| 870 | - print "Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()) | ||
| 871 | + print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())) | ||
| 872 | |||
| 873 | if bytecodeHFilename: | ||
| 874 | bytecodeHFile.write(hFileHashString) | ||
| 875 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py b/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | ||
| 876 | index 6077fa97a..bd30c817c 100644 | ||
| 877 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | ||
| 878 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py | ||
| 879 | @@ -1,24 +1,24 @@ | ||
| 880 | # Required for Python to search this directory for module files | ||
| 881 | |||
| 882 | -from models import * | ||
| 883 | -from generator import * | ||
| 884 | -from cpp_generator import * | ||
| 885 | -from objc_generator import * | ||
| 886 | +from .models import * | ||
| 887 | +from .generator import * | ||
| 888 | +from .cpp_generator import * | ||
| 889 | +from .objc_generator import * | ||
| 890 | |||
| 891 | -from generate_cpp_alternate_backend_dispatcher_header import * | ||
| 892 | -from generate_cpp_backend_dispatcher_header import * | ||
| 893 | -from generate_cpp_backend_dispatcher_implementation import * | ||
| 894 | -from generate_cpp_frontend_dispatcher_header import * | ||
| 895 | -from generate_cpp_frontend_dispatcher_implementation import * | ||
| 896 | -from generate_cpp_protocol_types_header import * | ||
| 897 | -from generate_cpp_protocol_types_implementation import * | ||
| 898 | -from generate_js_backend_commands import * | ||
| 899 | -from generate_objc_backend_dispatcher_header import * | ||
| 900 | -from generate_objc_backend_dispatcher_implementation import * | ||
| 901 | -from generate_objc_configuration_header import * | ||
| 902 | -from generate_objc_configuration_implementation import * | ||
| 903 | -from generate_objc_conversion_helpers import * | ||
| 904 | -from generate_objc_frontend_dispatcher_implementation import * | ||
| 905 | -from generate_objc_header import * | ||
| 906 | -from generate_objc_internal_header import * | ||
| 907 | -from generate_objc_protocol_types_implementation import * | ||
| 908 | +from .generate_cpp_alternate_backend_dispatcher_header import * | ||
| 909 | +from .generate_cpp_backend_dispatcher_header import * | ||
| 910 | +from .generate_cpp_backend_dispatcher_implementation import * | ||
| 911 | +from .generate_cpp_frontend_dispatcher_header import * | ||
| 912 | +from .generate_cpp_frontend_dispatcher_implementation import * | ||
| 913 | +from .generate_cpp_protocol_types_header import * | ||
| 914 | +from .generate_cpp_protocol_types_implementation import * | ||
| 915 | +from .generate_js_backend_commands import * | ||
| 916 | +from .generate_objc_backend_dispatcher_header import * | ||
| 917 | +from .generate_objc_backend_dispatcher_implementation import * | ||
| 918 | +from .generate_objc_configuration_header import * | ||
| 919 | +from .generate_objc_configuration_implementation import * | ||
| 920 | +from .generate_objc_conversion_helpers import * | ||
| 921 | +from .generate_objc_frontend_dispatcher_implementation import * | ||
| 922 | +from .generate_objc_header import * | ||
| 923 | +from .generate_objc_internal_header import * | ||
| 924 | +from .generate_objc_protocol_types_implementation import * | ||
| 925 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py b/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py | ||
| 926 | index edd330da4..43c655b05 100644 | ||
| 927 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py | ||
| 928 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py | ||
| 929 | @@ -28,8 +28,8 @@ import logging | ||
| 930 | import os.path | ||
| 931 | import re | ||
| 932 | |||
| 933 | -from generator import ucfirst | ||
| 934 | -from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 935 | +from .generator import ucfirst | ||
| 936 | +from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 937 | |||
| 938 | log = logging.getLogger('global') | ||
| 939 | |||
| 940 | @@ -56,11 +56,11 @@ class CppGenerator: | ||
| 941 | if isinstance(_type, ArrayType): | ||
| 942 | return 'getArray' | ||
| 943 | if isinstance(_type, PrimitiveType): | ||
| 944 | - if _type.raw_name() is 'integer': | ||
| 945 | + if _type.raw_name() == 'integer': | ||
| 946 | return 'getInteger' | ||
| 947 | - elif _type.raw_name() is 'number': | ||
| 948 | + elif _type.raw_name() == 'number': | ||
| 949 | return 'getDouble' | ||
| 950 | - elif _type.raw_name() is 'any': | ||
| 951 | + elif _type.raw_name() == 'any': | ||
| 952 | return 'getValue' | ||
| 953 | else: | ||
| 954 | return 'get' + ucfirst(_type.raw_name()) | ||
| 955 | @@ -76,11 +76,11 @@ class CppGenerator: | ||
| 956 | if isinstance(_type, ArrayType): | ||
| 957 | return 'setArray' | ||
| 958 | if isinstance(_type, PrimitiveType): | ||
| 959 | - if _type.raw_name() is 'integer': | ||
| 960 | + if _type.raw_name() == 'integer': | ||
| 961 | return 'setInteger' | ||
| 962 | - elif _type.raw_name() is 'number': | ||
| 963 | + elif _type.raw_name() == 'number': | ||
| 964 | return 'setDouble' | ||
| 965 | - elif _type.raw_name() is 'any': | ||
| 966 | + elif _type.raw_name() == 'any': | ||
| 967 | return 'setValue' | ||
| 968 | else: | ||
| 969 | return 'set' + ucfirst(_type.raw_name()) | ||
| 970 | @@ -95,7 +95,7 @@ class CppGenerator: | ||
| 971 | if isinstance(_type, ObjectType) and len(_type.members) == 0: | ||
| 972 | return 'Inspector::InspectorObject' | ||
| 973 | if isinstance(_type, ArrayType): | ||
| 974 | - if _type.raw_name() is None: # Otherwise, fall through and use typedef'd name. | ||
| 975 | + if _type.raw_name() == None: # Otherwise, fall through and use typedef'd name. | ||
| 976 | return 'Inspector::Protocol::Array<%s>' % CppGenerator.cpp_protocol_type_for_type(_type.element_type) | ||
| 977 | if isinstance(_type, (ObjectType, AliasedType, EnumType, ArrayType)): | ||
| 978 | return 'Inspector::Protocol::%s::%s' % (_type.type_domain().domain_name, _type.raw_name()) | ||
| 979 | @@ -119,7 +119,7 @@ class CppGenerator: | ||
| 980 | _type = _type.primitive_type # Fall through to primitive. | ||
| 981 | |||
| 982 | # This handles the 'any' type and objects with defined properties. | ||
| 983 | - if isinstance(_type, ObjectType) or _type.qualified_name() is 'object': | ||
| 984 | + if isinstance(_type, ObjectType) or _type.qualified_name() == 'object': | ||
| 985 | cpp_name = 'Inspector::InspectorObject' | ||
| 986 | if parameter.is_optional: | ||
| 987 | return 'const %s*' % cpp_name | ||
| 988 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py | ||
| 989 | index 375ce05ca..916277d31 100755 | ||
| 990 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py | ||
| 991 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py | ||
| 992 | @@ -30,9 +30,9 @@ import string | ||
| 993 | import re | ||
| 994 | from string import Template | ||
| 995 | |||
| 996 | -from cpp_generator import CppGenerator | ||
| 997 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 998 | -from generator import Generator | ||
| 999 | +from .cpp_generator import CppGenerator | ||
| 1000 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1001 | +from .generator import Generator | ||
| 1002 | |||
| 1003 | log = logging.getLogger('global') | ||
| 1004 | |||
| 1005 | @@ -60,7 +60,7 @@ class CppAlternateBackendDispatcherHeaderGenerator(Generator): | ||
| 1006 | sections = [] | ||
| 1007 | sections.append(self.generate_license()) | ||
| 1008 | sections.append(Template(CppTemplates.AlternateDispatchersHeaderPrelude).substitute(None, **header_args)) | ||
| 1009 | - sections.append('\n'.join(filter(None, map(self._generate_handler_declarations_for_domain, domains)))) | ||
| 1010 | + sections.append('\n'.join([_f for _f in map(self._generate_handler_declarations_for_domain, domains) if _f])) | ||
| 1011 | sections.append(Template(CppTemplates.AlternateDispatchersHeaderPostlude).substitute(None, **header_args)) | ||
| 1012 | return '\n\n'.join(sections) | ||
| 1013 | |||
| 1014 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py | ||
| 1015 | index 2e5ff7a6a..25bec9a22 100755 | ||
| 1016 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py | ||
| 1017 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py | ||
| 1018 | @@ -30,10 +30,10 @@ import re | ||
| 1019 | import string | ||
| 1020 | from string import Template | ||
| 1021 | |||
| 1022 | -from cpp_generator import CppGenerator | ||
| 1023 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1024 | -from generator import Generator, ucfirst | ||
| 1025 | -from models import EnumType | ||
| 1026 | +from .cpp_generator import CppGenerator | ||
| 1027 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1028 | +from .generator import Generator, ucfirst | ||
| 1029 | +from .models import EnumType | ||
| 1030 | |||
| 1031 | log = logging.getLogger('global') | ||
| 1032 | |||
| 1033 | @@ -46,7 +46,7 @@ class CppBackendDispatcherHeaderGenerator(Generator): | ||
| 1034 | return "InspectorBackendDispatchers.h" | ||
| 1035 | |||
| 1036 | def domains_to_generate(self): | ||
| 1037 | - return filter(lambda domain: len(domain.commands) > 0, Generator.domains_to_generate(self)) | ||
| 1038 | + return [domain for domain in Generator.domains_to_generate(self) if len(domain.commands) > 0] | ||
| 1039 | |||
| 1040 | def generate_output(self): | ||
| 1041 | headers = [ | ||
| 1042 | @@ -68,8 +68,8 @@ class CppBackendDispatcherHeaderGenerator(Generator): | ||
| 1043 | sections.append(self.generate_license()) | ||
| 1044 | sections.append(Template(CppTemplates.HeaderPrelude).substitute(None, **header_args)) | ||
| 1045 | sections.append(self._generate_alternate_handler_forward_declarations_for_domains(domains)) | ||
| 1046 | - sections.extend(map(self._generate_handler_declarations_for_domain, domains)) | ||
| 1047 | - sections.extend(map(self._generate_dispatcher_declarations_for_domain, domains)) | ||
| 1048 | + sections.extend(list(map(self._generate_handler_declarations_for_domain, domains))) | ||
| 1049 | + sections.extend(list(map(self._generate_dispatcher_declarations_for_domain, domains))) | ||
| 1050 | sections.append(Template(CppTemplates.HeaderPostlude).substitute(None, **header_args)) | ||
| 1051 | return "\n\n".join(sections) | ||
| 1052 | |||
| 1053 | @@ -194,7 +194,7 @@ class CppBackendDispatcherHeaderGenerator(Generator): | ||
| 1054 | declarations = [] | ||
| 1055 | if len(domain.commands) > 0: | ||
| 1056 | declarations.append('private:') | ||
| 1057 | - declarations.extend(map(self._generate_dispatcher_declaration_for_command, domain.commands)) | ||
| 1058 | + declarations.extend(list(map(self._generate_dispatcher_declaration_for_command, domain.commands))) | ||
| 1059 | |||
| 1060 | handler_args = { | ||
| 1061 | 'classAndExportMacro': " ".join(classComponents), | ||
| 1062 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py | ||
| 1063 | index 8f3df80ee..0c9b30e47 100755 | ||
| 1064 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py | ||
| 1065 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py | ||
| 1066 | @@ -29,10 +29,10 @@ import logging | ||
| 1067 | import string | ||
| 1068 | from string import Template | ||
| 1069 | |||
| 1070 | -from cpp_generator import CppGenerator | ||
| 1071 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1072 | -from generator import Generator, ucfirst | ||
| 1073 | -from models import ObjectType, ArrayType | ||
| 1074 | +from .cpp_generator import CppGenerator | ||
| 1075 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1076 | +from .generator import Generator, ucfirst | ||
| 1077 | +from .models import ObjectType, ArrayType | ||
| 1078 | |||
| 1079 | log = logging.getLogger('global') | ||
| 1080 | |||
| 1081 | @@ -45,7 +45,7 @@ class CppBackendDispatcherImplementationGenerator(Generator): | ||
| 1082 | return "InspectorBackendDispatchers.cpp" | ||
| 1083 | |||
| 1084 | def domains_to_generate(self): | ||
| 1085 | - return filter(lambda domain: len(domain.commands) > 0, Generator.domains_to_generate(self)) | ||
| 1086 | + return [domain for domain in Generator.domains_to_generate(self) if len(domain.commands) > 0] | ||
| 1087 | |||
| 1088 | def generate_output(self): | ||
| 1089 | secondary_headers = [ | ||
| 1090 | @@ -69,7 +69,7 @@ class CppBackendDispatcherImplementationGenerator(Generator): | ||
| 1091 | sections.append(self.generate_license()) | ||
| 1092 | sections.append(Template(CppTemplates.ImplementationPrelude).substitute(None, **header_args)) | ||
| 1093 | sections.append("\n".join(map(self._generate_handler_class_destructor_for_domain, self.domains_to_generate()))) | ||
| 1094 | - sections.extend(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate())) | ||
| 1095 | + sections.extend(list(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate()))) | ||
| 1096 | sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) | ||
| 1097 | return "\n\n".join(sections) | ||
| 1098 | |||
| 1099 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py | ||
| 1100 | index 58a3cb925..40905d676 100755 | ||
| 1101 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py | ||
| 1102 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py | ||
| 1103 | @@ -30,10 +30,10 @@ import re | ||
| 1104 | import string | ||
| 1105 | from string import Template | ||
| 1106 | |||
| 1107 | -from cpp_generator import CppGenerator | ||
| 1108 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1109 | -from generator import Generator, ucfirst | ||
| 1110 | -from models import EnumType | ||
| 1111 | +from .cpp_generator import CppGenerator | ||
| 1112 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1113 | +from .generator import Generator, ucfirst | ||
| 1114 | +from .models import EnumType | ||
| 1115 | |||
| 1116 | log = logging.getLogger('global') | ||
| 1117 | |||
| 1118 | @@ -46,7 +46,7 @@ class CppFrontendDispatcherHeaderGenerator(Generator): | ||
| 1119 | return "InspectorFrontendDispatchers.h" | ||
| 1120 | |||
| 1121 | def domains_to_generate(self): | ||
| 1122 | - return filter(lambda domain: len(domain.events) > 0, Generator.domains_to_generate(self)) | ||
| 1123 | + return [domain for domain in Generator.domains_to_generate(self) if len(domain.events) > 0] | ||
| 1124 | |||
| 1125 | def generate_output(self): | ||
| 1126 | headers = [ | ||
| 1127 | @@ -63,7 +63,7 @@ class CppFrontendDispatcherHeaderGenerator(Generator): | ||
| 1128 | sections = [] | ||
| 1129 | sections.append(self.generate_license()) | ||
| 1130 | sections.append(Template(CppTemplates.HeaderPrelude).substitute(None, **header_args)) | ||
| 1131 | - sections.extend(map(self._generate_dispatcher_declarations_for_domain, self.domains_to_generate())) | ||
| 1132 | + sections.extend(list(map(self._generate_dispatcher_declarations_for_domain, self.domains_to_generate()))) | ||
| 1133 | sections.append(Template(CppTemplates.HeaderPostlude).substitute(None, **header_args)) | ||
| 1134 | return "\n\n".join(sections) | ||
| 1135 | |||
| 1136 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py | ||
| 1137 | index ea46aaf26..132b1c67c 100755 | ||
| 1138 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py | ||
| 1139 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py | ||
| 1140 | @@ -29,10 +29,10 @@ import logging | ||
| 1141 | import string | ||
| 1142 | from string import Template | ||
| 1143 | |||
| 1144 | -from cpp_generator import CppGenerator | ||
| 1145 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1146 | -from generator import Generator, ucfirst | ||
| 1147 | -from models import ObjectType, ArrayType | ||
| 1148 | +from .cpp_generator import CppGenerator | ||
| 1149 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1150 | +from .generator import Generator, ucfirst | ||
| 1151 | +from .models import ObjectType, ArrayType | ||
| 1152 | |||
| 1153 | log = logging.getLogger('global') | ||
| 1154 | |||
| 1155 | @@ -45,7 +45,7 @@ class CppFrontendDispatcherImplementationGenerator(Generator): | ||
| 1156 | return "InspectorFrontendDispatchers.cpp" | ||
| 1157 | |||
| 1158 | def domains_to_generate(self): | ||
| 1159 | - return filter(lambda domain: len(domain.events) > 0, Generator.domains_to_generate(self)) | ||
| 1160 | + return [domain for domain in Generator.domains_to_generate(self) if len(domain.events) > 0] | ||
| 1161 | |||
| 1162 | def generate_output(self): | ||
| 1163 | secondary_headers = [ | ||
| 1164 | @@ -61,7 +61,7 @@ class CppFrontendDispatcherImplementationGenerator(Generator): | ||
| 1165 | sections = [] | ||
| 1166 | sections.append(self.generate_license()) | ||
| 1167 | sections.append(Template(CppTemplates.ImplementationPrelude).substitute(None, **header_args)) | ||
| 1168 | - sections.extend(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate())) | ||
| 1169 | + sections.extend(list(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate()))) | ||
| 1170 | sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) | ||
| 1171 | return "\n\n".join(sections) | ||
| 1172 | |||
| 1173 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py | ||
| 1174 | index 6753e2dcf..7bd4375df 100755 | ||
| 1175 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py | ||
| 1176 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py | ||
| 1177 | @@ -30,10 +30,10 @@ import re | ||
| 1178 | import string | ||
| 1179 | from string import Template | ||
| 1180 | |||
| 1181 | -from cpp_generator import CppGenerator | ||
| 1182 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1183 | -from generator import Generator, ucfirst | ||
| 1184 | -from models import EnumType, ObjectType, PrimitiveType, AliasedType, ArrayType, Frameworks | ||
| 1185 | +from .cpp_generator import CppGenerator | ||
| 1186 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1187 | +from .generator import Generator, ucfirst | ||
| 1188 | +from .models import EnumType, ObjectType, PrimitiveType, AliasedType, ArrayType, Frameworks | ||
| 1189 | |||
| 1190 | log = logging.getLogger('global') | ||
| 1191 | |||
| 1192 | @@ -80,8 +80,8 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1193 | ' return getEnumConstantValue(static_cast<int>(enumValue));', | ||
| 1194 | '}'])) | ||
| 1195 | |||
| 1196 | - builder_sections = map(self._generate_builders_for_domain, domains) | ||
| 1197 | - sections.extend(filter(lambda section: len(section) > 0, builder_sections)) | ||
| 1198 | + builder_sections = list(map(self._generate_builders_for_domain, domains)) | ||
| 1199 | + sections.extend([section for section in builder_sections if len(section) > 0]) | ||
| 1200 | sections.append(self._generate_forward_declarations_for_binding_traits()) | ||
| 1201 | sections.append('} // namespace Protocol') | ||
| 1202 | sections.append(Template(CppTemplates.HeaderPostlude).substitute(None, **header_args)) | ||
| 1203 | @@ -96,8 +96,8 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1204 | |||
| 1205 | for domain in domains: | ||
| 1206 | declaration_types = [decl.type for decl in domain.type_declarations] | ||
| 1207 | - object_types = filter(lambda _type: isinstance(_type, ObjectType), declaration_types) | ||
| 1208 | - enum_types = filter(lambda _type: isinstance(_type, EnumType), declaration_types) | ||
| 1209 | + object_types = [_type for _type in declaration_types if isinstance(_type, ObjectType)] | ||
| 1210 | + enum_types = [_type for _type in declaration_types if isinstance(_type, EnumType)] | ||
| 1211 | if len(object_types) + len(enum_types) == 0: | ||
| 1212 | continue | ||
| 1213 | |||
| 1214 | @@ -122,8 +122,8 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1215 | """ % '\n\n'.join(sections) | ||
| 1216 | |||
| 1217 | def _generate_typedefs(self, domains): | ||
| 1218 | - sections = map(self._generate_typedefs_for_domain, domains) | ||
| 1219 | - sections = filter(lambda text: len(text) > 0, sections) | ||
| 1220 | + sections = list(map(self._generate_typedefs_for_domain, domains)) | ||
| 1221 | + sections = [text for text in sections if len(text) > 0] | ||
| 1222 | |||
| 1223 | if len(sections) == 0: | ||
| 1224 | return '' | ||
| 1225 | @@ -133,8 +133,8 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1226 | // End of typedefs.""" % '\n\n'.join(sections) | ||
| 1227 | |||
| 1228 | def _generate_typedefs_for_domain(self, domain): | ||
| 1229 | - primitive_declarations = filter(lambda decl: isinstance(decl.type, AliasedType), domain.type_declarations) | ||
| 1230 | - array_declarations = filter(lambda decl: isinstance(decl.type, ArrayType), domain.type_declarations) | ||
| 1231 | + primitive_declarations = [decl for decl in domain.type_declarations if isinstance(decl.type, AliasedType)] | ||
| 1232 | + array_declarations = [decl for decl in domain.type_declarations if isinstance(decl.type, ArrayType)] | ||
| 1233 | if len(primitive_declarations) == 0 and len(array_declarations) == 0: | ||
| 1234 | return '' | ||
| 1235 | |||
| 1236 | @@ -170,7 +170,7 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1237 | elif isinstance(type_declaration.type, ObjectType): | ||
| 1238 | sections.append(self._generate_class_for_object_declaration(type_declaration, domain)) | ||
| 1239 | |||
| 1240 | - sections = filter(lambda section: len(section) > 0, sections) | ||
| 1241 | + sections = [section for section in sections if len(section) > 0] | ||
| 1242 | if len(sections) == 0: | ||
| 1243 | return '' | ||
| 1244 | |||
| 1245 | @@ -184,9 +184,9 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1246 | if len(type_declaration.type_members) == 0: | ||
| 1247 | return '' | ||
| 1248 | |||
| 1249 | - enum_members = filter(lambda member: isinstance(member.type, EnumType) and member.type.is_anonymous, type_declaration.type_members) | ||
| 1250 | - required_members = filter(lambda member: not member.is_optional, type_declaration.type_members) | ||
| 1251 | - optional_members = filter(lambda member: member.is_optional, type_declaration.type_members) | ||
| 1252 | + enum_members = [member for member in type_declaration.type_members if isinstance(member.type, EnumType) and member.type.is_anonymous] | ||
| 1253 | + required_members = [member for member in type_declaration.type_members if not member.is_optional] | ||
| 1254 | + optional_members = [member for member in type_declaration.type_members if member.is_optional] | ||
| 1255 | object_name = type_declaration.type_name | ||
| 1256 | |||
| 1257 | lines = [] | ||
| 1258 | @@ -244,7 +244,7 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1259 | else: | ||
| 1260 | return ' ' + line | ||
| 1261 | |||
| 1262 | - indented_lines = map(apply_indentation, self._generate_struct_for_enum_type(enum_member.member_name, enum_member.type)) | ||
| 1263 | + indented_lines = list(map(apply_indentation, self._generate_struct_for_enum_type(enum_member.member_name, enum_member.type))) | ||
| 1264 | return '\n'.join(indented_lines) | ||
| 1265 | |||
| 1266 | def _generate_struct_for_enum_type(self, enum_name, enum_type): | ||
| 1267 | @@ -258,7 +258,7 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1268 | |||
| 1269 | def _generate_builder_state_enum(self, type_declaration): | ||
| 1270 | lines = [] | ||
| 1271 | - required_members = filter(lambda member: not member.is_optional, type_declaration.type_members) | ||
| 1272 | + required_members = [member for member in type_declaration.type_members if not member.is_optional] | ||
| 1273 | enum_values = [] | ||
| 1274 | |||
| 1275 | lines.append(' enum {') | ||
| 1276 | @@ -323,7 +323,7 @@ class CppProtocolTypesHeaderGenerator(Generator): | ||
| 1277 | type_arguments = [] | ||
| 1278 | |||
| 1279 | for domain in self.domains_to_generate(): | ||
| 1280 | - declarations_to_generate = filter(lambda decl: self.type_needs_shape_assertions(decl.type), domain.type_declarations) | ||
| 1281 | + declarations_to_generate = [decl for decl in domain.type_declarations if self.type_needs_shape_assertions(decl.type)] | ||
| 1282 | |||
| 1283 | for type_declaration in declarations_to_generate: | ||
| 1284 | for type_member in type_declaration.type_members: | ||
| 1285 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py | ||
| 1286 | index 2c263b504..903278bfb 100755 | ||
| 1287 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py | ||
| 1288 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py | ||
| 1289 | @@ -29,10 +29,10 @@ import logging | ||
| 1290 | import string | ||
| 1291 | from string import Template | ||
| 1292 | |||
| 1293 | -from cpp_generator import CppGenerator | ||
| 1294 | -from cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1295 | -from generator import Generator, ucfirst | ||
| 1296 | -from models import AliasedType, ArrayType, EnumType, ObjectType | ||
| 1297 | +from .cpp_generator import CppGenerator | ||
| 1298 | +from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates | ||
| 1299 | +from .generator import Generator, ucfirst | ||
| 1300 | +from .models import AliasedType, ArrayType, EnumType, ObjectType | ||
| 1301 | |||
| 1302 | log = logging.getLogger('global') | ||
| 1303 | |||
| 1304 | @@ -61,8 +61,8 @@ class CppProtocolTypesImplementationGenerator(Generator): | ||
| 1305 | sections.append('namespace Protocol {') | ||
| 1306 | sections.append(self._generate_enum_mapping()) | ||
| 1307 | sections.append(self._generate_open_field_names()) | ||
| 1308 | - builder_sections = map(self._generate_builders_for_domain, domains) | ||
| 1309 | - sections.extend(filter(lambda section: len(section) > 0, builder_sections)) | ||
| 1310 | + builder_sections = list(map(self._generate_builders_for_domain, domains)) | ||
| 1311 | + sections.extend([section for section in builder_sections if len(section) > 0]) | ||
| 1312 | sections.append('} // namespace Protocol') | ||
| 1313 | sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) | ||
| 1314 | |||
| 1315 | @@ -84,7 +84,7 @@ class CppProtocolTypesImplementationGenerator(Generator): | ||
| 1316 | def _generate_open_field_names(self): | ||
| 1317 | lines = [] | ||
| 1318 | for domain in self.domains_to_generate(): | ||
| 1319 | - for type_declaration in filter(lambda decl: Generator.type_has_open_fields(decl.type), domain.type_declarations): | ||
| 1320 | + for type_declaration in [decl for decl in domain.type_declarations if Generator.type_has_open_fields(decl.type)]: | ||
| 1321 | for type_member in sorted(type_declaration.type_members, key=lambda member: member.member_name): | ||
| 1322 | field_name = '::'.join(['Inspector', 'Protocol', domain.domain_name, ucfirst(type_declaration.type_name), ucfirst(type_member.member_name)]) | ||
| 1323 | lines.append('const char* %s = "%s";' % (field_name, type_member.member_name)) | ||
| 1324 | @@ -93,7 +93,7 @@ class CppProtocolTypesImplementationGenerator(Generator): | ||
| 1325 | |||
| 1326 | def _generate_builders_for_domain(self, domain): | ||
| 1327 | sections = [] | ||
| 1328 | - declarations_to_generate = filter(lambda decl: self.type_needs_shape_assertions(decl.type), domain.type_declarations) | ||
| 1329 | + declarations_to_generate = [decl for decl in domain.type_declarations if self.type_needs_shape_assertions(decl.type)] | ||
| 1330 | |||
| 1331 | for type_declaration in declarations_to_generate: | ||
| 1332 | for type_member in type_declaration.type_members: | ||
| 1333 | @@ -114,8 +114,8 @@ class CppProtocolTypesImplementationGenerator(Generator): | ||
| 1334 | return Template(CppTemplates.ProtocolObjectRuntimeCast).substitute(None, **args) | ||
| 1335 | |||
| 1336 | def _generate_assertion_for_object_declaration(self, object_declaration): | ||
| 1337 | - required_members = filter(lambda member: not member.is_optional, object_declaration.type_members) | ||
| 1338 | - optional_members = filter(lambda member: member.is_optional, object_declaration.type_members) | ||
| 1339 | + required_members = [member for member in object_declaration.type_members if not member.is_optional] | ||
| 1340 | + optional_members = [member for member in object_declaration.type_members if member.is_optional] | ||
| 1341 | should_count_properties = not Generator.type_has_open_fields(object_declaration.type) | ||
| 1342 | lines = [] | ||
| 1343 | |||
| 1344 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py | ||
| 1345 | index 3392c7845..bd8f33164 100755 | ||
| 1346 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py | ||
| 1347 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py | ||
| 1348 | @@ -29,9 +29,9 @@ import logging | ||
| 1349 | import string | ||
| 1350 | from string import Template | ||
| 1351 | |||
| 1352 | -from generator import Generator, ucfirst | ||
| 1353 | -from generator_templates import GeneratorTemplates as Templates | ||
| 1354 | -from models import EnumType | ||
| 1355 | +from .generator import Generator, ucfirst | ||
| 1356 | +from .generator_templates import GeneratorTemplates as Templates | ||
| 1357 | +from .models import EnumType | ||
| 1358 | |||
| 1359 | log = logging.getLogger('global') | ||
| 1360 | |||
| 1361 | @@ -45,15 +45,15 @@ class JSBackendCommandsGenerator(Generator): | ||
| 1362 | |||
| 1363 | def domains_to_generate(self): | ||
| 1364 | def should_generate_domain(domain): | ||
| 1365 | - domain_enum_types = filter(lambda declaration: isinstance(declaration.type, EnumType), domain.type_declarations) | ||
| 1366 | + domain_enum_types = [declaration for declaration in domain.type_declarations if isinstance(declaration.type, EnumType)] | ||
| 1367 | return len(domain.commands) > 0 or len(domain.events) > 0 or len(domain_enum_types) > 0 | ||
| 1368 | |||
| 1369 | - return filter(should_generate_domain, Generator.domains_to_generate(self)) | ||
| 1370 | + return list(filter(should_generate_domain, Generator.domains_to_generate(self))) | ||
| 1371 | |||
| 1372 | def generate_output(self): | ||
| 1373 | sections = [] | ||
| 1374 | sections.append(self.generate_license()) | ||
| 1375 | - sections.extend(map(self.generate_domain, self.domains_to_generate())) | ||
| 1376 | + sections.extend(list(map(self.generate_domain, self.domains_to_generate()))) | ||
| 1377 | return "\n\n".join(sections) | ||
| 1378 | |||
| 1379 | def generate_domain(self, domain): | ||
| 1380 | @@ -64,7 +64,7 @@ class JSBackendCommandsGenerator(Generator): | ||
| 1381 | |||
| 1382 | lines.append('// %(domain)s.' % args) | ||
| 1383 | |||
| 1384 | - has_async_commands = any(map(lambda command: command.is_async, domain.commands)) | ||
| 1385 | + has_async_commands = any([command.is_async for command in domain.commands]) | ||
| 1386 | if len(domain.events) > 0 or has_async_commands: | ||
| 1387 | lines.append('InspectorBackend.register%(domain)sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "%(domain)s");' % args) | ||
| 1388 | |||
| 1389 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py | ||
| 1390 | index d56a0b178..809641d38 100755 | ||
| 1391 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py | ||
| 1392 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py | ||
| 1393 | @@ -30,11 +30,11 @@ import string | ||
| 1394 | import re | ||
| 1395 | from string import Template | ||
| 1396 | |||
| 1397 | -from cpp_generator import CppGenerator | ||
| 1398 | -from generator import Generator | ||
| 1399 | -from models import Frameworks | ||
| 1400 | -from objc_generator import ObjCGenerator | ||
| 1401 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1402 | +from .cpp_generator import CppGenerator | ||
| 1403 | +from .generator import Generator | ||
| 1404 | +from .models import Frameworks | ||
| 1405 | +from .objc_generator import ObjCGenerator | ||
| 1406 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1407 | |||
| 1408 | log = logging.getLogger('global') | ||
| 1409 | |||
| 1410 | @@ -47,7 +47,7 @@ class ObjCBackendDispatcherHeaderGenerator(Generator): | ||
| 1411 | return '%sBackendDispatchers.h' % ObjCGenerator.OBJC_PREFIX | ||
| 1412 | |||
| 1413 | def domains_to_generate(self): | ||
| 1414 | - return filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), Generator.domains_to_generate(self)) | ||
| 1415 | + return list(filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), Generator.domains_to_generate(self))) | ||
| 1416 | |||
| 1417 | def generate_output(self): | ||
| 1418 | headers = [ | ||
| 1419 | @@ -65,7 +65,7 @@ class ObjCBackendDispatcherHeaderGenerator(Generator): | ||
| 1420 | sections = [] | ||
| 1421 | sections.append(self.generate_license()) | ||
| 1422 | sections.append(Template(ObjCTemplates.BackendDispatcherHeaderPrelude).substitute(None, **header_args)) | ||
| 1423 | - sections.extend(map(self._generate_objc_handler_declarations_for_domain, domains)) | ||
| 1424 | + sections.extend(list(map(self._generate_objc_handler_declarations_for_domain, domains))) | ||
| 1425 | sections.append(Template(ObjCTemplates.BackendDispatcherHeaderPostlude).substitute(None, **header_args)) | ||
| 1426 | return '\n\n'.join(sections) | ||
| 1427 | |||
| 1428 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py | ||
| 1429 | index 42afd99cf..d35d3f14a 100755 | ||
| 1430 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py | ||
| 1431 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py | ||
| 1432 | @@ -30,11 +30,11 @@ import string | ||
| 1433 | import re | ||
| 1434 | from string import Template | ||
| 1435 | |||
| 1436 | -from cpp_generator import CppGenerator | ||
| 1437 | -from generator import Generator | ||
| 1438 | -from models import PrimitiveType, EnumType, AliasedType, Frameworks | ||
| 1439 | -from objc_generator import ObjCTypeCategory, ObjCGenerator, join_type_and_name | ||
| 1440 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1441 | +from .cpp_generator import CppGenerator | ||
| 1442 | +from .generator import Generator | ||
| 1443 | +from .models import PrimitiveType, EnumType, AliasedType, Frameworks | ||
| 1444 | +from .objc_generator import ObjCTypeCategory, ObjCGenerator, join_type_and_name | ||
| 1445 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1446 | |||
| 1447 | log = logging.getLogger('global') | ||
| 1448 | |||
| 1449 | @@ -47,7 +47,7 @@ class ObjCConfigurationImplementationGenerator(Generator): | ||
| 1450 | return '%sBackendDispatchers.mm' % ObjCGenerator.OBJC_PREFIX | ||
| 1451 | |||
| 1452 | def domains_to_generate(self): | ||
| 1453 | - return filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), Generator.domains_to_generate(self)) | ||
| 1454 | + return list(filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), Generator.domains_to_generate(self))) | ||
| 1455 | |||
| 1456 | def generate_output(self): | ||
| 1457 | secondary_headers = [ | ||
| 1458 | @@ -65,7 +65,7 @@ class ObjCConfigurationImplementationGenerator(Generator): | ||
| 1459 | sections = [] | ||
| 1460 | sections.append(self.generate_license()) | ||
| 1461 | sections.append(Template(ObjCTemplates.BackendDispatcherImplementationPrelude).substitute(None, **header_args)) | ||
| 1462 | - sections.extend(map(self._generate_handler_implementation_for_domain, domains)) | ||
| 1463 | + sections.extend(list(map(self._generate_handler_implementation_for_domain, domains))) | ||
| 1464 | sections.append(Template(ObjCTemplates.BackendDispatcherImplementationPostlude).substitute(None, **header_args)) | ||
| 1465 | return '\n\n'.join(sections) | ||
| 1466 | |||
| 1467 | @@ -112,7 +112,7 @@ class ObjCConfigurationImplementationGenerator(Generator): | ||
| 1468 | if command.return_parameters: | ||
| 1469 | lines.append(' Ref<InspectorObject> resultObject = InspectorObject::create();') | ||
| 1470 | |||
| 1471 | - required_pointer_parameters = filter(lambda parameter: not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), command.return_parameters) | ||
| 1472 | + required_pointer_parameters = [parameter for parameter in command.return_parameters if not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] | ||
| 1473 | for parameter in required_pointer_parameters: | ||
| 1474 | var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) | ||
| 1475 | lines.append(' THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(%s, @"%s");' % (var_name, var_name)) | ||
| 1476 | @@ -120,7 +120,7 @@ class ObjCConfigurationImplementationGenerator(Generator): | ||
| 1477 | if objc_array_class and objc_array_class.startswith(ObjCGenerator.OBJC_PREFIX): | ||
| 1478 | lines.append(' THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(%s, [%s class]);' % (var_name, objc_array_class)) | ||
| 1479 | |||
| 1480 | - optional_pointer_parameters = filter(lambda parameter: parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), command.return_parameters) | ||
| 1481 | + optional_pointer_parameters = [parameter for parameter in command.return_parameters if parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] | ||
| 1482 | for parameter in optional_pointer_parameters: | ||
| 1483 | var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) | ||
| 1484 | lines.append(' THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(%s, @"%s");' % (var_name, var_name)) | ||
| 1485 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py | ||
| 1486 | index 9b93f37f6..00f3860c7 100755 | ||
| 1487 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py | ||
| 1488 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py | ||
| 1489 | @@ -29,9 +29,9 @@ import logging | ||
| 1490 | import string | ||
| 1491 | from string import Template | ||
| 1492 | |||
| 1493 | -from generator import Generator | ||
| 1494 | -from objc_generator import ObjCGenerator | ||
| 1495 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1496 | +from .generator import Generator | ||
| 1497 | +from .objc_generator import ObjCGenerator | ||
| 1498 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1499 | |||
| 1500 | log = logging.getLogger('global') | ||
| 1501 | |||
| 1502 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py | ||
| 1503 | index 735abbca3..2db503c0b 100755 | ||
| 1504 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py | ||
| 1505 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py | ||
| 1506 | @@ -29,9 +29,9 @@ import logging | ||
| 1507 | import string | ||
| 1508 | from string import Template | ||
| 1509 | |||
| 1510 | -from generator import Generator | ||
| 1511 | -from objc_generator import ObjCGenerator | ||
| 1512 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1513 | +from .generator import Generator | ||
| 1514 | +from .objc_generator import ObjCGenerator | ||
| 1515 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1516 | |||
| 1517 | log = logging.getLogger('global') | ||
| 1518 | |||
| 1519 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_conversion_helpers.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_conversion_helpers.py | ||
| 1520 | index c31e991e3..7a23251b1 100755 | ||
| 1521 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_conversion_helpers.py | ||
| 1522 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_conversion_helpers.py | ||
| 1523 | @@ -29,10 +29,10 @@ import logging | ||
| 1524 | import string | ||
| 1525 | from string import Template | ||
| 1526 | |||
| 1527 | -from generator import Generator | ||
| 1528 | -from models import EnumType | ||
| 1529 | -from objc_generator import ObjCGenerator | ||
| 1530 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1531 | +from .generator import Generator | ||
| 1532 | +from .models import EnumType | ||
| 1533 | +from .objc_generator import ObjCGenerator | ||
| 1534 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1535 | |||
| 1536 | log = logging.getLogger('global') | ||
| 1537 | |||
| 1538 | @@ -51,7 +51,7 @@ class ObjCConversionHelpersGenerator(Generator): | ||
| 1539 | return '%sEnumConversionHelpers.h' % ObjCGenerator.OBJC_PREFIX | ||
| 1540 | |||
| 1541 | def domains_to_generate(self): | ||
| 1542 | - return filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), Generator.domains_to_generate(self)) | ||
| 1543 | + return list(filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), Generator.domains_to_generate(self))) | ||
| 1544 | |||
| 1545 | def generate_output(self): | ||
| 1546 | headers = [ | ||
| 1547 | @@ -67,7 +67,7 @@ class ObjCConversionHelpersGenerator(Generator): | ||
| 1548 | sections.append(self.generate_license()) | ||
| 1549 | sections.append(Template(ObjCTemplates.ConversionHelpersPrelude).substitute(None, **header_args)) | ||
| 1550 | sections.append(Template(ObjCTemplates.ConversionHelpersStandard).substitute(None)) | ||
| 1551 | - sections.extend(map(self._generate_enum_conversion_functions, domains)) | ||
| 1552 | + sections.extend(list(map(self._generate_enum_conversion_functions, domains))) | ||
| 1553 | sections.append(Template(ObjCTemplates.ConversionHelpersPostlude).substitute(None, **header_args)) | ||
| 1554 | return '\n\n'.join(sections) | ||
| 1555 | |||
| 1556 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | ||
| 1557 | index 0030ed5ee..101c09e9f 100755 | ||
| 1558 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | ||
| 1559 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | ||
| 1560 | @@ -29,10 +29,10 @@ import logging | ||
| 1561 | import string | ||
| 1562 | from string import Template | ||
| 1563 | |||
| 1564 | -from cpp_generator import CppGenerator | ||
| 1565 | -from generator import Generator, ucfirst | ||
| 1566 | -from objc_generator import ObjCGenerator | ||
| 1567 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1568 | +from .cpp_generator import CppGenerator | ||
| 1569 | +from .generator import Generator, ucfirst | ||
| 1570 | +from .objc_generator import ObjCGenerator | ||
| 1571 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1572 | |||
| 1573 | log = logging.getLogger('global') | ||
| 1574 | |||
| 1575 | @@ -45,7 +45,7 @@ class ObjCFrontendDispatcherImplementationGenerator(Generator): | ||
| 1576 | return '%sEventDispatchers.mm' % ObjCGenerator.OBJC_PREFIX | ||
| 1577 | |||
| 1578 | def domains_to_generate(self): | ||
| 1579 | - return filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), Generator.domains_to_generate(self)) | ||
| 1580 | + return list(filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), Generator.domains_to_generate(self))) | ||
| 1581 | |||
| 1582 | def generate_output(self): | ||
| 1583 | secondary_headers = [ | ||
| 1584 | @@ -62,7 +62,7 @@ class ObjCFrontendDispatcherImplementationGenerator(Generator): | ||
| 1585 | sections = [] | ||
| 1586 | sections.append(self.generate_license()) | ||
| 1587 | sections.append(Template(ObjCTemplates.ImplementationPrelude).substitute(None, **header_args)) | ||
| 1588 | - sections.extend(map(self._generate_event_dispatcher_implementations, domains)) | ||
| 1589 | + sections.extend(list(map(self._generate_event_dispatcher_implementations, domains))) | ||
| 1590 | sections.append(Template(ObjCTemplates.ImplementationPostlude).substitute(None, **header_args)) | ||
| 1591 | return '\n\n'.join(sections) | ||
| 1592 | |||
| 1593 | @@ -100,7 +100,7 @@ class ObjCFrontendDispatcherImplementationGenerator(Generator): | ||
| 1594 | lines.append(' const FrontendRouter& router = _controller->frontendRouter();') | ||
| 1595 | lines.append('') | ||
| 1596 | |||
| 1597 | - required_pointer_parameters = filter(lambda parameter: not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), event.event_parameters) | ||
| 1598 | + required_pointer_parameters = [parameter for parameter in event.event_parameters if not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] | ||
| 1599 | for parameter in required_pointer_parameters: | ||
| 1600 | var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) | ||
| 1601 | lines.append(' THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(%s, @"%s");' % (var_name, var_name)) | ||
| 1602 | @@ -108,7 +108,7 @@ class ObjCFrontendDispatcherImplementationGenerator(Generator): | ||
| 1603 | if objc_array_class and objc_array_class.startswith(ObjCGenerator.OBJC_PREFIX): | ||
| 1604 | lines.append(' THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(%s, [%s class]);' % (var_name, objc_array_class)) | ||
| 1605 | |||
| 1606 | - optional_pointer_parameters = filter(lambda parameter: parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), event.event_parameters) | ||
| 1607 | + optional_pointer_parameters = [parameter for parameter in event.event_parameters if parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] | ||
| 1608 | for parameter in optional_pointer_parameters: | ||
| 1609 | var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) | ||
| 1610 | lines.append(' THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(%s, @"%s");' % (var_name, var_name)) | ||
| 1611 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py | ||
| 1612 | index 7e8e61030..1b0059a7a 100755 | ||
| 1613 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py | ||
| 1614 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py | ||
| 1615 | @@ -29,10 +29,10 @@ import logging | ||
| 1616 | import string | ||
| 1617 | from string import Template | ||
| 1618 | |||
| 1619 | -from generator import Generator, ucfirst | ||
| 1620 | -from models import ObjectType, EnumType | ||
| 1621 | -from objc_generator import ObjCGenerator, join_type_and_name | ||
| 1622 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1623 | +from .generator import Generator, ucfirst | ||
| 1624 | +from .models import ObjectType, EnumType | ||
| 1625 | +from .objc_generator import ObjCGenerator, join_type_and_name | ||
| 1626 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1627 | |||
| 1628 | log = logging.getLogger('global') | ||
| 1629 | |||
| 1630 | @@ -60,9 +60,9 @@ class ObjCHeaderGenerator(Generator): | ||
| 1631 | } | ||
| 1632 | |||
| 1633 | domains = self.domains_to_generate() | ||
| 1634 | - type_domains = filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), domains) | ||
| 1635 | - command_domains = filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), domains) | ||
| 1636 | - event_domains = filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), domains) | ||
| 1637 | + type_domains = list(filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), domains)) | ||
| 1638 | + command_domains = list(filter(ObjCGenerator.should_generate_domain_command_handler_filter(self.model()), domains)) | ||
| 1639 | + event_domains = list(filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), domains)) | ||
| 1640 | |||
| 1641 | # FIXME: <https://webkit.org/b/138222> Web Inspector: Reduce unnecessary enums/types generated in ObjC Protocol Interfaces | ||
| 1642 | # Currently we generate enums/types for all types in the type_domains. For the built-in | ||
| 1643 | @@ -72,11 +72,11 @@ class ObjCHeaderGenerator(Generator): | ||
| 1644 | sections = [] | ||
| 1645 | sections.append(self.generate_license()) | ||
| 1646 | sections.append(Template(ObjCTemplates.HeaderPrelude).substitute(None, **header_args)) | ||
| 1647 | - sections.append('\n'.join(filter(None, map(self._generate_forward_declarations, type_domains)))) | ||
| 1648 | - sections.append('\n'.join(filter(None, map(self._generate_enums, type_domains)))) | ||
| 1649 | - sections.append('\n'.join(filter(None, map(self._generate_types, type_domains)))) | ||
| 1650 | - sections.append('\n\n'.join(filter(None, map(self._generate_command_protocols, command_domains)))) | ||
| 1651 | - sections.append('\n\n'.join(filter(None, map(self._generate_event_interfaces, event_domains)))) | ||
| 1652 | + sections.append('\n'.join([_f for _f in map(self._generate_forward_declarations, type_domains) if _f])) | ||
| 1653 | + sections.append('\n'.join([_f for _f in map(self._generate_enums, type_domains) if _f])) | ||
| 1654 | + sections.append('\n'.join([_f for _f in map(self._generate_types, type_domains) if _f])) | ||
| 1655 | + sections.append('\n\n'.join([_f for _f in map(self._generate_command_protocols, command_domains) if _f])) | ||
| 1656 | + sections.append('\n\n'.join([_f for _f in map(self._generate_event_interfaces, event_domains) if _f])) | ||
| 1657 | sections.append(Template(ObjCTemplates.HeaderPostlude).substitute(None)) | ||
| 1658 | return '\n\n'.join(sections) | ||
| 1659 | |||
| 1660 | @@ -156,8 +156,8 @@ class ObjCHeaderGenerator(Generator): | ||
| 1661 | objc_name = ObjCGenerator.objc_name_for_type(declaration.type) | ||
| 1662 | lines.append('__attribute__((visibility ("default")))') | ||
| 1663 | lines.append('@interface %s : %s' % (objc_name, ObjCGenerator.OBJC_JSON_OBJECT_BASE)) | ||
| 1664 | - required_members = filter(lambda member: not member.is_optional, declaration.type_members) | ||
| 1665 | - optional_members = filter(lambda member: member.is_optional, declaration.type_members) | ||
| 1666 | + required_members = [member for member in declaration.type_members if not member.is_optional] | ||
| 1667 | + optional_members = [member for member in declaration.type_members if member.is_optional] | ||
| 1668 | if required_members: | ||
| 1669 | lines.append(self._generate_init_method_for_required_members(domain, declaration, required_members)) | ||
| 1670 | for member in required_members: | ||
| 1671 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py | ||
| 1672 | index 40802ff17..f21b16222 100755 | ||
| 1673 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py | ||
| 1674 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py | ||
| 1675 | @@ -29,9 +29,9 @@ import logging | ||
| 1676 | import string | ||
| 1677 | from string import Template | ||
| 1678 | |||
| 1679 | -from generator import Generator, ucfirst | ||
| 1680 | -from objc_generator import ObjCGenerator | ||
| 1681 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1682 | +from .generator import Generator, ucfirst | ||
| 1683 | +from .objc_generator import ObjCGenerator | ||
| 1684 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1685 | |||
| 1686 | log = logging.getLogger('global') | ||
| 1687 | |||
| 1688 | @@ -56,12 +56,12 @@ class ObjCInternalHeaderGenerator(Generator): | ||
| 1689 | } | ||
| 1690 | |||
| 1691 | domains = self.domains_to_generate() | ||
| 1692 | - event_domains = filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), domains) | ||
| 1693 | + event_domains = list(filter(ObjCGenerator.should_generate_domain_event_dispatcher_filter(self.model()), domains)) | ||
| 1694 | |||
| 1695 | sections = [] | ||
| 1696 | sections.append(self.generate_license()) | ||
| 1697 | sections.append(Template(ObjCTemplates.GenericHeaderPrelude).substitute(None, **header_args)) | ||
| 1698 | - sections.append('\n\n'.join(filter(None, map(self._generate_event_dispatcher_private_interfaces, event_domains)))) | ||
| 1699 | + sections.append('\n\n'.join([_f for _f in map(self._generate_event_dispatcher_private_interfaces, event_domains) if _f])) | ||
| 1700 | sections.append(Template(ObjCTemplates.GenericHeaderPostlude).substitute(None, **header_args)) | ||
| 1701 | return '\n\n'.join(sections) | ||
| 1702 | |||
| 1703 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py | ||
| 1704 | index 95b57f671..8a6aac035 100755 | ||
| 1705 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py | ||
| 1706 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py | ||
| 1707 | @@ -29,10 +29,10 @@ import logging | ||
| 1708 | import string | ||
| 1709 | from string import Template | ||
| 1710 | |||
| 1711 | -from generator import Generator, ucfirst | ||
| 1712 | -from models import ObjectType | ||
| 1713 | -from objc_generator import ObjCGenerator | ||
| 1714 | -from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1715 | +from .generator import Generator, ucfirst | ||
| 1716 | +from .models import ObjectType | ||
| 1717 | +from .objc_generator import ObjCGenerator | ||
| 1718 | +from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates | ||
| 1719 | |||
| 1720 | log = logging.getLogger('global') | ||
| 1721 | |||
| 1722 | @@ -51,7 +51,7 @@ class ObjCProtocolTypesImplementationGenerator(Generator): | ||
| 1723 | return '%sTypes.mm' % ObjCGenerator.OBJC_PREFIX | ||
| 1724 | |||
| 1725 | def domains_to_generate(self): | ||
| 1726 | - return filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), Generator.domains_to_generate(self)) | ||
| 1727 | + return list(filter(ObjCGenerator.should_generate_domain_types_filter(self.model()), Generator.domains_to_generate(self))) | ||
| 1728 | |||
| 1729 | def generate_output(self): | ||
| 1730 | secondary_headers = [ | ||
| 1731 | @@ -69,7 +69,7 @@ class ObjCProtocolTypesImplementationGenerator(Generator): | ||
| 1732 | sections = [] | ||
| 1733 | sections.append(self.generate_license()) | ||
| 1734 | sections.append(Template(ObjCTemplates.ImplementationPrelude).substitute(None, **header_args)) | ||
| 1735 | - sections.extend(map(self.generate_type_implementations, domains)) | ||
| 1736 | + sections.extend(list(map(self.generate_type_implementations, domains))) | ||
| 1737 | sections.append(Template(ObjCTemplates.ImplementationPostlude).substitute(None, **header_args)) | ||
| 1738 | return '\n\n'.join(sections) | ||
| 1739 | |||
| 1740 | @@ -84,7 +84,7 @@ class ObjCProtocolTypesImplementationGenerator(Generator): | ||
| 1741 | def generate_type_implementation(self, domain, declaration): | ||
| 1742 | lines = [] | ||
| 1743 | lines.append('@implementation %s' % ObjCGenerator.objc_name_for_type(declaration.type)) | ||
| 1744 | - required_members = filter(lambda member: not member.is_optional, declaration.type_members) | ||
| 1745 | + required_members = [member for member in declaration.type_members if not member.is_optional] | ||
| 1746 | if required_members: | ||
| 1747 | lines.append('') | ||
| 1748 | lines.append(self._generate_init_method_for_required_members(domain, declaration, required_members)) | ||
| 1749 | @@ -112,7 +112,7 @@ class ObjCProtocolTypesImplementationGenerator(Generator): | ||
| 1750 | lines.append(' return nil;') | ||
| 1751 | lines.append('') | ||
| 1752 | |||
| 1753 | - required_pointer_members = filter(lambda member: ObjCGenerator.is_type_objc_pointer_type(member.type), required_members) | ||
| 1754 | + required_pointer_members = [member for member in required_members if ObjCGenerator.is_type_objc_pointer_type(member.type)] | ||
| 1755 | if required_pointer_members: | ||
| 1756 | for member in required_pointer_members: | ||
| 1757 | var_name = ObjCGenerator.identifier_to_objc_identifier(member.member_name) | ||
| 1758 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/generator.py b/Source/JavaScriptCore/inspector/scripts/codegen/generator.py | ||
| 1759 | index 4c8f1998e..0ed011136 100755 | ||
| 1760 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/generator.py | ||
| 1761 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/generator.py | ||
| 1762 | @@ -29,8 +29,8 @@ import os.path | ||
| 1763 | import re | ||
| 1764 | from string import Template | ||
| 1765 | |||
| 1766 | -from generator_templates import GeneratorTemplates as Templates | ||
| 1767 | -from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 1768 | +from .generator_templates import GeneratorTemplates as Templates | ||
| 1769 | +from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 1770 | |||
| 1771 | log = logging.getLogger('global') | ||
| 1772 | |||
| 1773 | @@ -87,7 +87,7 @@ class Generator: | ||
| 1774 | |||
| 1775 | # These methods are overridden by subclasses. | ||
| 1776 | def non_supplemental_domains(self): | ||
| 1777 | - return filter(lambda domain: not domain.is_supplemental, self.model().domains) | ||
| 1778 | + return [domain for domain in self.model().domains if not domain.is_supplemental] | ||
| 1779 | |||
| 1780 | def domains_to_generate(self): | ||
| 1781 | return self.non_supplemental_domains() | ||
| 1782 | @@ -129,7 +129,7 @@ class Generator: | ||
| 1783 | # set of types will not be automatically regenerated on subsequent calls to | ||
| 1784 | # Generator.types_needing_shape_assertions(). | ||
| 1785 | def calculate_types_requiring_shape_assertions(self, domains): | ||
| 1786 | - domain_names = map(lambda domain: domain.domain_name, domains) | ||
| 1787 | + domain_names = [domain.domain_name for domain in domains] | ||
| 1788 | log.debug("> Calculating types that need shape assertions (eligible domains: %s)" % ", ".join(domain_names)) | ||
| 1789 | |||
| 1790 | # Mutates the passed-in set; this simplifies checks to prevent infinite recursion. | ||
| 1791 | @@ -185,7 +185,7 @@ class Generator: | ||
| 1792 | for _type in all_types: | ||
| 1793 | if not isinstance(_type, EnumType): | ||
| 1794 | continue | ||
| 1795 | - map(self._assign_encoding_for_enum_value, _type.enum_values()) | ||
| 1796 | + list(map(self._assign_encoding_for_enum_value, _type.enum_values())) | ||
| 1797 | |||
| 1798 | def _assign_encoding_for_enum_value(self, enum_value): | ||
| 1799 | if enum_value in self._enum_value_encodings: | ||
| 1800 | @@ -219,7 +219,7 @@ class Generator: | ||
| 1801 | return match.group(1).upper() | ||
| 1802 | |||
| 1803 | # Split on hyphen, introduce camelcase, and force uppercasing of acronyms. | ||
| 1804 | - subwords = map(ucfirst, enum_value.split('-')) | ||
| 1805 | + subwords = list(map(ucfirst, enum_value.split('-'))) | ||
| 1806 | return re.sub(re.compile(regex, re.IGNORECASE), replaceCallback, "".join(subwords)) | ||
| 1807 | |||
| 1808 | @staticmethod | ||
| 1809 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/models.py b/Source/JavaScriptCore/inspector/scripts/codegen/models.py | ||
| 1810 | index ec16a1291..426ab4b2b 100755 | ||
| 1811 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/models.py | ||
| 1812 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/models.py | ||
| 1813 | @@ -35,7 +35,7 @@ def ucfirst(str): | ||
| 1814 | |||
| 1815 | |||
| 1816 | def find_duplicates(l): | ||
| 1817 | - return [key for key, count in collections.Counter(l).items() if count > 1] | ||
| 1818 | + return [key for key, count in list(collections.Counter(l).items()) if count > 1] | ||
| 1819 | |||
| 1820 | |||
| 1821 | _FRAMEWORK_CONFIG_MAP = { | ||
| 1822 | diff --git a/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py b/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | ||
| 1823 | index f6dd03cb5..00015dc2b 100755 | ||
| 1824 | --- a/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | ||
| 1825 | +++ b/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | ||
| 1826 | @@ -24,8 +24,8 @@ | ||
| 1827 | # THE POSSIBILITY OF SUCH DAMAGE. | ||
| 1828 | |||
| 1829 | import logging | ||
| 1830 | -from generator import Generator, ucfirst | ||
| 1831 | -from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 1832 | +from .generator import Generator, ucfirst | ||
| 1833 | +from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks | ||
| 1834 | |||
| 1835 | log = logging.getLogger('global') | ||
| 1836 | |||
| 1837 | @@ -50,7 +50,7 @@ _OBJC_IDENTIFIER_RENAME_MAP = { | ||
| 1838 | 'id': 'identifier', # Page.Frame.id, Runtime.ExecutionContextDescription.id, Debugger.BreakpointAction.id | ||
| 1839 | } | ||
| 1840 | |||
| 1841 | -_OBJC_IDENTIFIER_REVERSE_RENAME_MAP = dict((v, k) for k, v in _OBJC_IDENTIFIER_RENAME_MAP.iteritems()) | ||
| 1842 | +_OBJC_IDENTIFIER_REVERSE_RENAME_MAP = dict((v, k) for k, v in list(_OBJC_IDENTIFIER_RENAME_MAP.items())) | ||
| 1843 | |||
| 1844 | |||
| 1845 | class ObjCTypeCategory: | ||
| 1846 | @@ -62,11 +62,11 @@ class ObjCTypeCategory: | ||
| 1847 | @staticmethod | ||
| 1848 | def category_for_type(_type): | ||
| 1849 | if (isinstance(_type, PrimitiveType)): | ||
| 1850 | - if _type.raw_name() is 'string': | ||
| 1851 | + if _type.raw_name() == 'string': | ||
| 1852 | return ObjCTypeCategory.String | ||
| 1853 | if _type.raw_name() in ['object', 'any']: | ||
| 1854 | return ObjCTypeCategory.Object | ||
| 1855 | - if _type.raw_name() is 'array': | ||
| 1856 | + if _type.raw_name() == 'array': | ||
| 1857 | return ObjCTypeCategory.Array | ||
| 1858 | return ObjCTypeCategory.Simple | ||
| 1859 | if (isinstance(_type, ObjectType)): | ||
| 1860 | @@ -192,15 +192,15 @@ class ObjCGenerator: | ||
| 1861 | |||
| 1862 | @staticmethod | ||
| 1863 | def objc_type_for_raw_name(raw_name): | ||
| 1864 | - if raw_name is 'string': | ||
| 1865 | + if raw_name == 'string': | ||
| 1866 | return 'NSString *' | ||
| 1867 | - if raw_name is 'array': | ||
| 1868 | + if raw_name == 'array': | ||
| 1869 | return 'NSArray *' | ||
| 1870 | - if raw_name is 'integer': | ||
| 1871 | + if raw_name == 'integer': | ||
| 1872 | return 'int' | ||
| 1873 | - if raw_name is 'number': | ||
| 1874 | + if raw_name == 'number': | ||
| 1875 | return 'double' | ||
| 1876 | - if raw_name is 'boolean': | ||
| 1877 | + if raw_name == 'boolean': | ||
| 1878 | return 'BOOL' | ||
| 1879 | if raw_name in ['any', 'object']: | ||
| 1880 | return '%s *' % ObjCGenerator.OBJC_JSON_OBJECT_BASE | ||
| 1881 | @@ -208,9 +208,9 @@ class ObjCGenerator: | ||
| 1882 | |||
| 1883 | @staticmethod | ||
| 1884 | def objc_class_for_raw_name(raw_name): | ||
| 1885 | - if raw_name is 'string': | ||
| 1886 | + if raw_name == 'string': | ||
| 1887 | return 'NSString' | ||
| 1888 | - if raw_name is 'array': | ||
| 1889 | + if raw_name == 'array': | ||
| 1890 | return 'NSArray' | ||
| 1891 | if raw_name in ['integer', 'number', 'boolean']: | ||
| 1892 | return 'NSNumber' | ||
| 1893 | @@ -222,13 +222,13 @@ class ObjCGenerator: | ||
| 1894 | |||
| 1895 | @staticmethod | ||
| 1896 | def protocol_type_for_raw_name(raw_name): | ||
| 1897 | - if raw_name is 'string': | ||
| 1898 | + if raw_name == 'string': | ||
| 1899 | return 'String' | ||
| 1900 | - if raw_name is 'integer': | ||
| 1901 | + if raw_name == 'integer': | ||
| 1902 | return 'int' | ||
| 1903 | - if raw_name is 'number': | ||
| 1904 | + if raw_name == 'number': | ||
| 1905 | return 'double' | ||
| 1906 | - if raw_name is 'boolean': | ||
| 1907 | + if raw_name == 'boolean': | ||
| 1908 | return 'bool' | ||
| 1909 | if raw_name in ['any', 'object']: | ||
| 1910 | return 'InspectorObject' | ||
| 1911 | @@ -370,11 +370,11 @@ class ObjCGenerator: | ||
| 1912 | objc_class = ObjCGenerator.objc_class_for_type(var_type.element_type) | ||
| 1913 | if protocol_type == 'Inspector::Protocol::Array<String>': | ||
| 1914 | return 'inspectorStringArrayArray(%s)' % var_name | ||
| 1915 | - if protocol_type is 'String' and objc_class is 'NSString': | ||
| 1916 | + if protocol_type == 'String' and objc_class == 'NSString': | ||
| 1917 | return 'inspectorStringArray(%s)' % var_name | ||
| 1918 | - if protocol_type is 'int' and objc_class is 'NSNumber': | ||
| 1919 | + if protocol_type == 'int' and objc_class == 'NSNumber': | ||
| 1920 | return 'inspectorIntegerArray(%s)' % var_name | ||
| 1921 | - if protocol_type is 'double' and objc_class is 'NSNumber': | ||
| 1922 | + if protocol_type == 'double' and objc_class == 'NSNumber': | ||
| 1923 | return 'inspectorDoubleArray(%s)' % var_name | ||
| 1924 | return 'inspectorObjectArray(%s)' % var_name | ||
| 1925 | |||
| 1926 | @@ -404,9 +404,9 @@ class ObjCGenerator: | ||
| 1927 | return '[[[%s alloc] initWithInspectorObject:%s] autorelease]' % (objc_class, var_name) | ||
| 1928 | if category is ObjCTypeCategory.Array: | ||
| 1929 | objc_class = ObjCGenerator.objc_class_for_type(var_type.element_type) | ||
| 1930 | - if objc_class is 'NSString': | ||
| 1931 | + if objc_class == 'NSString': | ||
| 1932 | return 'objcStringArray(%s)' % var_name | ||
| 1933 | - if objc_class is 'NSNumber': # FIXME: Integer or Double? | ||
| 1934 | + if objc_class == 'NSNumber': # FIXME: Integer or Double? | ||
| 1935 | return 'objcIntegerArray(%s)' % var_name | ||
| 1936 | return 'objcArray<%s>(%s)' % (objc_class, var_name) | ||
| 1937 | |||
| 1938 | @@ -425,11 +425,11 @@ class ObjCGenerator: | ||
| 1939 | return sub_expression | ||
| 1940 | if category is ObjCTypeCategory.Array: | ||
| 1941 | objc_class = ObjCGenerator.objc_class_for_type(member.type.element_type) | ||
| 1942 | - if objc_class is 'NSString': | ||
| 1943 | + if objc_class == 'NSString': | ||
| 1944 | return 'inspectorStringArray(%s)' % sub_expression | ||
| 1945 | - if objc_class is 'NSNumber': | ||
| 1946 | + if objc_class == 'NSNumber': | ||
| 1947 | protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type) | ||
| 1948 | - if protocol_type is 'double': | ||
| 1949 | + if protocol_type == 'double': | ||
| 1950 | return 'inspectorDoubleArray(%s)' % sub_expression | ||
| 1951 | return 'inspectorIntegerArray(%s)' % sub_expression | ||
| 1952 | return 'inspectorObjectArray(%s)' % sub_expression | ||
| 1953 | @@ -449,11 +449,11 @@ class ObjCGenerator: | ||
| 1954 | if category is ObjCTypeCategory.Array: | ||
| 1955 | protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type) | ||
| 1956 | objc_class = ObjCGenerator.objc_class_for_type(member.type.element_type) | ||
| 1957 | - if objc_class is 'NSString': | ||
| 1958 | + if objc_class == 'NSString': | ||
| 1959 | return 'objcStringArray(%s)' % sub_expression | ||
| 1960 | - if objc_class is 'NSNumber': | ||
| 1961 | + if objc_class == 'NSNumber': | ||
| 1962 | protocol_type = ObjCGenerator.protocol_type_for_type(member.type.element_type) | ||
| 1963 | - if protocol_type is 'double': | ||
| 1964 | + if protocol_type == 'double': | ||
| 1965 | return 'objcDoubleArray(%s)' % sub_expression | ||
| 1966 | return 'objcIntegerArray(%s)' % sub_expression | ||
| 1967 | return 'objcArray<%s>(%s)' % (objc_class, sub_expression) | ||
| 1968 | @@ -470,17 +470,17 @@ class ObjCGenerator: | ||
| 1969 | _type = _type.aliased_type | ||
| 1970 | if (isinstance(_type, PrimitiveType)): | ||
| 1971 | raw_name = _type.raw_name() | ||
| 1972 | - if raw_name is 'boolean': | ||
| 1973 | + if raw_name == 'boolean': | ||
| 1974 | return 'setBool' | ||
| 1975 | - if raw_name is 'integer': | ||
| 1976 | + if raw_name == 'integer': | ||
| 1977 | return 'setInteger' | ||
| 1978 | - if raw_name is 'number': | ||
| 1979 | + if raw_name == 'number': | ||
| 1980 | return 'setDouble' | ||
| 1981 | - if raw_name is 'string': | ||
| 1982 | + if raw_name == 'string': | ||
| 1983 | return 'setString' | ||
| 1984 | if raw_name in ['any', 'object']: | ||
| 1985 | return 'setObject' | ||
| 1986 | - if raw_name is 'array': | ||
| 1987 | + if raw_name == 'array': | ||
| 1988 | return 'setInspectorArray' | ||
| 1989 | return None | ||
| 1990 | if (isinstance(_type, EnumType)): | ||
| 1991 | @@ -501,17 +501,17 @@ class ObjCGenerator: | ||
| 1992 | _type = _type.aliased_type | ||
| 1993 | if (isinstance(_type, PrimitiveType)): | ||
| 1994 | raw_name = _type.raw_name() | ||
| 1995 | - if raw_name is 'boolean': | ||
| 1996 | + if raw_name == 'boolean': | ||
| 1997 | return 'boolForKey' | ||
| 1998 | - if raw_name is 'integer': | ||
| 1999 | + if raw_name == 'integer': | ||
| 2000 | return 'integerForKey' | ||
| 2001 | - if raw_name is 'number': | ||
| 2002 | + if raw_name == 'number': | ||
| 2003 | return 'doubleForKey' | ||
| 2004 | - if raw_name is 'string': | ||
| 2005 | + if raw_name == 'string': | ||
| 2006 | return 'stringForKey' | ||
| 2007 | if raw_name in ['any', 'object']: | ||
| 2008 | return 'objectForKey' | ||
| 2009 | - if raw_name is 'array': | ||
| 2010 | + if raw_name == 'array': | ||
| 2011 | return 'inspectorArrayForKey' | ||
| 2012 | return None | ||
| 2013 | if (isinstance(_type, EnumType)): | ||
| 2014 | diff --git a/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py b/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py | ||
| 2015 | index a1987aa90..86cbd4934 100755 | ||
| 2016 | --- a/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py | ||
| 2017 | +++ b/Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py | ||
| 2018 | @@ -48,7 +48,7 @@ try: | ||
| 2019 | |||
| 2020 | # When copying generator files to JavaScriptCore's private headers on Mac, | ||
| 2021 | # the codegen/ module directory is flattened. So, import directly. | ||
| 2022 | -except ImportError, e: | ||
| 2023 | +except ImportError as e: | ||
| 2024 | # log.error(e) # Uncomment this to debug early import errors. | ||
| 2025 | import models | ||
| 2026 | from models import * | ||
| 2027 | diff --git a/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py b/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py | ||
| 2028 | index de32ef6c4..18fff7167 100644 | ||
| 2029 | --- a/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py | ||
| 2030 | +++ b/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py | ||
| 2031 | @@ -410,7 +410,7 @@ class InputsModel: | ||
| 2032 | self.inputs_by_name = {} | ||
| 2033 | |||
| 2034 | def enum_types(self): | ||
| 2035 | - _enums = filter(lambda x: x.is_enum() or x.is_enum_class(), self.types) | ||
| 2036 | + _enums = [x for x in self.types if x.is_enum() or x.is_enum_class()] | ||
| 2037 | return sorted(_enums, key=lambda _enum: _enum.type_name()) | ||
| 2038 | |||
| 2039 | def get_type_for_member(self, member): | ||
| 2040 | @@ -424,7 +424,7 @@ class InputsModel: | ||
| 2041 | if not isinstance(json['types'], dict): | ||
| 2042 | raise ParseException("Malformed specification: types is not a dict of framework->type list") | ||
| 2043 | |||
| 2044 | - for framework_name, type_list in json['types'].iteritems(): | ||
| 2045 | + for framework_name, type_list in json['types'].items(): | ||
| 2046 | if not isinstance(type_list, list): | ||
| 2047 | raise ParseException("Malformed specification: type list for framework %s is not a list" % framework_name) | ||
| 2048 | |||
| 2049 | @@ -436,7 +436,7 @@ class InputsModel: | ||
| 2050 | if not isinstance(json['inputs'], dict): | ||
| 2051 | raise ParseException("Malformed specification: inputs is not a dict of framework->input list") | ||
| 2052 | |||
| 2053 | - for framework_name, input_list in json['inputs'].iteritems(): | ||
| 2054 | + for framework_name, input_list in json['inputs'].items(): | ||
| 2055 | if not isinstance(input_list, list): | ||
| 2056 | raise ParseException("Malformed specification: input list for framework %s is not a list" % framework_name) | ||
| 2057 | |||
| 2058 | @@ -597,8 +597,8 @@ class Generator: | ||
| 2059 | implementation_file.close() | ||
| 2060 | |||
| 2061 | def generate_header(self): | ||
| 2062 | - enums_to_generate = filter(self.should_generate_item, self._model.enum_types()) | ||
| 2063 | - inputs_to_generate = filter(self.should_generate_item, self._model.inputs) | ||
| 2064 | + enums_to_generate = list(filter(self.should_generate_item, self._model.enum_types())) | ||
| 2065 | + inputs_to_generate = list(filter(self.should_generate_item, self._model.inputs)) | ||
| 2066 | |||
| 2067 | template_arguments = { | ||
| 2068 | 'licenseBlock': self.generate_license(), | ||
| 2069 | @@ -620,8 +620,8 @@ class Generator: | ||
| 2070 | return Template(Templates.HeaderSkeleton).substitute(template_arguments) | ||
| 2071 | |||
| 2072 | def generate_implementation(self): | ||
| 2073 | - enums_to_generate = filter(self.should_generate_item, self._model.enum_types()) | ||
| 2074 | - inputs_to_generate = filter(self.should_generate_item, self._model.inputs) | ||
| 2075 | + enums_to_generate = list(filter(self.should_generate_item, self._model.enum_types())) | ||
| 2076 | + inputs_to_generate = list(filter(self.should_generate_item, self._model.inputs)) | ||
| 2077 | |||
| 2078 | template_arguments = { | ||
| 2079 | 'licenseBlock': self.generate_license(), | ||
| 2080 | @@ -680,7 +680,7 @@ class Generator: | ||
| 2081 | lines = [] | ||
| 2082 | |||
| 2083 | decls_by_framework = {} | ||
| 2084 | - frameworks = [Framework.fromString(s) for s in FRAMEWORK_CONFIG_MAP.keys() if s != Frameworks.Global.name] | ||
| 2085 | + frameworks = [Framework.fromString(s) for s in list(FRAMEWORK_CONFIG_MAP.keys()) if s != Frameworks.Global.name] | ||
| 2086 | for framework in frameworks: | ||
| 2087 | decls_by_framework[framework] = [] | ||
| 2088 | |||
| 2089 | @@ -808,7 +808,7 @@ class Generator: | ||
| 2090 | return Template(template).substitute(template_arguments) | ||
| 2091 | |||
| 2092 | def generate_for_each_macro(self): | ||
| 2093 | - inputs_to_generate = filter(self.should_generate_item, self._model.inputs) | ||
| 2094 | + inputs_to_generate = list(filter(self.should_generate_item, self._model.inputs)) | ||
| 2095 | |||
| 2096 | macro_name = "%s_REPLAY_INPUT_NAMES_FOR_EACH" % self.setting('prefix').upper() | ||
| 2097 | lines = [] | ||
| 2098 | @@ -858,7 +858,7 @@ class Generator: | ||
| 2099 | } | ||
| 2100 | encodeLines.append(Template(encode_template).substitute(template_arguments)) | ||
| 2101 | |||
| 2102 | - for guard, guard_values in _type.guard_values_map.iteritems(): | ||
| 2103 | + for guard, guard_values in _type.guard_values_map.items(): | ||
| 2104 | guardedLines = [] | ||
| 2105 | for guard_value in guard_values: | ||
| 2106 | template_arguments = { | ||
| 2107 | @@ -880,7 +880,7 @@ class Generator: | ||
| 2108 | } | ||
| 2109 | decodeLines.append(Template(decode_template).substitute(template_arguments)) | ||
| 2110 | |||
| 2111 | - for guard, guard_values in _type.guard_values_map.iteritems(): | ||
| 2112 | + for guard, guard_values in _type.guard_values_map.items(): | ||
| 2113 | guardedLines = [] | ||
| 2114 | for i, guard_value in enumerate(guard_values): | ||
| 2115 | template_arguments = { | ||
| 2116 | @@ -999,7 +999,7 @@ def generate_from_specifications(input_filepaths=[], output_prefix="", output_di | ||
| 2117 | except ValueError as e: | ||
| 2118 | raise Exception("Error parsing valid JSON in file: " + input_filepath) | ||
| 2119 | |||
| 2120 | - specifications = map(parse_json_from_file, input_filepaths) | ||
| 2121 | + specifications = list(map(parse_json_from_file, input_filepaths)) | ||
| 2122 | |||
| 2123 | model = InputsModel() | ||
| 2124 | for spec in specifications: | ||
| 2125 | @@ -1012,7 +1012,7 @@ def generate_from_specifications(input_filepaths=[], output_prefix="", output_di | ||
| 2126 | |||
| 2127 | |||
| 2128 | if __name__ == '__main__': | ||
| 2129 | - allowed_framework_names = FRAMEWORK_CONFIG_MAP.keys() | ||
| 2130 | + allowed_framework_names = list(FRAMEWORK_CONFIG_MAP.keys()) | ||
| 2131 | |||
| 2132 | cli_parser = optparse.OptionParser(usage="usage: %prog [options] <Inputs.json> [, <MoreInputs.json> ]") | ||
| 2133 | cli_parser.add_option("-o", "--outputDir", help="Directory where generated files should be written.") | ||
| 2134 | diff --git a/Source/ThirdParty/ANGLE/generate_winrt_projects.py b/Source/ThirdParty/ANGLE/generate_winrt_projects.py | ||
| 2135 | index e0e517772..5e18782c1 100644 | ||
| 2136 | --- a/Source/ThirdParty/ANGLE/generate_winrt_projects.py | ||
| 2137 | +++ b/Source/ThirdParty/ANGLE/generate_winrt_projects.py | ||
| 2138 | @@ -30,8 +30,8 @@ def generateProjects(generation_dir, build_winphone): | ||
| 2139 | gyp_cmd += ' -D angle_standalone=1' | ||
| 2140 | gyp_cmd += ' ' + os.path.join(script_dir, 'angle.gyp') | ||
| 2141 | |||
| 2142 | - print 'Generating projects to ' + generation_dir + ' from gyp files...' | ||
| 2143 | - print gyp_cmd | ||
| 2144 | + print('Generating projects to ' + generation_dir + ' from gyp files...') | ||
| 2145 | + print(gyp_cmd) | ||
| 2146 | sys.stdout.flush() | ||
| 2147 | os.system(gyp_cmd) | ||
| 2148 | |||
| 2149 | diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/Float16ToFloat32.py b/Source/ThirdParty/ANGLE/src/libANGLE/Float16ToFloat32.py | ||
| 2150 | index cf039bfc2..951aa146e 100644 | ||
| 2151 | --- a/Source/ThirdParty/ANGLE/src/libANGLE/Float16ToFloat32.py | ||
| 2152 | +++ b/Source/ThirdParty/ANGLE/src/libANGLE/Float16ToFloat32.py | ||
| 2153 | @@ -42,7 +42,7 @@ def convertOffset(i): | ||
| 2154 | else: | ||
| 2155 | return 1024 | ||
| 2156 | |||
| 2157 | -print """// | ||
| 2158 | +print("""// | ||
| 2159 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. | ||
| 2160 | // Use of this source code is governed by a BSD-style license that can be | ||
| 2161 | // found in the LICENSE file. | ||
| 2162 | @@ -52,27 +52,27 @@ print """// | ||
| 2163 | |||
| 2164 | namespace gl | ||
| 2165 | { | ||
| 2166 | -""" | ||
| 2167 | +""") | ||
| 2168 | |||
| 2169 | -print "const static unsigned g_mantissa[2048] = {" | ||
| 2170 | +print("const static unsigned g_mantissa[2048] = {") | ||
| 2171 | for i in range(0, 2048): | ||
| 2172 | - print " %#010x," % convertMantissa(i) | ||
| 2173 | -print "};\n" | ||
| 2174 | + print(" %#010x," % convertMantissa(i)) | ||
| 2175 | +print("};\n") | ||
| 2176 | |||
| 2177 | -print "const static unsigned g_exponent[64] = {" | ||
| 2178 | +print("const static unsigned g_exponent[64] = {") | ||
| 2179 | for i in range(0, 64): | ||
| 2180 | - print " %#010x," % convertExponent(i) | ||
| 2181 | -print "};\n" | ||
| 2182 | + print(" %#010x," % convertExponent(i)) | ||
| 2183 | +print("};\n") | ||
| 2184 | |||
| 2185 | -print "const static unsigned g_offset[64] = {" | ||
| 2186 | +print("const static unsigned g_offset[64] = {") | ||
| 2187 | for i in range(0, 64): | ||
| 2188 | - print " %#010x," % convertOffset(i) | ||
| 2189 | -print "};\n" | ||
| 2190 | + print(" %#010x," % convertOffset(i)) | ||
| 2191 | +print("};\n") | ||
| 2192 | |||
| 2193 | -print """float float16ToFloat32(unsigned short h) | ||
| 2194 | +print("""float float16ToFloat32(unsigned short h) | ||
| 2195 | { | ||
| 2196 | unsigned i32 = g_mantissa[g_offset[h >> 10] + (h & 0x3ff)] + g_exponent[h >> 10]; | ||
| 2197 | return *(float*) &i32; | ||
| 2198 | } | ||
| 2199 | } | ||
| 2200 | -""" | ||
| 2201 | +""") | ||
| 2202 | diff --git a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/generate_new_renderer.py b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/generate_new_renderer.py | ||
| 2203 | index 5d64fbd23..e0be48b55 100644 | ||
| 2204 | --- a/Source/ThirdParty/ANGLE/src/libANGLE/renderer/generate_new_renderer.py | ||
| 2205 | +++ b/Source/ThirdParty/ANGLE/src/libANGLE/renderer/generate_new_renderer.py | ||
| 2206 | @@ -21,7 +21,7 @@ import re | ||
| 2207 | import string | ||
| 2208 | |||
| 2209 | if len(sys.argv) < 3: | ||
| 2210 | - print('Usage: ' + sys.argv[0] + ' <renderer name> <renderer suffix>') | ||
| 2211 | + print(('Usage: ' + sys.argv[0] + ' <renderer name> <renderer suffix>')) | ||
| 2212 | |||
| 2213 | renderer_name = sys.argv[1] | ||
| 2214 | renderer_suffix = sys.argv[2] | ||
| 2215 | diff --git a/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py b/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py | ||
| 2216 | index 148444ca7..333d55590 100755 | ||
| 2217 | --- a/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py | ||
| 2218 | +++ b/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py | ||
| 2219 | @@ -90,8 +90,8 @@ def VerifyFileExists(directory, relative_path): | ||
| 2220 | """ | ||
| 2221 | |||
| 2222 | if not os.path.isfile(os.path.join(directory, relative_path)): | ||
| 2223 | - print 'ERROR: Cannot find %s in directory %s.' % (relative_path, | ||
| 2224 | - directory) | ||
| 2225 | + print('ERROR: Cannot find %s in directory %s.' % (relative_path, | ||
| 2226 | + directory)) | ||
| 2227 | print ('Please either specify a valid project root directory ' | ||
| 2228 | 'or omit it on the command line.') | ||
| 2229 | sys.exit(1) | ||
| 2230 | @@ -119,11 +119,11 @@ def VerifyOutputFile(output_dir, relative_path): | ||
| 2231 | # TODO(wan@google.com): The following user-interaction doesn't | ||
| 2232 | # work with automated processes. We should provide a way for the | ||
| 2233 | # Makefile to force overwriting the files. | ||
| 2234 | - print ('%s already exists in directory %s - overwrite it? (y/N) ' % | ||
| 2235 | - (relative_path, output_dir)) | ||
| 2236 | + print(('%s already exists in directory %s - overwrite it? (y/N) ' % | ||
| 2237 | + (relative_path, output_dir))) | ||
| 2238 | answer = sys.stdin.readline().strip() | ||
| 2239 | if answer not in ['y', 'Y']: | ||
| 2240 | - print 'ABORTED.' | ||
| 2241 | + print('ABORTED.') | ||
| 2242 | sys.exit(1) | ||
| 2243 | |||
| 2244 | # Makes sure the directory holding the output file exists; creates | ||
| 2245 | @@ -242,7 +242,7 @@ def main(): | ||
| 2246 | # fuse_gtest_files.py GTEST_ROOT_DIR OUTPUT_DIR | ||
| 2247 | FuseGTest(sys.argv[1], sys.argv[2]) | ||
| 2248 | else: | ||
| 2249 | - print __doc__ | ||
| 2250 | + print(__doc__) | ||
| 2251 | sys.exit(1) | ||
| 2252 | |||
| 2253 | |||
| 2254 | diff --git a/Source/ThirdParty/gtest/scripts/gen_gtest_pred_impl.py b/Source/ThirdParty/gtest/scripts/gen_gtest_pred_impl.py | ||
| 2255 | index 8307134ad..748bcfeb4 100755 | ||
| 2256 | --- a/Source/ThirdParty/gtest/scripts/gen_gtest_pred_impl.py | ||
| 2257 | +++ b/Source/ThirdParty/gtest/scripts/gen_gtest_pred_impl.py | ||
| 2258 | @@ -183,7 +183,7 @@ def Title(word): | ||
| 2259 | def OneTo(n): | ||
| 2260 | """Returns the list [1, 2, 3, ..., n].""" | ||
| 2261 | |||
| 2262 | - return range(1, n + 1) | ||
| 2263 | + return list(range(1, n + 1)) | ||
| 2264 | |||
| 2265 | |||
| 2266 | def Iter(n, format, sep=''): | ||
| 2267 | @@ -305,13 +305,13 @@ def GenerateFile(path, content): | ||
| 2268 | """Given a file path and a content string, overwrites it with the | ||
| 2269 | given content.""" | ||
| 2270 | |||
| 2271 | - print 'Updating file %s . . .' % path | ||
| 2272 | + print('Updating file %s . . .' % path) | ||
| 2273 | |||
| 2274 | f = file(path, 'w+') | ||
| 2275 | - print >>f, content, | ||
| 2276 | + print(content, end=' ', file=f) | ||
| 2277 | f.close() | ||
| 2278 | |||
| 2279 | - print 'File %s has been updated.' % path | ||
| 2280 | + print('File %s has been updated.' % path) | ||
| 2281 | |||
| 2282 | |||
| 2283 | def GenerateHeader(n): | ||
| 2284 | @@ -720,8 +720,8 @@ def _Main(): | ||
| 2285 | unit test.""" | ||
| 2286 | |||
| 2287 | if len(sys.argv) != 2: | ||
| 2288 | - print __doc__ | ||
| 2289 | - print 'Author: ' + __author__ | ||
| 2290 | + print(__doc__) | ||
| 2291 | + print('Author: ' + __author__) | ||
| 2292 | sys.exit(1) | ||
| 2293 | |||
| 2294 | n = int(sys.argv[1]) | ||
| 2295 | diff --git a/Source/ThirdParty/gtest/scripts/pump.py b/Source/ThirdParty/gtest/scripts/pump.py | ||
| 2296 | index f15c1b6ce..92b70ecec 100755 | ||
| 2297 | --- a/Source/ThirdParty/gtest/scripts/pump.py | ||
| 2298 | +++ b/Source/ThirdParty/gtest/scripts/pump.py | ||
| 2299 | @@ -236,7 +236,7 @@ def ParseToken(lines, pos, regex, token_type): | ||
| 2300 | if m and not m.start(): | ||
| 2301 | return MakeToken(lines, pos, pos + m.end(), token_type) | ||
| 2302 | else: | ||
| 2303 | - print 'ERROR: %s expected at %s.' % (token_type, pos) | ||
| 2304 | + print('ERROR: %s expected at %s.' % (token_type, pos)) | ||
| 2305 | sys.exit(1) | ||
| 2306 | |||
| 2307 | |||
| 2308 | @@ -263,8 +263,8 @@ def SkipUntil(lines, pos, regex, token_type): | ||
| 2309 | if m: | ||
| 2310 | return pos + m.start() | ||
| 2311 | else: | ||
| 2312 | - print ('ERROR: %s expected on line %s after column %s.' % | ||
| 2313 | - (token_type, pos.line + 1, pos.column)) | ||
| 2314 | + print(('ERROR: %s expected on line %s after column %s.' % | ||
| 2315 | + (token_type, pos.line + 1, pos.column))) | ||
| 2316 | sys.exit(1) | ||
| 2317 | |||
| 2318 | |||
| 2319 | @@ -444,8 +444,8 @@ def PushFront(a_list, elem): | ||
| 2320 | def PopToken(a_list, token_type=None): | ||
| 2321 | token = PopFront(a_list) | ||
| 2322 | if token_type is not None and token.token_type != token_type: | ||
| 2323 | - print 'ERROR: %s expected at %s' % (token_type, token.start) | ||
| 2324 | - print 'ERROR: %s found instead' % (token,) | ||
| 2325 | + print('ERROR: %s expected at %s' % (token_type, token.start)) | ||
| 2326 | + print('ERROR: %s found instead' % (token,)) | ||
| 2327 | sys.exit(1) | ||
| 2328 | |||
| 2329 | return token | ||
| 2330 | @@ -609,16 +609,16 @@ class Env: | ||
| 2331 | if identifier == var: | ||
| 2332 | return value | ||
| 2333 | |||
| 2334 | - print 'ERROR: meta variable %s is undefined.' % (identifier,) | ||
| 2335 | + print('ERROR: meta variable %s is undefined.' % (identifier,)) | ||
| 2336 | sys.exit(1) | ||
| 2337 | |||
| 2338 | def EvalExp(self, exp): | ||
| 2339 | try: | ||
| 2340 | result = eval(exp.python_exp) | ||
| 2341 | - except Exception, e: | ||
| 2342 | - print 'ERROR: caught exception %s: %s' % (e.__class__.__name__, e) | ||
| 2343 | - print ('ERROR: failed to evaluate meta expression %s at %s' % | ||
| 2344 | - (exp.python_exp, exp.token.start)) | ||
| 2345 | + except Exception as e: | ||
| 2346 | + print('ERROR: caught exception %s: %s' % (e.__class__.__name__, e)) | ||
| 2347 | + print(('ERROR: failed to evaluate meta expression %s at %s' % | ||
| 2348 | + (exp.python_exp, exp.token.start))) | ||
| 2349 | sys.exit(1) | ||
| 2350 | return result | ||
| 2351 | |||
| 2352 | @@ -627,7 +627,7 @@ class Env: | ||
| 2353 | if identifier == var: | ||
| 2354 | return (lower, upper) | ||
| 2355 | |||
| 2356 | - print 'ERROR: range %s is undefined.' % (identifier,) | ||
| 2357 | + print('ERROR: range %s is undefined.' % (identifier,)) | ||
| 2358 | sys.exit(1) | ||
| 2359 | |||
| 2360 | |||
| 2361 | @@ -687,8 +687,8 @@ def RunAtomicCode(env, node, output): | ||
| 2362 | elif isinstance(node, CodeNode): | ||
| 2363 | RunCode(env.Clone(), node, output) | ||
| 2364 | else: | ||
| 2365 | - print 'BAD' | ||
| 2366 | - print node | ||
| 2367 | + print('BAD') | ||
| 2368 | + print(node) | ||
| 2369 | sys.exit(1) | ||
| 2370 | |||
| 2371 | |||
| 2372 | @@ -807,7 +807,7 @@ def BeautifyCode(string): | ||
| 2373 | |||
| 2374 | def main(argv): | ||
| 2375 | if len(argv) == 1: | ||
| 2376 | - print __doc__ | ||
| 2377 | + print(__doc__) | ||
| 2378 | sys.exit(1) | ||
| 2379 | |||
| 2380 | file_path = argv[-1] | ||
| 2381 | @@ -820,7 +820,7 @@ def main(argv): | ||
| 2382 | else: | ||
| 2383 | output_file_path = '-' | ||
| 2384 | if output_file_path == '-': | ||
| 2385 | - print output_str, | ||
| 2386 | + print(output_str, end=' ') | ||
| 2387 | else: | ||
| 2388 | output_file = file(output_file_path, 'w') | ||
| 2389 | output_file.write('// This file was GENERATED by command:\n') | ||
| 2390 | diff --git a/Source/ThirdParty/gtest/scripts/upload.py b/Source/ThirdParty/gtest/scripts/upload.py | ||
| 2391 | index 6e6f9a147..4890ea16d 100755 | ||
| 2392 | --- a/Source/ThirdParty/gtest/scripts/upload.py | ||
| 2393 | +++ b/Source/ThirdParty/gtest/scripts/upload.py | ||
| 2394 | @@ -31,7 +31,7 @@ against by using the '--rev' option. | ||
| 2395 | # This code is derived from appcfg.py in the App Engine SDK (open source), | ||
| 2396 | # and from ASPN recipe #146306. | ||
| 2397 | |||
| 2398 | -import cookielib | ||
| 2399 | +import http.cookiejar | ||
| 2400 | import getpass | ||
| 2401 | import logging | ||
| 2402 | import md5 | ||
| 2403 | @@ -42,9 +42,9 @@ import re | ||
| 2404 | import socket | ||
| 2405 | import subprocess | ||
| 2406 | import sys | ||
| 2407 | -import urllib | ||
| 2408 | -import urllib2 | ||
| 2409 | -import urlparse | ||
| 2410 | +import urllib.request, urllib.parse, urllib.error | ||
| 2411 | +import urllib.request, urllib.error, urllib.parse | ||
| 2412 | +import urllib.parse | ||
| 2413 | |||
| 2414 | try: | ||
| 2415 | import readline | ||
| 2416 | @@ -79,15 +79,15 @@ def GetEmail(prompt): | ||
| 2417 | last_email = last_email_file.readline().strip("\n") | ||
| 2418 | last_email_file.close() | ||
| 2419 | prompt += " [%s]" % last_email | ||
| 2420 | - except IOError, e: | ||
| 2421 | + except IOError as e: | ||
| 2422 | pass | ||
| 2423 | - email = raw_input(prompt + ": ").strip() | ||
| 2424 | + email = input(prompt + ": ").strip() | ||
| 2425 | if email: | ||
| 2426 | try: | ||
| 2427 | last_email_file = open(last_email_file_name, "w") | ||
| 2428 | last_email_file.write(email) | ||
| 2429 | last_email_file.close() | ||
| 2430 | - except IOError, e: | ||
| 2431 | + except IOError as e: | ||
| 2432 | pass | ||
| 2433 | else: | ||
| 2434 | email = last_email | ||
| 2435 | @@ -103,20 +103,20 @@ def StatusUpdate(msg): | ||
| 2436 | msg: The string to print. | ||
| 2437 | """ | ||
| 2438 | if verbosity > 0: | ||
| 2439 | - print msg | ||
| 2440 | + print(msg) | ||
| 2441 | |||
| 2442 | |||
| 2443 | def ErrorExit(msg): | ||
| 2444 | """Print an error message to stderr and exit.""" | ||
| 2445 | - print >>sys.stderr, msg | ||
| 2446 | + print(msg, file=sys.stderr) | ||
| 2447 | sys.exit(1) | ||
| 2448 | |||
| 2449 | |||
| 2450 | -class ClientLoginError(urllib2.HTTPError): | ||
| 2451 | +class ClientLoginError(urllib.error.HTTPError): | ||
| 2452 | """Raised to indicate there was an error authenticating with ClientLogin.""" | ||
| 2453 | |||
| 2454 | def __init__(self, url, code, msg, headers, args): | ||
| 2455 | - urllib2.HTTPError.__init__(self, url, code, msg, headers, None) | ||
| 2456 | + urllib.error.HTTPError.__init__(self, url, code, msg, headers, None) | ||
| 2457 | self.args = args | ||
| 2458 | self.reason = args["Error"] | ||
| 2459 | |||
| 2460 | @@ -162,10 +162,10 @@ class AbstractRpcServer(object): | ||
| 2461 | def _CreateRequest(self, url, data=None): | ||
| 2462 | """Creates a new urllib request.""" | ||
| 2463 | logging.debug("Creating request for: '%s' with payload:\n%s", url, data) | ||
| 2464 | - req = urllib2.Request(url, data=data) | ||
| 2465 | + req = urllib.request.Request(url, data=data) | ||
| 2466 | if self.host_override: | ||
| 2467 | req.add_header("Host", self.host_override) | ||
| 2468 | - for key, value in self.extra_headers.iteritems(): | ||
| 2469 | + for key, value in self.extra_headers.items(): | ||
| 2470 | req.add_header(key, value) | ||
| 2471 | return req | ||
| 2472 | |||
| 2473 | @@ -189,7 +189,7 @@ class AbstractRpcServer(object): | ||
| 2474 | account_type = "HOSTED" | ||
| 2475 | req = self._CreateRequest( | ||
| 2476 | url="https://www.google.com/accounts/ClientLogin", | ||
| 2477 | - data=urllib.urlencode({ | ||
| 2478 | + data=urllib.parse.urlencode({ | ||
| 2479 | "Email": email, | ||
| 2480 | "Passwd": password, | ||
| 2481 | "service": "ah", | ||
| 2482 | @@ -203,7 +203,7 @@ class AbstractRpcServer(object): | ||
| 2483 | response_dict = dict(x.split("=") | ||
| 2484 | for x in response_body.split("\n") if x) | ||
| 2485 | return response_dict["Auth"] | ||
| 2486 | - except urllib2.HTTPError, e: | ||
| 2487 | + except urllib.error.HTTPError as e: | ||
| 2488 | if e.code == 403: | ||
| 2489 | body = e.read() | ||
| 2490 | response_dict = dict(x.split("=", 1) for x in body.split("\n") if x) | ||
| 2491 | @@ -225,14 +225,14 @@ class AbstractRpcServer(object): | ||
| 2492 | continue_location = "http://localhost/" | ||
| 2493 | args = {"continue": continue_location, "auth": auth_token} | ||
| 2494 | req = self._CreateRequest("http://%s/_ah/login?%s" % | ||
| 2495 | - (self.host, urllib.urlencode(args))) | ||
| 2496 | + (self.host, urllib.parse.urlencode(args))) | ||
| 2497 | try: | ||
| 2498 | response = self.opener.open(req) | ||
| 2499 | - except urllib2.HTTPError, e: | ||
| 2500 | + except urllib.error.HTTPError as e: | ||
| 2501 | response = e | ||
| 2502 | if (response.code != 302 or | ||
| 2503 | response.info()["location"] != continue_location): | ||
| 2504 | - raise urllib2.HTTPError(req.get_full_url(), response.code, response.msg, | ||
| 2505 | + raise urllib.error.HTTPError(req.get_full_url(), response.code, response.msg, | ||
| 2506 | response.headers, response.fp) | ||
| 2507 | self.authenticated = True | ||
| 2508 | |||
| 2509 | @@ -255,34 +255,34 @@ class AbstractRpcServer(object): | ||
| 2510 | credentials = self.auth_function() | ||
| 2511 | try: | ||
| 2512 | auth_token = self._GetAuthToken(credentials[0], credentials[1]) | ||
| 2513 | - except ClientLoginError, e: | ||
| 2514 | + except ClientLoginError as e: | ||
| 2515 | if e.reason == "BadAuthentication": | ||
| 2516 | - print >>sys.stderr, "Invalid username or password." | ||
| 2517 | + print("Invalid username or password.", file=sys.stderr) | ||
| 2518 | continue | ||
| 2519 | if e.reason == "CaptchaRequired": | ||
| 2520 | - print >>sys.stderr, ( | ||
| 2521 | + print(( | ||
| 2522 | "Please go to\n" | ||
| 2523 | "https://www.google.com/accounts/DisplayUnlockCaptcha\n" | ||
| 2524 | - "and verify you are a human. Then try again.") | ||
| 2525 | + "and verify you are a human. Then try again."), file=sys.stderr) | ||
| 2526 | break | ||
| 2527 | if e.reason == "NotVerified": | ||
| 2528 | - print >>sys.stderr, "Account not verified." | ||
| 2529 | + print("Account not verified.", file=sys.stderr) | ||
| 2530 | break | ||
| 2531 | if e.reason == "TermsNotAgreed": | ||
| 2532 | - print >>sys.stderr, "User has not agreed to TOS." | ||
| 2533 | + print("User has not agreed to TOS.", file=sys.stderr) | ||
| 2534 | break | ||
| 2535 | if e.reason == "AccountDeleted": | ||
| 2536 | - print >>sys.stderr, "The user account has been deleted." | ||
| 2537 | + print("The user account has been deleted.", file=sys.stderr) | ||
| 2538 | break | ||
| 2539 | if e.reason == "AccountDisabled": | ||
| 2540 | - print >>sys.stderr, "The user account has been disabled." | ||
| 2541 | + print("The user account has been disabled.", file=sys.stderr) | ||
| 2542 | break | ||
| 2543 | if e.reason == "ServiceDisabled": | ||
| 2544 | - print >>sys.stderr, ("The user's access to the service has been " | ||
| 2545 | - "disabled.") | ||
| 2546 | + print(("The user's access to the service has been " | ||
| 2547 | + "disabled."), file=sys.stderr) | ||
| 2548 | break | ||
| 2549 | if e.reason == "ServiceUnavailable": | ||
| 2550 | - print >>sys.stderr, "The service is not available; try again later." | ||
| 2551 | + print("The service is not available; try again later.", file=sys.stderr) | ||
| 2552 | break | ||
| 2553 | raise | ||
| 2554 | self._GetAuthCookie(auth_token) | ||
| 2555 | @@ -319,7 +319,7 @@ class AbstractRpcServer(object): | ||
| 2556 | args = dict(kwargs) | ||
| 2557 | url = "http://%s%s" % (self.host, request_path) | ||
| 2558 | if args: | ||
| 2559 | - url += "?" + urllib.urlencode(args) | ||
| 2560 | + url += "?" + urllib.parse.urlencode(args) | ||
| 2561 | req = self._CreateRequest(url=url, data=payload) | ||
| 2562 | req.add_header("Content-Type", content_type) | ||
| 2563 | try: | ||
| 2564 | @@ -327,7 +327,7 @@ class AbstractRpcServer(object): | ||
| 2565 | response = f.read() | ||
| 2566 | f.close() | ||
| 2567 | return response | ||
| 2568 | - except urllib2.HTTPError, e: | ||
| 2569 | + except urllib.error.HTTPError as e: | ||
| 2570 | if tries > 3: | ||
| 2571 | raise | ||
| 2572 | elif e.code == 401: | ||
| 2573 | @@ -357,35 +357,35 @@ class HttpRpcServer(AbstractRpcServer): | ||
| 2574 | Returns: | ||
| 2575 | A urllib2.OpenerDirector object. | ||
| 2576 | """ | ||
| 2577 | - opener = urllib2.OpenerDirector() | ||
| 2578 | - opener.add_handler(urllib2.ProxyHandler()) | ||
| 2579 | - opener.add_handler(urllib2.UnknownHandler()) | ||
| 2580 | - opener.add_handler(urllib2.HTTPHandler()) | ||
| 2581 | - opener.add_handler(urllib2.HTTPDefaultErrorHandler()) | ||
| 2582 | - opener.add_handler(urllib2.HTTPSHandler()) | ||
| 2583 | + opener = urllib.request.OpenerDirector() | ||
| 2584 | + opener.add_handler(urllib.request.ProxyHandler()) | ||
| 2585 | + opener.add_handler(urllib.request.UnknownHandler()) | ||
| 2586 | + opener.add_handler(urllib.request.HTTPHandler()) | ||
| 2587 | + opener.add_handler(urllib.request.HTTPDefaultErrorHandler()) | ||
| 2588 | + opener.add_handler(urllib.request.HTTPSHandler()) | ||
| 2589 | opener.add_handler(urllib2.HTTPErrorProcessor()) | ||
| 2590 | if self.save_cookies: | ||
| 2591 | self.cookie_file = os.path.expanduser("~/.codereview_upload_cookies") | ||
| 2592 | - self.cookie_jar = cookielib.MozillaCookieJar(self.cookie_file) | ||
| 2593 | + self.cookie_jar = http.cookiejar.MozillaCookieJar(self.cookie_file) | ||
| 2594 | if os.path.exists(self.cookie_file): | ||
| 2595 | try: | ||
| 2596 | self.cookie_jar.load() | ||
| 2597 | self.authenticated = True | ||
| 2598 | StatusUpdate("Loaded authentication cookies from %s" % | ||
| 2599 | self.cookie_file) | ||
| 2600 | - except (cookielib.LoadError, IOError): | ||
| 2601 | + except (http.cookiejar.LoadError, IOError): | ||
| 2602 | # Failed to load cookies - just ignore them. | ||
| 2603 | pass | ||
| 2604 | else: | ||
| 2605 | # Create an empty cookie file with mode 600 | ||
| 2606 | - fd = os.open(self.cookie_file, os.O_CREAT, 0600) | ||
| 2607 | + fd = os.open(self.cookie_file, os.O_CREAT, 0o600) | ||
| 2608 | os.close(fd) | ||
| 2609 | # Always chmod the cookie file | ||
| 2610 | - os.chmod(self.cookie_file, 0600) | ||
| 2611 | + os.chmod(self.cookie_file, 0o600) | ||
| 2612 | else: | ||
| 2613 | # Don't save cookies across runs of update.py. | ||
| 2614 | - self.cookie_jar = cookielib.CookieJar() | ||
| 2615 | - opener.add_handler(urllib2.HTTPCookieProcessor(self.cookie_jar)) | ||
| 2616 | + self.cookie_jar = http.cookiejar.CookieJar() | ||
| 2617 | + opener.add_handler(urllib.request.HTTPCookieProcessor(self.cookie_jar)) | ||
| 2618 | return opener | ||
| 2619 | |||
| 2620 | |||
| 2621 | @@ -560,7 +560,7 @@ def RunShellWithReturnCode(command, print_output=False, | ||
| 2622 | line = p.stdout.readline() | ||
| 2623 | if not line: | ||
| 2624 | break | ||
| 2625 | - print line.strip("\n") | ||
| 2626 | + print(line.strip("\n")) | ||
| 2627 | output_array.append(line) | ||
| 2628 | output = "".join(output_array) | ||
| 2629 | else: | ||
| 2630 | @@ -568,7 +568,7 @@ def RunShellWithReturnCode(command, print_output=False, | ||
| 2631 | p.wait() | ||
| 2632 | errout = p.stderr.read() | ||
| 2633 | if print_output and errout: | ||
| 2634 | - print >>sys.stderr, errout | ||
| 2635 | + print(errout, file=sys.stderr) | ||
| 2636 | p.stdout.close() | ||
| 2637 | p.stderr.close() | ||
| 2638 | return output, p.returncode | ||
| 2639 | @@ -614,11 +614,11 @@ class VersionControlSystem(object): | ||
| 2640 | """Show an "are you sure?" prompt if there are unknown files.""" | ||
| 2641 | unknown_files = self.GetUnknownFiles() | ||
| 2642 | if unknown_files: | ||
| 2643 | - print "The following files are not added to version control:" | ||
| 2644 | + print("The following files are not added to version control:") | ||
| 2645 | for line in unknown_files: | ||
| 2646 | - print line | ||
| 2647 | + print(line) | ||
| 2648 | prompt = "Are you sure to continue?(y/N) " | ||
| 2649 | - answer = raw_input(prompt).strip() | ||
| 2650 | + answer = input(prompt).strip() | ||
| 2651 | if answer != "y": | ||
| 2652 | ErrorExit("User aborted") | ||
| 2653 | |||
| 2654 | @@ -670,13 +670,13 @@ class VersionControlSystem(object): | ||
| 2655 | else: | ||
| 2656 | type = "current" | ||
| 2657 | if len(content) > MAX_UPLOAD_SIZE: | ||
| 2658 | - print ("Not uploading the %s file for %s because it's too large." % | ||
| 2659 | - (type, filename)) | ||
| 2660 | + print(("Not uploading the %s file for %s because it's too large." % | ||
| 2661 | + (type, filename))) | ||
| 2662 | file_too_large = True | ||
| 2663 | content = "" | ||
| 2664 | checksum = md5.new(content).hexdigest() | ||
| 2665 | if options.verbose > 0 and not file_too_large: | ||
| 2666 | - print "Uploading %s file for %s" % (type, filename) | ||
| 2667 | + print("Uploading %s file for %s" % (type, filename)) | ||
| 2668 | url = "/%d/upload_content/%d/%d" % (int(issue), int(patchset), file_id) | ||
| 2669 | form_fields = [("filename", filename), | ||
| 2670 | ("status", status), | ||
| 2671 | @@ -698,7 +698,7 @@ class VersionControlSystem(object): | ||
| 2672 | |||
| 2673 | patches = dict() | ||
| 2674 | [patches.setdefault(v, k) for k, v in patch_list] | ||
| 2675 | - for filename in patches.keys(): | ||
| 2676 | + for filename in list(patches.keys()): | ||
| 2677 | base_content, new_content, is_binary, status = files[filename] | ||
| 2678 | file_id_str = patches.get(filename) | ||
| 2679 | if file_id_str.find("nobase") != -1: | ||
| 2680 | @@ -755,8 +755,8 @@ class SubversionVCS(VersionControlSystem): | ||
| 2681 | words = line.split() | ||
| 2682 | if len(words) == 2 and words[0] == "URL:": | ||
| 2683 | url = words[1] | ||
| 2684 | - scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) | ||
| 2685 | - username, netloc = urllib.splituser(netloc) | ||
| 2686 | + scheme, netloc, path, params, query, fragment = urllib.parse.urlparse(url) | ||
| 2687 | + username, netloc = urllib.parse.splituser(netloc) | ||
| 2688 | if username: | ||
| 2689 | logging.info("Removed username from base URL") | ||
| 2690 | if netloc.endswith("svn.python.org"): | ||
| 2691 | @@ -774,12 +774,12 @@ class SubversionVCS(VersionControlSystem): | ||
| 2692 | logging.info("Guessed CollabNet base = %s", base) | ||
| 2693 | elif netloc.endswith(".googlecode.com"): | ||
| 2694 | path = path + "/" | ||
| 2695 | - base = urlparse.urlunparse(("http", netloc, path, params, | ||
| 2696 | + base = urllib.parse.urlunparse(("http", netloc, path, params, | ||
| 2697 | query, fragment)) | ||
| 2698 | logging.info("Guessed Google Code base = %s", base) | ||
| 2699 | else: | ||
| 2700 | path = path + "/" | ||
| 2701 | - base = urlparse.urlunparse((scheme, netloc, path, params, | ||
| 2702 | + base = urllib.parse.urlunparse((scheme, netloc, path, params, | ||
| 2703 | query, fragment)) | ||
| 2704 | logging.info("Guessed base = %s", base) | ||
| 2705 | return base | ||
| 2706 | @@ -1187,8 +1187,8 @@ def UploadSeparatePatches(issue, rpc_server, patchset, data, options): | ||
| 2707 | rv = [] | ||
| 2708 | for patch in patches: | ||
| 2709 | if len(patch[1]) > MAX_UPLOAD_SIZE: | ||
| 2710 | - print ("Not uploading the patch for " + patch[0] + | ||
| 2711 | - " because the file is too large.") | ||
| 2712 | + print(("Not uploading the patch for " + patch[0] + | ||
| 2713 | + " because the file is too large.")) | ||
| 2714 | continue | ||
| 2715 | form_fields = [("filename", patch[0])] | ||
| 2716 | if not options.download_base: | ||
| 2717 | @@ -1196,7 +1196,7 @@ def UploadSeparatePatches(issue, rpc_server, patchset, data, options): | ||
| 2718 | files = [("data", "data.diff", patch[1])] | ||
| 2719 | ctype, body = EncodeMultipartFormData(form_fields, files) | ||
| 2720 | url = "/%d/upload_patch/%d" % (int(issue), int(patchset)) | ||
| 2721 | - print "Uploading patch for " + patch[0] | ||
| 2722 | + print("Uploading patch for " + patch[0]) | ||
| 2723 | response_body = rpc_server.Send(url, body, content_type=ctype) | ||
| 2724 | lines = response_body.splitlines() | ||
| 2725 | if not lines or lines[0] != "OK": | ||
| 2726 | @@ -1223,7 +1223,8 @@ def GuessVCS(options): | ||
| 2727 | out, returncode = RunShellWithReturnCode(["hg", "root"]) | ||
| 2728 | if returncode == 0: | ||
| 2729 | return MercurialVCS(options, out.strip()) | ||
| 2730 | - except OSError, (errno, message): | ||
| 2731 | + except OSError as xxx_todo_changeme: | ||
| 2732 | + (errno, message) = xxx_todo_changeme.args | ||
| 2733 | if errno != 2: # ENOENT -- they don't have hg installed. | ||
| 2734 | raise | ||
| 2735 | |||
| 2736 | @@ -1239,7 +1240,8 @@ def GuessVCS(options): | ||
| 2737 | "--is-inside-work-tree"]) | ||
| 2738 | if returncode == 0: | ||
| 2739 | return GitVCS(options) | ||
| 2740 | - except OSError, (errno, message): | ||
| 2741 | + except OSError as xxx_todo_changeme1: | ||
| 2742 | + (errno, message) = xxx_todo_changeme1.args | ||
| 2743 | if errno != 2: # ENOENT -- they don't have git installed. | ||
| 2744 | raise | ||
| 2745 | |||
| 2746 | @@ -1286,12 +1288,12 @@ def RealMain(argv, data=None): | ||
| 2747 | data = vcs.GenerateDiff(args) | ||
| 2748 | files = vcs.GetBaseFiles(data) | ||
| 2749 | if verbosity >= 1: | ||
| 2750 | - print "Upload server:", options.server, "(change with -s/--server)" | ||
| 2751 | + print("Upload server:", options.server, "(change with -s/--server)") | ||
| 2752 | if options.issue: | ||
| 2753 | prompt = "Message describing this patch set: " | ||
| 2754 | else: | ||
| 2755 | prompt = "New issue subject: " | ||
| 2756 | - message = options.message or raw_input(prompt).strip() | ||
| 2757 | + message = options.message or input(prompt).strip() | ||
| 2758 | if not message: | ||
| 2759 | ErrorExit("A non-empty message is required") | ||
| 2760 | rpc_server = GetRpcServer(options) | ||
| 2761 | @@ -1324,7 +1326,7 @@ def RealMain(argv, data=None): | ||
| 2762 | # Send a hash of all the base file so the server can determine if a copy | ||
| 2763 | # already exists in an earlier patchset. | ||
| 2764 | base_hashes = "" | ||
| 2765 | - for file, info in files.iteritems(): | ||
| 2766 | + for file, info in files.items(): | ||
| 2767 | if not info[0] is None: | ||
| 2768 | checksum = md5.new(info[0]).hexdigest() | ||
| 2769 | if base_hashes: | ||
| 2770 | @@ -1338,7 +1340,7 @@ def RealMain(argv, data=None): | ||
| 2771 | if not options.download_base: | ||
| 2772 | form_fields.append(("content_upload", "1")) | ||
| 2773 | if len(data) > MAX_UPLOAD_SIZE: | ||
| 2774 | - print "Patch is large, so uploading file patches separately." | ||
| 2775 | + print("Patch is large, so uploading file patches separately.") | ||
| 2776 | uploaded_diff_file = [] | ||
| 2777 | form_fields.append(("separate_patches", "1")) | ||
| 2778 | else: | ||
| 2779 | @@ -1378,7 +1380,7 @@ def main(): | ||
| 2780 | try: | ||
| 2781 | RealMain(sys.argv) | ||
| 2782 | except KeyboardInterrupt: | ||
| 2783 | |||
| 2784 | + print() | ||
| 2785 | StatusUpdate("Interrupted.") | ||
| 2786 | sys.exit(1) | ||
| 2787 | |||
| 2788 | diff --git a/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py b/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py | ||
| 2789 | index c81918331..f36abe338 100755 | ||
| 2790 | --- a/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py | ||
| 2791 | +++ b/Source/ThirdParty/gtest/test/gtest_break_on_failure_unittest.py | ||
| 2792 | @@ -145,7 +145,7 @@ class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase): | ||
| 2793 | msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' % | ||
| 2794 | (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command), | ||
| 2795 | should_or_not)) | ||
| 2796 | - self.assert_(has_seg_fault == expect_seg_fault, msg) | ||
| 2797 | + self.assertTrue(has_seg_fault == expect_seg_fault, msg) | ||
| 2798 | |||
| 2799 | def testDefaultBehavior(self): | ||
| 2800 | """Tests the behavior of the default mode.""" | ||
| 2801 | diff --git a/Source/ThirdParty/gtest/test/gtest_color_test.py b/Source/ThirdParty/gtest/test/gtest_color_test.py | ||
| 2802 | index d02a53ed8..b69ab0947 100755 | ||
| 2803 | --- a/Source/ThirdParty/gtest/test/gtest_color_test.py | ||
| 2804 | +++ b/Source/ThirdParty/gtest/test/gtest_color_test.py | ||
| 2805 | @@ -72,58 +72,58 @@ class GTestColorTest(gtest_test_utils.TestCase): | ||
| 2806 | """Tests the case when there's neither GTEST_COLOR nor --gtest_color.""" | ||
| 2807 | |||
| 2808 | if not IS_WINDOWS: | ||
| 2809 | - self.assert_(not UsesColor('dumb', None, None)) | ||
| 2810 | - self.assert_(not UsesColor('emacs', None, None)) | ||
| 2811 | - self.assert_(not UsesColor('xterm-mono', None, None)) | ||
| 2812 | - self.assert_(not UsesColor('unknown', None, None)) | ||
| 2813 | - self.assert_(not UsesColor(None, None, None)) | ||
| 2814 | - self.assert_(UsesColor('linux', None, None)) | ||
| 2815 | - self.assert_(UsesColor('cygwin', None, None)) | ||
| 2816 | - self.assert_(UsesColor('xterm', None, None)) | ||
| 2817 | - self.assert_(UsesColor('xterm-color', None, None)) | ||
| 2818 | - self.assert_(UsesColor('xterm-256color', None, None)) | ||
| 2819 | + self.assertTrue(not UsesColor('dumb', None, None)) | ||
| 2820 | + self.assertTrue(not UsesColor('emacs', None, None)) | ||
| 2821 | + self.assertTrue(not UsesColor('xterm-mono', None, None)) | ||
| 2822 | + self.assertTrue(not UsesColor('unknown', None, None)) | ||
| 2823 | + self.assertTrue(not UsesColor(None, None, None)) | ||
| 2824 | + self.assertTrue(UsesColor('linux', None, None)) | ||
| 2825 | + self.assertTrue(UsesColor('cygwin', None, None)) | ||
| 2826 | + self.assertTrue(UsesColor('xterm', None, None)) | ||
| 2827 | + self.assertTrue(UsesColor('xterm-color', None, None)) | ||
| 2828 | + self.assertTrue(UsesColor('xterm-256color', None, None)) | ||
| 2829 | |||
| 2830 | def testFlagOnly(self): | ||
| 2831 | """Tests the case when there's --gtest_color but not GTEST_COLOR.""" | ||
| 2832 | |||
| 2833 | - self.assert_(not UsesColor('dumb', None, 'no')) | ||
| 2834 | - self.assert_(not UsesColor('xterm-color', None, 'no')) | ||
| 2835 | + self.assertTrue(not UsesColor('dumb', None, 'no')) | ||
| 2836 | + self.assertTrue(not UsesColor('xterm-color', None, 'no')) | ||
| 2837 | if not IS_WINDOWS: | ||
| 2838 | - self.assert_(not UsesColor('emacs', None, 'auto')) | ||
| 2839 | - self.assert_(UsesColor('xterm', None, 'auto')) | ||
| 2840 | - self.assert_(UsesColor('dumb', None, 'yes')) | ||
| 2841 | - self.assert_(UsesColor('xterm', None, 'yes')) | ||
| 2842 | + self.assertTrue(not UsesColor('emacs', None, 'auto')) | ||
| 2843 | + self.assertTrue(UsesColor('xterm', None, 'auto')) | ||
| 2844 | + self.assertTrue(UsesColor('dumb', None, 'yes')) | ||
| 2845 | + self.assertTrue(UsesColor('xterm', None, 'yes')) | ||
| 2846 | |||
| 2847 | def testEnvVarOnly(self): | ||
| 2848 | """Tests the case when there's GTEST_COLOR but not --gtest_color.""" | ||
| 2849 | |||
| 2850 | - self.assert_(not UsesColor('dumb', 'no', None)) | ||
| 2851 | - self.assert_(not UsesColor('xterm-color', 'no', None)) | ||
| 2852 | + self.assertTrue(not UsesColor('dumb', 'no', None)) | ||
| 2853 | + self.assertTrue(not UsesColor('xterm-color', 'no', None)) | ||
| 2854 | if not IS_WINDOWS: | ||
| 2855 | - self.assert_(not UsesColor('dumb', 'auto', None)) | ||
| 2856 | - self.assert_(UsesColor('xterm-color', 'auto', None)) | ||
| 2857 | - self.assert_(UsesColor('dumb', 'yes', None)) | ||
| 2858 | - self.assert_(UsesColor('xterm-color', 'yes', None)) | ||
| 2859 | + self.assertTrue(not UsesColor('dumb', 'auto', None)) | ||
| 2860 | + self.assertTrue(UsesColor('xterm-color', 'auto', None)) | ||
| 2861 | + self.assertTrue(UsesColor('dumb', 'yes', None)) | ||
| 2862 | + self.assertTrue(UsesColor('xterm-color', 'yes', None)) | ||
| 2863 | |||
| 2864 | def testEnvVarAndFlag(self): | ||
| 2865 | """Tests the case when there are both GTEST_COLOR and --gtest_color.""" | ||
| 2866 | |||
| 2867 | - self.assert_(not UsesColor('xterm-color', 'no', 'no')) | ||
| 2868 | - self.assert_(UsesColor('dumb', 'no', 'yes')) | ||
| 2869 | - self.assert_(UsesColor('xterm-color', 'no', 'auto')) | ||
| 2870 | + self.assertTrue(not UsesColor('xterm-color', 'no', 'no')) | ||
| 2871 | + self.assertTrue(UsesColor('dumb', 'no', 'yes')) | ||
| 2872 | + self.assertTrue(UsesColor('xterm-color', 'no', 'auto')) | ||
| 2873 | |||
| 2874 | def testAliasesOfYesAndNo(self): | ||
| 2875 | """Tests using aliases in specifying --gtest_color.""" | ||
| 2876 | |||
| 2877 | - self.assert_(UsesColor('dumb', None, 'true')) | ||
| 2878 | - self.assert_(UsesColor('dumb', None, 'YES')) | ||
| 2879 | - self.assert_(UsesColor('dumb', None, 'T')) | ||
| 2880 | - self.assert_(UsesColor('dumb', None, '1')) | ||
| 2881 | + self.assertTrue(UsesColor('dumb', None, 'true')) | ||
| 2882 | + self.assertTrue(UsesColor('dumb', None, 'YES')) | ||
| 2883 | + self.assertTrue(UsesColor('dumb', None, 'T')) | ||
| 2884 | + self.assertTrue(UsesColor('dumb', None, '1')) | ||
| 2885 | |||
| 2886 | - self.assert_(not UsesColor('xterm', None, 'f')) | ||
| 2887 | - self.assert_(not UsesColor('xterm', None, 'false')) | ||
| 2888 | - self.assert_(not UsesColor('xterm', None, '0')) | ||
| 2889 | - self.assert_(not UsesColor('xterm', None, 'unknown')) | ||
| 2890 | + self.assertTrue(not UsesColor('xterm', None, 'f')) | ||
| 2891 | + self.assertTrue(not UsesColor('xterm', None, 'false')) | ||
| 2892 | + self.assertTrue(not UsesColor('xterm', None, '0')) | ||
| 2893 | + self.assertTrue(not UsesColor('xterm', None, 'unknown')) | ||
| 2894 | |||
| 2895 | |||
| 2896 | if __name__ == '__main__': | ||
| 2897 | diff --git a/Source/ThirdParty/gtest/test/gtest_env_var_test.py b/Source/ThirdParty/gtest/test/gtest_env_var_test.py | ||
| 2898 | index bcc0bfd55..868896831 100755 | ||
| 2899 | --- a/Source/ThirdParty/gtest/test/gtest_env_var_test.py | ||
| 2900 | +++ b/Source/ThirdParty/gtest/test/gtest_env_var_test.py | ||
| 2901 | @@ -47,8 +47,8 @@ environ = os.environ.copy() | ||
| 2902 | |||
| 2903 | def AssertEq(expected, actual): | ||
| 2904 | if expected != actual: | ||
| 2905 | - print 'Expected: %s' % (expected,) | ||
| 2906 | - print ' Actual: %s' % (actual,) | ||
| 2907 | + print('Expected: %s' % (expected,)) | ||
| 2908 | + print(' Actual: %s' % (actual,)) | ||
| 2909 | raise AssertionError | ||
| 2910 | |||
| 2911 | |||
| 2912 | diff --git a/Source/ThirdParty/gtest/test/gtest_filter_unittest.py b/Source/ThirdParty/gtest/test/gtest_filter_unittest.py | ||
| 2913 | index 0d1a77005..595b2fa33 100755 | ||
| 2914 | --- a/Source/ThirdParty/gtest/test/gtest_filter_unittest.py | ||
| 2915 | +++ b/Source/ThirdParty/gtest/test/gtest_filter_unittest.py | ||
| 2916 | @@ -231,10 +231,10 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): | ||
| 2917 | """Asserts that two sets are equal.""" | ||
| 2918 | |||
| 2919 | for elem in lhs: | ||
| 2920 | - self.assert_(elem in rhs, '%s in %s' % (elem, rhs)) | ||
| 2921 | + self.assertTrue(elem in rhs, '%s in %s' % (elem, rhs)) | ||
| 2922 | |||
| 2923 | for elem in rhs: | ||
| 2924 | - self.assert_(elem in lhs, '%s in %s' % (elem, lhs)) | ||
| 2925 | + self.assertTrue(elem in lhs, '%s in %s' % (elem, lhs)) | ||
| 2926 | |||
| 2927 | def AssertPartitionIsValid(self, set_var, list_of_sets): | ||
| 2928 | """Asserts that list_of_sets is a valid partition of set_var.""" | ||
| 2929 | @@ -575,13 +575,13 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): | ||
| 2930 | |||
| 2931 | shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), | ||
| 2932 | 'shard_status_file') | ||
| 2933 | - self.assert_(not os.path.exists(shard_status_file)) | ||
| 2934 | + self.assertTrue(not os.path.exists(shard_status_file)) | ||
| 2935 | |||
| 2936 | extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} | ||
| 2937 | try: | ||
| 2938 | InvokeWithModifiedEnv(extra_env, RunAndReturnOutput) | ||
| 2939 | finally: | ||
| 2940 | - self.assert_(os.path.exists(shard_status_file)) | ||
| 2941 | + self.assertTrue(os.path.exists(shard_status_file)) | ||
| 2942 | os.remove(shard_status_file) | ||
| 2943 | |||
| 2944 | def testShardStatusFileIsCreatedWithListTests(self): | ||
| 2945 | @@ -589,7 +589,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): | ||
| 2946 | |||
| 2947 | shard_status_file = os.path.join(gtest_test_utils.GetTempDir(), | ||
| 2948 | 'shard_status_file2') | ||
| 2949 | - self.assert_(not os.path.exists(shard_status_file)) | ||
| 2950 | + self.assertTrue(not os.path.exists(shard_status_file)) | ||
| 2951 | |||
| 2952 | extra_env = {SHARD_STATUS_FILE_ENV_VAR: shard_status_file} | ||
| 2953 | try: | ||
| 2954 | @@ -599,12 +599,12 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): | ||
| 2955 | finally: | ||
| 2956 | # This assertion ensures that Google Test enumerated the tests as | ||
| 2957 | # opposed to running them. | ||
| 2958 | - self.assert_('[==========]' not in output, | ||
| 2959 | + self.assertTrue('[==========]' not in output, | ||
| 2960 | 'Unexpected output during test enumeration.\n' | ||
| 2961 | 'Please ensure that LIST_TESTS_FLAG is assigned the\n' | ||
| 2962 | 'correct flag value for listing Google Test tests.') | ||
| 2963 | |||
| 2964 | - self.assert_(os.path.exists(shard_status_file)) | ||
| 2965 | + self.assertTrue(os.path.exists(shard_status_file)) | ||
| 2966 | os.remove(shard_status_file) | ||
| 2967 | |||
| 2968 | if SUPPORTS_DEATH_TESTS: | ||
| 2969 | diff --git a/Source/ThirdParty/gtest/test/gtest_help_test.py b/Source/ThirdParty/gtest/test/gtest_help_test.py | ||
| 2970 | index 3cb4c48e0..8aae487b4 100755 | ||
| 2971 | --- a/Source/ThirdParty/gtest/test/gtest_help_test.py | ||
| 2972 | +++ b/Source/ThirdParty/gtest/test/gtest_help_test.py | ||
| 2973 | @@ -107,17 +107,17 @@ class GTestHelpTest(gtest_test_utils.TestCase): | ||
| 2974 | """ | ||
| 2975 | |||
| 2976 | exit_code, output = RunWithFlag(flag) | ||
| 2977 | - self.assertEquals(0, exit_code) | ||
| 2978 | - self.assert_(HELP_REGEX.search(output), output) | ||
| 2979 | + self.assertEqual(0, exit_code) | ||
| 2980 | + self.assertTrue(HELP_REGEX.search(output), output) | ||
| 2981 | if IS_WINDOWS: | ||
| 2982 | - self.assert_(CATCH_EXCEPTIONS_FLAG in output, output) | ||
| 2983 | + self.assertTrue(CATCH_EXCEPTIONS_FLAG in output, output) | ||
| 2984 | else: | ||
| 2985 | - self.assert_(CATCH_EXCEPTIONS_FLAG not in output, output) | ||
| 2986 | + self.assertTrue(CATCH_EXCEPTIONS_FLAG not in output, output) | ||
| 2987 | |||
| 2988 | if SUPPORTS_DEATH_TESTS and not IS_WINDOWS: | ||
| 2989 | - self.assert_(DEATH_TEST_STYLE_FLAG in output, output) | ||
| 2990 | + self.assertTrue(DEATH_TEST_STYLE_FLAG in output, output) | ||
| 2991 | else: | ||
| 2992 | - self.assert_(DEATH_TEST_STYLE_FLAG not in output, output) | ||
| 2993 | + self.assertTrue(DEATH_TEST_STYLE_FLAG not in output, output) | ||
| 2994 | |||
| 2995 | def TestNonHelpFlag(self, flag): | ||
| 2996 | """Verifies correct behavior when no help flag is specified. | ||
| 2997 | @@ -130,8 +130,8 @@ class GTestHelpTest(gtest_test_utils.TestCase): | ||
| 2998 | """ | ||
| 2999 | |||
| 3000 | exit_code, output = RunWithFlag(flag) | ||
| 3001 | - self.assert_(exit_code != 0) | ||
| 3002 | - self.assert_(not HELP_REGEX.search(output), output) | ||
| 3003 | + self.assertTrue(exit_code != 0) | ||
| 3004 | + self.assertTrue(not HELP_REGEX.search(output), output) | ||
| 3005 | |||
| 3006 | def testPrintsHelpWithFullFlag(self): | ||
| 3007 | self.TestHelpFlag('--help') | ||
| 3008 | diff --git a/Source/ThirdParty/gtest/test/gtest_list_tests_unittest.py b/Source/ThirdParty/gtest/test/gtest_list_tests_unittest.py | ||
| 3009 | index ce8c3ef05..1d3ce746c 100755 | ||
| 3010 | --- a/Source/ThirdParty/gtest/test/gtest_list_tests_unittest.py | ||
| 3011 | +++ b/Source/ThirdParty/gtest/test/gtest_list_tests_unittest.py | ||
| 3012 | @@ -136,9 +136,9 @@ class GTestListTestsUnitTest(gtest_test_utils.TestCase): | ||
| 3013 | (LIST_TESTS_FLAG, flag_expression, ' '.join(args), output)) | ||
| 3014 | |||
| 3015 | if expected_output is not None: | ||
| 3016 | - self.assert_(output == expected_output, msg) | ||
| 3017 | + self.assertTrue(output == expected_output, msg) | ||
| 3018 | else: | ||
| 3019 | - self.assert_(output != EXPECTED_OUTPUT_NO_FILTER, msg) | ||
| 3020 | + self.assertTrue(output != EXPECTED_OUTPUT_NO_FILTER, msg) | ||
| 3021 | |||
| 3022 | def testDefaultBehavior(self): | ||
| 3023 | """Tests the behavior of the default mode.""" | ||
| 3024 | diff --git a/Source/ThirdParty/gtest/test/gtest_shuffle_test.py b/Source/ThirdParty/gtest/test/gtest_shuffle_test.py | ||
| 3025 | index 30d0303d1..e4902f09a 100755 | ||
| 3026 | --- a/Source/ThirdParty/gtest/test/gtest_shuffle_test.py | ||
| 3027 | +++ b/Source/ThirdParty/gtest/test/gtest_shuffle_test.py | ||
| 3028 | @@ -179,23 +179,23 @@ class GTestShuffleUnitTest(gtest_test_utils.TestCase): | ||
| 3029 | self.assertEqual(len(SHARDED_TESTS), len(SHUFFLED_SHARDED_TESTS)) | ||
| 3030 | |||
| 3031 | def testShuffleChangesTestOrder(self): | ||
| 3032 | - self.assert_(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS) | ||
| 3033 | - self.assert_(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS) | ||
| 3034 | - self.assert_(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS, | ||
| 3035 | + self.assertTrue(SHUFFLED_ALL_TESTS != ALL_TESTS, SHUFFLED_ALL_TESTS) | ||
| 3036 | + self.assertTrue(SHUFFLED_ACTIVE_TESTS != ACTIVE_TESTS, SHUFFLED_ACTIVE_TESTS) | ||
| 3037 | + self.assertTrue(SHUFFLED_FILTERED_TESTS != FILTERED_TESTS, | ||
| 3038 | SHUFFLED_FILTERED_TESTS) | ||
| 3039 | - self.assert_(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS, | ||
| 3040 | + self.assertTrue(SHUFFLED_SHARDED_TESTS != SHARDED_TESTS, | ||
| 3041 | SHUFFLED_SHARDED_TESTS) | ||
| 3042 | |||
| 3043 | def testShuffleChangesTestCaseOrder(self): | ||
| 3044 | - self.assert_(GetTestCases(SHUFFLED_ALL_TESTS) != GetTestCases(ALL_TESTS), | ||
| 3045 | + self.assertTrue(GetTestCases(SHUFFLED_ALL_TESTS) != GetTestCases(ALL_TESTS), | ||
| 3046 | GetTestCases(SHUFFLED_ALL_TESTS)) | ||
| 3047 | - self.assert_( | ||
| 3048 | + self.assertTrue( | ||
| 3049 | GetTestCases(SHUFFLED_ACTIVE_TESTS) != GetTestCases(ACTIVE_TESTS), | ||
| 3050 | GetTestCases(SHUFFLED_ACTIVE_TESTS)) | ||
| 3051 | - self.assert_( | ||
| 3052 | + self.assertTrue( | ||
| 3053 | GetTestCases(SHUFFLED_FILTERED_TESTS) != GetTestCases(FILTERED_TESTS), | ||
| 3054 | GetTestCases(SHUFFLED_FILTERED_TESTS)) | ||
| 3055 | - self.assert_( | ||
| 3056 | + self.assertTrue( | ||
| 3057 | GetTestCases(SHUFFLED_SHARDED_TESTS) != GetTestCases(SHARDED_TESTS), | ||
| 3058 | GetTestCases(SHUFFLED_SHARDED_TESTS)) | ||
| 3059 | |||
| 3060 | @@ -215,29 +215,29 @@ class GTestShuffleUnitTest(gtest_test_utils.TestCase): | ||
| 3061 | |||
| 3062 | def testShuffleDoesNotCreateNewTest(self): | ||
| 3063 | for test in SHUFFLED_ALL_TESTS: | ||
| 3064 | - self.assert_(test in ALL_TESTS, '%s is an invalid test' % (test,)) | ||
| 3065 | + self.assertTrue(test in ALL_TESTS, '%s is an invalid test' % (test,)) | ||
| 3066 | for test in SHUFFLED_ACTIVE_TESTS: | ||
| 3067 | - self.assert_(test in ACTIVE_TESTS, '%s is an invalid test' % (test,)) | ||
| 3068 | + self.assertTrue(test in ACTIVE_TESTS, '%s is an invalid test' % (test,)) | ||
| 3069 | for test in SHUFFLED_FILTERED_TESTS: | ||
| 3070 | - self.assert_(test in FILTERED_TESTS, '%s is an invalid test' % (test,)) | ||
| 3071 | + self.assertTrue(test in FILTERED_TESTS, '%s is an invalid test' % (test,)) | ||
| 3072 | for test in SHUFFLED_SHARDED_TESTS: | ||
| 3073 | - self.assert_(test in SHARDED_TESTS, '%s is an invalid test' % (test,)) | ||
| 3074 | + self.assertTrue(test in SHARDED_TESTS, '%s is an invalid test' % (test,)) | ||
| 3075 | |||
| 3076 | def testShuffleIncludesAllTests(self): | ||
| 3077 | for test in ALL_TESTS: | ||
| 3078 | - self.assert_(test in SHUFFLED_ALL_TESTS, '%s is missing' % (test,)) | ||
| 3079 | + self.assertTrue(test in SHUFFLED_ALL_TESTS, '%s is missing' % (test,)) | ||
| 3080 | for test in ACTIVE_TESTS: | ||
| 3081 | - self.assert_(test in SHUFFLED_ACTIVE_TESTS, '%s is missing' % (test,)) | ||
| 3082 | + self.assertTrue(test in SHUFFLED_ACTIVE_TESTS, '%s is missing' % (test,)) | ||
| 3083 | for test in FILTERED_TESTS: | ||
| 3084 | - self.assert_(test in SHUFFLED_FILTERED_TESTS, '%s is missing' % (test,)) | ||
| 3085 | + self.assertTrue(test in SHUFFLED_FILTERED_TESTS, '%s is missing' % (test,)) | ||
| 3086 | for test in SHARDED_TESTS: | ||
| 3087 | - self.assert_(test in SHUFFLED_SHARDED_TESTS, '%s is missing' % (test,)) | ||
| 3088 | + self.assertTrue(test in SHUFFLED_SHARDED_TESTS, '%s is missing' % (test,)) | ||
| 3089 | |||
| 3090 | def testShuffleLeavesDeathTestsAtFront(self): | ||
| 3091 | non_death_test_found = False | ||
| 3092 | for test in SHUFFLED_ACTIVE_TESTS: | ||
| 3093 | if 'DeathTest.' in test: | ||
| 3094 | - self.assert_(not non_death_test_found, | ||
| 3095 | + self.assertTrue(not non_death_test_found, | ||
| 3096 | '%s appears after a non-death test' % (test,)) | ||
| 3097 | else: | ||
| 3098 | non_death_test_found = True | ||
| 3099 | @@ -295,11 +295,11 @@ class GTestShuffleUnitTest(gtest_test_utils.TestCase): | ||
| 3100 | GetTestsForAllIterations( | ||
| 3101 | {}, [ShuffleFlag(), RandomSeedFlag(1), RepeatFlag(3)])) | ||
| 3102 | |||
| 3103 | - self.assert_(tests_in_iteration1 != tests_in_iteration2, | ||
| 3104 | + self.assertTrue(tests_in_iteration1 != tests_in_iteration2, | ||
| 3105 | tests_in_iteration1) | ||
| 3106 | - self.assert_(tests_in_iteration1 != tests_in_iteration3, | ||
| 3107 | + self.assertTrue(tests_in_iteration1 != tests_in_iteration3, | ||
| 3108 | tests_in_iteration1) | ||
| 3109 | - self.assert_(tests_in_iteration2 != tests_in_iteration3, | ||
| 3110 | + self.assertTrue(tests_in_iteration2 != tests_in_iteration3, | ||
| 3111 | tests_in_iteration2) | ||
| 3112 | |||
| 3113 | def testShuffleShardedTestsPreservesPartition(self): | ||
| 3114 | diff --git a/Source/ThirdParty/gtest/test/gtest_test_utils.py b/Source/ThirdParty/gtest/test/gtest_test_utils.py | ||
| 3115 | index e0f5973e7..80a953ea1 100755 | ||
| 3116 | --- a/Source/ThirdParty/gtest/test/gtest_test_utils.py | ||
| 3117 | +++ b/Source/ThirdParty/gtest/test/gtest_test_utils.py | ||
| 3118 | @@ -167,7 +167,7 @@ def GetTestExecutablePath(executable_name, build_dir=None): | ||
| 3119 | # TODO(vladl@google.com): change mk_test.py to test.py after renaming | ||
| 3120 | # the file. | ||
| 3121 | 'Please run mk_test.py -h for help.') | ||
| 3122 | - print >> sys.stderr, message | ||
| 3123 | + print(message, file=sys.stderr) | ||
| 3124 | sys.exit(1) | ||
| 3125 | |||
| 3126 | return path | ||
| 3127 | diff --git a/Source/ThirdParty/gtest/test/gtest_throw_on_failure_test.py b/Source/ThirdParty/gtest/test/gtest_throw_on_failure_test.py | ||
| 3128 | index 5678ffeaf..318e6306c 100755 | ||
| 3129 | --- a/Source/ThirdParty/gtest/test/gtest_throw_on_failure_test.py | ||
| 3130 | +++ b/Source/ThirdParty/gtest/test/gtest_throw_on_failure_test.py | ||
| 3131 | @@ -70,7 +70,7 @@ def SetEnvVar(env_var, value): | ||
| 3132 | def Run(command): | ||
| 3133 | """Runs a command; returns True/False if its exit code is/isn't 0.""" | ||
| 3134 | |||
| 3135 | - print 'Running "%s". . .' % ' '.join(command) | ||
| 3136 | + print('Running "%s". . .' % ' '.join(command)) | ||
| 3137 | p = gtest_test_utils.Subprocess(command) | ||
| 3138 | return p.exited and p.exit_code == 0 | ||
| 3139 | |||
| 3140 | @@ -123,7 +123,7 @@ class ThrowOnFailureTest(gtest_test_utils.TestCase): | ||
| 3141 | 'exit code.' % | ||
| 3142 | (THROW_ON_FAILURE, env_var_value_msg, ' '.join(command), | ||
| 3143 | should_or_not)) | ||
| 3144 | - self.assert_(failed == should_fail, msg) | ||
| 3145 | + self.assertTrue(failed == should_fail, msg) | ||
| 3146 | |||
| 3147 | def testDefaultBehavior(self): | ||
| 3148 | """Tests the behavior of the default mode.""" | ||
| 3149 | diff --git a/Source/ThirdParty/gtest/test/gtest_uninitialized_test.py b/Source/ThirdParty/gtest/test/gtest_uninitialized_test.py | ||
| 3150 | index 6ae57eeed..435837009 100755 | ||
| 3151 | --- a/Source/ThirdParty/gtest/test/gtest_uninitialized_test.py | ||
| 3152 | +++ b/Source/ThirdParty/gtest/test/gtest_uninitialized_test.py | ||
| 3153 | @@ -46,8 +46,8 @@ def Assert(condition): | ||
| 3154 | |||
| 3155 | def AssertEq(expected, actual): | ||
| 3156 | if expected != actual: | ||
| 3157 | - print 'Expected: %s' % (expected,) | ||
| 3158 | - print ' Actual: %s' % (actual,) | ||
| 3159 | + print('Expected: %s' % (expected,)) | ||
| 3160 | + print(' Actual: %s' % (actual,)) | ||
| 3161 | raise AssertionError | ||
| 3162 | |||
| 3163 | |||
| 3164 | diff --git a/Source/ThirdParty/gtest/test/gtest_xml_outfiles_test.py b/Source/ThirdParty/gtest/test/gtest_xml_outfiles_test.py | ||
| 3165 | index 0fe947f08..7281864c5 100755 | ||
| 3166 | --- a/Source/ThirdParty/gtest/test/gtest_xml_outfiles_test.py | ||
| 3167 | +++ b/Source/ThirdParty/gtest/test/gtest_xml_outfiles_test.py | ||
| 3168 | @@ -100,8 +100,8 @@ class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): | ||
| 3169 | command = [gtest_prog_path, "--gtest_output=xml:%s" % self.output_dir_] | ||
| 3170 | p = gtest_test_utils.Subprocess(command, | ||
| 3171 | working_dir=gtest_test_utils.GetTempDir()) | ||
| 3172 | - self.assert_(p.exited) | ||
| 3173 | - self.assertEquals(0, p.exit_code) | ||
| 3174 | + self.assertTrue(p.exited) | ||
| 3175 | + self.assertEqual(0, p.exit_code) | ||
| 3176 | |||
| 3177 | # TODO(wan@google.com): libtool causes the built test binary to be | ||
| 3178 | # named lt-gtest_xml_outfiles_test_ instead of | ||
| 3179 | @@ -112,7 +112,7 @@ class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): | ||
| 3180 | output_file1 = os.path.join(self.output_dir_, output_file_name1) | ||
| 3181 | output_file_name2 = 'lt-' + output_file_name1 | ||
| 3182 | output_file2 = os.path.join(self.output_dir_, output_file_name2) | ||
| 3183 | - self.assert_(os.path.isfile(output_file1) or os.path.isfile(output_file2), | ||
| 3184 | + self.assertTrue(os.path.isfile(output_file1) or os.path.isfile(output_file2), | ||
| 3185 | output_file1) | ||
| 3186 | |||
| 3187 | expected = minidom.parseString(expected_xml) | ||
| 3188 | diff --git a/Source/ThirdParty/gtest/test/gtest_xml_output_unittest.py b/Source/ThirdParty/gtest/test/gtest_xml_output_unittest.py | ||
| 3189 | index 6d44929ca..93b67532e 100755 | ||
| 3190 | --- a/Source/ThirdParty/gtest/test/gtest_xml_output_unittest.py | ||
| 3191 | +++ b/Source/ThirdParty/gtest/test/gtest_xml_output_unittest.py | ||
| 3192 | @@ -145,16 +145,16 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): | ||
| 3193 | "gtest_no_test_unittest") | ||
| 3194 | try: | ||
| 3195 | os.remove(output_file) | ||
| 3196 | - except OSError, e: | ||
| 3197 | + except OSError as e: | ||
| 3198 | if e.errno != errno.ENOENT: | ||
| 3199 | raise | ||
| 3200 | |||
| 3201 | p = gtest_test_utils.Subprocess( | ||
| 3202 | [gtest_prog_path, "%s=xml" % GTEST_OUTPUT_FLAG], | ||
| 3203 | working_dir=gtest_test_utils.GetTempDir()) | ||
| 3204 | - self.assert_(p.exited) | ||
| 3205 | - self.assertEquals(0, p.exit_code) | ||
| 3206 | - self.assert_(os.path.isfile(output_file)) | ||
| 3207 | + self.assertTrue(p.exited) | ||
| 3208 | + self.assertEqual(0, p.exit_code) | ||
| 3209 | + self.assertTrue(os.path.isfile(output_file)) | ||
| 3210 | |||
| 3211 | def testSuppressedXmlOutput(self): | ||
| 3212 | """ | ||
| 3213 | @@ -174,16 +174,16 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): | ||
| 3214 | "--shut_down_xml"] | ||
| 3215 | p = gtest_test_utils.Subprocess(command) | ||
| 3216 | if p.terminated_by_signal: | ||
| 3217 | - self.assert_(False, | ||
| 3218 | + self.assertTrue(False, | ||
| 3219 | "%s was killed by signal %d" % (gtest_prog_name, p.signal)) | ||
| 3220 | else: | ||
| 3221 | - self.assert_(p.exited) | ||
| 3222 | - self.assertEquals(1, p.exit_code, | ||
| 3223 | + self.assertTrue(p.exited) | ||
| 3224 | + self.assertEqual(1, p.exit_code, | ||
| 3225 | "'%s' exited with code %s, which doesn't match " | ||
| 3226 | "the expected exit code %s." | ||
| 3227 | % (command, p.exit_code, 1)) | ||
| 3228 | |||
| 3229 | - self.assert_(not os.path.isfile(xml_path)) | ||
| 3230 | + self.assertTrue(not os.path.isfile(xml_path)) | ||
| 3231 | |||
| 3232 | |||
| 3233 | def _TestXmlOutput(self, gtest_prog_name, expected_xml, expected_exit_code): | ||
| 3234 | @@ -200,11 +200,11 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): | ||
| 3235 | command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)] | ||
| 3236 | p = gtest_test_utils.Subprocess(command) | ||
| 3237 | if p.terminated_by_signal: | ||
| 3238 | - self.assert_(False, | ||
| 3239 | + self.assertTrue(False, | ||
| 3240 | "%s was killed by signal %d" % (gtest_prog_name, p.signal)) | ||
| 3241 | else: | ||
| 3242 | - self.assert_(p.exited) | ||
| 3243 | - self.assertEquals(expected_exit_code, p.exit_code, | ||
| 3244 | + self.assertTrue(p.exited) | ||
| 3245 | + self.assertEqual(expected_exit_code, p.exit_code, | ||
| 3246 | "'%s' exited with code %s, which doesn't match " | ||
| 3247 | "the expected exit code %s." | ||
| 3248 | % (command, p.exit_code, expected_exit_code)) | ||
| 3249 | diff --git a/Source/ThirdParty/gtest/test/gtest_xml_test_utils.py b/Source/ThirdParty/gtest/test/gtest_xml_test_utils.py | ||
| 3250 | index c83c3b7ea..2d6afb359 100755 | ||
| 3251 | --- a/Source/ThirdParty/gtest/test/gtest_xml_test_utils.py | ||
| 3252 | +++ b/Source/ThirdParty/gtest/test/gtest_xml_test_utils.py | ||
| 3253 | @@ -67,37 +67,37 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): | ||
| 3254 | """ | ||
| 3255 | |||
| 3256 | if expected_node.nodeType == Node.CDATA_SECTION_NODE: | ||
| 3257 | - self.assertEquals(Node.CDATA_SECTION_NODE, actual_node.nodeType) | ||
| 3258 | - self.assertEquals(expected_node.nodeValue, actual_node.nodeValue) | ||
| 3259 | + self.assertEqual(Node.CDATA_SECTION_NODE, actual_node.nodeType) | ||
| 3260 | + self.assertEqual(expected_node.nodeValue, actual_node.nodeValue) | ||
| 3261 | return | ||
| 3262 | |||
| 3263 | - self.assertEquals(Node.ELEMENT_NODE, actual_node.nodeType) | ||
| 3264 | - self.assertEquals(Node.ELEMENT_NODE, expected_node.nodeType) | ||
| 3265 | - self.assertEquals(expected_node.tagName, actual_node.tagName) | ||
| 3266 | + self.assertEqual(Node.ELEMENT_NODE, actual_node.nodeType) | ||
| 3267 | + self.assertEqual(Node.ELEMENT_NODE, expected_node.nodeType) | ||
| 3268 | + self.assertEqual(expected_node.tagName, actual_node.tagName) | ||
| 3269 | |||
| 3270 | expected_attributes = expected_node.attributes | ||
| 3271 | actual_attributes = actual_node .attributes | ||
| 3272 | - self.assertEquals( | ||
| 3273 | + self.assertEqual( | ||
| 3274 | expected_attributes.length, actual_attributes.length, | ||
| 3275 | "attribute numbers differ in element " + actual_node.tagName) | ||
| 3276 | for i in range(expected_attributes.length): | ||
| 3277 | expected_attr = expected_attributes.item(i) | ||
| 3278 | actual_attr = actual_attributes.get(expected_attr.name) | ||
| 3279 | - self.assert_( | ||
| 3280 | + self.assertTrue( | ||
| 3281 | actual_attr is not None, | ||
| 3282 | "expected attribute %s not found in element %s" % | ||
| 3283 | (expected_attr.name, actual_node.tagName)) | ||
| 3284 | - self.assertEquals(expected_attr.value, actual_attr.value, | ||
| 3285 | + self.assertEqual(expected_attr.value, actual_attr.value, | ||
| 3286 | " values of attribute %s in element %s differ" % | ||
| 3287 | (expected_attr.name, actual_node.tagName)) | ||
| 3288 | |||
| 3289 | expected_children = self._GetChildren(expected_node) | ||
| 3290 | actual_children = self._GetChildren(actual_node) | ||
| 3291 | - self.assertEquals( | ||
| 3292 | + self.assertEqual( | ||
| 3293 | len(expected_children), len(actual_children), | ||
| 3294 | "number of child elements differ in element " + actual_node.tagName) | ||
| 3295 | - for child_id, child in expected_children.iteritems(): | ||
| 3296 | - self.assert_(child_id in actual_children, | ||
| 3297 | + for child_id, child in expected_children.items(): | ||
| 3298 | + self.assertTrue(child_id in actual_children, | ||
| 3299 | '<%s> is not in <%s> (in element %s)' % | ||
| 3300 | (child_id, actual_children, actual_node.tagName)) | ||
| 3301 | self.AssertEquivalentNodes(child, actual_children[child_id]) | ||
| 3302 | @@ -125,10 +125,10 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): | ||
| 3303 | children = {} | ||
| 3304 | for child in element.childNodes: | ||
| 3305 | if child.nodeType == Node.ELEMENT_NODE: | ||
| 3306 | - self.assert_(child.tagName in self.identifying_attribute, | ||
| 3307 | + self.assertTrue(child.tagName in self.identifying_attribute, | ||
| 3308 | "Encountered unknown element <%s>" % child.tagName) | ||
| 3309 | childID = child.getAttribute(self.identifying_attribute[child.tagName]) | ||
| 3310 | - self.assert_(childID not in children) | ||
| 3311 | + self.assertTrue(childID not in children) | ||
| 3312 | children[childID] = child | ||
| 3313 | elif child.nodeType in [Node.TEXT_NODE, Node.CDATA_SECTION_NODE]: | ||
| 3314 | if "detail" not in children: | ||
| 3315 | diff --git a/Source/ThirdParty/gtest/test/run_tests_util.py b/Source/ThirdParty/gtest/test/run_tests_util.py | ||
| 3316 | index 9e57931eb..1f4d33af2 100755 | ||
| 3317 | --- a/Source/ThirdParty/gtest/test/run_tests_util.py | ||
| 3318 | +++ b/Source/ThirdParty/gtest/test/run_tests_util.py | ||
| 3319 | @@ -159,8 +159,8 @@ def _GetConfigFromBuildDir(build_dir): | ||
| 3320 | if m: | ||
| 3321 | return m.group(1) | ||
| 3322 | else: | ||
| 3323 | - print >>sys.stderr, ('%s is an invalid build directory that does not ' | ||
| 3324 | - 'correspond to any configuration.' % (build_dir,)) | ||
| 3325 | + print(('%s is an invalid build directory that does not ' | ||
| 3326 | + 'correspond to any configuration.' % (build_dir,)), file=sys.stderr) | ||
| 3327 | return '' | ||
| 3328 | |||
| 3329 | |||
| 3330 | @@ -250,7 +250,7 @@ class TestRunner(object): | ||
| 3331 | # If this script is run on a Windows machine that has no association | ||
| 3332 | # between the .py extension and a python interpreter, simply passing | ||
| 3333 | # the script name into subprocess.Popen/os.spawn will not work. | ||
| 3334 | - print 'Running %s . . .' % (test,) | ||
| 3335 | + print('Running %s . . .' % (test,)) | ||
| 3336 | return self._Run([sys.executable, test]) | ||
| 3337 | |||
| 3338 | finally: | ||
| 3339 | @@ -308,7 +308,7 @@ class TestRunner(object): | ||
| 3340 | # A final list of build directories which will be searched for the test | ||
| 3341 | # binaries. First, add directories specified directly on the command | ||
| 3342 | # line. | ||
| 3343 | - build_dirs = filter(self.os.path.isdir, normalized_args) | ||
| 3344 | + build_dirs = list(filter(self.os.path.isdir, normalized_args)) | ||
| 3345 | |||
| 3346 | # Adds build directories specified via their build configurations using | ||
| 3347 | # the -c or -a options. | ||
| 3348 | @@ -374,8 +374,8 @@ class TestRunner(object): | ||
| 3349 | config = _GetConfigFromBuildDir(directory) | ||
| 3350 | file_name = os.path.basename(test) | ||
| 3351 | if python_tests_to_skip and (config, file_name) in python_tests_to_skip: | ||
| 3352 | - print ('NOTE: %s is skipped for configuration %s, as it does not ' | ||
| 3353 | - 'work there.' % (file_name, config)) | ||
| 3354 | + print(('NOTE: %s is skipped for configuration %s, as it does not ' | ||
| 3355 | + 'work there.' % (file_name, config))) | ||
| 3356 | else: | ||
| 3357 | python_test_pairs.append((directory, test)) | ||
| 3358 | |||
| 3359 | @@ -418,17 +418,17 @@ class TestRunner(object): | ||
| 3360 | failed = [(directory, test) | ||
| 3361 | for (directory, test, success) in results | ||
| 3362 | if not success] | ||
| 3363 | |||
| 3364 | - print '%d tests run.' % len(results) | ||
| 3365 | + print() | ||
| 3366 | + print('%d tests run.' % len(results)) | ||
| 3367 | if failed: | ||
| 3368 | - print 'The following %d tests failed:' % len(failed) | ||
| 3369 | + print('The following %d tests failed:' % len(failed)) | ||
| 3370 | for (directory, test) in failed: | ||
| 3371 | - print '%s in %s' % (test, directory) | ||
| 3372 | + print('%s in %s' % (test, directory)) | ||
| 3373 | return 1 | ||
| 3374 | else: | ||
| 3375 | - print 'All tests passed!' | ||
| 3376 | + print('All tests passed!') | ||
| 3377 | else: # No tests defined | ||
| 3378 | - print 'Nothing to test - no tests specified!' | ||
| 3379 | + print('Nothing to test - no tests specified!') | ||
| 3380 | |||
| 3381 | return 0 | ||
| 3382 | |||
| 3383 | @@ -440,7 +440,7 @@ def ParseArgs(project_name, argv=None, help_callback=None): | ||
| 3384 | # required by optparse, even though they are unused. | ||
| 3385 | # pylint: disable-msg=W0613 | ||
| 3386 | def PrintHelp(option, opt, value, parser): | ||
| 3387 | - print HELP_MSG % {'proj': project_name} | ||
| 3388 | + print(HELP_MSG % {'proj': project_name}) | ||
| 3389 | sys.exit(1) | ||
| 3390 | |||
| 3391 | parser = optparse.OptionParser() | ||
| 3392 | diff --git a/Source/ThirdParty/gtest/test/run_tests_util_test.py b/Source/ThirdParty/gtest/test/run_tests_util_test.py | ||
| 3393 | index 9c55726fd..dce27f3ae 100755 | ||
| 3394 | --- a/Source/ThirdParty/gtest/test/run_tests_util_test.py | ||
| 3395 | +++ b/Source/ThirdParty/gtest/test/run_tests_util_test.py | ||
| 3396 | @@ -144,7 +144,7 @@ class FakeOs(object): | ||
| 3397 | # pylint: disable-msg=C6409 | ||
| 3398 | def listdir(self, path): | ||
| 3399 | assert self.path.isdir(path) | ||
| 3400 | - return self.path.PathElement(path).iterkeys() | ||
| 3401 | + return iter(self.path.PathElement(path).keys()) | ||
| 3402 | |||
| 3403 | def spawnv(self, wait, executable, *kargs): | ||
| 3404 | assert wait == FakeOs.P_WAIT | ||
| 3405 | @@ -165,7 +165,7 @@ class GetTestsToRunTest(unittest.TestCase): | ||
| 3406 | def NormalizeBinaryTestPair(pair): | ||
| 3407 | """Normalizes path data in the (directory, binary_executable) pair.""" | ||
| 3408 | |||
| 3409 | - directory, executable = map(os.path.normpath, pair) | ||
| 3410 | + directory, executable = list(map(os.path.normpath, pair)) | ||
| 3411 | |||
| 3412 | # On Windows and Cygwin, the test file names have the .exe extension, but | ||
| 3413 | # they can be invoked either by name or by name+extension. Our test must | ||
| 3414 | @@ -174,8 +174,8 @@ class GetTestsToRunTest(unittest.TestCase): | ||
| 3415 | executable = re.sub(r'\.exe$', '', executable) | ||
| 3416 | return (directory, executable) | ||
| 3417 | |||
| 3418 | - python_tests = sets.Set(map(NormalizePythonTestPair, results[0])) | ||
| 3419 | - binary_tests = sets.Set(map(NormalizeBinaryTestPair, results[1])) | ||
| 3420 | + python_tests = sets.Set(list(map(NormalizePythonTestPair, results[0]))) | ||
| 3421 | + binary_tests = sets.Set(list(map(NormalizeBinaryTestPair, results[1]))) | ||
| 3422 | return (python_tests, binary_tests) | ||
| 3423 | |||
| 3424 | def AssertResultsEqual(self, results, expected): | ||
| 3425 | @@ -472,7 +472,7 @@ class GetTestsToRunTest(unittest.TestCase): | ||
| 3426 | def testNonTestBinary(self): | ||
| 3427 | """Exercises GetTestsToRun with a non-test parameter.""" | ||
| 3428 | |||
| 3429 | - self.assert_( | ||
| 3430 | + self.assertTrue( | ||
| 3431 | not self.test_runner.GetTestsToRun( | ||
| 3432 | ['gtest_unittest_not_really'], | ||
| 3433 | '', | ||
| 3434 | @@ -482,7 +482,7 @@ class GetTestsToRunTest(unittest.TestCase): | ||
| 3435 | def testNonExistingPythonTest(self): | ||
| 3436 | """Exercises GetTestsToRun with a non-existent Python test parameter.""" | ||
| 3437 | |||
| 3438 | - self.assert_( | ||
| 3439 | + self.assertTrue( | ||
| 3440 | not self.test_runner.GetTestsToRun( | ||
| 3441 | ['nonexistent_test.py'], | ||
| 3442 | '', | ||
| 3443 | @@ -619,7 +619,7 @@ class ParseArgsTest(unittest.TestCase): | ||
| 3444 | def testNoOptions(self): | ||
| 3445 | options, args = run_tests_util.ParseArgs('gtest', argv=['script.py']) | ||
| 3446 | self.assertEqual(args, ['script.py']) | ||
| 3447 | - self.assert_(options.configurations is None) | ||
| 3448 | + self.assertTrue(options.configurations is None) | ||
| 3449 | self.assertFalse(options.built_configurations) | ||
| 3450 | |||
| 3451 | def testOptionC(self): | ||
| 3452 | @@ -638,7 +638,7 @@ class ParseArgsTest(unittest.TestCase): | ||
| 3453 | def testOptionB(self): | ||
| 3454 | options, args = run_tests_util.ParseArgs('gtest', argv=['script.py', '-b']) | ||
| 3455 | self.assertEqual(args, ['script.py']) | ||
| 3456 | - self.assert_(options.configurations is None) | ||
| 3457 | + self.assertTrue(options.configurations is None) | ||
| 3458 | self.assertTrue(options.built_configurations) | ||
| 3459 | |||
| 3460 | def testOptionCAndOptionB(self): | ||
| 3461 | diff --git a/Source/ThirdParty/gtest/xcode/Scripts/versiongenerate.py b/Source/ThirdParty/gtest/xcode/Scripts/versiongenerate.py | ||
| 3462 | index 81de8c96a..ea24f964c 100644 | ||
| 3463 | --- a/Source/ThirdParty/gtest/xcode/Scripts/versiongenerate.py | ||
| 3464 | +++ b/Source/ThirdParty/gtest/xcode/Scripts/versiongenerate.py | ||
| 3465 | @@ -54,7 +54,7 @@ import re | ||
| 3466 | |||
| 3467 | # Read the command line argument (the output directory for Version.h) | ||
| 3468 | if (len(sys.argv) < 3): | ||
| 3469 | - print "Usage: versiongenerate.py input_dir output_dir" | ||
| 3470 | + print("Usage: versiongenerate.py input_dir output_dir") | ||
| 3471 | sys.exit(1) | ||
| 3472 | else: | ||
| 3473 | input_dir = sys.argv[1] | ||
| 3474 | diff --git a/Source/WebCore/AVFoundationSupport.py b/Source/WebCore/AVFoundationSupport.py | ||
| 3475 | index 7f13a8742..a3ab479ad 100644 | ||
| 3476 | --- a/Source/WebCore/AVFoundationSupport.py | ||
| 3477 | +++ b/Source/WebCore/AVFoundationSupport.py | ||
| 3478 | @@ -42,22 +42,22 @@ def fileContains(relativePath, regexp): | ||
| 3479 | return False | ||
| 3480 | |||
| 3481 | |||
| 3482 | -print "/* Identifying AVFoundation Support */" | ||
| 3483 | +print("/* Identifying AVFoundation Support */") | ||
| 3484 | if lookFor("/include/AVFoundationCF/AVCFBase.h"): | ||
| 3485 | - print "#define HAVE_AVCF 1" | ||
| 3486 | + print("#define HAVE_AVCF 1") | ||
| 3487 | if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"): | ||
| 3488 | - print "#define HAVE_AVCF_LEGIBLE_OUTPUT 1" | ||
| 3489 | + print("#define HAVE_AVCF_LEGIBLE_OUTPUT 1") | ||
| 3490 | if lookFor("/include/AVFoundationCF/AVCFAssetResourceLoader.h"): | ||
| 3491 | - print "#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1" | ||
| 3492 | + print("#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1") | ||
| 3493 | if lookFor("/include/AVFoundationCF/AVCFAsset.h"): | ||
| 3494 | regexp = re.compile("AVCFURLAssetIsPlayableExtendedMIMEType") | ||
| 3495 | if fileContains("/include/AVFoundationCF/AVCFAsset.h", regexp): | ||
| 3496 | - print "#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1" | ||
| 3497 | + print("#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1") | ||
| 3498 | if lookFor("/include/QuartzCore/CACFLayer.h"): | ||
| 3499 | regexp = re.compile("CACFLayerSetContentsScale") | ||
| 3500 | if fileContains("/include/QuartzCore/CACFLayer.h", regexp): | ||
| 3501 | - print "#define HAVE_CACFLAYER_SETCONTENTSSCALE 1" | ||
| 3502 | + print("#define HAVE_CACFLAYER_SETCONTENTSSCALE 1") | ||
| 3503 | if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"): | ||
| 3504 | regexp = re.compile("kAVCFPlayerItemLegibleOutput_CallbacksVersion_2") | ||
| 3505 | if fileContains("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h", regexp): | ||
| 3506 | - print "#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1" | ||
| 3507 | + print("#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1") | ||
| 3508 | diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt | ||
| 3509 | index 56b32563a..feac0dbbb 100644 | ||
| 3510 | --- a/Source/WebCore/CMakeLists.txt | ||
| 3511 | +++ b/Source/WebCore/CMakeLists.txt | ||
| 3512 | @@ -3671,14 +3671,14 @@ set(WebCore_BUILTINS_SOURCES | ||
| 3513 | ) | ||
| 3514 | |||
| 3515 | set(BUILTINS_GENERATOR_SCRIPTS | ||
| 3516 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins.py | ||
| 3517 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py | ||
| 3518 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py | ||
| 3519 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py | ||
| 3520 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py | ||
| 3521 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py | ||
| 3522 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py | ||
| 3523 | - ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py | ||
| 3524 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins.py | ||
| 3525 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generator.py | ||
| 3526 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_model.py | ||
| 3527 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_templates.py | ||
| 3528 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_combined_header.py | ||
| 3529 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_combined_implementation.py | ||
| 3530 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_separate_header.py | ||
| 3531 | + ${JavaScriptCore_SCRIPTS_DIR}/mybuiltins_generate_separate_implementation.py | ||
| 3532 | ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py | ||
| 3533 | ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py | ||
| 3534 | ) | ||
| 3535 | diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make | ||
| 3536 | index 0f5a79fa4..83bf5f96a 100644 | ||
| 3537 | --- a/Source/WebCore/DerivedSources.make | ||
| 3538 | +++ b/Source/WebCore/DerivedSources.make | ||
| 3539 | @@ -1286,14 +1286,14 @@ WebCore_BUILTINS_SOURCES = \ | ||
| 3540 | # | ||
| 3541 | |||
| 3542 | BUILTINS_GENERATOR_SCRIPTS = \ | ||
| 3543 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins.py \ | ||
| 3544 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_generator.py \ | ||
| 3545 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_model.py \ | ||
| 3546 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_templates.py \ | ||
| 3547 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_combined_header.py \ | ||
| 3548 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_combined_implementation.py \ | ||
| 3549 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_separate_header.py \ | ||
| 3550 | - $(JavaScriptCore_SCRIPTS_DIR)/builtins_generate_separate_implementation.py \ | ||
| 3551 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins.py \ | ||
| 3552 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_generator.py \ | ||
| 3553 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_model.py \ | ||
| 3554 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_templates.py \ | ||
| 3555 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_generate_combined_header.py \ | ||
| 3556 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_generate_combined_implementation.py \ | ||
| 3557 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_generate_separate_header.py \ | ||
| 3558 | + $(JavaScriptCore_SCRIPTS_DIR)/mybuiltins_generate_separate_implementation.py \ | ||
| 3559 | $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \ | ||
| 3560 | $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \ | ||
| 3561 | # | ||
| 3562 | diff --git a/Source/WebCore/platform/network/create-http-header-name-table b/Source/WebCore/platform/network/create-http-header-name-table | ||
| 3563 | index 755d22e94..3dc57a568 100755 | ||
| 3564 | --- a/Source/WebCore/platform/network/create-http-header-name-table | ||
| 3565 | +++ b/Source/WebCore/platform/network/create-http-header-name-table | ||
| 3566 | @@ -41,7 +41,7 @@ input_file = open(input_path) | ||
| 3567 | http_header_name_to_id = { } | ||
| 3568 | http_header_names = [] | ||
| 3569 | |||
| 3570 | -for line in input_file.xreadlines(): | ||
| 3571 | +for line in input_file: | ||
| 3572 | http_header_name = line.strip() | ||
| 3573 | if not http_header_name or http_header_name[:2] == '//': | ||
| 3574 | continue | ||
| 3575 | diff --git a/Source/WebInspectorUI/Scripts/jsmin.py b/Source/WebInspectorUI/Scripts/jsmin.py | ||
| 3576 | index 372418b4d..2f9fddfce 100644 | ||
| 3577 | --- a/Source/WebInspectorUI/Scripts/jsmin.py | ||
| 3578 | +++ b/Source/WebInspectorUI/Scripts/jsmin.py | ||
| 3579 | @@ -23,17 +23,20 @@ | ||
| 3580 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 3581 | # THE SOFTWARE. | ||
| 3582 | |||
| 3583 | +# stolen from webkitgtk 2.26.2 | ||
| 3584 | |||
| 3585 | import sys | ||
| 3586 | is_3 = sys.version_info >= (3, 0) | ||
| 3587 | if is_3: | ||
| 3588 | import io | ||
| 3589 | + python_text_type = str | ||
| 3590 | else: | ||
| 3591 | import StringIO | ||
| 3592 | try: | ||
| 3593 | import cStringIO | ||
| 3594 | except ImportError: | ||
| 3595 | cStringIO = None | ||
| 3596 | + python_text_type = basestring | ||
| 3597 | |||
| 3598 | |||
| 3599 | __all__ = ['jsmin', 'JavascriptMinify'] | ||
| 3600 | @@ -79,14 +82,18 @@ class JavascriptMinify(object): | ||
| 3601 | def write(char): | ||
| 3602 | # all of this is to support literal regular expressions. | ||
| 3603 | # sigh | ||
| 3604 | - if char in 'return': | ||
| 3605 | + if str(char) in 'return': | ||
| 3606 | self.return_buf += char | ||
| 3607 | self.is_return = self.return_buf == 'return' | ||
| 3608 | self.outs.write(char) | ||
| 3609 | if self.is_return: | ||
| 3610 | self.return_buf = '' | ||
| 3611 | |||
| 3612 | - read = self.ins.read | ||
| 3613 | + def read(n): | ||
| 3614 | + char = self.ins.read(n) | ||
| 3615 | + if not isinstance(char, python_text_type): | ||
| 3616 | + raise ValueError("ERROR: The script jsmin.py can only handle text input, but it received input of type %s" % type(char)) | ||
| 3617 | + return char | ||
| 3618 | |||
| 3619 | space_strings = "abcdefghijklmnopqrstuvwxyz"\ | ||
| 3620 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\" | ||
| 3621 | @@ -118,8 +125,8 @@ class JavascriptMinify(object): | ||
| 3622 | write(previous) | ||
| 3623 | elif not previous: | ||
| 3624 | return | ||
| 3625 | - elif previous >= '!': | ||
| 3626 | - if previous in "'\"": | ||
| 3627 | + elif str(previous) >= "!": | ||
| 3628 | + if str(previous) in "'\"": | ||
| 3629 | in_quote = previous | ||
| 3630 | write(previous) | ||
| 3631 | previous_non_space = previous | ||
| 3632 | @@ -166,7 +173,7 @@ class JavascriptMinify(object): | ||
| 3633 | if numslashes % 2 == 0: | ||
| 3634 | in_quote = '' | ||
| 3635 | write(''.join(quote_buf)) | ||
| 3636 | - elif next1 in '\r\n': | ||
| 3637 | + elif str(next1) in '\r\n': | ||
| 3638 | if previous_non_space in newlineend_strings \ | ||
| 3639 | or previous_non_space > '~': | ||
| 3640 | while 1: | ||
| 3641 | @@ -179,7 +186,7 @@ class JavascriptMinify(object): | ||
| 3642 | or next2 > '~' or next2 == '/': | ||
| 3643 | do_newline = True | ||
| 3644 | break | ||
| 3645 | - elif next1 < '!' and not in_re: | ||
| 3646 | + elif str(next1) < '!' and not in_re: | ||
| 3647 | if (previous_non_space in space_strings \ | ||
| 3648 | or previous_non_space > '~') \ | ||
| 3649 | and (next2 in space_strings or next2 > '~'): | ||
| 3650 | @@ -217,14 +224,14 @@ class JavascriptMinify(object): | ||
| 3651 | do_newline = False | ||
| 3652 | |||
| 3653 | write(next1) | ||
| 3654 | - if not in_re and next1 in "'\"`": | ||
| 3655 | + if not in_re and str(next1) in "'\"`": | ||
| 3656 | in_quote = next1 | ||
| 3657 | quote_buf = [] | ||
| 3658 | |||
| 3659 | previous = next1 | ||
| 3660 | next1 = next2 | ||
| 3661 | |||
| 3662 | - if previous >= '!': | ||
| 3663 | + if str(previous) >= '!': | ||
| 3664 | previous_non_space = previous | ||
| 3665 | |||
| 3666 | if previous == '\\': | ||
| 3667 | diff --git a/Source/WebKit2/Scripts/generate-message-receiver.py b/Source/WebKit2/Scripts/generate-message-receiver.py | ||
| 3668 | index 6413a8bf3..8702117f0 100644 | ||
| 3669 | --- a/Source/WebKit2/Scripts/generate-message-receiver.py | ||
| 3670 | +++ b/Source/WebKit2/Scripts/generate-message-receiver.py | ||
| 3671 | @@ -22,7 +22,7 @@ | ||
| 3672 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 3673 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 3674 | |||
| 3675 | -from __future__ import with_statement | ||
| 3676 | + | ||
| 3677 | import sys | ||
| 3678 | |||
| 3679 | import webkit.messages | ||
| 3680 | diff --git a/Source/WebKit2/Scripts/generate-messages-header.py b/Source/WebKit2/Scripts/generate-messages-header.py | ||
| 3681 | index ad73a5283..b35ee7d51 100644 | ||
| 3682 | --- a/Source/WebKit2/Scripts/generate-messages-header.py | ||
| 3683 | +++ b/Source/WebKit2/Scripts/generate-messages-header.py | ||
| 3684 | @@ -22,7 +22,7 @@ | ||
| 3685 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 3686 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 3687 | |||
| 3688 | -from __future__ import with_statement | ||
| 3689 | + | ||
| 3690 | import sys | ||
| 3691 | |||
| 3692 | import webkit.messages | ||
| 3693 | diff --git a/Source/WebKit2/Scripts/webkit/messages_unittest.py b/Source/WebKit2/Scripts/webkit/messages_unittest.py | ||
| 3694 | index 164199fc2..5f58e1919 100644 | ||
| 3695 | --- a/Source/WebKit2/Scripts/webkit/messages_unittest.py | ||
| 3696 | +++ b/Source/WebKit2/Scripts/webkit/messages_unittest.py | ||
| 3697 | @@ -24,7 +24,7 @@ import os | ||
| 3698 | import re | ||
| 3699 | import sys | ||
| 3700 | import unittest | ||
| 3701 | -from StringIO import StringIO | ||
| 3702 | +from io import StringIO | ||
| 3703 | |||
| 3704 | sys.path.append(os.path.dirname(os.path.dirname(__file__))) | ||
| 3705 | from webkit import messages | ||
| 3706 | @@ -255,43 +255,43 @@ class MessagesTest(unittest.TestCase): | ||
| 3707 | |||
| 3708 | class ParsingTest(MessagesTest): | ||
| 3709 | def check_message(self, message, expected_message): | ||
| 3710 | - self.assertEquals(message.name, expected_message['name']) | ||
| 3711 | - self.assertEquals(len(message.parameters), len(expected_message['parameters'])) | ||
| 3712 | + self.assertEqual(message.name, expected_message['name']) | ||
| 3713 | + self.assertEqual(len(message.parameters), len(expected_message['parameters'])) | ||
| 3714 | for index, parameter in enumerate(message.parameters): | ||
| 3715 | expected_parameter = expected_message['parameters'][index] | ||
| 3716 | - self.assertEquals(parameter.type, expected_parameter[0]) | ||
| 3717 | - self.assertEquals(parameter.name, expected_parameter[1]) | ||
| 3718 | + self.assertEqual(parameter.type, expected_parameter[0]) | ||
| 3719 | + self.assertEqual(parameter.name, expected_parameter[1]) | ||
| 3720 | if len(expected_parameter) > 2: | ||
| 3721 | - self.assertEquals(parameter.attributes, frozenset(expected_parameter[2])) | ||
| 3722 | + self.assertEqual(parameter.attributes, frozenset(expected_parameter[2])) | ||
| 3723 | for attribute in expected_parameter[2]: | ||
| 3724 | self.assertTrue(parameter.has_attribute(attribute)) | ||
| 3725 | else: | ||
| 3726 | - self.assertEquals(parameter.attributes, frozenset()) | ||
| 3727 | + self.assertEqual(parameter.attributes, frozenset()) | ||
| 3728 | if message.reply_parameters is not None: | ||
| 3729 | for index, parameter in enumerate(message.reply_parameters): | ||
| 3730 | - self.assertEquals(parameter.type, expected_message['reply_parameters'][index][0]) | ||
| 3731 | - self.assertEquals(parameter.name, expected_message['reply_parameters'][index][1]) | ||
| 3732 | + self.assertEqual(parameter.type, expected_message['reply_parameters'][index][0]) | ||
| 3733 | + self.assertEqual(parameter.name, expected_message['reply_parameters'][index][1]) | ||
| 3734 | else: | ||
| 3735 | self.assertFalse('reply_parameters' in expected_message) | ||
| 3736 | - self.assertEquals(message.condition, expected_message['conditions']) | ||
| 3737 | + self.assertEqual(message.condition, expected_message['conditions']) | ||
| 3738 | |||
| 3739 | def test_receiver(self): | ||
| 3740 | """Receiver should be parsed as expected""" | ||
| 3741 | - self.assertEquals(self.receiver.name, _expected_results['name']) | ||
| 3742 | - self.assertEquals(self.receiver.condition, _expected_results['conditions']) | ||
| 3743 | - self.assertEquals(len(self.receiver.messages), len(_expected_results['messages'])) | ||
| 3744 | + self.assertEqual(self.receiver.name, _expected_results['name']) | ||
| 3745 | + self.assertEqual(self.receiver.condition, _expected_results['conditions']) | ||
| 3746 | + self.assertEqual(len(self.receiver.messages), len(_expected_results['messages'])) | ||
| 3747 | for index, message in enumerate(self.receiver.messages): | ||
| 3748 | self.check_message(message, _expected_results['messages'][index]) | ||
| 3749 | |||
| 3750 | - self.assertEquals(self.legacy_receiver.name, _expected_results['name']) | ||
| 3751 | - self.assertEquals(self.legacy_receiver.condition, _expected_results['conditions']) | ||
| 3752 | - self.assertEquals(len(self.legacy_receiver.messages), len(_expected_results['messages'])) | ||
| 3753 | + self.assertEqual(self.legacy_receiver.name, _expected_results['name']) | ||
| 3754 | + self.assertEqual(self.legacy_receiver.condition, _expected_results['conditions']) | ||
| 3755 | + self.assertEqual(len(self.legacy_receiver.messages), len(_expected_results['messages'])) | ||
| 3756 | for index, message in enumerate(self.legacy_receiver.messages): | ||
| 3757 | self.check_message(message, _expected_results['messages'][index]) | ||
| 3758 | |||
| 3759 | - self.assertEquals(self.superclass_receiver.name, _expected_superclass_results['name']) | ||
| 3760 | - self.assertEquals(self.superclass_receiver.superclass, _expected_superclass_results['superclass']) | ||
| 3761 | - self.assertEquals(len(self.superclass_receiver.messages), len(_expected_superclass_results['messages'])) | ||
| 3762 | + self.assertEqual(self.superclass_receiver.name, _expected_superclass_results['name']) | ||
| 3763 | + self.assertEqual(self.superclass_receiver.superclass, _expected_superclass_results['superclass']) | ||
| 3764 | + self.assertEqual(len(self.superclass_receiver.messages), len(_expected_superclass_results['messages'])) | ||
| 3765 | for index, message in enumerate(self.superclass_receiver.messages): | ||
| 3766 | self.check_message(message, _expected_superclass_results['messages'][index]) | ||
| 3767 | |||
| 3768 | @@ -309,9 +309,9 @@ class GeneratedFileContentsTest(unittest.TestCase): | ||
| 3769 | expected_line_list = expected_file_contents.splitlines(False) | ||
| 3770 | |||
| 3771 | for index, actual_line in enumerate(actual_line_list): | ||
| 3772 | - self.assertEquals(actual_line, expected_line_list[index]) | ||
| 3773 | + self.assertEqual(actual_line, expected_line_list[index]) | ||
| 3774 | |||
| 3775 | - self.assertEquals(len(actual_line_list), len(expected_line_list)) | ||
| 3776 | + self.assertEqual(len(actual_line_list), len(expected_line_list)) | ||
| 3777 | |||
| 3778 | def assertHeaderEqual(self, input_messages_file_contents, expected_file_name): | ||
| 3779 | actual_file_contents = messages.generate_messages_header(StringIO(input_messages_file_contents)) | ||
| 3780 | @@ -344,11 +344,11 @@ class ReceiverImplementationTest(GeneratedFileContentsTest): | ||
| 3781 | |||
| 3782 | class UnsupportedPrecompilerDirectiveTest(unittest.TestCase): | ||
| 3783 | def test_error_at_else(self): | ||
| 3784 | - with self.assertRaisesRegexp(Exception, r"ERROR: '#else.*' is not supported in the \*\.in files"): | ||
| 3785 | + with self.assertRaisesRegex(Exception, r"ERROR: '#else.*' is not supported in the \*\.in files"): | ||
| 3786 | messages.generate_message_handler(StringIO("asd\n#else bla\nfoo")) | ||
| 3787 | |||
| 3788 | def test_error_at_elif(self): | ||
| 3789 | - with self.assertRaisesRegexp(Exception, r"ERROR: '#elif.*' is not supported in the \*\.in files"): | ||
| 3790 | + with self.assertRaisesRegex(Exception, r"ERROR: '#elif.*' is not supported in the \*\.in files"): | ||
| 3791 | messages.generate_message_handler(StringIO("asd\n#elif bla\nfoo")) | ||
| 3792 | |||
| 3793 | |||
| 3794 | diff --git a/Source/cmake/WebKitCommon.cmake b/Source/cmake/WebKitCommon.cmake | ||
| 3795 | index de4ac8f65..1ba7b58ea 100644 | ||
| 3796 | --- a/Source/cmake/WebKitCommon.cmake | ||
| 3797 | +++ b/Source/cmake/WebKitCommon.cmake | ||
| 3798 | @@ -25,9 +25,6 @@ if (NOT HAS_RUN_WEBKIT_COMMON) | ||
| 3799 | find_package(Perl 5.10.0 REQUIRED) | ||
| 3800 | |||
| 3801 | find_package(PythonInterp 2.7.0 REQUIRED) | ||
| 3802 | - if (PYTHON_VERSION_MAJOR GREATER 2) | ||
| 3803 | - message(FATAL_ERROR "Python 2 is required, but Python ${PYTHON_VERSION_MAJOR} was found.") | ||
| 3804 | - endif () | ||
| 3805 | |||
| 3806 | # We cannot check for RUBY_FOUND because it is set only when the full package is installed and | ||
| 3807 | # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro | ||
| 3808 | diff --git a/Tools/jhbuild/jhbuildutils.py b/Tools/jhbuild/jhbuildutils.py | ||
| 3809 | index c00160e7e..f4edc29a2 100644 | ||
| 3810 | --- a/Tools/jhbuild/jhbuildutils.py | ||
| 3811 | +++ b/Tools/jhbuild/jhbuildutils.py | ||
| 3812 | @@ -1,7 +1,7 @@ | ||
| 3813 | import glob | ||
| 3814 | import os.path | ||
| 3815 | import sys | ||
| 3816 | -import __builtin__ | ||
| 3817 | +import builtins | ||
| 3818 | |||
| 3819 | top_level_dir = None | ||
| 3820 | |||
| 3821 | @@ -35,9 +35,9 @@ def enter_jhbuild_environment_if_available(platform): | ||
| 3822 | sys.path.insert(0, source_path) | ||
| 3823 | |||
| 3824 | # When loading jhbuild from the source checkout it fails if the SRCDIR, PKGDATADIR or DATADIR aren't present. | ||
| 3825 | - __builtin__.__dict__['SRCDIR'] = source_path | ||
| 3826 | - __builtin__.__dict__['PKGDATADIR'] = None | ||
| 3827 | - __builtin__.__dict__['DATADIR'] = None | ||
| 3828 | + builtins.__dict__['SRCDIR'] = source_path | ||
| 3829 | + builtins.__dict__['PKGDATADIR'] = None | ||
| 3830 | + builtins.__dict__['DATADIR'] = None | ||
| 3831 | |||
| 3832 | # We don't know the Python version, so we just assume that we can safely take the first one in the list. | ||
| 3833 | site_packages_path = glob.glob(os.path.join(get_dependencies_path(platform), "Root", "lib", "*", "site-packages")) | ||
| 3834 | @@ -49,7 +49,7 @@ def enter_jhbuild_environment_if_available(platform): | ||
| 3835 | import jhbuild.config | ||
| 3836 | from jhbuild.errors import FatalError | ||
| 3837 | config = jhbuild.config.Config(get_config_file_for_platform(platform), []) | ||
| 3838 | - except FatalError, exception: | ||
| 3839 | + except FatalError as exception: | ||
| 3840 | sys.stderr.write('Could not load jhbuild config file: %s\n' % exception.args[0]) | ||
| 3841 | return False | ||
| 3842 | |||
| 3843 | -- | ||
| 3844 | 2.21.0 | ||
| 3845 | |||
diff --git a/recipes-qt/qt5/qtwebkit/0001-Do-not-skip-build-for-cross-compile.patch b/recipes-qt/qt5/qtwebkit/0002-Do-not-skip-build-for-cross-compile.patch index a237d03d..a237d03d 100644 --- a/recipes-qt/qt5/qtwebkit/0001-Do-not-skip-build-for-cross-compile.patch +++ b/recipes-qt/qt5/qtwebkit/0002-Do-not-skip-build-for-cross-compile.patch | |||
diff --git a/recipes-qt/qt5/qtwebkit/0002-Fix-build-with-non-glibc-libc-on-musl.patch b/recipes-qt/qt5/qtwebkit/0003-Fix-build-with-non-glibc-libc-on-musl.patch index bf79b363..bf79b363 100644 --- a/recipes-qt/qt5/qtwebkit/0002-Fix-build-with-non-glibc-libc-on-musl.patch +++ b/recipes-qt/qt5/qtwebkit/0003-Fix-build-with-non-glibc-libc-on-musl.patch | |||
diff --git a/recipes-qt/qt5/qtwebkit/0003-Fix-build-bug-for-armv32-BE.patch b/recipes-qt/qt5/qtwebkit/0004-Fix-build-bug-for-armv32-BE.patch index ffd8da0f..ffd8da0f 100644 --- a/recipes-qt/qt5/qtwebkit/0003-Fix-build-bug-for-armv32-BE.patch +++ b/recipes-qt/qt5/qtwebkit/0004-Fix-build-bug-for-armv32-BE.patch | |||
diff --git a/recipes-qt/qt5/qtwebkit/0004-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch b/recipes-qt/qt5/qtwebkit/0005-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch index 14cb8aa4..14cb8aa4 100644 --- a/recipes-qt/qt5/qtwebkit/0004-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch +++ b/recipes-qt/qt5/qtwebkit/0005-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch | |||
diff --git a/recipes-qt/qt5/qtwebkit_git.bb b/recipes-qt/qt5/qtwebkit_git.bb index 41c7b173..58809f91 100644 --- a/recipes-qt/qt5/qtwebkit_git.bb +++ b/recipes-qt/qt5/qtwebkit_git.bb | |||
| @@ -12,13 +12,16 @@ DEPENDS += "qtbase qtdeclarative icu ruby-native sqlite3 glib-2.0 libxslt gperf- | |||
| 12 | # Patches from https://github.com/meta-qt5/qtwebkit/commits/b5.13 | 12 | # Patches from https://github.com/meta-qt5/qtwebkit/commits/b5.13 |
| 13 | # 5.13.meta-qt5.1 | 13 | # 5.13.meta-qt5.1 |
| 14 | SRC_URI += "\ | 14 | SRC_URI += "\ |
| 15 | file://0001-Do-not-skip-build-for-cross-compile.patch \ | 15 | file://0001-Port-build-to-python3.patch \ |
| 16 | file://0002-Fix-build-with-non-glibc-libc-on-musl.patch \ | 16 | file://0002-Do-not-skip-build-for-cross-compile.patch \ |
| 17 | file://0003-Fix-build-bug-for-armv32-BE.patch \ | 17 | file://0003-Fix-build-with-non-glibc-libc-on-musl.patch \ |
| 18 | file://0004-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch \ | 18 | file://0004-Fix-build-bug-for-armv32-BE.patch \ |
| 19 | file://0005-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 21 | inherit cmake_qt5 perlnative pythonnative | 22 | inherit cmake_qt5 perlnative |
| 23 | |||
| 24 | inherit python3native | ||
| 22 | 25 | ||
| 23 | # qemuarm build fails with: | 26 | # qemuarm build fails with: |
| 24 | # | {standard input}: Assembler messages: | 27 | # | {standard input}: Assembler messages: |
| @@ -45,6 +48,7 @@ EXTRA_OECMAKE += " \ | |||
| 45 | -DCROSS_COMPILE=ON \ | 48 | -DCROSS_COMPILE=ON \ |
| 46 | -DECM_MKSPECS_INSTALL_DIR=${libdir}${QT_DIR_NAME}/mkspecs/modules \ | 49 | -DECM_MKSPECS_INSTALL_DIR=${libdir}${QT_DIR_NAME}/mkspecs/modules \ |
| 47 | -DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML} \ | 50 | -DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML} \ |
| 51 | -DPYTHON_EXECUTABLE=`which python3` \ | ||
| 48 | " | 52 | " |
| 49 | 53 | ||
| 50 | EXTRA_OECMAKE_append_toolchain-clang = " -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}'" | 54 | EXTRA_OECMAKE_append_toolchain-clang = " -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}'" |
diff --git a/recipes-qt/qt5/qtwebview_git.bb b/recipes-qt/qt5/qtwebview_git.bb index 03aa56d4..5a4edc46 100644 --- a/recipes-qt/qt5/qtwebview_git.bb +++ b/recipes-qt/qt5/qtwebview_git.bb | |||
| @@ -20,3 +20,8 @@ COMPATIBLE_MACHINE_armv7ve = "(.*)" | |||
| 20 | COMPATIBLE_MACHINE_aarch64 = "(.*)" | 20 | COMPATIBLE_MACHINE_aarch64 = "(.*)" |
| 21 | 21 | ||
| 22 | SRCREV = "3de65bf9daf1d0e61300cdfe44d3eca51636d438" | 22 | SRCREV = "3de65bf9daf1d0e61300cdfe44d3eca51636d438" |
| 23 | |||
| 24 | python() { | ||
| 25 | if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 26 | raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') | ||
| 27 | } | ||
diff --git a/recipes-qt/qt5/qtxmlpatterns_git.bb b/recipes-qt/qt5/qtxmlpatterns_git.bb index a8b7005c..51adb30c 100644 --- a/recipes-qt/qt5/qtxmlpatterns_git.bb +++ b/recipes-qt/qt5/qtxmlpatterns_git.bb | |||
| @@ -28,4 +28,3 @@ EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains('PACKAGECONFIG', 'qtdeclarative', ' | |||
| 28 | SRCREV = "837fe1627fce599bfb9a906d33d14df34648ba89" | 28 | SRCREV = "837fe1627fce599bfb9a906d33d14df34648ba89" |
| 29 | 29 | ||
| 30 | BBCLASSEXTEND =+ "native nativesdk" | 30 | BBCLASSEXTEND =+ "native nativesdk" |
| 31 | |||
