xmake.lua 1.1 KB

12345678910111213141516171819202122
  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.14", "f04095010518635b51c2313efa4f290b7db828d6273e39b2b8858f859dfe81d5")
  7. add_versions("0.2.13", "12231bb2be2581a7f0fb9904092d24b0ed2a271a16835071ed97bed65267f4be")
  8. add_deps("m4", "pkg-config", "autoconf", "automake", "libtool")
  9. on_install("linux", function (package)
  10. local configs = {"--disable-dependency-tracking", "--disable-doxygen-doc"}
  11. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  12. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  13. import("package.tools.autoconf").install(package, configs)
  14. end)
  15. on_test(function (package)
  16. assert(package:has_cfuncs("trie_new", {includes = "datrie/trie.h"}))
  17. end)