Skip to content

Commit

Permalink
add package mpg123 (#2551)
Browse files Browse the repository at this point in the history
* add package mpg123

* filter plat
  • Loading branch information
elkpi authored Sep 8, 2023
1 parent aed6409 commit f44a7ba
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/m/mpg123/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package("mpg123")
set_homepage("https://www.mpg123.de/")
set_description("Fast console MPEG Audio Player and decoder library")

add_urls("https://sourceforge.net/projects/mpg123/files/mpg123/$(version)/mpg123-$(version).tar.bz2")

add_versions("1.30.2", "c7ea863756bb79daed7cba2942ad3b267a410f26d2dfbd9aaf84451ff28a05d7")

add_deps("autoconf", "automake", "libtool")
if is_plat("linux") then
add_syslinks("m")
end

on_install("linux", "macosx", "android", "iphoneos", "bsd", "cross", function (package)
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
if package:debug() then
table.insert(configs, "--enable-debug")
end
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
import("package.tools.autoconf").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("mpg123_init", {includes = "mpg123.h"}))
end)

0 comments on commit f44a7ba

Please sign in to comment.