xmake.lua 1.3 KB

123456789101112131415161718192021222324252627
  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. add_urls("https://github.com/axboe/liburing/archive/refs/tags/liburing-$(version).tar.gz",
  5. "https://github.com/axboe/liburing.git")
  6. add_versions("2.5", "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98")
  7. add_versions("2.4", "2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b")
  8. add_versions("2.3", "60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8")
  9. add_versions("2.2", "e092624af6aa244ade2d52181cc07751ac5caba2f3d63e9240790db9ed130bbc")
  10. add_versions("2.1", "f1e0500cb3934b0b61c5020c3999a973c9c93b618faff1eba75aadc95bb03e07")
  11. -- liburing doesn't support building as a shared lib
  12. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  13. on_install("linux", function (package)
  14. local cflags
  15. if package:config("pic") ~= false then
  16. cflags = "-fPIC"
  17. end
  18. import("package.tools.autoconf").install(package, {"--use-libc"}, {makeconfigs = {CFLAGS = cflags}})
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("io_uring_submit", {includes = "liburing.h"}))
  22. end)