xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  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://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version)-win64.zip")
  9. add_versions("2.15.05", "f5c93c146f52b4f1664fa3ce6579f961a910e869ab0dae431bd871bdd2584ef2")
  10. else
  11. add_urls("https://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version)-win32.zip")
  12. add_versions("2.15.05", "258c7d1076e435511cf2fdf94e2281eadbdb9e3003fd57f356f446e2bce3119e")
  13. end
  14. else
  15. add_urls("https://github.com/xmake-mirror/nasm/releases/download/nasm-$(version)/nasm-$(version).tar.xz")
  16. add_versions("2.13.03", "812ecfb0dcbc5bd409aaa8f61c7de94c5b8752a7b00c632883d15b2ed6452573")
  17. add_versions("2.15.05", "3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f")
  18. end
  19. on_install("@windows", "@mingw", "@msys", function (package)
  20. os.cp("*.exe", package:installdir("bin"))
  21. os.cp(path.join("rdoff", "*.exe"), package:installdir("bin"))
  22. end)
  23. on_install("@linux", "@macosx", "@bsd", function (package)
  24. import("package.tools.autoconf").install(package)
  25. end)
  26. on_test(function (package)
  27. os.vrun("nasm --version")
  28. end)