xmake.lua 1.2 KB

12345678910111213141516171819202122
  1. package("opencore-amr")
  2. set_homepage("https://opencore-amr.sourceforge.io")
  3. set_description("Library of OpenCORE Framework implementation of Adaptive Multi Rate Narrowband and Wideband (AMR-NB and AMR-WB) speech codec.")
  4. add_urls("https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-$(version).tar.gz")
  5. add_versions("0.1.6", "483eb4061088e2b34b358e47540b5d495a96cd468e361050fae615b1809dc4a1")
  6. on_install("linux", "macosx", "android", "iphoneos", "bsd", "cross", "mingw", function (package)
  7. local configs = {}
  8. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  9. if package:is_debug() then
  10. table.insert(configs, "--enable-debug")
  11. end
  12. import("package.tools.autoconf").install(package, configs)
  13. end)
  14. on_test(function (package)
  15. assert(package:has_cfuncs("Decoder_Interface_init", {includes = "opencore-amrnb/interf_dec.h"}))
  16. assert(package:has_cfuncs("Encoder_Interface_init", {includes = "opencore-amrnb/interf_enc.h"}))
  17. assert(package:has_cfuncs("D_IF_init", {includes = "opencore-amrwb/dec_if.h"}))
  18. end)