|
|
|
@ -9,8 +9,8 @@ package("zlib") |
|
|
|
|
add_versions("1.2.10", "8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017") |
|
|
|
|
add_versions("1.2.11", "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1") |
|
|
|
|
|
|
|
|
|
on_install("macosx", "linux", function (package) |
|
|
|
|
import("package.tools.autoconf").install(package) |
|
|
|
|
on_install("linux", "macosx", function (package) |
|
|
|
|
import("package.tools.autoconf").install(package, {"--static"}) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_install("windows", function (package) |
|
|
|
@ -20,6 +20,14 @@ package("zlib") |
|
|
|
|
os.cp("*.h", package:installdir("include")) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_install("iphoneos", "android", "cross", function (package) |
|
|
|
|
import("package.tools.autoconf").configure(package, {host = "", "--static"}) |
|
|
|
|
io.gsub("Makefile", "\nAR=.-\n", "\nAR=" .. (package:build_getenv("ar") or "") .. "\n") |
|
|
|
|
io.gsub("Makefile", "\nARFLAGS=.-\n", "\nARFLAGS=cr\n") |
|
|
|
|
io.gsub("Makefile", "\nRANLIB=.-\n", "\nRANLIB=\n") |
|
|
|
|
os.vrun("make install -j4") |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|
assert(package:has_cfuncs("inflate", {includes = "zlib.h"})) |
|
|
|
|
end) |
|
|
|
|