xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  1. package("libgpg-error")
  2. set_homepage("https://www.gnupg.org/related_software/libgpg-error/")
  3. set_description("Libgpg-error is a small library that originally defined common error values for all GnuPG components.")
  4. set_license("GPL-2.0")
  5. add_urls("https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$(version).tar.bz2")
  6. add_versions("1.44", "8e3d2da7a8b9a104dd8e9212ebe8e0daf86aa838cc1314ba6bc4de8f2d8a1ff9")
  7. if is_plat("macosx") then
  8. add_deps("libintl")
  9. end
  10. on_install("linux", "macosx", function (package)
  11. local configs = {"--disable-doc", "--disable-tests"}
  12. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  13. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  14. if package:config("pic") ~= false then
  15. table.insert(configs, "--with-pic")
  16. end
  17. import("package.tools.autoconf").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("gpgrt_strdup", {includes = "gpgrt.h"}))
  21. end)