100-meson-make-libcap-ng-dependent-on-setpriv.patch 877 B

12345678910111213141516171819202122232425262728293031
  1. From cd23a4336f49ba6a12ade557a09589f2a7c966f4 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <[email protected]>
  3. Date: Mon, 2 May 2022 16:18:33 -0700
  4. Subject: [PATCH] meson: make libcap-ng dependent on setpriv
  5. Signed-off-by: Rosen Penev <[email protected]>
  6. ---
  7. meson.build | 5 +++--
  8. 1 file changed, 3 insertions(+), 2 deletions(-)
  9. --- a/meson.build
  10. +++ b/meson.build
  11. @@ -334,7 +334,8 @@ have = cc.has_function(
  12. conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false)
  13. lib_cap_ng = dependency(
  14. - 'libcap-ng')
  15. + 'libcap-ng',
  16. + required : get_option('build-setpriv'))
  17. lib_selinux = dependency(
  18. 'libselinux',
  19. @@ -1754,7 +1755,7 @@ if opt and not is_disabler(exe)
  20. exes += exe
  21. endif
  22. -opt = not get_option('build-setpriv').disabled()
  23. +opt = not get_option('build-setpriv').disabled() and lib_cap_ng.found()
  24. exe = executable(
  25. 'setpriv',
  26. setpriv_sources,