From e61f3b1dfcc883b701cf6dd331f2d93dcc8919f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Thu, 19 Aug 2021 12:03:39 +0200 Subject: [PATCH plocate] meson: use feature option for libiouring source-based distributions would prefer to allow this option to be disabled without a hack, regardless of is libiouring installed or not, and meson already supports feature options for this purpose. --- rebased from plocate-1.1.10-meson-use-feature-option-for-libiouring.patch on top of 1.1.15 meson.build | 2 +- meson_options.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 2a7d20c..81bc891 100644 --- a/meson.build +++ b/meson.build @@ -9,7 +9,7 @@ add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', lan add_project_arguments('-DPACKAGE_BUGREPORT="steinar+plocate@gunderson.no"', language: 'cpp') cxx = meson.get_compiler('cpp') -uringdep = dependency('liburing', required: false) +uringdep = dependency('liburing', required: get_option('use_libiouring')) zstddep = dependency('libzstd') threaddep = dependency('threads') atomicdep = cxx.find_library('atomic', required: false) diff --git a/meson_options.txt b/meson_options.txt index a9f3358..1f2274f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,3 +4,4 @@ option('systemunitdir', type: 'string', description: 'Where to install systemd u option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file') option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb') option('dbpath', type: 'string', value: 'plocate/plocate.db', description: 'Path to plocate database relative to "sharedstatedir"') +option('use_libiouring', type: 'feature', value: 'auto', description: 'Enable libiouring dependency (default: autodetect)') -- 2.34.1