improve libarchive (#2601)

* improve libarchive

* fix static

* add windows links
pull/2607/head
ruki 1 year ago committed by GitHub
parent 190bf83e02
commit f62fa963d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      packages/l/libarchive/xmake.lua

@ -8,13 +8,34 @@ package("libarchive")
add_versions("3.5.1", "9015d109ec00bb9ae1a384b172bf2fc1dff41e2c66e5a9eeddf933af9db37f5a")
add_versions("3.5.2", "5f245bd5176bc5f67428eb0aa497e09979264a153a074d35416521a5b8e86189")
add_versions("3.6.2", "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3")
add_versions("3.7.2", "df404eb7222cf30b4f8f93828677890a2986b66ff8bf39dac32a804e96ddf104")
add_deps("cmake")
add_deps("zlib", "bzip2", "lz4", "zstd")
if is_plat("windows") then
add_syslinks("advapi32")
end
on_install("windows", "linux", "macosx", function (package)
local configs = {"-DENABLE_TEST=OFF", "-DENABLE_OPENSSL=OFF", "-DENABLE_PCREPOSIX=OFF", "-DENABLE_LibGCC=OFF", "-DENABLE_CNG=OFF", "-DENABLE_ICONV=OFF", "-DENABLE_ACL=OFF", "-DENABLE_EXPAT=OFF", "-DENABLE_LIBXML2=OFF", "-DENABLE_LIBB2=OFF"}
local configs = {"-DENABLE_TEST=OFF",
"-DENABLE_CAT=OFF",
"-DENABLE_TAR=OFF",
"-DENABLE_CPIO=OFF",
"-DENABLE_OPENSSL=OFF",
"-DENABLE_PCREPOSIX=OFF",
"-DENABLE_LibGCC=OFF",
"-DENABLE_CNG=OFF",
"-DENABLE_ICONV=OFF",
"-DENABLE_ACL=OFF",
"-DENABLE_EXPAT=OFF",
"-DENABLE_LIBXML2=OFF",
"-DENABLE_LIBB2=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if not package:config("shared") then
package:add("defines", "LIBARCHIVE_STATIC")
end
import("package.tools.cmake").install(package, configs)
end)

Loading…
Cancel
Save