From 0904fab375e3bed39d18f043717397304bd17f77 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Feb 02 2023 19:55:16 +0000 Subject: Fix build with GCC 12 Also, fix a manpage compression assumption disallowed by the packaging guidelines, needed in case this ever ends up build for a flatpak. --- diff --git a/mimic-gcc12.patch b/mimic-gcc12.patch new file mode 100644 index 0000000..5a84dce --- /dev/null +++ b/mimic-gcc12.patch @@ -0,0 +1,23 @@ +From bab709f22c4534015a9526ccef8fe040c900b386 Mon Sep 17 00:00:00 2001 +From: Dominique Leuenberger +Date: Mon, 31 Oct 2022 15:49:14 +0100 +Subject: [PATCH] HTSEngine: use HTS_free instead of libc's free() + +Fixes #231 +--- + src/hts/hts_engine_API/lib/HTS_model.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hts/hts_engine_API/lib/HTS_model.c b/src/hts/hts_engine_API/lib/HTS_model.c +index 3d43af4..9f71fb1 100644 +--- a/src/hts/hts_engine_API/lib/HTS_model.c ++++ b/src/hts/hts_engine_API/lib/HTS_model.c +@@ -698,7 +698,7 @@ static HTS_Boolean HTS_Model_load_pdf(HTS_Model * model, HTS_File * fp, size_t v + } + if (result == FALSE) { + model->npdf += 2; +- free(model->npdf); ++ HTS_free(model->npdf); + HTS_Model_initialize(model); + return FALSE; + } diff --git a/mimic.spec b/mimic.spec index ac136d8..dba0897 100644 --- a/mimic.spec +++ b/mimic.spec @@ -7,6 +7,8 @@ License: BSD URL: https://mimic.mycroft.ai/ Source0: https://github.com/MycroftAI/mimic/archive/%{version}.tar.gz Patch0: mimic-fix-pulse.patch +# upstream fix for GCC 12 +Patch1: mimic-gcc12.patch BuildRequires: make BuildRequires: automake autoconf libtool @@ -61,7 +63,7 @@ find %{buildroot} -type f -name "*.la" -delete %{_bindir}/mimic* %{_bindir}/compile_regexes %{_bindir}/t2p -%{_datadir}/man/man1/mimic.1.gz +%{_datadir}/man/man1/mimic.1* %{_datadir}/%{name} %files devel