xmake.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package("liburing")
  2. set_homepage("https://github.com/axboe/liburing")
  3. set_description("liburing provides helpers to setup and teardown io_uring instances")
  4. set_license("MIT")
  5. add_urls("https://github.com/axboe/liburing/archive/refs/tags/liburing-$(version).tar.gz",
  6. "https://github.com/axboe/liburing.git")
  7. add_versions("2.9", "897b1153b55543e8b92a5a3eb9b906537a5fedcf8afaf241f8b8787940c79f8d")
  8. add_versions("2.8", "3ed7891d1b2bbe743ef3fb6d0a4970e630aa02d7c7bd3b0212791fb7be815984")
  9. add_versions("2.7", "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1")
  10. add_versions("2.6", "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc")
  11. add_versions("2.5", "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98")
  12. add_versions("2.4", "2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b")
  13. add_versions("2.3", "60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8")
  14. add_versions("2.2", "e092624af6aa244ade2d52181cc07751ac5caba2f3d63e9240790db9ed130bbc")
  15. add_versions("2.1", "f1e0500cb3934b0b61c5020c3999a973c9c93b618faff1eba75aadc95bb03e07")
  16. on_install("linux|native", function (package)
  17. local cflags
  18. if package:config("pic") ~= false then
  19. cflags = "-fPIC"
  20. end
  21. import("package.tools.autoconf").install(package, {"--use-libc"}, {makeconfigs = {CFLAGS = cflags}})
  22. -- liburing build for static and shared by default without giving
  23. -- any option to choose between the two, so remove the wrong kind afterward
  24. if package:config("shared") then
  25. os.rm(path.join(package:installdir("lib"), "*.a"))
  26. else
  27. os.rm(path.join(package:installdir("lib"), "*.so*"))
  28. end
  29. end)
  30. on_test(function (package)
  31. assert(package:has_cfuncs("io_uring_submit", {includes = "liburing.h"}))
  32. end)