File fix-nanopb.patch of Package criterion
--- Criterion-2.4.1/meson.build.orig 2023-01-05 08:13:30.258556378 +0100
+++ Criterion-2.4.1/meson.build 2023-01-05 08:24:59.154097804 +0100
@@ -171,18 +171,8 @@
config.set('NN_REQREP_H', '<nanomsg/reqrep.h>')
endif
-nanopb = dependency('nanopb', required: false, method: 'cmake', modules: ['nanopb::protobuf-nanopb-static'])
+nanopb = dependency('nanopb', required: true, method: 'cmake', modules: ['nanopb::protobuf-nanopb'])
must_regenerate_pb = nanopb.found()
-if not nanopb.found()
- nanopb_proj = cmake.subproject('nanopb',
- cmake_options: [
- '-Dnanopb_BUILD_GENERATOR=OFF',
- '-DBUILD_SHARED_LIBS=OFF',
- '-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1',
- '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
- ])
- nanopb = nanopb_proj.dependency('protobuf-nanopb-static')
-endif
libgit2 = dependency('libgit2', required: false)
if not libgit2.found() and get_option('diffs').enabled()