xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  1. package("libev")
  2. set_homepage("http://software.schmorp.de/pkg/libev")
  3. set_description("Full-featured high-performance event loop loosely modelled after libevent.")
  4. add_urls("http://dist.schmorp.de/libev/libev-$(version).tar.gz",
  5. "https://github.com/xmake-mirror/libev/releases/download/$(version)/libev-$(version).tar.gz",
  6. "https://github.com/xmake-mirror/libev.git")
  7. add_versions("4.33", "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea")
  8. add_links("ev")
  9. on_install("macosx", "linux", "iphoneos", function (package)
  10. local configs = {}
  11. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  12. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  13. if package:debug() then
  14. table.insert(configs, "--enable-debug")
  15. end
  16. import("package.tools.autoconf").install(package, configs)
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cfuncs("ev_loop", {includes = "ev.h"}))
  20. end)