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.
 
 
 

27 lines
1.0 KiB

package("chromium_zlib")
set_homepage("https://chromium.googlesource.com/chromium/src/third_party/zlib/")
set_description("zlib from chromium")
set_license("zlib")
add_urls("https://github.com/xmake-mirror/chromium_zlib.git")
add_urls("https://chromium.googlesource.com/chromium/src/third_party/zlib.git")
add_versions("2022.02.22", "6f44c22c1f003bd20011062abec283678842567c")
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
if is_plat("linux") then
add_syslinks("pthread")
end
on_install(function (package)
for _, f in ipairs(table.join(os.files("contrib/minizip/*.c"), os.files("contrib/minizip/*.h"))) do
io.replace(f, "third_party/zlib/zlib.h", "zlib.h", {plain = true})
end
os.cp(path.join(os.scriptdir(), "port", "xmake.lua"), ".")
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("inflate", {includes = "zlib.h"}))
end)