From 3a9831681123bb0326a7cb84cc3ee63038fc491e Mon Sep 17 00:00:00 2001 From: "zeno.albisser@nokia.com" Date: Fri, 27 Jan 2012 14:42:07 +0000 Subject: [PATCH] [Qt][Mac] Build fails after adding ICU support (r105997). https://bugs.webkit.org/show_bug.cgi?id=77118 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 12 ++++++++++++ .../JavaScriptCore/runtime/DatePrototype.cpp | 4 ++-- Source/WTF/ChangeLog | 11 +++++++++++ Source/WTF/WTF.pri | 19 ++++++++++++++----- Source/WebCore/ChangeLog | 11 +++++++++++ Source/WebCore/Target.pri | 16 +++++++++++----- Tools/ChangeLog | 11 +++++++++++ Tools/qmake/mkspecs/features/features.prf | 3 ++- 8 files changed, 74 insertions(+), 13 deletions(-) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index af28b77f6dcc..5bed34380316 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,15 @@ +2012-01-27 Zeno Albisser + + [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 [GTK] Add a GKeyFile especialization to GOwnPtr diff --git a/Source/JavaScriptCore/runtime/DatePrototype.cpp b/Source/JavaScriptCore/runtime/DatePrototype.cpp index 5eb045bad540..922fb0a8679d 100644 --- a/Source/JavaScriptCore/runtime/DatePrototype.cpp +++ b/Source/JavaScriptCore/runtime/DatePrototype.cpp @@ -60,7 +60,7 @@ #include #endif -#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX) +#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WX) || (PLATFORM(QT) && OS(DARWIN)) #include #elif USE(ICU_UNICODE) #include @@ -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. diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index d44adf7a5f81..58d551c625d9 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,14 @@ +2012-01-27 Zeno Albisser + + [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 [Qt] Use ICU if available diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri index 93bbe9295461..f7a68c3d7ee4 100644 --- a/Source/WTF/WTF.pri +++ b/Source/WTF/WTF.pri @@ -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 { diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index f93422866e16..bc8d3121adf0 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2012-01-27 Zeno Albisser + + [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 Web Inspector: detailed heap snapshot: Replace (Native objects) root element diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri index 6b6a14b822a0..6f544650b7ce 100644 --- a/Source/WebCore/Target.pri +++ b/Source/WebCore/Target.pri @@ -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) { diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 7d3bd46754e3..20bae6645a1e 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,14 @@ +2012-01-27 Zeno Albisser + + [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 Update committers.py with new contributors. diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf index fe20fdb0e2d1..412006033306 100644 --- a/Tools/qmake/mkspecs/features/features.prf +++ b/Tools/qmake/mkspecs/features/features.prf @@ -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 { -- 2.36.0