summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2021-04-25 12:00:24 +0000
committerleot <leot@pkgsrc.org>2021-04-25 12:00:24 +0000
commitbb8395f8580aec07010d2aa8530a6aeb860a3982 (patch)
treec37fcc4d74c256cfb5480a468d33d826ad1672fe /www
parent3ce367ad12176b3f31326e041172757196fb8129 (diff)
downloadpkgsrc-bb8395f8580aec07010d2aa8530a6aeb860a3982.tar.gz
webkit-gtk: Backport upstream patches to fix the build for ICU >= 69
PKGREVISION++ Thanks to <wiz> for pointing out them!
Diffstat (limited to 'www')
-rw-r--r--www/webkit-gtk/Makefile4
-rw-r--r--www/webkit-gtk/distinfo7
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_Sources.txt18
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp19
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.h19
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegments.cpp19
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp64
7 files changed, 147 insertions, 3 deletions
diff --git a/www/webkit-gtk/Makefile b/www/webkit-gtk/Makefile
index a1a691a0b5c..20c8a6af70a 100644
--- a/www/webkit-gtk/Makefile
+++ b/www/webkit-gtk/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.204 2021/04/21 11:40:44 adam Exp $
+# $NetBSD: Makefile,v 1.205 2021/04/25 12:00:24 leot Exp $
DISTNAME= webkitgtk-2.32.0
PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk/}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= www
MASTER_SITES= https://www.webkitgtk.org/releases/
EXTRACT_SUFX= .tar.xz
diff --git a/www/webkit-gtk/distinfo b/www/webkit-gtk/distinfo
index bee0859915e..4e617be640d 100644
--- a/www/webkit-gtk/distinfo
+++ b/www/webkit-gtk/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.147 2021/03/30 12:47:42 leot Exp $
+$NetBSD: distinfo,v 1.148 2021/04/25 12:00:24 leot Exp $
SHA1 (webkitgtk-2.32.0.tar.xz) = 8abdb3ba2732c892dd06bb2bd63208b090462bf7
RMD160 (webkitgtk-2.32.0.tar.xz) = c825873ec544e505f84e3b8a900619dac08e01ce
@@ -6,11 +6,16 @@ SHA512 (webkitgtk-2.32.0.tar.xz) = 4832a4614be24481028ca8a6480a8e6cfacd8e22f5ba9
Size (webkitgtk-2.32.0.tar.xz) = 23315936 bytes
SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = f4f117e6c1cd8eb8e4905f74946e0367156ed528
SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697
+SHA1 (patch-Source_JavaScriptCore_Sources.txt) = 51de2568e6255ee77f6ea7f3ab657eb3c43c8ce6
SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = 79c282ca90d0ba2ef4769da40d4648f5f709951b
SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 70975aac175ec4131a4ed26a54dfe51e16ffb7cd
SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = 709e5dcf4cdb834617c2ef542686bb2aa4aa37b3
SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 7f6c0c57d46478e83c4ff21dae2415f44085ba32
SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93
+SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp) = 326b0405fc433e579c115e174e516f1c79e8edc5
+SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegmenter.h) = 36abe8dd1cf6fceefc05d8f6fe0d1a6c18f4d0c5
+SHA1 (patch-Source_JavaScriptCore_runtime_IntlSegments.cpp) = 8c357e32a256c06f05c0aeb6bea485f90ef8219d
+SHA1 (patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp) = b4a793edefa3c500b167d6fe3cdb9244ec38bcf5
SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012
SHA1 (patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp) = 73dfe781efe7e8aa7d49094af8820a87c501818f
SHA1 (patch-Source_ThirdParty_ANGLE_src_compiler_translator_SymbolTable.h) = 10debffda84bc752ed434657a337a466aad19a3a
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_Sources.txt b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_Sources.txt
new file mode 100644
index 00000000000..8af78d2afa3
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_Sources.txt
@@ -0,0 +1,18 @@
+$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
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp
new file mode 100644
index 00000000000..71aebf4be8b
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.cpp
@@ -0,0 +1,19 @@
+$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 { };
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.h b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.h
new file mode 100644
index 00000000000..1ddc9eb99dd
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegmenter.h
@@ -0,0 +1,19 @@
+$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
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegments.cpp b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegments.cpp
new file mode 100644
index 00000000000..17f87e1ad84
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlSegments.cpp
@@ -0,0 +1,19 @@
+$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;
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp
new file mode 100644
index 00000000000..56b52786cd6
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_runtime_IntlWorkaround.cpp
@@ -0,0 +1,64 @@
+$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