2
0
Эх сурвалжийг харах

add opencore-amr (#2767)

* add opencore-amr

* remove useless code

* opencore-amr support android

* opencore-amr: update on_install

* opencore-amr: filter plat

* Update xmake.lua

* opencore-amr: remove pic and cxx logic

* Revert "opencore-amr: filter plat"

This reverts commit f5fc99732fdeeeac82ee1df39599ad91652f59cd.

* Revert "Revert "opencore-amr: filter plat""

This reverts commit 626f1e6db1b25c3bfac85d4d7879647ea392c7fd.

* opencore-amr: remove wasm, add mingw

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
elkPi 1 жил өмнө
parent
commit
91f78377d3

+ 22 - 0
packages/o/opencore-amr/xmake.lua

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