summaryrefslogtreecommitdiff
path: root/archivers/zim-tools/files/patch-src_zimcheck_meson.build
blob: e458ce1b224fc52892d004001a912f213ef14953 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- src/zimcheck/meson.build.orig	2024-09-08 18:40:36 UTC
+++ src/zimcheck/meson.build
@@ -8,11 +8,13 @@ inc = include_directories(extra_include)
 
 inc = include_directories(extra_include)
 
-if compiler.get_id() == 'gcc' and host_machine.system() == 'linux'
-  # C++ std::thread is implemented using pthread on linux by gcc
-  thread_dep = dependency('threads')
-else
-  thread_dep = dependency('', required:false)
+zimcheck_deps = [libzim_dep, icu_dep, docopt_dep]
+
+# C++ std::thread is implemented using pthread on Linux by GCC, and on FreeBSD
+# for both GCC and LLVM.
+if (host_machine.system() == 'linux' and compiler.get_id() == 'gcc') or \
+   host_machine.system() == 'freebsd'
+  zimcheck_deps += dependency('threads')
 endif
 
 executable('zimcheck',
@@ -23,7 +25,5 @@ executable('zimcheck',
   '../tools.cpp',
   '../metadata.cpp',
   include_directories : inc,
-  dependencies: [libzim_dep, icu_dep, thread_dep, docopt_dep],
+  dependencies: zimcheck_deps,
   install: true)
-
-