From b0ae977d130cb972e05176cfccf9e651af189a99 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 27 Jul 2023 14:07:49 +0200 Subject: harfbuzz: Add upstream patch to fix the build with clang Signed-off-by: Raphael Kubo da Costa --- ...sed-variable-supp_size-from-plan_subset_e.patch | 50 ++++++++++++++++++++++ recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend | 5 +++ 2 files changed, 55 insertions(+) create mode 100644 recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch create mode 100644 recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend diff --git a/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch b/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch new file mode 100644 index 0000000..67455b8 --- /dev/null +++ b/recipes-graphics/harfbuzz/harfbuzz/0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch @@ -0,0 +1,50 @@ +Upstream-status: Backport + +Fixes the following build error: + +| ../../harfbuzz-2.6.4/src/hb-subset-cff1.cc:472:33: error: variable 'supp_size' set but not used [-Werror,-Wunused-but-set-variable] +| unsigned int size0, size1, supp_size; +| ^ +| 1 error generated. + +Signed-off-by: Raphael Kubo da Costa +--- +From 243d056ff1c2af583ceb67e5dfbfaac51dc96e63 Mon Sep 17 00:00:00 2001 +From: Andi-Bogdan Postelnicu +Date: Wed, 2 Jun 2021 14:08:11 +0300 +Subject: [PATCH] Removed unused variable `supp_size` from + plan_subset_encoding(...). + +--- + src/hb-subset-cff1.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc +index df322f845..35dae7b1f 100644 +--- a/src/hb-subset-cff1.cc ++++ b/src/hb-subset-cff1.cc +@@ -469,12 +469,11 @@ struct cff_subset_plan { + unsigned int plan_subset_encoding (const OT::cff1::accelerator_subset_t &acc, hb_subset_plan_t *plan) + { + const Encoding *encoding = acc.encoding; +- unsigned int size0, size1, supp_size; ++ unsigned int size0, size1; + hb_codepoint_t code, last_code = CFF_UNDEF_CODE; + hb_vector_t supp_codes; + + subset_enc_code_ranges.resize (0); +- supp_size = 0; + supp_codes.init (); + + subset_enc_num_codes = plan->num_output_glyphs () - 1; +@@ -510,7 +509,6 @@ struct cff_subset_plan { + code_pair_t pair = { supp_codes[i], sid }; + subset_enc_supp_codes.push (pair); + } +- supp_size += SuppEncoding::static_size * supp_codes.length; + } + } + supp_codes.fini (); +-- +2.41.0 + diff --git a/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend b/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend new file mode 100644 index 0000000..9d02c11 --- /dev/null +++ b/recipes-graphics/harfbuzz/harfbuzz_2.6.4.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:toolchain-clang = "\ + file://0001-Removed-unused-variable-supp_size-from-plan_subset_e.patch \ +" -- cgit v1.2.3-54-g00ecf