diff --git a/3rdparty/ext_pyqt/CMakeLists.txt b/3rdparty/ext_pyqt/CMakeLists.txt index 6b15924903..5dc23b2719 100644 --- a/3rdparty/ext_pyqt/CMakeLists.txt +++ b/3rdparty/ext_pyqt/CMakeLists.txt @@ -1,34 +1,47 @@ SET(PREFIX_ext_pyqt "${EXTPREFIX}" ) if (UNIX) ExternalProject_Add( ext_pyqt DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} URL http://files.kde.org/krita/build/dependencies/PyQt5_gpl-5.6.tar.gz URL_MD5 dbfc885c0548e024ba5260c4f44e0481 CONFIGURE_COMMAND ${PREFIX_ext_pyqt}/bin/python3 /configure.py --confirm-license BUILD_COMMAND make INSTALL_COMMAND make install BUILD_IN_SOURCE 1 UPDATE_COMMAND "" - ALWAYS 0 ) elseif(MINGW) + list(APPEND _PYQT_conf + --confirm-license + --target-py-version 3.6 + --bindir ${PREFIX_ext_pyqt}/bin + --qt ${PREFIX_ext_pyqt} + --sip ${PREFIX_ext_pyqt}/bin/sip.exe + --sip-incdir ${PREFIX_ext_pyqt}/include + --spec win32-g++ + --verbose + --sipdir ${PREFIX_ext_pyqt}/share/sip + --destdir ${PREFIX_ext_pyqt}/share/krita/pykrita + --no-qml-plugin --no-python-dbus --no-qsci-api --no-tools + --disable QtSql --disable QtTest --disable QtWinExtras + ) ExternalProject_Add( ext_pyqt DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL http://files.kde.org/krita/build/dependencies/PyQt5_gpl-5.6.zip - URL_MD5 916e79bacda1799f8db7bc034043e450 - - CONFIGURE_COMMAND python.exe /configure.py --confirm-license --target-py-version 3.6 --bindir {PREFIX_ext_pyqt}/bin --qt ${PREFIX_ext_pyqt} --sip ${PREFIX_ext_pyqt}/bin/sip.exe --sip-incdir ${PREFIX_ext_pyqt}/include --target-py-version 3.6 --spec win32-g++ --verbose --sipdir ${PREFIX_ext_pyqt}/share/sip --destdir ${PREFIX_ext_pyqt}/bin --no-qml-plugin --no-python-dbus --no-qsci-api --no-tools - BUILD_COMMAND mingw32-make - INSTALL_COMMAND mingw32-make install + URL https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.9/PyQt5_gpl-5.9.zip + URL_MD5 d978884753df265896eda436d8f4e07b + PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/pyqt-configure-fix.patch + + CONFIGURE_COMMAND python.exe /configure.py ${_PYQT_conf} + BUILD_COMMAND mingw32-make -j${SUBMAKE_JOBS} CXXFLAGS=-D_hypot=hypot + INSTALL_COMMAND mingw32-make -j${SUBMAKE_JOBS} install BUILD_IN_SOURCE 1 UPDATE_COMMAND "" - ALWAYS 0 ) endif() diff --git a/3rdparty/ext_pyqt/pyqt-configure-fix.patch b/3rdparty/ext_pyqt/pyqt-configure-fix.patch new file mode 100644 index 0000000000..86d896664e --- /dev/null +++ b/3rdparty/ext_pyqt/pyqt-configure-fix.patch @@ -0,0 +1,15 @@ +--- a/configure.py 2017-07-03 18:25:14.000000000 +0800 ++++ b/configure.py 2017-07-15 01:19:44.622435500 +0800 +@@ -2168,10 +2168,8 @@ + if source is None: + for disabled in run_test_program(mname, test, verbose): + if disabled: +- inform("Disabled %s features: %s" % (mname, +- ', '.join(disabled))) +- +- target_config.pyqt_disabled_features.extend(disabled) ++ inform("Disabled %s features: %s" % (mname, disabled)) ++ target_config.pyqt_disabled_features.append(disabled) + + # Include the module in the build. + target_config.pyqt_modules.append(mname)