11zip: add package (#4488)

pull/4495/head
star9029 5 months ago committed by GitHub
parent 8bd9497c35
commit 84f6cefdff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      packages/1/11zip/port/xmake.lua
  2. 28
      packages/1/11zip/xmake.lua

@ -0,0 +1,17 @@
add_rules("mode.debug", "mode.release")
add_requires("minizip-ng")
add_packages("minizip-ng")
target("11zip")
set_kind("$(kind)")
set_languages("c++17")
add_files("src/*.cpp")
remove_files("src/elzip_fs_fallback.cpp")
add_includedirs("include", "include/elzip")
add_headerfiles("include/(**.hpp)")
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end

@ -0,0 +1,28 @@
package("11zip")
set_homepage("https://github.com/Sygmei/11Zip")
set_description("Dead simple zipping / unzipping C++ Lib")
set_license("MIT")
add_urls("https://github.com/Sygmei/11Zip/archive/516e161d5c96aa8f2603fb30b10b7770a87332c2.tar.gz",
"https://github.com/Sygmei/11Zip.git")
add_versions("2023.05.10", "9e4052571c73ecd8e328fa9e8399f606604baa3373103d2e7dddb75019330ee0")
add_includedirs("include", "include/elzip")
add_deps("minizip-ng")
on_install("macosx", "android", "linux", "windows", "mingw", function (package)
io.replace("src/unzipper.cpp", "unzLocateFile(zipFile_, filename.data(), nullptr)", "unzLocateFile(zipFile_, filename.data(), 0)", {plain = true})
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
std::string zipname;
elz::extractZip(zipname);
}
]]}, {configs = {languages = "c++17"}, includes = "elzip/elzip.hpp"}))
end)
Loading…
Cancel
Save