Skip to content

Commit

Permalink
add gsound repo (#5596)
Browse files Browse the repository at this point in the history
* add gsound repo

* add libcanberra and glib with share configs
  • Loading branch information
hahahahbenny authored Oct 28, 2024
1 parent d71b396 commit 2f65a92
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/g/gsound/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package("gsound")

set_homepage("https://wiki.gnome.org/Projects/GSound")
set_description("GSound is a small library for playing system sounds.")
set_license("LGPL-2.1")

add_urls("https://gitlab.gnome.org/GNOME/gsound/-/archive/1.0.3/gsound-1.0.3.tar.gz")
add_versions("1.0.3", "ebee33c77f43bcae87406c20e051acaff08e86f8960c35b92911e243fddc7a0b")

if is_plat("linux") then
add_syslinks("pthread", "dl")
end

on_load(function (package)
package:add("deps", "glib", { configs = {shared = package:config("shared")} })
package:add("deps", "libcanberra", { configs = {shared = package:config("shared")} })
end)
add_deps("meson", "ninja")

on_install("linux", function (package)
local configs = {"-Denable_vala=false", "-Dgtk_doc=false", "-Dintrospection=false"}
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
import("package.tools.meson").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("gsound_context_new", {includes = "gsound-context.h"}))
end)

0 comments on commit 2f65a92

Please sign in to comment.