From 7e890244cfcadc47d34e5a35efad5dda7712c02b Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 19 Aug 2024 10:35:13 +0200 Subject: [PATCH] Correctly depends on ICU `getTextLength` in `metadata.cpp` directly use icu so we must explicitly depend on it. It was working as libzim wrongly put it in it `libzim.pc` file. --- meson.build | 1 + src/zimcheck/meson.build | 2 +- src/zimwriterfs/meson.build | 2 +- test/meson.build | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 49f8f748..e6609175 100644 --- a/meson.build +++ b/meson.build @@ -27,6 +27,7 @@ with_xapian_support = compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIA find_library_in_compiler = meson.version().version_compare('>=0.31.0') rt_dep = dependency('rt', required:false) docopt_dep = dependency('docopt', static:static_linkage) +icu_dep = dependency('icu-i18n', static:static_linkage) with_writer = host_machine.system() != 'windows' diff --git a/src/zimcheck/meson.build b/src/zimcheck/meson.build index 08c6789e..917e76c1 100644 --- a/src/zimcheck/meson.build +++ b/src/zimcheck/meson.build @@ -23,7 +23,7 @@ executable('zimcheck', '../tools.cpp', '../metadata.cpp', include_directories : inc, - dependencies: [libzim_dep, thread_dep], + dependencies: [libzim_dep, icu_dep, thread_dep], install: true) diff --git a/src/zimwriterfs/meson.build b/src/zimwriterfs/meson.build index a4f44012..bc3696fe 100644 --- a/src/zimwriterfs/meson.build +++ b/src/zimwriterfs/meson.build @@ -7,7 +7,7 @@ sources = [ 'zimcreatorfs.cpp' ] -deps = [thread_dep, libzim_dep, zlib_dep, gumbo_dep, magic_dep] +deps = [thread_dep, libzim_dep, zlib_dep, gumbo_dep, magic_dep, icu_dep] zimwriterfs = executable('zimwriterfs', sources, diff --git a/test/meson.build b/test/meson.build index 07eeb99f..dcb5e580 100644 --- a/test/meson.build +++ b/test/meson.build @@ -21,7 +21,7 @@ if gtest_dep.found() and not meson.is_cross_build() foreach test_name : tests test_exe = executable(test_name, [test_name+'.cpp'] + tests_src_map[test_name], - dependencies : [gtest_dep, libzim_dep, gumbo_dep, magic_dep, zlib_dep], + dependencies : [gtest_dep, libzim_dep, gumbo_dep, magic_dep, zlib_dep, icu_dep], include_directories: inc, build_rpath : '$ORIGIN')