aboutsummaryrefslogtreecommitdiffstats
path: root/patches/qtwebkit/0003-Make-WebKit-compile-with-modularized-Qt-with-prefix.patch
blob: 4cf246eab92e1c7c5329a94c05c363a4e52bbc92 (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
From ff0c40205642eef0905c40bc5b8c74b04018372c Mon Sep 17 00:00:00 2001
From: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Date: Thu, 3 Mar 2011 17:02:15 +0100
Subject: [PATCH] Make WebKit compile with modularized Qt with prefix

Before this, WebKit would only compile with in-source developer builds.
Updated the previous patch for the same.
---
 Source/JavaScriptCore/JavaScriptCore.pro           |    8 +++-----
 Source/WebCore/WebCore.pro                         |    2 +-
 Source/WebCore/features.pri                        |    2 +-
 Source/WebKit.pri                                  |   11 +++++------
 Source/WebKit/qt/declarative/declarative.pro       |   12 ++----------
 .../docs/webkitsnippets/webelement/webelement.pro  |    4 +---
 Source/WebKit/qt/tests/tests.pri                   |    3 +--
 Tools/DumpRenderTree/qt/DumpRenderTree.pro         |    2 +-
 8 files changed, 15 insertions(+), 29 deletions(-)

diff --git a/Source/JavaScriptCore/JavaScriptCore.pro b/Source/JavaScriptCore/JavaScriptCore.pro
index e41f04d..9237b16 100644
--- a/Source/JavaScriptCore/JavaScriptCore.pro
+++ b/Source/JavaScriptCore/JavaScriptCore.pro
@@ -22,11 +22,9 @@ contains(QT_CONFIG, embedded):CONFIG += embedded
 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
 
-CONFIG(QTDIR_build) {
-    # Remove the following 2 lines if you want debug information in JavaScriptCore
-    CONFIG -= separate_debug_info
-    CONFIG += no_debug_info
-}
+# Remove the following 2 lines if you want debug information in JavaScriptCore
+CONFIG -= separate_debug_info
+CONFIG += no_debug_info
 
 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
diff --git a/Source/WebCore/WebCore.pro b/Source/WebCore/WebCore.pro
index 458d6a2..83b5d00 100644
--- a/Source/WebCore/WebCore.pro
+++ b/Source/WebCore/WebCore.pro
@@ -1,5 +1,5 @@
 # WebCore - qmake build info
-CONFIG += building-libs
+CONFIG += building-libs qt_module
 CONFIG += depend_includepath
 
 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ..
diff --git a/Source/WebCore/features.pri b/Source/WebCore/features.pri
index 4288d0f..c1d5b55 100644
--- a/Source/WebCore/features.pri
+++ b/Source/WebCore/features.pri
@@ -19,7 +19,7 @@ load(mobilityconfig, true)
 ## Define default features macros for optional components
 ## (look for defs in config.h and included files!)
 # Try to locate sqlite3 source
-CONFIG(QTDIR_build) {
+!isEmpty(QT_SOURCE_TREE) {
     SQLITE3SRCDIR = $$QT_SOURCE_TREE/src/3rdparty/sqlite/
 } else {
     SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
diff --git a/Source/WebKit.pri b/Source/WebKit.pri
index 51d13f0..8785496 100644
--- a/Source/WebKit.pri
+++ b/Source/WebKit.pri
@@ -1,10 +1,10 @@
 # Include file to make it easy to include WebKit into Qt projects
 
 # Detect that we are building as a standalone package by the presence of
-# either the generated files directory or as part of the Qt package through
-# QTDIR_build
-CONFIG(QTDIR_build) {
-    CONFIG += standalone_package
+# the generated files directory
+exists($$PWD/WebCore/generated):CONFIG += standalone_package
+
+!isEmpty(QT_SOURCE_TREE) {
     # Make sure we compile both debug and release on mac when inside Qt.
     # This line was extracted from qbase.pri instead of including the whole file
     win32|mac:!macx-xcode:CONFIG += debug_and_release
@@ -15,7 +15,6 @@ CONFIG(QTDIR_build) {
         OBJECTS_DIR = obj/release
         DEFINES *= NDEBUG
     }
-    exists($$PWD/WebCore/generated):CONFIG += standalone_package
     # Make sure that build_all follows the build_all config in WebCore
     mac:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework):!build_pass:CONFIG += build_all
 }
@@ -29,7 +28,7 @@ DEFINES += BUILDING_QT__=1
 building-libs {
     win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
 } else {
-    CONFIG(QTDIR_build) {
+    !isEmpty(QT_SOURCE_TREE) {
         QT += webkit
     } else {
         QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
diff --git a/Source/WebKit/qt/declarative/declarative.pro b/Source/WebKit/qt/declarative/declarative.pro
index 526cf06..1f084b7 100644
--- a/Source/WebKit/qt/declarative/declarative.pro
+++ b/Source/WebKit/qt/declarative/declarative.pro
@@ -10,11 +10,7 @@ isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
 
 QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
 copy2build.input = QMLDIRFILE
-CONFIG(QTDIR_build) {
-    copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
-} else {
-    copy2build.output = $$OUTPUT_DIR/imports/$$TARGETPATH/qmldir
-}
+copy2build.output = $$OUTPUT_DIR/imports/$$TARGETPATH/qmldir
 !contains(TEMPLATE_PREFIX, vc):copy2build.variable_out = PRE_TARGETDEPS
 copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
 copy2build.name = COPY ${QMAKE_FILE_IN}
@@ -55,11 +51,7 @@ QT += declarative
 SOURCES += qdeclarativewebview.cpp plugin.cpp
 HEADERS += qdeclarativewebview_p.h
 
-CONFIG(QTDIR_build) {
-    DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-} else {
-    DESTDIR = $$OUTPUT_DIR/imports/$$TARGETPATH
-}
+DESTDIR = $$OUTPUT_DIR/imports/$$TARGETPATH
 target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
 
 
diff --git a/Source/WebKit/qt/docs/webkitsnippets/webelement/webelement.pro b/Source/WebKit/qt/docs/webkitsnippets/webelement/webelement.pro
index 8ca4b59..7d17749 100644
--- a/Source/WebKit/qt/docs/webkitsnippets/webelement/webelement.pro
+++ b/Source/WebKit/qt/docs/webkitsnippets/webelement/webelement.pro
@@ -1,8 +1,6 @@
 TEMPLATE = app
 CONFIG -= app_bundle
-CONFIG(QTDIR_build) {
-    QT       += webkit
-}
+QT += webkit
 SOURCES   = main.cpp
 include(../../../../../WebKit.pri)
 QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
diff --git a/Source/WebKit/qt/tests/tests.pri b/Source/WebKit/qt/tests/tests.pri
index bb519eb..b526e06 100644
--- a/Source/WebKit/qt/tests/tests.pri
+++ b/Source/WebKit/qt/tests/tests.pri
@@ -3,8 +3,7 @@ CONFIG -= app_bundle
 
 VPATH += $$_PRO_FILE_PWD_
 # Add the tst_ prefix, In QTDIR_build it's done by qttest_p4.prf
-CONFIG(QTDIR_build) { load(qttest_p4) }
-ELSE { TARGET = tst_$$TARGET }
+TARGET = tst_$$TARGET
 
 # Load mobilityconfig if Qt Mobility is available
 load(mobilityconfig, true)
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index d84af96..92d7a67 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -17,7 +17,7 @@ unix:!mac:!symbian {
     PKGCONFIG += fontconfig
 }
 
-QT = core gui network testlib
+QT = core gui network testlib webkit
 macx: QT += xml
 
 HEADERS = $$BASEDIR/WorkQueue.h \
-- 
1.7.3.1