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

improve elfutils #5307

Merged
merged 3 commits into from
Sep 22, 2024
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
27 changes: 23 additions & 4 deletions packages/e/elfutils/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,33 @@ package("elfutils")
add_configs("libasm", {description = "Enable libasm", default = false, type = "boolean"})

add_deps("m4", "zstd", "zlib")
if is_plat("android") then
add_deps("libintl", "argp-standalone")
end

if is_plat("android") then
if on_source then
on_source(function (package)
if package:is_plat("android") then
package:add("configs", "shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end
end)
elseif is_plat("android") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
end

on_load(function(package)
if package:is_plat("android") then
package:add("deps", "libintl", "argp-standalone")
end
end)

if on_check then
-- https://github.com/xmake-io/xmake-repo/issues/3182
on_check("android", function (package)
local ndk = package:toolchain("ndk")
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk and tonumber(ndk) < 26, "package(elfutils): need ndk version < 26 for android")
assert(ndk_sdkver and tonumber(ndk_sdkver) <= 23, "package(elfutils): need ndk api level <= 23 for android")
end)
end

on_install("linux", "android", function (package)
local configs = {"--disable-dependency-tracking",
"--disable-silent-rules",
Expand Down
Loading