xmake.lua 987 B

123456789101112131415161718192021
  1. package("libdatrie")
  2. set_homepage("https://github.com/tlwg/libdatrie")
  3. set_description("an implementation of double-array structure for representing trie")
  4. set_license("LGPL-2.1")
  5. add_urls("https://github.com/tlwg/libdatrie/releases/download/v$(version)/libdatrie-$(version).tar.xz")
  6. add_versions("0.2.13", "12231bb2be2581a7f0fb9904092d24b0ed2a271a16835071ed97bed65267f4be")
  7. add_deps("m4", "pkg-config", "autoconf", "automake", "libtool")
  8. on_install("linux", function (package)
  9. local configs = {"--disable-dependency-tracking", "--disable-doxygen-doc"}
  10. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  11. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  12. import("package.tools.autoconf").install(package, configs)
  13. end)
  14. on_test(function (package)
  15. assert(package:has_cfuncs("trie_new", {includes = "datrie/trie.h"}))
  16. end)