|
@@ -4,6 +4,7 @@ package("lzma")
|
|
|
set_description("LZMA SDK")
|
|
|
|
|
|
add_urls("https://www.7-zip.org/a/lzma$(version).7z", {version = function (version) return version:gsub("%.", "") end})
|
|
|
+ add_versions("19.00", "00f569e624b3d9ed89cf8d40136662c4c5207eaceb92a70b1044c77f84234bad")
|
|
|
add_versions("21.07", "833888f03c6628c8a062ce5844bb8012056e7ab7ba294c7ea232e20ddadf0d75")
|
|
|
add_versions("22.01", "35b1689169efbc7c3c147387e5495130f371b4bad8ec24f049d28e126d52d9fe")
|
|
|
add_versions("23.01", "317dd834d6bbfd95433488b832e823cd3d4d420101436422c03af88507dd1370")
|
|
@@ -14,7 +15,7 @@ package("lzma")
|
|
|
end
|
|
|
on_install(function (package)
|
|
|
os.cd("C")
|
|
|
- io.writefile("xmake.lua", [[
|
|
|
+ local xmake_lua = [[
|
|
|
add_rules("mode.debug", "mode.release")
|
|
|
target("lzma")
|
|
|
set_kind("$(kind)")
|
|
@@ -26,8 +27,18 @@ package("lzma")
|
|
|
if is_plat("linux", "bsd") then
|
|
|
add_syslinks("pthread")
|
|
|
end
|
|
|
- ]])
|
|
|
- local cxflags = ""
|
|
|
+ ]]
|
|
|
+ if package:version():le("19.00") then
|
|
|
+ xmake_lua = xmake_lua .. [[
|
|
|
+ if not is_plat("windows", "mingw") then
|
|
|
+ add_defines("_7ZIP_ST")
|
|
|
+ remove_headerfiles("Threads.h", "LzFindMt.h")
|
|
|
+ remove_files("Threads.c", "LzFindMt.c")
|
|
|
+ end
|
|
|
+ ]]
|
|
|
+ end
|
|
|
+ io.writefile("xmake.lua", xmake_lua)
|
|
|
+ local cxflags
|
|
|
if not package:is_plat("windows") and package:is_arch("arm.*") then
|
|
|
cxflags = "-march=armv8-a+crc+crypto"
|
|
|
end
|