Sun Apr 25 12:00:24 2021 UTC ()
webkit-gtk: Backport upstream patches to fix the build for ICU >= 69
PKGREVISION++
Thanks to <wiz> for pointing out them!
(leot)
diff -r1.204 -r1.205 pkgsrc/www/webkit-gtk/Makefile
diff -r1.147 -r1.148 pkgsrc/www/webkit-gtk/distinfo
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_JavaScriptCore_Sources.txt
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.h
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegments.cpp
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp
--- pkgsrc/www/webkit-gtk/Makefile 2021/04/21 11:40:44 1.204
+++ pkgsrc/www/webkit-gtk/Makefile 2021/04/25 12:00:24 1.205
| @@ -1,18 +1,18 @@ | | | @@ -1,18 +1,18 @@ |
1 | # $NetBSD: Makefile,v 1.204 2021/04/21 11:40:44 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.205 2021/04/25 12:00:24 leot Exp $ |
2 | | | 2 | |
3 | DISTNAME= webkitgtk-2.32.0 | | 3 | DISTNAME= webkitgtk-2.32.0 |
4 | PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk/} | | 4 | PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk/} |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 2 |
6 | CATEGORIES= www | | 6 | CATEGORIES= www |
7 | MASTER_SITES= https://www.webkitgtk.org/releases/ | | 7 | MASTER_SITES= https://www.webkitgtk.org/releases/ |
8 | EXTRACT_SUFX= .tar.xz | | 8 | EXTRACT_SUFX= .tar.xz |
9 | | | 9 | |
10 | MAINTAINER= pkgsrc-users@NetBSD.org | | 10 | MAINTAINER= pkgsrc-users@NetBSD.org |
11 | HOMEPAGE= https://www.webkitgtk.org/ | | 11 | HOMEPAGE= https://www.webkitgtk.org/ |
12 | COMMENT= GTK port of the WebKit browser engine | | 12 | COMMENT= GTK port of the WebKit browser engine |
13 | LICENSE= 2-clause-bsd AND gnu-lgpl-v2 | | 13 | LICENSE= 2-clause-bsd AND gnu-lgpl-v2 |
14 | | | 14 | |
15 | # shm_open(3) and shm_unlink(3) appeared in NetBSD 7.0 | | 15 | # shm_open(3) and shm_unlink(3) appeared in NetBSD 7.0 |
16 | NOT_FOR_PLATFORM= NetBSD-[1-6].*-* | | 16 | NOT_FOR_PLATFORM= NetBSD-[1-6].*-* |
17 | | | 17 | |
18 | TOOL_DEPENDS+= gettext-tools>=0.18:../../devel/gettext-tools | | 18 | TOOL_DEPENDS+= gettext-tools>=0.18:../../devel/gettext-tools |
--- pkgsrc/www/webkit-gtk/distinfo 2021/03/30 12:47:42 1.147
+++ pkgsrc/www/webkit-gtk/distinfo 2021/04/25 12:00:24 1.148
| @@ -1,26 +1,31 @@ | | | @@ -1,26 +1,31 @@ |
1 | $NetBSD: distinfo,v 1.147 2021/03/30 12:47:42 leot Exp $ | | 1 | $NetBSD: distinfo,v 1.148 2021/04/25 12:00:24 leot Exp $ |
2 | | | 2 | |
3 | SHA1 (webkitgtk-2.32.0.tar.xz) = 8abdb3ba2732c892dd06bb2bd63208b090462bf7 | | 3 | SHA1 (webkitgtk-2.32.0.tar.xz) = 8abdb3ba2732c892dd06bb2bd63208b090462bf7 |
4 | RMD160 (webkitgtk-2.32.0.tar.xz) = c825873ec544e505f84e3b8a900619dac08e01ce | | 4 | RMD160 (webkitgtk-2.32.0.tar.xz) = c825873ec544e505f84e3b8a900619dac08e01ce |
5 | SHA512 (webkitgtk-2.32.0.tar.xz) = 4832a4614be24481028ca8a6480a8e6cfacd8e22f5ba9f936703c09944550056f06f75ccf8fffa7dee3f5a1d11ab1870841407745be2e61ebad6557a0934db15 | | 5 | SHA512 (webkitgtk-2.32.0.tar.xz) = 4832a4614be24481028ca8a6480a8e6cfacd8e22f5ba9f936703c09944550056f06f75ccf8fffa7dee3f5a1d11ab1870841407745be2e61ebad6557a0934db15 |
6 | Size (webkitgtk-2.32.0.tar.xz) = 23315936 bytes | | 6 | Size (webkitgtk-2.32.0.tar.xz) = 23315936 bytes |
7 | SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = f4f117e6c1cd8eb8e4905f74946e0367156ed528 | | 7 | SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = f4f117e6c1cd8eb8e4905f74946e0367156ed528 |
8 | SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697 | | 8 | SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697 |
| | | 9 | SHA1 (patch-Source_JavaScriptCore_Sources.txt) = 51de2568e6255ee77f6ea7f3ab657eb3c43c8ce6 |
9 | SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = 79c282ca90d0ba2ef4769da40d4648f5f709951b | | 10 | SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = 79c282ca90d0ba2ef4769da40d4648f5f709951b |
10 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 70975aac175ec4131a4ed26a54dfe51e16ffb7cd | | 11 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 70975aac175ec4131a4ed26a54dfe51e16ffb7cd |
11 | SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = 709e5dcf4cdb834617c2ef542686bb2aa4aa37b3 | | 12 | SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = 709e5dcf4cdb834617c2ef542686bb2aa4aa37b3 |
12 | SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 7f6c0c57d46478e83c4ff21dae2415f44085ba32 | | 13 | SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 7f6c0c57d46478e83c4ff21dae2415f44085ba32 |
13 | SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93 | | 14 | SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93 |
| | | 15 | SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp) = 326b0405fc433e579c115e174e516f1c79e8edc5 |
| | | 16 | SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegmenter.h) = 36abe8dd1cf6fceefc05d8f6fe0d1a6c18f4d0c5 |
| | | 17 | SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegments.cpp) = 8c357e32a256c06f05c0aeb6bea485f90ef8219d |
| | | 18 | SHA1 (patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp) = b4a793edefa3c500b167d6fe3cdb9244ec38bcf5 |
14 | SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012 | | 19 | SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012 |
15 | SHA1 (patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp) = 73dfe781efe7e8aa7d49094af8820a87c501818f | | 20 | SHA1 (patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp) = 73dfe781efe7e8aa7d49094af8820a87c501818f |
16 | SHA1 (patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h) = 10debffda84bc752ed434657a337a466aad19a3a | | 21 | SHA1 (patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h) = 10debffda84bc752ed434657a337a466aad19a3a |
17 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = a5454eb891ad1f9d8285c28af2e9efb4ff439e6b | | 22 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = a5454eb891ad1f9d8285c28af2e9efb4ff439e6b |
18 | SHA1 (patch-Source_WTF_wtf_Assertions.h) = 427de20eba4627578087feaa7de2f23e80b9debf | | 23 | SHA1 (patch-Source_WTF_wtf_Assertions.h) = 427de20eba4627578087feaa7de2f23e80b9debf |
19 | SHA1 (patch-Source_WTF_wtf_FileSystem.cpp) = 2fe7b7755646d9a1cc022aec3d01091766378aba | | 24 | SHA1 (patch-Source_WTF_wtf_FileSystem.cpp) = 2fe7b7755646d9a1cc022aec3d01091766378aba |
20 | SHA1 (patch-Source_WTF_wtf_PlatformEnable.h) = eb5598c20c8453314daba7897066f15827bbede7 | | 25 | SHA1 (patch-Source_WTF_wtf_PlatformEnable.h) = eb5598c20c8453314daba7897066f15827bbede7 |
21 | SHA1 (patch-Source_WTF_wtf_PlatformHave.h) = 3787817a0e288d00aa747c417aecd9abf52866d1 | | 26 | SHA1 (patch-Source_WTF_wtf_PlatformHave.h) = 3787817a0e288d00aa747c417aecd9abf52866d1 |
22 | SHA1 (patch-Source_WTF_wtf_PlatformOS.h) = 80aa6ff20f10407d447fdb41606d4bb4989351aa | | 27 | SHA1 (patch-Source_WTF_wtf_PlatformOS.h) = 80aa6ff20f10407d447fdb41606d4bb4989351aa |
23 | SHA1 (patch-Source_WTF_wtf_PlatformUse.h) = 595486b48e7d89378208c0a209a121ef136415e6 | | 28 | SHA1 (patch-Source_WTF_wtf_PlatformUse.h) = 595486b48e7d89378208c0a209a121ef136415e6 |
24 | SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3 | | 29 | SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3 |
25 | SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = b292baf2494bcd459d9af91386263123046c6615 | | 30 | SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = b292baf2494bcd459d9af91386263123046c6615 |
26 | SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 9b323aa1fa8e6e5599ac0a7ae08fbbed4348c70e | | 31 | SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 9b323aa1fa8e6e5599ac0a7ae08fbbed4348c70e |
$NetBSD: patch-Source_JavaScriptCore_Sources.txt,v 1.1 2021/04/25 12:00:24 leot Exp $
Fix build for ICU >= 69.
From:
https://trac.webkit.org/changeset/275920/webkit?format=diff&new=275920
--- Source/JavaScriptCore/Sources.txt.orig 2021-02-26 09:57:05.000000000 +0000
+++ Source/JavaScriptCore/Sources.txt
@@ -848,6 +848,7 @@ runtime/IntlSegmenterConstructor.cpp
runtime/IntlSegmenterPrototype.cpp
runtime/IntlSegments.cpp
runtime/IntlSegmentsPrototype.cpp
+runtime/IntlWorkaround.cpp @no-unify // Confine U_HIDE_DRAFT_API's effect to this file.
runtime/IteratorOperations.cpp
runtime/IteratorPrototype.cpp
runtime/JSArray.cpp
$NetBSD: patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp,v 1.1 2021/04/25 12:00:24 leot Exp $
Fix build for ICU >= 69.
From:
https://trac.webkit.org/changeset/275920/webkit?format=diff&new=275920
--- Source/JavaScriptCore/runtime/IntlSegmenter.cpp.orig 2021-02-26 09:57:05.000000000 +0000
+++ Source/JavaScriptCore/runtime/IntlSegmenter.cpp
@@ -125,7 +125,7 @@ JSValue IntlSegmenter::segment(JSGlobalO
auto upconvertedCharacters = Box<Vector<UChar>>::create(string.charactersWithoutNullTermination());
UErrorCode status = U_ZERO_ERROR;
- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status));
+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status));
if (U_FAILURE(status)) {
throwTypeError(globalObject, scope, "failed to initialize Segments"_s);
return { };
$NetBSD: patch-Source_JavaScriptCore_runtime_IntlSegmenter.h,v 1.1 2021/04/25 12:00:24 leot Exp $
Fix build for ICU >= 69.
From:
https://trac.webkit.org/changeset/275920/webkit?format=diff&new=275920
--- Source/JavaScriptCore/runtime/IntlSegmenter.h.orig 2021-02-26 09:57:05.000000000 +0000
+++ Source/JavaScriptCore/runtime/IntlSegmenter.h
@@ -75,4 +75,8 @@ private:
Granularity m_granularity { Granularity::Grapheme };
};
+// Abstraction to call ubrk_safeClone or ubrk_clone depending on ICU version.
+// This is implemented in IntlWorkaround.cpp in order to confine draft API visibility.
+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
+
} // namespace JSC
$NetBSD: patch-Source_JavaScriptCore_runtime_IntlSegments.cpp,v 1.1 2021/04/25 12:00:24 leot Exp $
Fix build for ICU >= 69.
From:
https://trac.webkit.org/changeset/275920/webkit?format=diff&new=275920
--- Source/JavaScriptCore/runtime/IntlSegments.cpp.orig 2021-02-26 09:57:05.000000000 +0000
+++ Source/JavaScriptCore/runtime/IntlSegments.cpp
@@ -100,7 +100,7 @@ JSObject* IntlSegments::createSegmentIte
auto scope = DECLARE_THROW_SCOPE(vm);
UErrorCode status = U_ZERO_ERROR;
- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status));
+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status));
if (U_FAILURE(status)) {
throwTypeError(globalObject, scope, "failed to initialize SegmentIterator"_s);
return nullptr;
$NetBSD: patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp,v 1.1 2021/04/25 12:00:24 leot Exp $
Fix build for ICU >= 69.
From:
https://trac.webkit.org/changeset/275920/webkit?format=diff&new=275920
--- Source/JavaScriptCore/runtime/IntlWorkaround.cpp.orig 2021-04-25 09:57:43.581734903 +0000
+++ Source/JavaScriptCore/runtime/IntlWorkaround.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2021 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <unicode/uvernum.h>
+
+// ICU 69 introduces draft API ubrk_clone and deprecates ubrk_safeClone.
+#if U_ICU_VERSION_MAJOR_NUM >= 69
+#define HAVE_ICU_UBRK_CLONE 1
+#endif
+
+#if defined(U_HIDE_DRAFT_API)
+#undef U_HIDE_DRAFT_API
+#endif
+#include <unicode/ubrk.h>
+
+namespace JSC {
+
+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
+
+UBreakIterator* cloneUBreakIterator(const UBreakIterator* iterator, UErrorCode* status)
+{
+#if HAVE(ICU_UBRK_CLONE)
+ return ubrk_clone(iterator, status);
+#else
+ return ubrk_safeClone(iterator, nullptr, nullptr, status);
+#endif
+}
+
+} // namespace JSC