[mingw-qt5-qtbase] Make sure the .pc files of the Qt5 modules are installed correctly

Erik van Pienbroek epienbro at fedoraproject.org
Tue Mar 26 19:03:42 UTC 2013


commit ff07adf8eed6b2a4ca332c48f2a52c32b7bb3b68
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Tue Mar 26 20:03:37 2013 +0100

    Make sure the .pc files of the Qt5 modules are installed correctly

 mingw-qt5-qtbase.spec                        |   16 ++++++++-
 qt5-workaround-pkgconfig-install-issue.patch |   46 ++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 1 deletions(-)
---
diff --git a/mingw-qt5-qtbase.spec b/mingw-qt5-qtbase.spec
index 184462b..609fe76 100644
--- a/mingw-qt5-qtbase.spec
+++ b/mingw-qt5-qtbase.spec
@@ -20,7 +20,7 @@
 
 Name:           mingw-qt5-qtbase
 Version:        5.0.1
-Release:        2%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
+Release:        3%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
 Summary:        Qt5 for Windows - QtBase component
 
 License:        GPLv3 with exceptions or LGPLv2 with exceptions
@@ -71,6 +71,16 @@ Patch13:        qt5-workaround-qtbug-29426.patch
 # reserved keyword on Win32 environments (defined in rpc.h)
 Patch14:        qt5-prevent-conflict-with-interface-keyword.patch
 
+# Make sure the .pc files of the Qt5 modules are installed correctly
+# This should prevent (silent) failures like:
+# sed -e "s,/usr/i686-w64-mingw32/sys-root/mingw/include,/usr/i686-w64-mingw32/sys-root/mingw/include/qt5,g" -e "s,/usr/i686-w64-mingw32/sys-root/mingw/lib,/usr/i686-w64-mingw32/sys-root/mingw/lib,g" "../../../build_win32/lib/pkgconfig/Qt5AxContainer.pc" >"/home/erik/rpmbuild/BUILDROOT/mingw-qt5-qtactiveqt-5.0.1-1.fc18.x86_64/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig/Qt5AxContainer.pc"
+# sed: can't read ../../../build_win32/lib/pkgconfig/Qt5AxContainer.pc: No such file or directory
+# make[5]: [install_target] Error 2 (ignored)
+#
+# This issue was discovered during the review of mingw-qt5-qttools:
+# https://bugzilla.redhat.com/show_bug.cgi?id=858080
+Patch15:        qt5-workaround-pkgconfig-install-issue.patch
+
 BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-gcc-c++
@@ -206,6 +216,7 @@ Static version of the mingw64-qt5-qtbase library.
 %patch12 -p0 -b .qt_needs_qmain
 %patch13 -p0 -b .non_x86
 %patch14 -p0 -b .interface
+%patch15 -p0 -b .pkgconfig
 
 # Cross-compilation qmake target.
 mkdir mkspecs/%{platform_win32}
@@ -675,6 +686,9 @@ sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{p
 
 
 %changelog
+* Tue Mar 26 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.0.1-3
+- Make sure the .pc files of the Qt5 modules are installed correctly
+
 * Thu Feb  7 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.0.1-2
 - Replaced the OpenSSL patch with a more proper one
 - Improve detection of the Qt5Bootstrap library (needed by mingw-qt5-qttools)
diff --git a/qt5-workaround-pkgconfig-install-issue.patch b/qt5-workaround-pkgconfig-install-issue.patch
new file mode 100644
index 0000000..bae1156
--- /dev/null
+++ b/qt5-workaround-pkgconfig-install-issue.patch
@@ -0,0 +1,46 @@
+--- qmake/generators/makefile.cpp.pkgconfig	2013-01-29 20:03:12.000000000 +0100
++++ qmake/generators/makefile.cpp	2013-03-26 19:18:07.480722316 +0100
+@@ -3108,7 +3108,7 @@
+ }
+ 
+ QString
+-MakefileGenerator::pkgConfigFileName(bool fixify)
++MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
+ {
+     QString ret = var("TARGET");
+     int slsh = ret.lastIndexOf(Option::dir_sep);
+@@ -3130,7 +3130,11 @@
+     if(fixify) {
+         if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
+             ret.prepend(project->first("DESTDIR").toQString());
+-        ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
++        if (onlyPrependDestdir) {
++            ret = Option::fixPathToLocalOS(ret);
++        } else {
++            ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
++        }
+     }
+     return ret;
+ }
+--- qmake/generators/makefile.h.orig	2013-03-26 19:17:37.624199870 +0100
++++ qmake/generators/makefile.h	2013-03-26 19:17:56.327527157 +0100
+@@ -108,7 +108,7 @@
+     virtual bool writeMakefile(QTextStream &t);
+ 
+     QString pkgConfigPrefix() const;
+-    QString pkgConfigFileName(bool fixify=true);
++    QString pkgConfigFileName(bool fixify=true, bool onlyPrependDestdir = false);
+     QString pkgConfigFixPath(QString) const;
+     void writePkgConfigFile();   // for pkg-config
+ 
+--- qmake/generators/win32/winmakefile.cpp.orig	2013-03-26 19:05:13.398183953 +0100
++++ qmake/generators/win32/winmakefile.cpp	2013-03-26 19:15:02.800490466 +0100
+@@ -856,7 +856,7 @@
+                         if (!match.isEmpty() /*&& match != replace*/)
+                             ret += " -e \"s," + match + "," + replace + ",g\"";
+                     }
+-                    ret += " \"" + pkgConfigFileName(true) + "\" >\"" + dst_pc + "\"";
++                    ret += " \"" + pkgConfigFileName(true, true) + "\" >\"" + dst_pc + "\"";
+                 }
+                 if(!uninst.isEmpty())
+                     uninst.append("\n\t");


More information about the scm-commits mailing list