Kaynağa Gözat

add libdatrie repo (#5062)

* add libdatrie repo

* remove the debug opstion
benny066567 1 yıl önce
ebeveyn
işleme
fa98f122e0
1 değiştirilmiş dosya ile 21 ekleme ve 0 silme
  1. 21 0
      packages/l/libdatrie/xmake.lua

+ 21 - 0
packages/l/libdatrie/xmake.lua

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