Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch liburing shared/static #6286

Merged
merged 2 commits into from
Feb 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/l/liburing/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ package("liburing")
add_versions("2.2", "e092624af6aa244ade2d52181cc07751ac5caba2f3d63e9240790db9ed130bbc")
add_versions("2.1", "f1e0500cb3934b0b61c5020c3999a973c9c93b618faff1eba75aadc95bb03e07")

-- liburing doesn't support building as a shared lib
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})

on_install("linux", function (package)
on_install("linux|native", function (package)
local cflags
if package:config("pic") ~= false then
cflags = "-fPIC"
end
import("package.tools.autoconf").install(package, {"--use-libc"}, {makeconfigs = {CFLAGS = cflags}})

-- liburing build for static and shared by default without giving
-- any option to choose between the two, so remove the wrong kind afterward
if package:config("shared") then
os.rm(path.join(package:installdir("lib"), "*.a"))
else
os.rm(path.join(package:installdir("lib"), "*.so*"))
end
end)

on_test(function (package)
Expand Down
Loading