summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aports/pkg.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/aports/pkg.lua b/aports/pkg.lua
index b5218e0..66f94cc 100644
--- a/aports/pkg.lua
+++ b/aports/pkg.lua
@@ -90,6 +90,15 @@ function M.arch_enabled(pkg)
return pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild.arch]
end
+function M.libc_enabled(pkg)
+ local libc = abuild.chost:match("-([%a]+)$")
+ return not pkg.options["!libc_"..libc]
+end
+
+function M.enabled(pkg)
+ return pkg:arch_enabled() and pkg:libc_enabled()
+end
+
function M.each_dependency(pkg)
return coroutine.wrap(function()
for _,dep in pairs(pkg.depends or {}) do