Skip to content

Commit

Permalink
feat: add fdk-aac and wavpack (#2307)
Browse files Browse the repository at this point in the history
* feat: add fdk-aac

* fix(fdk-aac): try to fix android build error

* fix(fdk-aac): try to fix android build error

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
  • Loading branch information
DreamOfIce and waruqi authored Jul 12, 2023
1 parent af40f39 commit 69f461f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/f/fdk-aac/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package("fdk-aac")
set_homepage("https://sourceforge.net/projects/opencore-amr/")
set_description("A standalone library of the Fraunhofer FDK AAC code from Android.")

add_urls("https://github.com/mstorsjo/fdk-aac/archive/refs/tags/v$(version).tar.gz",
"https://github.com/mstorsjo/fdk-aac.git")
add_versions("2.0.0", "6e6c7921713788e31df655911e1d42620b057180b00bf16874f5d630e1d5b9a2")
add_versions("2.0.1", "a4142815d8d52d0e798212a5adea54ecf42bcd4eec8092b37a8cb615ace91dc6")
add_versions("2.0.2", "7812b4f0cf66acda0d0fe4302545339517e702af7674dd04e5fe22a5ade16a90")

add_deps("cmake")

on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("android") then
io.replace("libSBRdec/src/lpp_tran.cpp", "#ifdef __ANDROID__", "#if 0")
end
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("aacEncOpen", {includes = "fdk-aac/aacenc_lib.h"}))
end)

0 comments on commit 69f461f

Please sign in to comment.