xmake.lua 1.1 KB

123456789101112131415161718192021222324
  1. package("libgcrypt")
  2. set_homepage("https://www.gnupg.org/related_software/libgcrypt/")
  3. set_description("Libgcrypt is a general purpose cryptographic library originally based on code from GnuPG.")
  4. set_license("GPL-2.0")
  5. add_urls("https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$(version).tar.gz")
  6. add_versions("1.10.0", "624dc2f72aaadf6ef4e183589aba794cc060bfbf14d2f4f0995b4d636189c584")
  7. add_deps("libgpg-error")
  8. on_install("linux", "macosx", function (package)
  9. local configs = {"--disable-doc"}
  10. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  11. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  12. table.insert(configs, "--with-libgpg-error-prefix=" .. package:dep("libgpg-error"):installdir())
  13. if package:config("pic") ~= false then
  14. table.insert(configs, "--with-pic")
  15. end
  16. import("package.tools.autoconf").install(package, configs)
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cfuncs("gcry_check_version", {includes = "gcrypt.h"}))
  20. end)