package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

6 years ago
package("xz")
set_homepage("https://tukaani.org/xz/")
set_description("General-purpose data compression with high compression ratio.")
set_urls("https://downloads.sourceforge.net/project/lzmautils/xz-$(version).tar.gz",
"https://tukaani.org/xz/xz-$(version).tar.gz")
add_versions("5.2.4", "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145")
5 years ago
on_load(function (package)
if is_plat(os.host()) then
package:addenv("PATH", "bin")
end
end)
on_install("macosx", "linux", "mingw@linux,macosx", function (package)
6 years ago
local configs = {"--disable-dependency-tracking", "--disable-silent-rules"}
if package:debug() then
table.insert(configs, "--enable-debug")
end
5 years ago
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
6 years ago
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
5 years ago
if is_plat(os.host()) then
os.vrun("xz --version")
end
6 years ago
assert(package:has_cfuncs("lzma_code", {includes = "lzma.h"}))
end)