git.iko.soy/typeable/nixpkgs
on master help sign in
qt56.qtwebkit: fix with icu-59 by upstream patch

The patch is from qtwebkit-5.9.1, but it's fairly simple and seems to work here as well.

commit26db832fee73ba5e75c7dee29039b6e00125a07e authorVladimír Čunát <vcunat@gmail.com> dateSun 15 Oct 2017, 14:55 (9 years ago) parentf7d308d
2 files changed+87
pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icu-59.patch+86 pkgs/development/libraries/qt-5/5.6/qtwebkit/series+1
pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icu-59.patchnew file+86
@@ -0,0 +1,86 @@
1+From: Konstantin Tokarev <annulen@yandex.ru>
2+Date: Thu, 4 May 2017 12:12:37 +0000 (+0300)
3+Subject: Fix compilation with ICU 59
4+X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqtwebkit.git;a=commitdiff_plain;h=bf172ae289a1348842005a9421797970f9b72060;hp=821eaaadc9d63d03aca65cf757230b520daaaa7c
5+
6+Fix compilation with ICU 59
7+
8+Upstream fix: https://bugs.webkit.org/show_bug.cgi?id=171612
9+
10+Task-number: QTBUG-60532
11+Change-Id: I6014feea213aa70ebe40b09d9d1a03fd1ed3c843
12+Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
13+---
14+
15+diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp
16+index 812f3d4..77a3fd0 100644
17+--- a/Source/JavaScriptCore/API/JSStringRef.cpp
18++++ b/Source/JavaScriptCore/API/JSStringRef.cpp
19+@@ -37,7 +37,7 @@ using namespace WTF::Unicode;
20+ JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
21+ {
22+ initializeThreading();
23+- return OpaqueJSString::create(chars, numChars).leakRef();
24++ return OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
25+ }
26+
27+ JSStringRef JSStringCreateWithUTF8CString(const char* string)
28+@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string)
29+ JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
30+ {
31+ initializeThreading();
32+- return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
33++ return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
34+ }
35+
36+ JSStringRef JSStringRetain(JSStringRef string)
37+@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
38+
39+ const JSChar* JSStringGetCharactersPtr(JSStringRef string)
40+ {
41+- return string->characters();
42++ return reinterpret_cast<const JSChar*>(string->characters());
43+ }
44+
45+ size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
46+diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
47+index 0b57f01..05e2733 100644
48+--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
49++++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
50+@@ -107,7 +107,8 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
51+ #if OS(WINDOWS)
52+ TIME_ZONE_INFORMATION timeZoneInformation;
53+ GetTimeZoneInformation(&timeZoneInformation);
54+- const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
55++ const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
56++ String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName));
57+ #else
58+ struct tm gtm = t;
59+ char timeZoneName[70];
60+diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
61+index 9df2c95..f5d6121 100644
62+--- a/Source/WTF/wtf/TypeTraits.h
63++++ b/Source/WTF/wtf/TypeTraits.h
64+@@ -72,6 +72,9 @@ namespace WTF {
65+ template<> struct IsInteger<unsigned long> { static const bool value = true; };
66+ template<> struct IsInteger<long long> { static const bool value = true; };
67+ template<> struct IsInteger<unsigned long long> { static const bool value = true; };
68++#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
69++ template<> struct IsInteger<char16_t> { static const bool value = true; };
70++#endif
71+ #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
72+ template<> struct IsInteger<wchar_t> { static const bool value = true; };
73+ #endif
74+diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
75+index cbac67d..23400a6 100644
76+--- a/Source/WebKit2/Shared/API/c/WKString.cpp
77++++ b/Source/WebKit2/Shared/API/c/WKString.cpp
78+@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
79+ size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
80+ {
81+ COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
82+- return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
83++ return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
84+ }
85+
86+ size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
pkgs/development/libraries/qt-5/5.6/qtwebkit/series+1
@@ -1,3 +1,4 @@
11qtwebkit-dlopen-gtk.patch
22qtwebkit-dlopen-udev.patch
33qtwebkit-icucore-darwin.patch
4+qtwebkit-icu-59.patch