[Qt][Mac] Build fails after adding ICU support (r105997).
authorzeno.albisser@nokia.com <zeno.albisser@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 14:42:07 +0000 (14:42 +0000)
committerzeno.albisser@nokia.com <zeno.albisser@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 14:42:07 +0000 (14:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77118

Source/JavaScriptCore:

Use Apple code path for unicode date formats on mac.

Reviewed by Tor Arne Vestbø.

* runtime/DatePrototype.cpp:
():

Source/WebCore:

Use SmareReplaceCF.cpp code path if platform Mac.

Reviewed by Tor Arne Vestbø.

* Target.pri:

Source/WTF:

Link to libicucore if platform Mac.

Reviewed by Tor Arne Vestbø.

* WTF.pri:

Tools:

Define WTF_USE_ICU_UNICODE if we are on mac.

Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/features.prf:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106118 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/DatePrototype.cpp
Source/WTF/ChangeLog
Source/WTF/WTF.pri
Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf

index af28b77f6dcc7a7b362df44c3384568ad796158a..5bed34380316c21e977f1388d3484231821875c4 100644 (file)
@@ -1,3 +1,15 @@
+2012-01-27  Zeno Albisser  <zeno@webkit.org>
+
+        [Qt][Mac] Build fails after adding ICU support (r105997).
+        https://bugs.webkit.org/show_bug.cgi?id=77118
+
+        Use Apple code path for unicode date formats on mac.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * runtime/DatePrototype.cpp:
+        ():
+
 2012-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Add a GKeyFile especialization to GOwnPtr
index 5eb045bad5401c8a2e38ab36de6e7d70044ddc17..922fb0a8679db3d6d097d77e6b0a10c2b3679f46 100644 (file)
@@ -60,7 +60,7 @@
 #include <sys/timeb.h>
 #endif
 
-#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX)
+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX) || (PLATFORM(QT) && OS(DARWIN))
 #include <CoreFoundation/CoreFoundation.h>
 #elif USE(ICU_UNICODE)
 #include <unicode/udat.h>
@@ -130,7 +130,7 @@ namespace JSC {
 
 enum LocaleDateTimeFormat { LocaleDateAndTime, LocaleDate, LocaleTime };
  
-#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX)
+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX) || (PLATFORM(QT) && OS(DARWIN))
 
 // FIXME: Since this is superior to the strftime-based version, why limit this to PLATFORM(MAC)?
 // Instead we should consider using this whenever USE(CF) is true.
index d44adf7a5f81d558b52e8d0ef53b00ad9faae92c..58d551c625d96096148d530a975351980ea1a49a 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <zeno@webkit.org>
+
+        [Qt][Mac] Build fails after adding ICU support (r105997).
+        https://bugs.webkit.org/show_bug.cgi?id=77118
+
+        Link to libicucore if platform Mac.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * WTF.pri:
+
 2012-01-26  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
 
         [Qt] Use ICU if available
index 93bbe929546109dede1a12ccfcb7e919227a5f71..f7a68c3d7ee4499e1581a1ac8b63b78a8ba086e8 100644 (file)
@@ -17,11 +17,20 @@ INCLUDEPATH += \
     $$OLD_SOURCE_DIR/qt \
     $$OLD_SOURCE_DIR/unicode
 
-haveQt(5):contains(QT_CONFIG,icu) {
-    unix:!mac: LIBS += $$system(icu-config --ldflags-searchpath --ldflags-libsonly)
-    else: LIBS += -licuin
-} else {
-    haveQt(5): error("To build QtWebKit with Qt 5 you need ICU")
+haveQt(5) {
+    mac {
+        # Mac OS does ship libicu but not the associated header files.
+        # Therefore WebKit provides adequate header files.
+        INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WTF/icu
+        LIBS += -licucore
+    } else {
+        contains(QT_CONFIG,icu) {
+            unix: LIBS += $$system(icu-config --ldflags-searchpath --ldflags-libsonly)
+            else: LIBS += -licuin
+        } else {
+            error("To build QtWebKit with Qt 5 you need ICU")
+        }
+    }
 }
 
 v8 {
index f93422866e167661615e579adf1362e2a22b619d..bc8d3121adf0b294d8a78ba001616f96bae4a243 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <zeno@webkit.org>
+
+        [Qt][Mac] Build fails after adding ICU support (r105997).
+        https://bugs.webkit.org/show_bug.cgi?id=77118
+
+        Use SmareReplaceCF.cpp code path if platform Mac.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * Target.pri:
+
 2012-01-27  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: detailed heap snapshot: Replace (Native objects) root element
index 6b6a14b822a033ab6fdb8aa3f1d115514da429ab..6f544650b7cecaf06193f0c5462acf44045ffa72 100644 (file)
@@ -629,7 +629,6 @@ SOURCES += \
     editing/ReplaceSelectionCommand.cpp \
     editing/SetNodeAttributeCommand.cpp \
     editing/SetSelectionCommand.cpp \
-    editing/SmartReplaceICU.cpp \
     editing/SpellChecker.cpp \
     editing/SpellingCorrectionCommand.cpp \
     editing/SpellingCorrectionController.cpp \
@@ -2795,7 +2794,6 @@ SOURCES += \
     platform/network/qt/QtMIMETypeSniffer.cpp \
     platform/network/qt/QNetworkReplyHandler.cpp \
     editing/qt/EditorQt.cpp \
-    editing/qt/SmartReplaceQt.cpp \
     platform/Cursor.cpp \
     platform/qt/ClipboardQt.cpp \
     platform/qt/ContextMenuItemQt.cpp \
@@ -2870,10 +2868,18 @@ mac {
         platform/text/cf/StringImplCF.cpp
 }
 
-haveQt(5):contains(QT_CONFIG,icu) {
-    SOURCES += platform/text/TextBreakIteratorICU.cpp
+haveQt(5) {
+    contains(QT_CONFIG,icu)|mac: SOURCES += platform/text/TextBreakIteratorICU.cpp
+    mac {
+        # For Mac we use the same SmartReplace implementation as the Apple port.
+        SOURCES += editing/SmartReplaceCF.cpp
+        INCLUDEPATH += $$PWD/icu
+    } else {
+        SOURCES += editing/SmartReplaceICU.cpp
+    }
 } else {
-    SOURCES += platform/text/qt/TextBreakIteratorQt.cpp
+    SOURCES += platform/text/qt/TextBreakIteratorQt.cpp \
+               editing/qt/SmartReplaceQt.cpp
 }
 
 contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
index 7d3bd46754e32bdf0e2fbf11617d0fc0c20175ef..20bae6645a1ebb7aa80eeab73261ba0f8f732580 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <zeno@webkit.org>
+
+        [Qt][Mac] Build fails after adding ICU support (r105997).
+        https://bugs.webkit.org/show_bug.cgi?id=77118
+
+        Define WTF_USE_ICU_UNICODE if we are on mac.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * qmake/mkspecs/features/features.prf:
+
 2012-01-27  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
 
         Update committers.py with new contributors.
index fe20fdb0e2d133917a872e2500a3ec4c91678222..41200603330621e8aceca8bf1bff7991c9327665 100644 (file)
@@ -30,7 +30,8 @@ isEmpty(SQLITE3SRCDIR) {
     SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
 }
 
-haveQt(5):contains(QT_CONFIG,icu) {
+# For Mac we do not rely on QT_CONFIG, because icu is not officially supported for all of qt.
+haveQt(5):if(contains(QT_CONFIG,icu)|mac) {
     DEFINES += WTF_USE_ICU_UNICODE=1
     DEFINES -= WTF_USE_QT4_UNICODE
 } else {