Skip to content

Commit

Permalink
add libdatrie repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahahbenny committed Aug 27, 2024
1 parent 5bf8009 commit 5a0a9f1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/l/libdatrie/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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, (package:is_debug() and "-d" or ""))
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)

0 comments on commit 5a0a9f1

Please sign in to comment.