summarylogtreecommitdiffstats
path: root/0009-Fix-linking-against-static-D-Bus.patch
diff options
context:
space:
mode:
Diffstat (limited to '0009-Fix-linking-against-static-D-Bus.patch')
-rw-r--r--0009-Fix-linking-against-static-D-Bus.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/0009-Fix-linking-against-static-D-Bus.patch b/0009-Fix-linking-against-static-D-Bus.patch
new file mode 100644
index 000000000000..bf620e71d31f
--- /dev/null
+++ b/0009-Fix-linking-against-static-D-Bus.patch
@@ -0,0 +1,58 @@
+From 3b501d8fc4dab1c437f18d2d21c64265858e367d Mon Sep 17 00:00:00 2001
+From: Martchus <martchus@gmx.net>
+Date: Fri, 3 Feb 2017 19:36:25 +0100
+Subject: [PATCH 09/32] Fix linking against static D-Bus
+
+---
+ configure.json | 9 +++++++--
+ src/dbus/qdbus_symbols_p.h | 4 ++++
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/configure.json b/configure.json
+index a6f3ed66a9..803abf38bb 100644
+--- a/configure.json
++++ b/configure.json
+@@ -171,18 +171,23 @@
+ "CONFIG(debug, debug|release): \\",
+ " LIBS += $$LIBS_DEBUG",
+ "else: \\",
+- " LIBS += $$LIBS_RELEASE"
++ " LIBS += $$LIBS_RELEASE",
++ "static: DEFINES += DBUS_STATIC_BUILD"
+ ]
+ },
+ "sources": [
+ { "type": "pkgConfig", "args": "dbus-1 >= 1.2" },
++ {
++ "libs": "-ldbus-1 -lws2_32 -liphlpapi",
++ "condition": "config.win32 && !features.shared"
++ },
+ {
+ "libs": "",
+ "builds": {
+ "debug": "-ldbus-1d",
+ "release": "-ldbus-1"
+ },
+- "condition": "config.win32"
++ "condition": "config.win32 && features.shared"
+ },
+ { "libs": "-ldbus-1", "condition": "!config.win32" }
+ ]
+diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
+index 9eaebe6d7e..ac1b1d977b 100644
+--- a/src/dbus/qdbus_symbols_p.h
++++ b/src/dbus/qdbus_symbols_p.h
+@@ -57,6 +57,10 @@
+
+ #ifndef QT_NO_DBUS
+
++#ifdef QT_STATIC
++# define DBUS_STATIC_BUILD
++#endif
++
+ #ifdef QT_LINKED_LIBDBUS
+ # include <dbus/dbus.h>
+ #else
+--
+2.16.1
+