summaryrefslogtreecommitdiffstats
path: root/patches/0049-Remove-hardcoded-modules-in-configure-and-QT_CONFIG.patch
blob: 50a97e67192645cee95433a8628fe58cb8c2fae4 (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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
From 9395e18728811d9dbbd03f12cbbe97c00d9cfe1b Mon Sep 17 00:00:00 2001
From: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Date: Mon, 21 Mar 2011 10:02:39 -0500
Subject: [PATCH] Remove hardcoded modules in configure and QT_CONFIG

Also,
 - Turn qt3support into gui-qt3support, to support
   turning on/off qt3support-functions in core.
 - Fix QT_BUILD_PARTS for configure.exe
---
 qtbase/tools/configure/configureapp.cpp |  132 +++++++++++++++----------------
 1 files changed, 65 insertions(+), 67 deletions(-)

diff --git a/qtbase/tools/configure/configureapp.cpp b/qtbase/tools/configure/configureapp.cpp
index 914061e..6fe46b2 100644
--- a/qtbase/tools/configure/configureapp.cpp
+++ b/qtbase/tools/configure/configureapp.cpp
@@ -188,7 +188,7 @@ Configure::Configure(int& argc, char** argv)
             if (syncqt_bat.open(QFile::WriteOnly)) {
                 QTextStream stream(&syncqt_bat);
                 stream << "@echo off" << endl
-                       << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/syncqt.bat -outdir \"") << fixSeparators(buildPath) << "\" \"" << fixSeparators(sourcePath) << "\"" << endl
+                       << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/syncqt.bat -outdir \"") << fixSeparators(buildPath) << "\" \"" << fixSeparators(sourcePath) << "\"" << endl;
                 syncqt_bat.close();
             }
         }
@@ -1595,9 +1595,6 @@ void Configure::applySpecSpecifics()
         dictionary[ "SQL_SQLITE" ]          = "yes";
         dictionary[ "SQL_SQLITE_LIB" ]      = "system";
 
