Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-update minizip-ng to 4.0.4 #3157

Merged
merged 5 commits into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion packages/m/minizip-ng/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("minizip-ng")

add_urls("https://github.com/zlib-ng/minizip-ng/archive/refs/tags/$(version).tar.gz",
"https://github.com/zlib-ng/minizip-ng.git")
add_versions("4.0.4", "955800fe39f9d830fcb84e60746952f6a48e41093ec7a233c63ad611b5fcfe9f")
add_versions("3.0.3", "5f1dd0d38adbe9785cb9c4e6e47738c109d73a0afa86e58c4025ce3e2cc504ed")
add_versions("3.0.5", "1a248c378fdf4ef6c517024bb65577603d5146cffaebe81900bec9c0a5035d4d")

Expand All @@ -15,6 +16,7 @@ package("minizip-ng")
add_configs("zstd", {description = "Enable zstd comppressression library.", default = false, type = "boolean"})

add_deps("cmake")

if is_plat("macosx") then
add_frameworks("CoreFoundation", "Security")
add_syslinks("iconv")
Expand All @@ -25,6 +27,13 @@ package("minizip-ng")
end

on_load(function (package)
if package:version():ge("4.0") then
if package:is_plat("macosx") then
package:add("deps", "openssl")
elseif package:is_plat("windows", "mingw") then
package:add("syslinks", "Bcrypt")
end
end
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
if enabled then
Expand All @@ -47,5 +56,9 @@ package("minizip-ng")
end)

on_test(function (package)
assert(package:has_cfuncs("zipOpen", {includes = {"mz.h", "mz_compat.h"}}))
if package:version():ge("4.0") then
assert(package:has_cfuncs("zipOpen", {includes = {"minizip/mz.h", "minizip/mz_compat.h"}}))
else
assert(package:has_cfuncs("zipOpen", {includes = {"mz.h", "mz_compat.h"}}))
end
end)
Loading