Title: [106118] trunk
Revision
106118
Author
[email protected]
Date
2012-01-27 06:42:07 -0800 (Fri, 27 Jan 2012)

Log Message

[Qt][Mac] Build fails after adding ICU support (r105997).
https://bugs.webkit.org/show_bug.cgi?id=77118

Source/_javascript_Core:

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:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (106117 => 106118)


--- trunk/Source/_javascript_Core/ChangeLog	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-01-27 14:42:07 UTC (rev 106118)
@@ -1,3 +1,15 @@
+2012-01-27  Zeno Albisser  <[email protected]>
+
+        [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  <[email protected]>
 
         [GTK] Add a GKeyFile especialization to GOwnPtr

Modified: trunk/Source/_javascript_Core/runtime/DatePrototype.cpp (106117 => 106118)


--- trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-01-27 14:42:07 UTC (rev 106118)
@@ -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 @@
 
 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.

Modified: trunk/Source/WTF/ChangeLog (106117 => 106118)


--- trunk/Source/WTF/ChangeLog	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/WTF/ChangeLog	2012-01-27 14:42:07 UTC (rev 106118)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <[email protected]>
+
+        [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  <[email protected]>
 
         [Qt] Use ICU if available

Modified: trunk/Source/WTF/WTF.pri (106117 => 106118)


--- trunk/Source/WTF/WTF.pri	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/WTF/WTF.pri	2012-01-27 14:42:07 UTC (rev 106118)
@@ -17,11 +17,20 @@
     $$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 {

Modified: trunk/Source/WebCore/ChangeLog (106117 => 106118)


--- trunk/Source/WebCore/ChangeLog	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/WebCore/ChangeLog	2012-01-27 14:42:07 UTC (rev 106118)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <[email protected]>
+
+        [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  <[email protected]>
 
         Web Inspector: detailed heap snapshot: Replace (Native objects) root element

Modified: trunk/Source/WebCore/Target.pri (106117 => 106118)


--- trunk/Source/WebCore/Target.pri	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Source/WebCore/Target.pri	2012-01-27 14:42:07 UTC (rev 106118)
@@ -629,7 +629,6 @@
     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 @@
     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 @@
         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) {

Modified: trunk/Tools/ChangeLog (106117 => 106118)


--- trunk/Tools/ChangeLog	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Tools/ChangeLog	2012-01-27 14:42:07 UTC (rev 106118)
@@ -1,3 +1,14 @@
+2012-01-27  Zeno Albisser  <[email protected]>
+
+        [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  <[email protected]>
 
         Update committers.py with new contributors.

Modified: trunk/Tools/qmake/mkspecs/features/features.prf (106117 => 106118)


--- trunk/Tools/qmake/mkspecs/features/features.prf	2012-01-27 14:27:24 UTC (rev 106117)
+++ trunk/Tools/qmake/mkspecs/features/features.prf	2012-01-27 14:42:07 UTC (rev 106118)
@@ -30,7 +30,8 @@
     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 {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to