xmake.lua 1.3 KB

1234567891011121314151617181920212223242526
  1. package("libunistring")
  2. set_homepage("https://www.gnu.org/software/libunistring/")
  3. set_description("This library provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.")
  4. set_license("GPL-3.0")
  5. add_urls("https://ftpmirror.gnu.org/gnu/libunistring/libunistring-$(version).tar.gz",
  6. "https://ftp.gnu.org/gnu/libunistring/libunistring-$(version).tar.gz")
  7. add_versions("0.9.10", "a82e5b333339a88ea4608e4635479a1cfb2e01aafb925e1290b65710d43f610b")
  8. add_versions("1.1", "a2252beeec830ac444b9f68d6b38ad883db19919db35b52222cf827c385bdb6a")
  9. add_deps("libiconv")
  10. on_install("linux", "macosx", function (package)
  11. local configs = {"--disable-dependency-tracking"}
  12. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  13. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  14. if package:config("pic") ~= false then
  15. table.insert(configs, "--with-pic")
  16. end
  17. import("package.tools.autoconf").install(package, configs, {packagedeps = {"libiconv"}})
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("u8_check", {includes = "unistr.h"}))
  21. end)