Files
qt5/patches/qtwebkit/0003-Make-WebKit-compile-with-modularized-Qt-with-prefix.patch
2011-04-27 12:34:00 +02:00

172 lines
6.5 KiB
Diff

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