[packages/gtk-webkit] build fixes from arch
atler
atler at pld-linux.org
Thu Aug 12 01:01:11 CEST 2021
commit c6c75c07992e9f083726b314bb8907966d98e3d7
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Aug 12 00:59:33 2021 +0200
build fixes from arch
glib2.68.patch | 31 ++++++++++++++
grammar.patch | 18 ++++++++
gtk-webkit.spec | 8 ++++
icu68.patch | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
volatile.patch | 39 +++++++++++++++++
5 files changed, 224 insertions(+)
---
diff --git a/gtk-webkit.spec b/gtk-webkit.spec
index 47fd58b..56a138b 100644
--- a/gtk-webkit.spec
+++ b/gtk-webkit.spec
@@ -21,6 +21,10 @@ Patch0: x32.patch
Patch1: abs.patch
Patch2: %{name}-icu59.patch
Patch3: %{name}-icu65.patch
+Patch4: glib2.68.patch
+Patch5: icu68.patch
+Patch6: grammar.patch
+Patch7: volatile.patch
URL: http://webkitgtk.org/
BuildRequires: /usr/bin/ld.gold
BuildRequires: EGL-devel
@@ -121,6 +125,10 @@ Pliki programistyczne komponentu WebKit dla GTK+ 2.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
%build
%{__libtoolize}
diff --git a/glib2.68.patch b/glib2.68.patch
new file mode 100644
index 0000000..4784b34
--- /dev/null
+++ b/glib2.68.patch
@@ -0,0 +1,31 @@
+diff --git a/Source/WTF/wtf/gobject/GRefPtr.h b/Source/WTF/wtf/gobject/GRefPtr.h
+index b25b7bb..447015e 100644
+--- a/Source/WTF/wtf/gobject/GRefPtr.h
++++ b/Source/WTF/wtf/gobject/GRefPtr.h
+@@ -25,11 +25,11 @@
+
+ #if USE(GLIB)
+
++#include <glib-object.h>
++
+ #include <wtf/RefPtr.h>
+ #include <algorithm>
+
+-extern "C" void g_object_unref(gpointer);
+-extern "C" gpointer g_object_ref_sink(gpointer);
+
+ namespace WTF {
+
+--- webkitgtk-2.4.11/Source/WebKit/gtk/GNUmakefile.am.orig 2016-04-10 08:48:37.000000000 +0200
++++ webkitgtk-2.4.11/Source/WebKit/gtk/GNUmakefile.am 2021-08-11 22:06:08.927265391 +0200
+@@ -352,8 +352,8 @@
+ @true
+
+ stamp-webkitmarshal.cpp: $(WEBKIT_MARSHAL_LIST)
+- $(AM_V_GEN) echo "extern \"C\" {" > $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
+- $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
++ $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=webkit_marshal $(WEBKIT_MARSHAL_LIST) --body >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
++ sed -i '1,10s/#ifdef/extern "C" {\n#ifdef/gm' $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
+ echo '}' >> $(GENSOURCES_WEBKIT)/webkitmarshal.cpp && \
+ echo timestamp > $(@F)
+
diff --git a/grammar.patch b/grammar.patch
new file mode 100644
index 0000000..ee330b9
--- /dev/null
+++ b/grammar.patch
@@ -0,0 +1,18 @@
+--- webkitgtk-2.4.11/Source/WebCore/GNUmakefile.am.orig 2016-04-10 08:48:37.000000000 +0200
++++ webkitgtk-2.4.11/Source/WebCore/GNUmakefile.am 2021-08-11 22:06:08.927265391 +0200
+@@ -95674,6 +95674,7 @@ $(GENSOURCES_WEBCORE)/XPathGrammar.h: $(GENSOURCES_WEBCORE)/XPathGrammar.cpp
+ $(GENSOURCES_WEBCORE)/XPathGrammar.cpp: $(WebCore)/xml/XPathGrammar.y
+ $(AM_V_GEN)
+ $(AM_V_at)perl $(WebCore)/css/makegrammar.pl --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix xpathyy $<
++ $(AM_V_at)cp $(GENSOURCES_WEBCORE)/XPathGrammar.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp
+
+ # MathML tag and attribute names, and element factory
+ DerivedSources/WebCore/MathMLElementFactory.h: DerivedSources/WebCore/MathMLElementFactory.cpp
+@@ -95732,6 +95733,7 @@ DerivedSources/WebCore/CSSGrammar.h: $(GENSOURCES_WEBCORE)/CSSGrammar.cpp
+ DerivedSources/WebCore/CSSGrammar.cpp: $(WebCore)/css/CSSGrammar.y.in
+ $(AM_V_GEN)
+ $(AM_V_at)perl -I $(WebCore)/bindings/scripts $(WebCore)/css/makegrammar.pl --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix cssyy $<
++ $(AM_V_at)cp $(GENSOURCES_WEBCORE)/CSSGrammar.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp
+
+ # user agent style sheets
+ USER_AGENT_STYLE_SHEETS = \
diff --git a/icu68.patch b/icu68.patch
new file mode 100644
index 0000000..4cbe68b
--- /dev/null
+++ b/icu68.patch
@@ -0,0 +1,128 @@
+diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp
+index f6d16cb..f5c0f68 100644
+--- a/Source/WebCore/platform/text/TextCodecICU.cpp
++++ b/Source/WebCore/platform/text/TextCodecICU.cpp
+@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const
+ m_converterICU = ucnv_open(m_canonicalConverterName, &err);
+ ASSERT(U_SUCCESS(err));
+ if (m_converterICU)
+- ucnv_setFallback(m_converterICU, TRUE);
++ ucnv_setFallback(m_converterICU, true);
+ }
+
+ int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err)
+diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h
+index 81a025a..a77aa45 100644
+--- a/Source/WebCore/platform/text/icu/UTextProvider.h
++++ b/Source/WebCore/platform/text/icu/UTextProvider.h
+@@ -81,12 +81,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
+ // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+ ASSERT(offset < std::numeric_limits<int32_t>::max());
+ text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+- isAccessible = TRUE;
++ isAccessible = true;
+ return true;
+ }
+ if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) {
+ text->chunkOffset = text->chunkLength;
+- isAccessible = FALSE;
++ isAccessible = false;
+ return true;
+ }
+ } else {
+@@ -95,12 +95,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text, int64_t nativeIndex, int
+ // Ensure chunk offset is well formed if computed offset exceeds int32_t range.
+ ASSERT(offset < std::numeric_limits<int32_t>::max());
+ text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0;
+- isAccessible = TRUE;
++ isAccessible = true;
+ return true;
+ }
+ if (nativeIndex <= 0 && !text->chunkNativeStart) {
+ text->chunkOffset = 0;
+- isAccessible = FALSE;
++ isAccessible = false;
+ return true;
+ }
+ }
+diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+index ee02763..48ba1eb 100644
+--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
+ if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) {
+ // Already inside the buffer. Set the new offset.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return TRUE;
++ return true;
+ }
+ if (index >= length && uText->chunkNativeLimit == length) {
+ // Off the end of the buffer, but we can't get it.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return FALSE;
++ return false;
+ }
+ } else {
+ if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) {
+ // Already inside the buffer. Set the new offset.
+ uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart);
+- return TRUE;
++ return true;
+ }
+ if (!index && !uText->chunkNativeStart) {
+ // Already at the beginning; can't go any farther.
+ uText->chunkOffset = 0;
+- return FALSE;
++ return false;
+ }
+ }
+
+@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t index, UBool forward)
+
+ uText->nativeIndexingLimit = uText->chunkLength;
+
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status)
+@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UText* text)
+ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text);
+ UBool isAccessible;
+ if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBo
+ ASSERT(newContext == UTextProviderContext::PriorContext);
+ textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
+diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+index 7aaac48..9ae0d36 100644
+--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLength(UText* text)
+ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward)
+ {
+ if (!text->context)
+- return FALSE;
++ return false;
+ int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text);
+ UBool isAccessible;
+ if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible))
+@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBoo
+ ASSERT(newContext == UTextProviderContext::PriorContext);
+ textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward);
+ }
+- return TRUE;
++ return true;
+ }
+
+ static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode)
diff --git a/volatile.patch b/volatile.patch
new file mode 100644
index 0000000..8bc0edf
--- /dev/null
+++ b/volatile.patch
@@ -0,0 +1,39 @@
+diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp
+index 0e4a0c8..2a8296d 100644
+--- a/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp
++++ b/Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp
+@@ -390,7 +390,7 @@ static void webkitAccessibleHyperlinkInit(AtkHyperlink* link)
+
+ GType webkitAccessibleHyperlinkGetType()
+ {
+- static volatile gsize typeVolatile = 0;
++ static gsize typeVolatile = 0;
+
+ if (g_once_init_enter(&typeVolatile)) {
+ static const GTypeInfo tinfo = {
+diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+index 79eb46d..f4b0270 100644
+--- a/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
++++ b/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
+@@ -1015,7 +1015,7 @@ static void webkitAccessibleClassInit(AtkObjectClass* klass)
+ GType
+ webkitAccessibleGetType(void)
+ {
+- static volatile gsize typeVolatile = 0;
++ static gsize typeVolatile = 0;
+
+ if (g_once_init_enter(&typeVolatile)) {
+ static const GTypeInfo tinfo = {
+diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h b/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
+index bd060ed..f003e8a 100644
+--- a/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
++++ b/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
+@@ -98,7 +98,7 @@ static void type_name##_init(TypeName* self) \
+ }\
+ GType type_name##_get_type(void) \
+ { \
+- static volatile gsize g_define_type_id__volatile = 0; \
++ static gsize g_define_type_id__volatile = 0; \
+ if (g_once_init_enter(&g_define_type_id__volatile)) { \
+ GType g_define_type_id = \
+ g_type_register_static_simple( \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gtk-webkit.git/commitdiff/c6c75c07992e9f083726b314bb8907966d98e3d7
More information about the pld-cvs-commit
mailing list