Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gstreamer: add package #2980

Merged
merged 10 commits into from
Apr 22, 2024
Prev Previous commit
Next Next commit
fix macosx libintl
  • Loading branch information
star-hengxing committed Dec 21, 2023
commit fb8a4177655017a4050bbd2bd60361151832c15a
13 changes: 13 additions & 0 deletions packages/g/gstreamer/xmake.lua
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ package("gstreamer")
add_versions("home:1.22.8", "ad4e3db1771139b1db17b1afa7c05db083ae0100bd4da244b71f162dcce41bfc")
-- add_versions("github:1.22.8", "ebe085820a32f135d9a5a3442b2cb2238d8ce1d3bc66f4d6bfbc11d0873dbecc")

add_configs("libunwind", {description = "Use libunwind to generate backtraces", default = false, type = "boolean"})

if is_plat("linux") then
add_extsources("pacman::gstreamer", "apt::libgstreamer1.0-dev")
elseif is_plat("macosx") then
@@ -27,18 +29,29 @@ package("gstreamer")

add_includedirs("include", "include/gstreamer-1.0")

on_load(function (package)
if package:config("libunwind") then
package:add("deps", "libunwind")
end
end)

on_install("windows", "macosx", "linux", "cross", function (package)
local configs = {
"-Dtools=disabled",
"-Dexamples=disabled",
"-Dbenchmarks=disabled",
"-Dtests=disabled",
}
table.insert(configs, "-Dgst_debug=" .. (package:is_debug() and "true" or "false"))
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
table.insert(configs, "-Dlibunwind=" .. (package:config("libunwind") and "true" or "false"))
local packagedeps = {}
if not package:dep("glib"):config("shared") then
table.insert(packagedeps, "libiconv")
end
if package:is_plat("macosx") then
table.insert(packagedeps, "libintl")
end
import("package.tools.meson").install(package, configs, {packagedeps = packagedeps})
end)

Loading