opencore-amr: update on_install

pull/2767/head
ping 2 years ago
parent aa19a9f541
commit ada69601b0
No known key found for this signature in database
GPG Key ID: E190FCE890D3B329
  1. 33
      packages/o/opencore-amr/xmake.lua

@ -18,36 +18,9 @@ package("opencore-amr")
table.insert(configs, "--with-pic")
end
if is_plat("android") then
import("core.tool.toolchain")
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
local cxflags = ndk:get("cxflags")
local cflags = table.join(table.wrap(cxflags), ndk:get("cflags"))
local cxxflags = table.join(table.wrap(cxflags), ndk:get("cxxflags"))
local sysincludedirs = ndk:get("sysincludedirs")
for _, includedir in ipairs(sysincludedirs) do
table.insert(cflags, "-I" .. includedir)
table.insert(cxxflags, "-I" .. includedir)
end
local cc = package:tool("cc")
local cxx = package:tool("cxx")
local cpp = package:tool("cpp")
local as = package:tool("as")
local ar = package:tool("ar")
import("package.tools.autoconf").install(package, configs, {
envs = {
CC = cc, CXX = cxx, CPP = cpp,
AR = ar, AS = as,
CFLAGS = table.concat(cflags, ' '),
CXXFLAGS = table.concat(cxxflags, ' '),
}
})
else
import("package.tools.autoconf").install(package, configs)
end
local buildenvs = import("package.tools.autoconf").buildenvs(package)
buildenvs.CXX = package:tool("cxx")
import("package.tools.autoconf").install(package, configs, {envs = buildenvs})
end)
on_test(function (package)

Loading…
Cancel
Save