xmake.lua 1.1 KB

12345678910111213141516171819202122
  1. package("libthai")
  2. set_homepage("https://github.com/tlwg/libthai")
  3. set_description("LibThai is a set of Thai language support routines")
  4. set_license("LGPL-2.1")
  5. add_urls("https://github.com/tlwg/libthai/releases/download/v$(version)/libthai-$(version).tar.xz")
  6. add_versions("0.1.29", "fc80cc7dcb50e11302b417cebd24f2d30a8b987292e77e003267b9100d0f4bcd")
  7. add_deps("libdatrie", "pkg-config", "autoconf", "automake","m4", "libtool")
  8. on_install("linux", function (package)
  9. local configs = {"--disable-dependency-tracking", "--disable-doxygen-doc", "--disable-dict"}
  10. table.insert(configs, (package:debug() and "--enable-debug" or ""))
  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, {packagedeps = "libdatrie"})
  14. end)
  15. on_test(function (package)
  16. assert(package:has_cfuncs("th_brk_new", {includes = "thai/thbrk.h"}))
  17. end)