add linenoise (#1820)

* add linenoise

* add version

* limit os
pull/1822/head
ruki 2 years ago committed by GitHub
parent 92ec2cea7e
commit 831a46a9b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      packages/l/linenoise/xmake.lua

@ -0,0 +1,27 @@
package("linenoise")
set_homepage("https://github.com/antirez/linenoise")
set_description("A small self-contained alternative to readline and libedit")
add_urls("https://github.com/antirez/linenoise.git")
add_versions("2020.3.12", "97d2850af13c339369093b78abe5265845d78220")
on_install("linux", "macosx", "bsd", "wasm", "android", "cross", "iphoneos", function (package)
local configs = {}
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("linenoise")
set_kind("static")
add_files("linenoise.c")
add_headerfiles("linenoise.h")
]])
if package:config("shared") then
configs.kind = "shared"
end
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("linenoise", {includes = {"stddef.h", "linenoise.h"}}))
end)
Loading…
Cancel
Save