Build yasm from source and merge with vsyasm

SirLynix-patch-3
Jérôme Leclercq 7 months ago committed by GitHub
parent 104d504072
commit 8c81009aaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 23
      packages/v/vsyasm/xmake.lua
  2. 37
      packages/y/yasm/xmake.lua

@ -1,23 +0,0 @@
package("vsyasm")
set_kind("binary")
set_homepage("https://yasm.tortall.net/")
set_description("Modular BSD reimplementation of NASM - for use with VS2010+")
set_license("BSD-2-Clause")
if os.arch() == "x64" then
add_urls("https://github.com/yasm/yasm/releases/download/v$(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/v$(version)/vsyasm-$(version)-win32.zip",
"http://www.tortall.net/projects/yasm/releases/vsyasm-$(version)-win32.zip")
add_versions("1.3.0", "ff4585e2a03e7015b0b1d406d4231267c2d3733968ffc6fc633e586c85c16da5")
end
on_install("@windows", "@mingw", "@msys", function (package)
os.cp("*", package:installdir("bin"))
end)
on_test(function (package)
os.vrun("vsyasm --version")
end)

@ -4,36 +4,19 @@ package("yasm")
set_description("Modular BSD reimplementation of NASM.")
set_license("BSD-2-Clause")
if is_host("windows") then
if os.arch() == "x64" then
add_urls("https://github.com/yasm/yasm/releases/download/v$(version)/yasm-$(version)-win64.exe",
"http://www.tortall.net/projects/yasm/releases/yasm-$(version)-win64.exe")
add_versions("1.3.0", "d160b1d97266f3f28a71b4420a0ad2cd088a7977c2dd3b25af155652d8d8d91f")
else
add_urls("https://github.com/yasm/yasm/releases/download/v$(version)/yasm-$(version)-win32.exe",
"http://www.tortall.net/projects/yasm/releases/yasm-$(version)-win32.exe")
add_versions("1.3.0", "db8ef9348ae858354cee4cc2f99e0f36de8a47a121de4cfeea5a16d45dd5ac1b")
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
add_urls("https://github.com/yasm/yasm/archive/refs/tags/$(version.tar.gz",
"https://github.com/yasm/yasm.git")
add_versions("v1.3.0", "f708be0b7b8c59bc1dbe7134153cd2f31faeebaa8eec48676c10f972a1f13df3")
on_install("@windows", "@mingw", "@msys", function (package)
-- renaming the file and moving it to the right folder has to be in two steps to avoid xmake mistaking the filename for a folder
os.vmv(package:originfile(), "yasm.exe")
os.vmv("yasm.exe", package:installdir("bin"))
end)
on_install("@linux", "@macosx", function (package)
local configs = {"--disable-python"}
if package:debug() then
table.insert(configs, "--enable-debug")
end
import("package.tools.autoconf").install(package)
on_install(function (package)
local configs = {"-DYASM_BUILD_TESTS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
os.vrun("yasm --version")
if package:is_plat("windows") then
os.vrun("vsyasm --version")
end
end)

Loading…
Cancel
Save