pull/378/head
Hoildkv 4 years ago committed by GitHub
parent 9c42388257
commit 2023e9d083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      packages/m/miniz/xmake.lua
  2. 1
      packages/p/python/xmake.lua

@ -0,0 +1,29 @@
package("miniz")
set_homepage("https://github.com/richgel999/miniz/")
set_description("miniz: Single C source file zlib-replacement library")
set_license("MIT")
add_urls("https://github.com/richgel999/miniz/archive/refs/tags/2.1.0.tar.gz",
"https://github.com/richgel999/miniz.git")
add_versions("2.1.0", "95f9b23c92219ad2670389a23a4ed5723b7329c82c3d933b7047673ecdfc1fea")
on_install(function (package)
io.writefile("miniz_export.h", "#define MINIZ_EXPORT")
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("miniz")
set_kind("static")
add_files("miniz.c", "miniz_zip.c", "miniz_tinfl.c", "miniz_tdef.c")
add_headerfiles("miniz.h", "miniz_common.h", "miniz_zip.h", "miniz_tinfl.h", "miniz_tdef.h")
]])
local configs = {}
if package:is_plat("linux") and package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("mz_compress", {includes = "miniz.h"}))
end)

@ -86,6 +86,7 @@ package("python")
os.cp("libs/*", package:installdir("lib"))
os.cp("*", package:installdir())
local python = path.join(package:installdir("bin"), "python.exe")
os.vrunv(python, {"-m", "pip", "install", "-U", "pip"})
os.vrunv(python, {"-m", "pip", "install", "wheel"})
end)

Loading…
Cancel
Save