xmake.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package("nasm")
  2. set_kind("binary")
  3. set_homepage("https://www.nasm.us/")
  4. set_description("Netwide Assembler (NASM) is an 80x86 assembler.")
  5. set_license("BSD-2-Clause")
  6. if is_host("windows") then
  7. if os.arch() == "x64" then
  8. add_urls("https://www.nasm.us/pub/nasm/releasebuilds/$(version)/win64/nasm-$(version)-win64.zip")
  9. add_urls("https://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version)-win64.zip")
  10. add_versions("2.15.05", "f5c93c146f52b4f1664fa3ce6579f961a910e869ab0dae431bd871bdd2584ef2")
  11. add_versions("2.16.01", "029eed31faf0d2c5f95783294432cbea6c15bf633430f254bb3c1f195c67ca3a")
  12. add_versions("2.16.03", "3ee4782247bcb874378d02f7eab4e294a84d3d15f3f6ee2de2f47a46aa7226e6")
  13. else
  14. add_urls("https://www.nasm.us/pub/nasm/releasebuilds/$(version)/win32/nasm-$(version)-win32.zip")
  15. add_urls("https://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version)-win32.zip")
  16. add_versions("2.15.05", "258c7d1076e435511cf2fdf94e2281eadbdb9e3003fd57f356f446e2bce3119e")
  17. add_versions("2.16.01", "e289fa70c88594b092c916344bb8bfcd6896b604bfab284ab57b1372997c820c")
  18. add_versions("2.16.03", "1881d062da8a2f02d832c3d47262697817541bcbb853126638ad209ea6ffe5b0")
  19. end
  20. else
  21. add_urls("https://www.nasm.us/pub/nasm/releasebuilds/$(version)/nasm-$(version).tar.xz")
  22. add_urls("https://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version).tar.xz")
  23. add_versions("2.13.03", "812ecfb0dcbc5bd409aaa8f61c7de94c5b8752a7b00c632883d15b2ed6452573")
  24. add_versions("2.15.05", "3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f")
  25. add_versions("2.16.01", "c77745f4802375efeee2ec5c0ad6b7f037ea9c87c92b149a9637ff099f162558")
  26. add_versions("2.16.03", "1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148")
  27. end
  28. on_install("@windows", "@mingw", "@msys", function (package)
  29. os.cp("*.exe", package:installdir("bin"))
  30. os.cp(path.join("rdoff", "*.exe"), package:installdir("bin"))
  31. end)
  32. on_install("@linux", "@macosx", "@bsd", function (package)
  33. import("package.tools.autoconf").install(package)
  34. end)
  35. on_test(function (package)
  36. os.vrun("nasm --version")
  37. end)