2018-12-08 22:06:32 +01:00
|
|
|
From 07fa0fe80bd49e335ff8663ee8c67aa6b0f042c8 Mon Sep 17 00:00:00 2001
|
2016-09-19 22:18:45 +02:00
|
|
|
From: Martchus <martchus@gmx.net>
|
|
|
|
Date: Sun, 18 Sep 2016 13:54:12 +0200
|
2018-09-19 20:39:07 +02:00
|
|
|
Subject: [PATCH 05/33] Make sure *.pc files are installed correctly
|
2016-09-19 22:18:45 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
qmake/generators/makefile.cpp | 8 ++++++--
|
|
|
|
qmake/generators/makefile.h | 2 +-
|
|
|
|
qmake/generators/win32/winmakefile.cpp | 2 +-
|
|
|
|
3 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
|
2018-12-08 22:06:32 +01:00
|
|
|
index b7e591d2ab..5abf0624f4 100644
|
2016-09-19 22:18:45 +02:00
|
|
|
--- a/qmake/generators/makefile.cpp
|
|
|
|
+++ b/qmake/generators/makefile.cpp
|
2018-12-08 22:06:32 +01:00
|
|
|
@@ -3189,7 +3189,7 @@ MakefileGenerator::openOutput(QFile &file, const QString &build) const
|
2016-02-03 20:42:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
-MakefileGenerator::pkgConfigFileName(bool fixify)
|
|
|
|
+MakefileGenerator::pkgConfigFileName(bool fixify, bool onlyPrependDestdir)
|
|
|
|
{
|
|
|
|
QString ret = project->first("QMAKE_PKGCONFIG_FILE").toQString();
|
|
|
|
if (ret.isEmpty()) {
|
2018-12-08 22:06:32 +01:00
|
|
|
@@ -3214,7 +3214,11 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
|
2016-02-03 20:42:14 +01:00
|
|
|
if(fixify) {
|
|
|
|
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
|
|
|
|
ret.prepend(project->first("DESTDIR").toQString());
|
|
|
|
- ret = fileFixify(ret, FileFixifyBackwards);
|
|
|
|
+ if (onlyPrependDestdir) {
|
|
|
|
+ ret = Option::fixPathToLocalOS(ret);
|
|
|
|
+ } else {
|
|
|
|
+ ret = fileFixify(ret, FileFixifyBackwards);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
2016-09-19 22:18:45 +02:00
|
|
|
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
|
2018-12-08 22:06:32 +01:00
|
|
|
index b5c150e1cb..afb0e91381 100644
|
2016-09-19 22:18:45 +02:00
|
|
|
--- a/qmake/generators/makefile.h
|
|
|
|
+++ b/qmake/generators/makefile.h
|
2016-12-20 23:05:26 +01:00
|
|
|
@@ -89,7 +89,7 @@ protected:
|
2016-02-03 20:42:14 +01:00
|
|
|
virtual void writeDefaultVariables(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
|
|
|
|
|
2016-09-19 22:18:45 +02:00
|
|
|
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
|
2018-12-08 22:06:32 +01:00
|
|
|
index e0d03ccc1c..37eee7fca3 100644
|
2016-09-19 22:18:45 +02:00
|
|
|
--- a/qmake/generators/win32/winmakefile.cpp
|
|
|
|
+++ b/qmake/generators/win32/winmakefile.cpp
|
2018-12-08 22:06:32 +01:00
|
|
|
@@ -747,7 +747,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
|
2016-02-03 20:42:14 +01:00
|
|
|
}
|
|
|
|
if(!ret.isEmpty())
|
|
|
|
ret += "\n\t";
|
|
|
|
- ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true), dst_pc);
|
|
|
|
+ ret += installMetaFile(ProKey("QMAKE_PKGCONFIG_INSTALL_REPLACE"), pkgConfigFileName(true, true), dst_pc);
|
|
|
|
if(!uninst.isEmpty())
|
|
|
|
uninst.append("\n\t");
|
|
|
|
uninst.append("-$(DEL_FILE) " + escapeFilePath(dst_pc));
|
2016-09-19 22:18:45 +02:00
|
|
|
--
|
2018-12-08 22:06:32 +01:00
|
|
|
2.19.2
|
2016-09-19 22:18:45 +02:00
|
|
|
|