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.
31 lines
1.2 KiB
31 lines
1.2 KiB
package("libmagic") |
|
|
|
set_homepage("https://www.darwinsys.com/file/") |
|
set_description("Implementation of the file(1) command") |
|
|
|
add_urls("https://astron.com/pub/file/file-$(version).tar.gz") |
|
add_versions("5.40", "167321f43c148a553f68a0ea7f579821ef3b11c27b8cbe158e4df897e4a5dd57") |
|
|
|
if is_plat("linux", "bsd") then |
|
add_deps("zlib") |
|
end |
|
|
|
on_install("macosx", "linux", "bsd", function (package) |
|
local configs = {"--disable-dependency-tracking", |
|
"--disable-silent-rules", |
|
"--disable-xzlib", |
|
"--disable-bzlib"} |
|
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
|
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
|
if package:debug() then |
|
table.insert(configs, "--enable-debug") |
|
end |
|
if package:config("pic") ~= false then |
|
table.insert(configs, "--with-pic") |
|
end |
|
import("package.tools.autoconf").install(package, configs) |
|
end) |
|
|
|
on_test(function (package) |
|
assert(package:has_cfuncs("magic_open", {includes = "magic.h"})) |
|
end)
|
|
|