-
-
Notifications
You must be signed in to change notification settings - Fork 419
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 libsdl3 #6225
base: dev
Are you sure you want to change the base?
Add libsdl3 #6225
Conversation
actions/runner-images#10980 (comment)
Either swapping win SDK ver either swapping ninja ver helped them as well it seems, what is really confusing to understand what was exactly a solution. on_load(function (package)
if package:is_plat("windows") then
package:add("deps", "ninja")
package:set("policy", "package.cmake_generator.ninja", true)
end Maybe we miss |
I don't think it's the best way to fix this since some users will have 2022 CI as well. |
if the new package name is |
Yes indeed, the next step is to rename libsdl to libsdl2 and keep a libsdl package using libsdl2 as a base, like this: package("libsdl")
set_base("libsdl2")
on_load(function (package)
wprint("libsdl package has been renamed to libsdl2 following the release of SDL3 which is also available under the name libsdl3.${clear}")
end) |
packages/l/libsdl3/xmake.lua
Outdated
add_configs("x11", {description = "Enables X11 support (requires it on the system)", default = true, type = "boolean"}) | ||
add_configs("wayland", {description = "Enables Wayland support", default = true, type = "boolean"}) |
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.
I don't do linux development, but is there a reason why these are enabled by default on that platform? I thought you could develop a libsdl3 application without these?
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.
One of the main feature of SDL (and reason people use it) is input and window management, which need x11/wayland to work.
It's very rare to use libsdl without these
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.
I'm always wary about defaults being enabled because you can't really take it back later. Even if it's rare, minimal dependencies by default should still be a consideration.
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.
I understand, but libsdl is a bit special, it only requires headers to build as it doesn't link x11 nor wayland, it loads them manually (dlopen/dlsym) at runtime only if they're available.
A good default for libsdl is to build it with as many deps as possible for this reason
cross and linux ARM64 fail because of wayland not supporting cross-building at the moment (because of wayland-scanner), I think this should be addressed. I'm disabling wayland by default for now on cross-platforms |
#6156
I took the libsdl package and removed all deprecated stuff, I may have missed some things though.