2
0

xmake.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. package("patch")
  2. set_kind("binary")
  3. set_homepage("http://www.gnu.org/software/patch/patch.html")
  4. set_description("GNU patch, which applies diff files to original files.")
  5. if is_host("windows") then
  6. add_urls("https://gitlab.com/xmake-mirror/patch/uploads/2ff76c0c6a35a4a6af98bb7052544c38/patch-$(version)-bin.zip")
  7. add_urls("https://github.com/xmake-mirror/patch/releases/download/v2.5.9/patch-$(version)-bin.zip")
  8. add_versions("2.5.9-7", "fabd6517e7bd88e067db9bf630d69bb3a38a08e044fa73d13a704ab5f8dd110b")
  9. else
  10. add_urls("https://ftp.gnu.org/gnu/patch/patch-$(version).tar.bz2",
  11. "https://github.com/xmake-mirror/patch/releases/download/v$(version)/patch-$(version).tar.bz2")
  12. add_versions("2.7.6", "3d1d001210d76c9f754c12824aa69f25de7cb27bb6765df63455b77601a0dcc9")
  13. end
  14. on_install("@windows", "@msys", "@cygwin", function (package)
  15. os.cp("bin/*", package:installdir("bin"))
  16. end)
  17. on_install("@macosx", "@linux", function (package)
  18. import("package.tools.autoconf").install(package)
  19. end)
  20. on_test(function (package)
  21. os.vrun("patch --version")
  22. end)