-        // Disable building docs and translations for now
-        disabledBuildParts << "docs" << "translations";
-
     } else if (dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong.
       //TODO
         dictionary[ "STYLE_WINDOWSXP" ]     = "no";
@@ -2684,7 +2681,7 @@ void Configure::generateOutputVars()
         qmakeVars += "QT_LFLAGS_SQLITE += " + escapeSeparators(dictionary["QT_LFLAGS_SQLITE"]);
 
     if (dictionary[ "QT3SUPPORT" ] == "yes")
-        qtConfig += "qt3support";
+        qtConfig += "gui-qt3support";
 
     if (dictionary[ "OPENGL" ] == "yes")
         qtConfig += "opengl";
@@ -2729,51 +2726,52 @@ void Configure::generateOutputVars()
     if (dictionary[ "CETEST" ] == "yes")
         qtConfig += "cetest";
 
-    if (dictionary[ "SCRIPT" ] == "yes")
-        qtConfig += "script";
+// No longer needed after modularization
+//    if (dictionary[ "SCRIPT" ] == "yes")
+//        qtConfig += "script";
 
-    if (dictionary[ "SCRIPTTOOLS" ] == "yes") {
-        if (dictionary[ "SCRIPT" ] == "no") {
-            cout << "QtScriptTools was requested, but it can't be built due to QtScript being "
-                    "disabled." << endl;
-            dictionary[ "DONE" ] = "error";
-        }
-        qtConfig += "scripttools";
-    }
+// No longer needed after modularization
+//    if (dictionary[ "SCRIPTTOOLS" ] == "yes") {
+//        if (dictionary[ "SCRIPT" ] == "no") {
+//            cout << "QtScriptTools was requested, but it can't be built due to QtScript being "
+//                    "disabled." << endl;
+//            dictionary[ "DONE" ] = "error";
+//        }
+//        qtConfig += "scripttools";
+//    }
 
-    if (dictionary[ "XMLPATTERNS" ] == "yes")
-        qtConfig += "xmlpatterns";
+// No longer needed after modularization
+//    if (dictionary[ "XMLPATTERNS" ] == "yes")
+//        qtConfig += "xmlpatterns";
 
     if (dictionary["PHONON"] == "yes") {
-        qtConfig += "phonon";
+        // No longer needed after modularization
+        //qtConfig += "phonon";
         if (dictionary["PHONON_BACKEND"] == "yes")
             qtConfig += "phonon-backend";
     }
 
     if (dictionary["MULTIMEDIA"] == "yes") {
-        qtConfig += "multimedia";
+        // No longer needed after modularization
+        //qtConfig += "multimedia";
         if (dictionary["AUDIO_BACKEND"] == "yes")
             qtConfig += "audio-backend";
     }
 
-    QString dst = buildPath + "/mkspecs/modules/qt_webkit_version.pri";
-    QFile::remove(dst);
     if (dictionary["WEBKIT"] != "no") {
-        // This include takes care of adding "webkit" to QT_CONFIG.
-        QString src = sourcePath + "/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri";
-        QFile::copy(src, dst);
         if (dictionary["WEBKIT"] == "debug")
             qtConfig += "webkit-debug";
     }
 
-    if (dictionary["DECLARATIVE"] == "yes") {
-        if (dictionary[ "SCRIPT" ] == "no") {
-            cout << "QtDeclarative was requested, but it can't be built due to QtScript being "
-                    "disabled." << endl;
-            dictionary[ "DONE" ] = "error";
-        }
-        qtConfig += "declarative";
-    }
+// No longer needed after modularization
+//    if (dictionary["DECLARATIVE"] == "yes") {
+//        if (dictionary[ "SCRIPT" ] == "no") {
+//            cout << "QtDeclarative was requested, but it can't be built due to QtScript being "
+//                    "disabled." << endl;
+//            dictionary[ "DONE" ] = "error";
+//        }
+//        qtConfig += "declarative";
+//    }
 
     if (dictionary["DIRECTWRITE"] == "yes")
         qtConfig += "directwrite";
@@ -2924,81 +2922,81 @@ void Configure::generateCachefile()
     }
 
     // Generate qmodule.pri
-    QFile configFile(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qmodule.pri");
-    if (configFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file.
-        QTextStream configStream(&configFile);
+    QFile moduleFile(dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qmodule.pri");
+    if (moduleFile.open(QFile::WriteOnly | QFile::Text)) { // Truncates any existing file.
+        QTextStream moduleStream(&moduleFile);
 
-        configStream << "#paths" << endl;
-        configStream << "QT_BUILD_TREE   = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl;
-        configStream << "QT_SOURCE_TREE  = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl;
+        moduleStream << "#paths" << endl;
+        moduleStream << "QT_BUILD_TREE   = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl;
+        moduleStream << "QT_SOURCE_TREE  = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl;
         QStringList buildParts;
-        buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
+        buildParts << "libs" << "examples" << "demos";
         foreach (const QString &item, disabledBuildParts) {
             buildParts.removeAll(item);
         }
-        configStream << "QT_BUILD_PARTS  = " << buildParts.join(" ") << endl << endl;
+        moduleStream << "QT_BUILD_PARTS  = " << buildParts.join(" ") << endl << endl;
 
         //so that we can build without an install first (which would be impossible)
-        configStream << "#local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR" << endl;
-        configStream << "QMAKE_MOC       = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe", true) << endl;
-        configStream << "QMAKE_UIC       = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe", true) << endl;
-        configStream << "QMAKE_RCC       = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe", true) << endl;
-        configStream << "QMAKE_DUMPCPP   = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe", true) << endl;
-        configStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include", true) << endl;
-        configStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib", true) << endl;
+        moduleStream << "#local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR" << endl;
+        moduleStream << "QMAKE_MOC       = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe", true) << endl;
+        moduleStream << "QMAKE_UIC       = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe", true) << endl;
+        moduleStream << "QMAKE_RCC       = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe", true) << endl;
+        moduleStream << "QMAKE_DUMPCPP   = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe", true) << endl;
+        moduleStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include", true) << endl;
+        moduleStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib", true) << endl;
 
 
         QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ];
         QString mkspec_path = fixSeparators(sourcePath + "/mkspecs/" + targetSpec);
         if (QFile::exists(mkspec_path))
