qtwebkit-5.9.0-icu_59-1.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Submitted by: DJ Lucas (dj_AT_linuxfromscratch_DOT_org)
  2. Date: 2017-04-29
  3. Initial Package Version: 5.8.0
  4. Upstream Status: Unknown
  5. Origin: https://bugreports.qt.io/browse/QTBUG-35971
  6. Description: Fixes build with icu-59.
  7. diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/JavaScriptCore/API/JSStringRef.h qtwebkit-opensource-src-5.8.0/Source/JavaScriptCore/API/JSStringRef.h
  8. --- qtwebkit-opensource-src-5.8.0-orig/Source/JavaScriptCore/API/JSStringRef.h 2016-12-10 10:32:34.000000000 -0600
  9. +++ Source/JavaScriptCore/API/JSStringRef.h 2017-04-29 17:03:35.280465079 -0500
  10. @@ -32,6 +32,7 @@
  11. #include <stdbool.h>
  12. #endif
  13. #include <stddef.h> /* for size_t */
  14. +#include <uchar.h>
  15. #ifdef __cplusplus
  16. extern "C" {
  17. @@ -43,7 +44,7 @@ extern "C" {
  18. @typedef JSChar
  19. @abstract A Unicode character.
  20. */
  21. - typedef unsigned short JSChar;
  22. + typedef char16_t JSChar;
  23. #else
  24. typedef wchar_t JSChar;
  25. #endif
  26. diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/Compiler.h qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/Compiler.h
  27. --- qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/Compiler.h 2016-12-10 10:32:34.000000000 -0600
  28. +++ Source/WTF/wtf/Compiler.h 2017-04-29 17:03:35.280465079 -0500
  29. @@ -61,6 +61,7 @@
  30. #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor)
  31. #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
  32. #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
  33. +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES !defined(_LIBCPP_HAS_NO_UNICODE_CHARS)
  34. #endif
  35. @@ -142,6 +143,7 @@
  36. #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
  37. #endif
  38. #if GCC_VERSION_AT_LEAST(4, 5, 0)
  39. +#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES 1
  40. #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
  41. #endif
  42. #if GCC_VERSION_AT_LEAST(4, 6, 0)
  43. diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/TypeTraits.h qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/TypeTraits.h
  44. --- qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/TypeTraits.h 2016-12-10 10:32:34.000000000 -0600
  45. +++ Source/WTF/wtf/TypeTraits.h 2017-04-29 17:03:35.280465079 -0500
  46. @@ -75,6 +75,10 @@ namespace WTF {
  47. #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
  48. template<> struct IsInteger<wchar_t> { static const bool value = true; };
  49. #endif
  50. +#if COMPILER_SUPPORTS(CXX_NEW_CHAR_TYPES)
  51. + template<> struct IsInteger<char16_t> { static const bool value = true; };
  52. + template<> struct IsInteger<char32_t> { static const bool value = true; };
  53. +#endif
  54. template<typename T> struct IsFloatingPoint { static const bool value = false; };
  55. template<> struct IsFloatingPoint<float> { static const bool value = true; };
  56. diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WebKit2/Shared/API/c/WKString.h qtwebkit-opensource-src-5.8.0/Source/WebKit2/Shared/API/c/WKString.h
  57. --- qtwebkit-opensource-src-5.8.0-orig/Source/WebKit2/Shared/API/c/WKString.h 2016-12-10 10:32:34.000000000 -0600
  58. +++ Source/WebKit2/Shared/API/c/WKString.h 2017-04-29 17:03:35.280465079 -0500
  59. @@ -31,6 +31,7 @@
  60. #ifndef __cplusplus
  61. #include <stdbool.h>
  62. #endif
  63. +#include <uchar.h>
  64. #ifdef __cplusplus
  65. extern "C" {
  66. @@ -38,7 +39,7 @@ extern "C" {
  67. #if !defined(WIN32) && !defined(_WIN32) \
  68. && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */
  69. - typedef unsigned short WKChar;
  70. + typedef char16_t WKChar;
  71. #else
  72. typedef wchar_t WKChar;
  73. #endif