add yasm for win (#488)

* add yasm for win

* format
pull/491/head
hh-wu 3 years ago committed by GitHub
parent 5f43095bb9
commit 0d0608031a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      packages/y/yasm/xmake.lua

@ -4,10 +4,27 @@ package("yasm")
set_homepage("https://yasm.tortall.net/")
set_description("Modular BSD reimplementation of NASM.")
add_urls("https://www.tortall.net/projects/yasm/releases/yasm-$(version).tar.gz",
"https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-$(version).tar.gz")
add_versions("1.3.0", "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f")
if is_host("windows") then
if os.arch() == "x64" then
add_urls("https://github.com/yasm/yasm/releases/download/$(version)/vsyasm-$(version)-win64.zip",
"http://www.tortall.net/projects/yasm/releases/vsyasm-$(version)-win64.zip")
add_versions("1.3.0", "6D991CA77E3827AADE0091C87C89CB4C9FA6AD097AFCEA95EA736482BAE707E2")
else
add_urls("https://github.com/yasm/yasm/releases/download/$(version)/vsyasm-$(version)-win32.zip",
"http://www.tortall.net/projects/yasm/releases/vsyasm-$(version)-win32.zip")
add_versions("1.3.0", "FF4585E2A03E7015B0B1D406D4231267C2D3733968FFC6FC633E586C85C16DA5")
end
else
add_urls("https://www.tortall.net/projects/yasm/releases/yasm-$(version).tar.gz",
"https://ftp.openbsd.org/pub/OpenBSD/distfiles/yasm-$(version).tar.gz")
add_versions("1.3.0", "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f")
end
on_install("@windows", "@mingw", "@msys", function (package)
os.mv("vsyasm.exe", "yasm.exe")
os.cp("*", package:installdir("bin"))
end)
on_install("@linux", "@macosx", function (package)
local configs = {"--disable-python"}
if package:debug() then
@ -19,3 +36,4 @@ package("yasm")
on_test(function (package)
os.vrun("yasm --version")
end)
Loading…
Cancel
Save