aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/util-linux/patches/100-meson-make-libcap-ng-dependent-on-setpriv.patch
blob: d8b119900405c6411531e7ad5f25e8c8c6ed727b (plain)
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
31
From cd23a4336f49ba6a12ade557a09589f2a7c966f4 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Mon, 2 May 2022 16:18:33 -0700
Subject: [PATCH] meson: make libcap-ng dependent on setpriv

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/meson.build
+++ b/meson.build
@@ -334,7 +334,8 @@ have = cc.has_function(
 conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false)
 
 lib_cap_ng = dependency(
-  'libcap-ng')
+  'libcap-ng',
+  required : get_option('build-setpriv'))
 
 lib_selinux = dependency(
   'libselinux',
@@ -1754,7 +1755,7 @@ if opt and not is_disabler(exe)
   exes += exe
 endif
 
-opt = not get_option('build-setpriv').disabled()
+opt = not get_option('build-setpriv').disabled() and lib_cap_ng.found()
 exe = executable(
   'setpriv',
   setpriv_sources,