From ada69601b0ecfb8f121ab6183f0d2f17e4c65e67 Mon Sep 17 00:00:00 2001 From: ping Date: Sun, 16 Oct 2022 13:29:24 +0800 Subject: [PATCH] opencore-amr: update on_install --- packages/o/opencore-amr/xmake.lua | 33 +++---------------------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/packages/o/opencore-amr/xmake.lua b/packages/o/opencore-amr/xmake.lua index dfc8276d8..9dfbae3e6 100644 --- a/packages/o/opencore-amr/xmake.lua +++ b/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)