File 936.patch of Package libzim
From 2c4789b37bd4ad5074a3c5c675db90201576471c Mon Sep 17 00:00:00 2001
From: Michael Cho <michael@michaelcho.dev>
Date: Thu, 31 Oct 2024 11:12:07 -0400
Subject: [PATCH] Fix build with ICU 76
Due to unicode-org/icu@199bc82, ICU 76 no longer adds `icu-uc` by
default. This causes linker errors for undefined symbols like
`icu_76::UnicodeString::doReplace(...)`, referenced from:
`zim::removeAccents(...)` in tools.cpp.o.
Meson will automatically flatten the dependencies list as documented
at https://mesonbuild.com/Reference-manual_functions.html#build_target
---
meson.build | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 53664e95..bd47b03a 100644
--- a/meson.build
+++ b/meson.build
@@ -77,9 +77,15 @@ else
endif
if xapian_dep.found()
- icu_dep = dependency('icu-i18n', static:static_linkage)
+ icu_dep = [
+ dependency('icu-i18n', static:static_linkage),
+ dependency('icu-uc', static:static_linkage)
+ ]
else
- icu_dep = dependency('icu-i18n', required:false, static:static_linkage)
+ icu_dep = [
+ dependency('icu-i18n', required:false, static:static_linkage),
+ dependency('icu-uc', required:false, static:static_linkage)
+ ]
endif
gtest_dep = dependency('gtest', version: '>=1.10.0', main:true, fallback:['gtest', 'gtest_main_dep'], required:false)