xmake.lua 1.2 KB

1234567891011121314151617181920212223242526
  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.4", "2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b")
  7. add_versions("2.3", "60b367dbdc6f2b0418a6e0cd203ee0049d9d629a36706fcf91dfb9428bae23c8")
  8. add_versions("2.2", "e092624af6aa244ade2d52181cc07751ac5caba2f3d63e9240790db9ed130bbc")
  9. add_versions("2.1", "f1e0500cb3934b0b61c5020c3999a973c9c93b618faff1eba75aadc95bb03e07")
  10. -- liburing doesn't support building as a shared lib
  11. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  12. on_install("linux", function (package)
  13. local cflags
  14. if package:config("pic") ~= false then
  15. cflags = "-fPIC"
  16. end
  17. import("package.tools.autoconf").install(package, {}, {makeconfigs = {CFLAGS = cflags}})
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("io_uring_submit", {includes = "liburing.h"}))
  21. end)