aboutsummarylogtreecommitdiffstats
path: root/0020-Use-.dll.a-as-import-lib-extension.patch
diff options
context:
space:
mode:
authorMartchus2018-02-19 20:15:10 +0100
committerMartchus2018-02-19 20:15:10 +0100
commit2660e624877e04323aaac908770b038c92b7abc0 (patch)
tree6a83eda8e329fc43b34c64fb2ddcf5146d475811 /0020-Use-.dll.a-as-import-lib-extension.patch
parent4536f0e121fda87c68095bf7ae5d108aaf7706d3 (diff)
downloadaur-2660e624877e04323aaac908770b038c92b7abc0.tar.gz
Update to 5.10.1
Diffstat (limited to '0020-Use-.dll.a-as-import-lib-extension.patch')
-rw-r--r--0020-Use-.dll.a-as-import-lib-extension.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/0020-Use-.dll.a-as-import-lib-extension.patch b/0020-Use-.dll.a-as-import-lib-extension.patch
new file mode 100644
index 000000000000..39d3af6e9432
--- /dev/null
+++ b/0020-Use-.dll.a-as-import-lib-extension.patch
@@ -0,0 +1,68 @@
+From e01cb55796ac795043b4e3afd6811c8d0bfaf6c1 Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Sun, 18 Sep 2016 18:26:18 +0200
+Subject: [PATCH 20/32] Use *.dll.a as import lib extension
+
+The variables used here are provided by
+mingw-w64 specific mkspec
+---
+ mkspecs/features/create_cmake.prf | 5 +++--
+ qmake/generators/win32/winmakefile.cpp | 17 ++++++++++++-----
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
+index 146e83ae67..15fc070008 100644
+--- a/mkspecs/features/create_cmake.prf
++++ b/mkspecs/features/create_cmake.prf
+@@ -236,8 +236,9 @@ mac {
+ CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
+ CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
+ } else {
+- CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
+- CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
++ isEmpty(QMAKE_EXTENSION_IMPORTLIB): QMAKE_EXTENSION_IMPORTLIB = a
++ CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.$${QMAKE_EXTENSION_IMPORTLIB}
++ CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$${QMAKE_EXTENSION_IMPORTLIB}
+ }
+ } else {
+ CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
+diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
+index 737f3abc3a..2e6d5d94a9 100644
+--- a/qmake/generators/win32/winmakefile.cpp
++++ b/qmake/generators/win32/winmakefile.cpp
+@@ -80,10 +80,14 @@ Win32MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg)
+ bool
+ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
+ {
+- ProStringList impexts = project->values("QMAKE_LIB_EXTENSIONS");
+- if (impexts.isEmpty())
+- impexts = project->values("QMAKE_EXTENSION_STATICLIB");
+- QList<QMakeLocalFileName> dirs;
++ ProStringList impexts;
++ if (project->isActiveConfig("staticlib")) {
++ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
++ } else {
++ impexts.append(project->values("QMAKE_EXTENSION_IMPORTLIB"));
++ impexts.append(project->values("QMAKE_EXTENSION_STATICLIB"));
++ }
++ QList<QMakeLocalFileName> dirs;
+ static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
+ for (int i = 0; lflags[i]; i++) {
+ ProStringList &l = project->values(lflags[i]);
+@@ -234,9 +238,12 @@ void Win32MakefileGenerator::fixTargetExt()
+ if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
+ project->values("TARGET_EXT").append(".exe");
+ } else if (project->isActiveConfig("shared")) {
++ ProString impext = project->first("QMAKE_EXTENSION_IMPORTLIB");
++ if (impext.isEmpty())
++ impext = project->first("QMAKE_PREFIX_STATICLIB");
+ project->values("LIB_TARGET").prepend(project->first("QMAKE_PREFIX_STATICLIB")
+ + project->first("TARGET") + project->first("TARGET_VERSION_EXT")
+- + '.' + project->first("QMAKE_EXTENSION_STATICLIB"));
++ + '.' + impext);
+ project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
+ + project->first("QMAKE_EXTENSION_SHLIB"));
+ project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
+--
+2.16.1
+