2
1

0002-build-sys-fix-static-build-gcrypt-dependency-gpg-err.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From eabe21164bbb29dead1a902b6d6e910f6892e3a7 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Fri, 7 Jun 2019 23:17:13 +0200
  4. Subject: [PATCH] build-sys: fix static build gcrypt dependency gpg-error
  5. The gcrypt depends on gpg-error, so find it's availability and link with it
  6. when needed to fix static build.
  7. Fixes:
  8. - http://autobuild.buildroot.net/results/fb698e3e903869978bd5e69d791ec362317b7981
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. Upstream status: commit eabe21164bbb29dead1a902b6d6e910f6892e3a7
  11. ---
  12. meson.build | 12 +++++++-----
  13. 1 file changed, 7 insertions(+), 5 deletions(-)
  14. diff --git a/meson.build b/meson.build
  15. index 84e4360..3766edc 100644
  16. --- a/meson.build
  17. +++ b/meson.build
  18. @@ -101,20 +101,22 @@ else
  19. endif
  20. crypto = get_option('USE_CRYPTO')
  21. +crypto_dep = []
  22. if crypto == 'nettle'
  23. - crypto_dep = dependency('nettle')
  24. + crypto_dep += dependency('nettle')
  25. conf.set('USE_NETTLE', 1, description : 'If set use nettle crypto library.')
  26. elif crypto == 'gcrypt'
  27. - crypto_dep = cc.find_library('gcrypt')
  28. + crypto_dep += cc.find_library('gcrypt')
  29. + crypto_dep += dependency('gpg-error', required : true)
  30. conf.set('USE_GCRYPT', 1, description : 'If set use gcrypt crypto library.')
  31. elif crypto == 'openssl'
  32. - crypto_dep = dependency('openssl')
  33. + crypto_dep += dependency('openssl')
  34. conf.set('USE_OPENSSL', 1, description : 'if set use openssl crypto library.')
  35. elif crypto == 'kernel'
  36. - crypto_dep = dependency('disabler-appears-to-disable-executable-build', required : false)
  37. + crypto_dep += dependency('disabler-appears-to-disable-executable-build', required : false)
  38. conf.set('USE_KERNEL_CRYPTO_API', 1, description : 'if set use Linux kernel Crypto API.')
  39. elif crypto == 'none'
  40. - crypto_dep = dependency('disabler-appears-to-disable-executable-build', required : false)
  41. + crypto_dep += dependency('disabler-appears-to-disable-executable-build', required : false)
  42. conf.set('PING6_NONCE_MEMORY', 1,
  43. description : 'If set RFC6744 random does not use any CRYPTO lib.')
  44. endif
  45. --
  46. 2.21.0