-            configStream << "QMAKESPEC       = " << escapeSeparators(mkspec_path) << endl;
+            moduleStream << "QMAKESPEC       = " << escapeSeparators(mkspec_path) << endl;
         else
-            configStream << "QMAKESPEC       = " << fixSeparators(targetSpec, true) << endl;
-        configStream << "ARCH            = " << dictionary[ "ARCHITECTURE" ] << endl;
+            moduleStream << "QMAKESPEC       = " << fixSeparators(targetSpec, true) << endl;
+        moduleStream << "ARCH            = " << dictionary[ "ARCHITECTURE" ] << endl;
 
         if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE")
-            configStream << "DEFINES        *= QT_EDITION=QT_EDITION_DESKTOP" << endl;
+            moduleStream << "DEFINES        *= QT_EDITION=QT_EDITION_DESKTOP" << endl;
 
         if (dictionary["CETEST"] == "yes") {
-            configStream << "QT_CE_RAPI_INC  = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ], true) << endl;
-            configStream << "QT_CE_RAPI_LIB  = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ], true) << endl;
+            moduleStream << "QT_CE_RAPI_INC  = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ], true) << endl;
+            moduleStream << "QT_CE_RAPI_LIB  = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ], true) << endl;
         }
 
-        configStream << "#Qt for Windows CE c-runtime deployment" << endl
+        moduleStream << "#Qt for Windows CE c-runtime deployment" << endl
                      << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ], true) << endl;
 
         if (dictionary["CE_SIGNATURE"] != QLatin1String("no"))
-            configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl;
+            moduleStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl;
 
         if (!dictionary["QMAKE_RPATHDIR"].isEmpty())
-            configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl;
+            moduleStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl;
 
         if (!dictionary["QT_LIBINFIX"].isEmpty())
-            configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
+            moduleStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
 
-        configStream << "#Qt for Symbian FPU settings" << endl;
+        moduleStream << "#Qt for Symbian FPU settings" << endl;
         if (!dictionary["ARM_FPU_TYPE"].isEmpty()) {
-            configStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\"";
+            moduleStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\"";
         }
         if (!dictionary["QT_NAMESPACE"].isEmpty()) {
-            configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
+            moduleStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
         }
 
         // embedded
         if (!dictionary["KBD_DRIVERS"].isEmpty())
-            configStream << "kbd-drivers += "<< dictionary["KBD_DRIVERS"]<<endl;
+            moduleStream << "kbd-drivers += "<< dictionary["KBD_DRIVERS"]<<endl;
         if (!dictionary["GFX_DRIVERS"].isEmpty())
-            configStream << "gfx-drivers += "<< dictionary["GFX_DRIVERS"]<<endl;
+            moduleStream << "gfx-drivers += "<< dictionary["GFX_DRIVERS"]<<endl;
         if (!dictionary["MOUSE_DRIVERS"].isEmpty())
-            configStream << "mouse-drivers += "<< dictionary["MOUSE_DRIVERS"]<<endl;
+            moduleStream << "mouse-drivers += "<< dictionary["MOUSE_DRIVERS"]<<endl;
         if (!dictionary["DECORATIONS"].isEmpty())
-            configStream << "decorations += "<<dictionary["DECORATIONS"]<<endl;
+            moduleStream << "decorations += "<<dictionary["DECORATIONS"]<<endl;
 
         if (!dictionary["QMAKE_RPATHDIR"].isEmpty())
-            configStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
+            moduleStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
 
-        configStream.flush();
-        configFile.close();
+        moduleStream.flush();
+        moduleFile.close();
     }
 
     // Generate qconfig.pri
-- 
1.7.3.2.343.g7d43d