diff --git a/network/misc/webkit-gtk2/files/grammar.patch b/network/misc/webkit-gtk2/files/grammar.patch
new file mode 100644
index 0000000000..4371decd2a
--- /dev/null
+++ b/network/misc/webkit-gtk2/files/grammar.patch
@@ -0,0 +1,20 @@
+diff --git a/GNUmakefile.in b/GNUmakefile.in
+index 1732cff..7d4d21c 100644
+--- a/GNUmakefile.in
++++ b/GNUmakefile.in
+@@ -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
+
+ DerivedSources/WebCore/UserAgentStyleSheetsData.cpp: DerivedSources/WebCore/UserAgentStyleSheets.h
+ DerivedSources/WebCore/UserAgentStyleSheets.h: $(WebCore)/css/make-css-file-arrays.pl $(WebCore)/bindings/scripts/preprocessor.pm $(USER_AGENT_STYLE_SHEETS)
diff --git a/network/misc/webkit-gtk2/files/pkgconfig-enchant-2.patch b/network/misc/webkit-gtk2/files/pkgconfig-enchant-2.patch
new file mode 100644
index 0000000000..865c40bfc8
--- /dev/null
+++ b/network/misc/webkit-gtk2/files/pkgconfig-enchant-2.patch
@@ -0,0 +1,13 @@
+diff --git a/Source/autotools/FindDependencies.m4 b/Source/autotools/FindDependencies.m4
+index 60ee32d..cf1019f 100644
+--- a/Source/autotools/FindDependencies.m4
++++ b/Source/autotools/FindDependencies.m4
+@@ -154,7 +154,7 @@ AC_SUBST(PANGO_CFLAGS)
+ AC_SUBST(PANGO_LIBS)
+
+ if test "$enable_spellcheck" = "yes"; then
+- PKG_CHECK_MODULES(ENCHANT, enchant >= enchant_required_version, [], [enable_spellcheck="no"])
++ PKG_CHECK_MODULES(ENCHANT, enchant-2 >= enchant_required_version, [], [enable_spellcheck="no"])
+ AC_SUBST(ENCHANT_CFLAGS)
+ AC_SUBST(ENCHANT_LIBS)
+ fi
diff --git a/network/misc/webkit-gtk2/pspec.xml b/network/misc/webkit-gtk2/pspec.xml
index 4978047663..cea0cf2715 100755
--- a/network/misc/webkit-gtk2/pspec.xml
+++ b/network/misc/webkit-gtk2/pspec.xml
@@ -50,9 +50,11 @@
install-minibrowser.patch
enchant-2.x.patch
icu59.patch
+ pkgconfig-enchant-2.patch
icu68.patch
fix-ftbfs-gcc6.patch
gtk-doc.patch
+ grammar.patch