aboutsummaryrefslogtreecommitdiff
path: root/ports/qt5/fix-commandline-overrides.patch
blob: 08f6277405e1918758aa3ef74c9f1896fe82eeb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff --git a/qtbase/configure.json b/qtbase/configure.json
index f774291..8903df0 100644
--- a/qtbase/configure.json
+++ b/qtbase/configure.json
@@ -19,8 +19,7 @@
     "commandline": {
         "assignments": {
             "DBUS_HOST_PATH": "host_dbus.prefix",
-            "DBUS_PATH": "dbus.prefix",
-            "ZLIB_LIBS": "zlib.libs"
+            "DBUS_PATH": "dbus.prefix"
         },
         "custom": "qmakeArgs",
         "options": {
diff --git a/qtbase/mkspecs/features/qt_configure.prf b/qtbase/mkspecs/features/qt_configure.prf
index eaaa161..fdec8ea 100644
--- a/qtbase/mkspecs/features/qt_configure.prf
+++ b/qtbase/mkspecs/features/qt_configure.prf
@@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) {
 }
 
 defineTest(qtConfSetupLibraries) {
+    asspfx = $${currentConfig}.commandline.assignments
     for (l, $${currentConfig}.libraries._KEYS_) {
         lpfx = $${currentConfig}.libraries.$${l}
         # 'export' may be omitted, in which case it falls back to the library's name
@@ -408,6 +409,15 @@ defineTest(qtConfSetupLibraries) {
             $${lpfx}.export = $$l
             export($${lpfx}.export)
         }
+        # 'export' may also be empty, but we need a derived identifier
+        alias = $$eval($${lpfx}.export)
+        isEmpty(alias): alias = $$l
+        $${lpfx}.alias = $$alias
+        export($${lpfx}.alias)
+        # make it easy to refer to the library by its export name.
+        $${currentConfig}.exports._KEYS_ += $$alias
+        $${currentConfig}.exports.$$alias += $$l
+        export($${currentConfig}.exports.$$alias)
         isEmpty($${lpfx}.sources._KEYS_): \
             error("Library $$l defines no sources")
         for (s, $${lpfx}.sources._KEYS_) {
@@ -427,10 +437,35 @@ defineTest(qtConfSetupLibraries) {
             }
         }
     }
+
+    $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
+    export($${currentConfig}.exports._KEYS_)
+
+    for (alias, $${currentConfig}.exports._KEYS_) {
+        ua = $$upper($$alias)
+        $${asspfx}._KEYS_ += \
+            $${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \
+            $${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE
+        uapfx = $${asspfx}.$${ua}
+        $${uapfx}_PREFIX = $${alias}.prefix
+        $${uapfx}_INCDIR = $${alias}.incdir
+        $${uapfx}_LIBDIR = $${alias}.libdir
+        $${uapfx}_LIBS = $${alias}.libs
+        $${uapfx}_LIBS_DEBUG = $${alias}.libs.debug
+        $${uapfx}_LIBS_RELEASE = $${alias}.libs.release
+        export($${uapfx}_PREFIX)
+        export($${uapfx}_INCDIR)
+        export($${uapfx}_LIBDIR)
+        export($${uapfx}_LIBS)
+        export($${uapfx}_LIBS_DEBUG)
+        export($${uapfx}_LIBS_RELEASE)
+    }
+    export($${asspfx}._KEYS_)
+
 
     # reverse mapping for assignments on command line.
-    for (a, $${currentConfig}.commandline.assignments._KEYS_) {
-        apfx = $${currentConfig}.commandline.assignments.$${a}
+    for (a, $${asspfx}._KEYS_) {
+        apfx = $${asspfx}.$${a}
         ra = config.commandline.rev_assignments.$$eval($$apfx)
         $$ra = $$a
         export($$ra)
@@ -479,6 +514,18 @@ defineTest(qtConfLibrary_inline) {
         export($${1}.libs)
     }
 
+    incdir = $$val_escape(config.input.$${input}.incdir)
+    !isEmpty(incdir) {
+        $${1}.includedir = $$incdir
+        export($${1}.includedir)
+    }
+
+    libdir = $$val_escape(config.input.$${input}.libdir)
+    !isEmpty(libdir) {
+        $${1}.libs = "-L$$libdir $$eval($${1}.libs)"
+        export($${1}.libs)
+    }
+
     return(true)
 }
 
diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json
index 1f50116..af03362 100644
--- a/qtbase/src/gui/configure.json
+++ b/qtbase/src/gui/configure.json
@@ -100,7 +100,7 @@
             "test": "unix/freetype",
             "sources": [
                 { "type": "pkgConfig", "args": "freetype2" },
-                { "type": "freetype", "libs": "-lfreetype" }
+                { "libs": "-lfreetype" }
             ]
         },
         "fontconfig": {
diff --git a/qtbase/src/network/configure.json b/qtbase/src/network/configure.json
index 1e08aa7..314970e 100644
--- a/qtbase/src/network/configure.json
+++ b/qtbase/src/network/configure.json
@@ -7,9 +7,6 @@
 
     "commandline": {
         "assignments": {
-            "OPENSSL_LIBS": "openssl.libs",
-            "OPENSSL_LIBS_DEBUG": "openssl.libs.debug",
-            "OPENSSL_LIBS_RELEASE": "openssl.libs.release",
             "OPENSSL_PATH": "openssl.prefix"
         },
         "options": {
diff --git a/qtbase/src/sql/configure.json b/qtbase/src/sql/configure.json
index 96c82e8..51a7e51 100644
--- a/qtbase/src/sql/configure.json
+++ b/qtbase/src/sql/configure.json
@@ -8,7 +8,6 @@
     "commandline": {
         "assignments": {
             "MYSQL_PATH": "mysql.prefix",
-            "PSQL_LIBS": "psql.libs",
             "SYBASE": "tds.prefix",
             "SYBASE_LIBS": "tds.libs"
         },
@@ -71,8 +70,8 @@
             "sources": [
                 { "type": "pkgConfig", "args": "libpq" },
                 { "type": "psqlConfig" },
-                { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
-                { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
+                { "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
+                { "libs": "-lpq", "condition": "!config.win32" }
             ]
         },
         "tds": {