add libcanberra repo (#5586)

* add libcanberra repo

* Add magic enum module support (#5587)

* [magic_enum] add C++ module support

* [magic_enum] fix v0.9.6 sha256

* add vorbis and ogg to packagedeps

* add libvorbis shared deps

* add ltdl includedir

* change includedir

* add libtool kind

* change libtool configs

* change kind

* change kind

* delete the part of adding path manually

* fix grammar pproblem

* add libtool to packagedeps

* fix grammar probllem

* change libtool kind setting

* fix libtool test

---------

Co-authored-by: Arthur Laurent <arthur.laurent4@gmail.com>
pull/5591/head^2
benny066567 1 month ago committed by GitHub
parent e328ef3c5c
commit 51dc33b14b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/a/alsa-lib/xmake.lua
  2. 43
      packages/l/libcanberra/xmake.lua
  3. 24
      packages/l/libtool/xmake.lua

@ -11,7 +11,7 @@ package("alsa-lib")
add_configs("versioned", {description = "pass flag --without-versioned", default = true, type = "boolean"})
if is_plat("linux") then
add_syslinks("pthread")
add_syslinks("pthread", "dl")
add_extsources("pacman::alsa-lib", "apt::libasound2-dev")
end

@ -0,0 +1,43 @@
package("libcanberra")
set_homepage("https://0pointer.de/lennart/projects/libcanberra/")
set_description("libcanberra is an implementation of the XDG Sound Theme and Name Specifications")
set_license("LGPL-2.1")
add_urls("http://0pointer.de/lennart/projects/libcanberra/libcanberra-$(version).tar.xz")
add_versions("0.30", "c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72")
add_deps("libtool", {kind = "library"})
add_deps("autoconf", "automake", "m4")
add_deps("libogg", "alsa-lib")
if is_plat("linux") then
add_syslinks("dl")
end
add_links("canberra", "canberra-null", "canberra-alsa", "canberra-oss", "canberra-pulse", "canberra-multi")
add_linkdirs("lib", "lib/libcanberra-0.30")
add_includedirs("include")
on_load(function (package)
if package:config("shared") then
package:add("deps", "libvorbis", {configs = {shared = true}})
else
package:add("deps", "libvorbis")
end
end)
on_install("linux", function (package)
local configs = {"--disable-dependency-tracking", "--disable-lynx"}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
table.insert(configs, "--with-systemdsystemunitdir=" .. package:installdir("system_servise"))
table.insert(configs, "LIBS=" .. "-lltdl -ldl")
import("package.tools.autoconf").install(package, configs, {packagedeps= {"libtool", "libvorbis"}})
end)
on_test(function (package)
assert(package:has_cfuncs("ca_context_create", {includes = "canberra.h"}))
end)

@ -1,8 +1,7 @@
package("libtool")
set_kind("binary")
set_homepage("https://www.gnu.org/software/libtool/")
set_description("A generic library support script.")
set_kind("binary")
add_urls("http://ftpmirror.gnu.org/libtool/libtool-$(version).tar.gz",
"https://mirrors.ustc.edu.cn/gnu/libtool/libtool-$(version).tar.gz",
"git://git.savannah.gnu.org/libtool.git")
@ -11,6 +10,16 @@ package("libtool")
add_versions("2.4.5", "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987")
add_versions("2.4.7", "04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8")
on_load(function (package)
if package:is_library() then
package:addenv("PATH", "bin")
end
end)
if is_plat("linux") then
add_syslinks("dl")
end
if is_host("linux") then
add_extsources("apt::libtool", "pacman::libtool")
elseif is_host("macosx") then
@ -20,7 +29,10 @@ package("libtool")
add_deps("autoconf")
on_install("@macosx", "@linux", "@bsd", function (package)
import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--enable-ltdl-install"})
local configs = {"--disable-dependency-tracking", "--enable-ltdl-install"}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
import("package.tools.autoconf").install(package, configs)
if package:is_plat("macosx") then
local bindir = package:installdir("bin")
os.ln(path.join(bindir, "libtoolize"), path.join(bindir, "glibtoolize"))
@ -28,5 +40,9 @@ package("libtool")
end)
on_test(function (package)
os.vrun("libtool --version")
if not package:is_binary() then
assert(package:has_cfuncs("lt_dlopen", {includes = "ltdl.h"}))
else
os.vrun("libtool --version")
end
end)

Loading…
Cancel
Save