From 9270bd8550b1b6a2ebefeb09a79806ca31403751 Mon Sep 17 00:00:00 2001 From: mcallegari79 Date: Sun, 29 May 2016 13:28:16 +0200 Subject: [PATCH] qt5-git: enable qtscxml module and remove patch 0047 Apparently patch 0047 is not needed anymore cause of an upstream fix: https://codereview.qt-project.org/#/c/157817/ --- ...T_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch | 152 ------------------ mingw-w64-qt5-git/PKGBUILD | 7 +- 2 files changed, 2 insertions(+), 157 deletions(-) delete mode 100644 mingw-w64-qt5-git/0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch diff --git a/mingw-w64-qt5-git/0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch b/mingw-w64-qt5-git/0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch deleted file mode 100644 index a822acb72e..0000000000 --- a/mingw-w64-qt5-git/0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch +++ /dev/null @@ -1,152 +0,0 @@ -diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp ---- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/configureapp.cpp 2015-08-26 14:29:09.999124600 +0100 -+++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/configureapp.cpp 2015-08-26 15:41:02.749516900 +0100 -@@ -3448,6 +3448,9 @@ - // FIXME: add detection - configStream << " QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; - configStream << " QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; -+ } else { -+ configStream << " QMAKE_DEFAULT_LIBDIRS = " << Environment::detectCompilerDefaultLibDirs() << endl; -+ configStream << " QMAKE_DEFAULT_INCDIRS = " << Environment::detectCompilerDefaultIncDirs() << endl; - } - configStream << "}" << endl; - configStream << "QT_CONFIG += " << qtConfig.join(' ') << endl; -diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp ---- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.cpp 2015-08-26 14:29:10.004624600 +0100 -+++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.cpp 2015-08-26 15:41:02.742516900 +0100 -@@ -40,6 +40,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -249,6 +251,112 @@ - #endif - }; - -+/* Returns the exit-code. */ -+int Environment::compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr) -+{ -+ CompilerInfo *info = compilerInfo(detectCompiler()); -+ int returnCode = 1; -+ if (info) { -+ QTemporaryFile tmpIn("conftestXXXXXX.cpp"); -+ QString tmpOutFileName; -+ { -+ QTemporaryFile tmpOut("conftestXXXXXX.o"); -+ tmpOut.open(); -+ tmpOut.close(); -+ tmpOutFileName = tmpOut.fileName(); -+ } -+ QString tmpStdErrFileName; -+ { -+ QTemporaryFile tmpStdErr("conftestXXXXXX.stderr"); -+ tmpStdErr.open(); -+ tmpStdErr.close(); -+ tmpStdErrFileName = tmpStdErr.fileName(); -+ } -+ if (tmpIn.open()) { -+ tmpIn.write(code.toUtf8()); -+ tmpIn.close(); -+ QString cmd = info->executable + QString(" ") + flags -+ + QString(" -o ") + tmpOutFileName -+ + QString(" ") + tmpIn.fileName() + " 2>" + tmpStdErrFileName; -+ stdOut = Environment::execute(cmd, &returnCode); -+ QFile tmpStdErr(tmpStdErrFileName); -+ if (tmpStdErr.open(QIODevice::ReadOnly | QIODevice::Text)) { -+ stdErr = tmpStdErr.readAll(); -+ tmpStdErr.close(); -+ tmpStdErr.remove(); -+ } -+ QFile::remove(tmpOutFileName); -+ } -+ } -+ return returnCode; -+} -+ -+QString Environment::detectCompilerDefaultIncDirs() -+{ -+ QString stdOut; -+ QString stdErr; -+ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); -+ QStringList result; -+ int index = stdErr.indexOf("<...>"); -+ if (index != -1) { -+ index = stdErr.indexOf("\n", index); -+ int lastIndex = index; -+ while (lastIndex != -1) { -+ if (stdErr[lastIndex + 1] != ' ') -+ break; -+ lastIndex += 2; -+ index = stdErr.indexOf("\n", lastIndex + 1); -+ if (index != -1) { -+ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex, index - lastIndex))); -+ if (result.indexOf(newPath) == -1) -+ result.append(newPath); -+ } -+ lastIndex = index; -+ } -+ } -+ Q_UNUSED(returnCode); -+ QString resultString; -+ for (int i = 0; i < result.count(); ++i) { -+ resultString.append(result[i]); -+ if ( i != result.count() - 1) -+ resultString.append(" "); -+ } -+ return resultString; -+} -+ -+QString Environment::detectCompilerDefaultLibDirs() -+{ -+ QString stdOut; -+ QString stdErr; -+ int returnCode = Environment::compileSomething("-v ", "", stdOut, stdErr); -+ QStringList result; -+ int index = stdErr.indexOf("LIBRARY_PATH"); -+ if (index != -1) { -+ index += strlen("LIBRARY_PATH"); -+ int lastIndex = index; -+ while (lastIndex != -1) { -+ if (stdErr[lastIndex + 1] == '\n') -+ break; -+ index = stdErr.indexOf(";", lastIndex + 1); -+ if (index != -1) { -+ const QString newPath(QDir::cleanPath(stdErr.mid(lastIndex + 1, index - lastIndex - 1))); -+ if (result.indexOf(newPath) == -1) -+ result.append(newPath); -+ } -+ lastIndex = index; -+ } -+ } -+ Q_UNUSED(returnCode); -+ QString resultString; -+ for (int i = 0; i < result.count(); ++i) { -+ resultString.append(result[i]); -+ if ( i != result.count() - 1) -+ resultString.append(" "); -+ } -+ return resultString; -+} -+ -+ - /*! - Creates a commandling from \a program and it \a arguments, - escaping characters that needs it. -diff -urN qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h ---- qt-everywhere-opensource-src-5.5.0.orig/qtbase/tools/configure/environment.h 2015-08-26 14:29:10.018624600 +0100 -+++ qt-everywhere-opensource-src-5.5.0/qtbase/tools/configure/environment.h 2015-08-26 15:41:02.735516900 +0100 -@@ -58,6 +58,10 @@ - static Compiler compilerFromQMakeSpec(const QString &qmakeSpec); - static QString gccVersion(); - -+ static int compileSomething(const QString &flags, const QString &code, QString &stdOut, QString &stdErr); -+ static QString detectCompilerDefaultIncDirs(); -+ static QString detectCompilerDefaultLibDirs(); -+ - static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv); - static QString execute(const QString &command, int *returnCode = 0); - static bool cpdir(const QString &srcDir, const QString &destDir); diff --git a/mingw-w64-qt5-git/PKGBUILD b/mingw-w64-qt5-git/PKGBUILD index c666f2630d..ecceaaf5ab 100644 --- a/mingw-w64-qt5-git/PKGBUILD +++ b/mingw-w64-qt5-git/PKGBUILD @@ -6,7 +6,7 @@ _qt_git_repo=https://code.qt.io/qt #_qt_git_repo=https://github.com/qtproject # The Qt5 GIT branch to clone and build (replace with 'dev' to build the bleeding edge sources) -_qt_git_branch=5.7 +_qt_git_branch=5.7.0 # The way Qt5 libraries are built. Possible values are '-release', '-debug' or '-debug_and_release' _build_mode=-release @@ -118,7 +118,7 @@ qt_modules=( qtquickcontrols qtquickcontrols2 qtscript - #qtscxml + qtscxml qtsensors qtserialbus qtserialport @@ -163,7 +163,6 @@ source=( 0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch 0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch 0046-Revert-Revert-fix-NTFS-mount-points.patch - 0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch 0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch 0049-do-not-include-qopengles2ext-h.patch ) @@ -294,7 +293,6 @@ prepare() { popd > /dev/null rm -f ${srcdir}/qt5/qtbase/src/gui/opengl/qopengles2ext.h - patch -p1 -i ${srcdir}/0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch patch -p1 -i ${srcdir}/0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch local _ARCH_TUNE= @@ -488,7 +486,6 @@ sha256sums=('609ab74b93ef11f24ef4d7c1bd0a2e81c4280b07fa455dfcf003a2364ab72745' '29ed4566d4c1853b70a5173c6391ed90f123c5121b5836f2d16f8478f6354f0a' # 0043-static-cmake-regex-QT_INSTALL_LIBS-in-QMAKE_PRL_LIBS_FOR_CMAKE.patch '72e46178f2f694d8408f22684d1a7d39394056cb574fc4855c1f38c9d51e7e6c' # 0045-static-use-qminimal-platform-plugin-for-qcollectiongenerator.patch 'fd6b1cd956730c1a05a7489760afed6b36561a3b0ec5857c3fbe21dcd7a54617' # 0046-Revert-Revert-fix-NTFS-mount-points.patch - '59081c0bd492181c64ad991bb9e722733c17af6007c2b04c7c5c5a80c2a3fb75' # 0047-Emit-QMAKE_DEFAULT_LIBDIRS-and-INCDIRS-to-qconfig-pri.patch '3bda25f357a33b122345fea011a14199b5953fd248fab960a5344a2ed9401331' # 0048-win32-Avoid-platformNativeInterface-segfaults-with-minimal-platform.patch '199c08dbf2f1e8596023b484714de8757a8bcf7d78c5dfe64ea271c54a401687' # 0049-do-not-include-qopengles2ext-h.patch )