webkit2gtk3/SOURCES/icu60.patch
2022-02-11 05:33:45 +00:00

57 lines
2.0 KiB
Diff

--- a/Source/JavaScriptCore/runtime/IntlCache.cpp
+++ a/Source/JavaScriptCore/runtime/IntlCache.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "IntlCache.h"
+#include "IntlDisplayNames.h"
#include <wtf/Vector.h>
namespace JSC {
@@ -53,6 +54,7 @@ Vector<UChar, 32> IntlCache::getBestDateTimePattern(const CString& locale, const
return patternBuffer;
}
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
Vector<UChar, 32> IntlCache::getFieldDisplayName(const CString& locale, UDateTimePatternField field, UDateTimePGDisplayWidth width, UErrorCode& status)
{
auto sharedGenerator = getSharedPatternGenerator(locale, status);
@@ -64,5 +66,6 @@ Vector<UChar, 32> IntlCache::getFieldDisplayName(const CString& locale, UDateTim
return { };
return buffer;
}
+#endif
} // namespace JSC
--- a/Source/JavaScriptCore/runtime/IntlCache.h
+++ a/Source/JavaScriptCore/runtime/IntlCache.h
@@ -25,6 +25,7 @@
#pragma once
+#include "IntlDisplayNames.h"
#include <unicode/udatpg.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/CString.h>
@@ -39,7 +40,9 @@ public:
IntlCache() = default;
Vector<UChar, 32> getBestDateTimePattern(const CString& locale, const UChar* skeleton, unsigned skeletonSize, UErrorCode&);
+#if HAVE(ICU_U_LOCALE_DISPLAY_NAMES)
Vector<UChar, 32> getFieldDisplayName(const CString& locale, UDateTimePatternField, UDateTimePGDisplayWidth, UErrorCode&);
+#endif
private:
UDateTimePatternGenerator* getSharedPatternGenerator(const CString& locale, UErrorCode& status)
--- a/Source/cmake/OptionsGTK.cmake
+++ a/Source/cmake/OptionsGTK.cmake
@@ -14,7 +14,7 @@ find_package(Freetype 2.4.2 REQUIRED)
find_package(LibGcrypt 1.6.0 REQUIRED)
find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
-find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
+find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
find_package(LibXml2 2.8.0 REQUIRED)
find_package(PNG REQUIRED)