diff --git a/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch new file mode 100644 index 0000000000..de2955d8b5 --- /dev/null +++ b/package/harfbuzz/0002-cplusplus-Fix-build-on-GCC-7.patch @@ -0,0 +1,50 @@ +From 7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 6 Jul 2022 12:58:15 +0200 +Subject: [PATCH] [cplusplus] Fix build on GCC < 7 + +[Retrieved from: +https://github.com/harfbuzz/harfbuzz/commit/7b51bc95d9cf0d9a2e91a37319fa34e4e5f26927] +Signed-off-by: Fabrice Fontaine +--- + src/hb-cplusplus.hh | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/hb-cplusplus.hh b/src/hb-cplusplus.hh +index 86d0452080..f06a32d912 100644 +--- a/src/hb-cplusplus.hh ++++ b/src/hb-cplusplus.hh +@@ -166,8 +166,14 @@ HB_DEFINE_VTABLE (unicode_funcs); + + } // namespace hb + ++/* Workaround for GCC < 7, see: ++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 ++ * https://stackoverflow.com/a/25594741 */ ++namespace std { ++ ++ + template +-struct std::hash> ++struct hash> + { + std::size_t operator()(const hb::shared_ptr& v) const noexcept + { +@@ -177,7 +183,7 @@ struct std::hash> + }; + + template +-struct std::hash> ++struct hash> + { + std::size_t operator()(const hb::unique_ptr& v) const noexcept + { +@@ -187,6 +193,8 @@ struct std::hash> + }; + + ++} // namespace std ++ + #endif /* __cplusplus */ + + #endif /* HB_CPLUSPLUS_HH */ diff --git a/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch new file mode 100644 index 0000000000..d3355443b7 --- /dev/null +++ b/package/harfbuzz/0003-GSUB-Fix-build-on-GCC-7.patch @@ -0,0 +1,56 @@ +From 79eb0f74860fb6309e3162b4f17f98481c05a318 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 6 Jul 2022 13:29:55 +0200 +Subject: [PATCH] [GSUB] Fix build on GCC < 7 + +[Retrieved (and backported) from: +https://github.com/harfbuzz/harfbuzz/commit/79eb0f74860fb6309e3162b4f17f98481c05a318] +Signed-off-by: Fabrice Fontaine +--- + src/OT/Layout/GSUB/GSUB.hh | 5 +++-- + src/hb-ot-layout-gsub-table.hh | 8 ++++---- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/OT/Layout/GSUB/GSUB.hh b/src/OT/Layout/GSUB/GSUB.hh +index 372862e2bb..750dca1da3 100644 +--- a/src/OT/Layout/GSUB/GSUB.hh ++++ b/src/OT/Layout/GSUB/GSUB.hh +@@ -5,9 +5,10 @@ + #include "Common.hh" + #include "SubstLookup.hh" + +-using OT::Layout::GSUB::SubstLookup; +- + namespace OT { ++ ++using Layout::GSUB::SubstLookup; ++ + namespace Layout { + + /* +diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh +index 1eca613b6a..50301ff1d9 100644 +--- a/src/hb-ot-layout-gsub-table.hh ++++ b/src/hb-ot-layout-gsub-table.hh +@@ -32,9 +32,8 @@ + #include "OT/Layout/GSUB/GSUB.hh" + + namespace OT { +- +-using Layout::GSUB::SubstLookup; +-using Layout::GSUB::ExtensionSubst; ++namespace Layout { ++namespace GSUB { + + // TODO(garretrieger): Move into the new layout directory. + /* Out-of-class implementation for methods recursing */ +@@ -82,7 +81,8 @@ inline bool SubstLookup::dispatch_recurse_func (hb_ot_app + } + #endif + +- ++} /* namespace GSUB */ ++} /* namespace Layout */ + } /* namespace OT */ + +