xmake.lua 951 B

123456789101112131415161718192021222324252627282930313233
  1. package("flex")
  2. set_kind("binary")
  3. set_homepage("https://github.com/westes/flex/")
  4. set_license("BSD-2-Clause")
  5. if not is_plat("windows") then
  6. add_urls("https://github.com/westes/flex/releases/download/v$(version)/flex-$(version).tar.gz")
  7. end
  8. add_versions("2.6.4", "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995")
  9. if is_plat("windows") then
  10. add_deps("winflexbison")
  11. elseif is_plat("linux") then
  12. add_deps("m4")
  13. end
  14. on_load("macosx", "linux", "bsd", "android", "iphoneos", "cross", function (package)
  15. package:addenv("PATH", "bin")
  16. end)
  17. on_install("windows", function (package)
  18. -- handled by winflexbison
  19. end)
  20. on_install("macosx", "linux", "bsd", "android", "iphoneos", "cross", function (package)
  21. import("package.tools.autoconf").install(package)
  22. end)
  23. on_test(function (package)
  24. os.vrun("flex -h")
  25. end)