-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
add libcanberra repo #5586
add libcanberra repo #5586
Conversation
* [magic_enum] add C++ module support * [magic_enum] fix v0.9.6 sha256
对了,ruki哥,如果自己手动加链接地址或者include地址的话,除了用add_includedir还有什么方法吗?因为如果用add_included加其他包的include地址,得转成相对地址才能加 |
By the way, brother ruki, if you manually add the link address or include address, is there any other way besides using add_includedir? Because if you use add_included to add the include address of other packages, you have to convert it to a relative address before adding it. |
只能用于添加当前包的 includedir 和 linkdirs ,为啥要加其他包的。。如果要加,也应该在对应那个包里 通过add_includedir 去导出。。不要在当前包中加其他包的 includedir |
It can only be used to add includedir and linkdirs of the current package. Why add other packages? . If you want to add it, you should export it through add_includedir in the corresponding package. . Do not add includedir from other packages to the current package. |
packages/l/libcanberra/xmake.lua
Outdated
end | ||
local linkdirs = fetchinfo.linkdirs | ||
if linkdirs and #linkdirs > 0 then | ||
table.insert(configs, "LDFLAGS=-L" .. linkdirs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个时候返回的可能是 table 。不一定是 string
得先 wrap 下,然后 concat 下
local includedirs = table.wrap(fetchinfo.includedirs or fetchinfo.sysincludedirs)
另外,autoconf.install 不是可以直接传递 cflags ,以及 packagedeps 么,为啥这个要单独设置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确实,因为之前只有binary,在packagedeps加不进去,所以就手动加。现在修改
packages/l/libtool/xmake.lua
Outdated
if is_host("linux") then | ||
add_extsources("apt::libtool", "pacman::libtool") | ||
add_syslinks("dl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里要单独放在 is_plat("linux")
,否则会影响交叉编译
packages/l/libcanberra/xmake.lua
Outdated
add_includedirs("include") | ||
|
||
on_install("linux", function (package) | ||
local fetchinfo = package:dep("libtool"):fetch() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
漏删了
packages/l/libcanberra/xmake.lua
Outdated
add_deps("libtool", {kind = "library"}) | ||
add_deps("autoconf", "automake", "m4") | ||
add_deps("libogg", "alsa-lib") | ||
add_deps("libvorbis", {configs = {shared = true}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
漏删了
packages/l/libcanberra/xmake.lua
Outdated
add_syslinks("dl") | ||
end | ||
|
||
add_links("canberra", "canberra-null", "canberra-alsa", "canberra-oss", "canberra-pulse", "canberra-multi", "ltdl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ltdl 也是这个包的库么?系统库得用 add_syslinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ltdl 来自 libtool,加了 add_deps
就会自动放在最右面保证 link order,所以这里可以也删了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个好像是 libtool 的库,不应该在 libtool 里面自动导出了么
ltdl是libtool的库
…---Original---
From: ***@***.***>
Date: Mon, Oct 28, 2024 15:40 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [xmake-io/xmake-repo] add libcanberra repo (PR #5586)
@waruqi commented on this pull request.
In packages/l/libcanberra/xmake.lua:
> + 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", "ltdl")
ltdl 也是这个包的库么?系统库得用 add_syslinks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
packages/l/libtool/xmake.lua
Outdated
if package:is_plat("macosx") then | ||
local bindir = package:installdir("bin") | ||
os.ln(path.join(bindir, "libtoolize"), path.join(bindir, "glibtoolize")) | ||
end | ||
end) | ||
|
||
on_test(function (package) | ||
os.vrun("libtool --version") | ||
if package:kind() ~= "binary" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package:is_binary
那应该 libtool 里面设置 links 而不是这里 |
那改成这样,能拿到二进制也能拿到 lib/include 信息。 -- libtool/xmake.lua
on_load(function (package)
if package:is_library() then
package:addenv("PATH", "bin")
end
end) |
添加libcanberra的repo