-
Notifications
You must be signed in to change notification settings - Fork 95
Add SDL2-image and SDL2-ttf #401
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
Conversation
Let's wait until 25.08.0 is released, I want to test the build with that. Remind me if I forget. |
That predates the codeoweners file, if you are adding this you have to be the “official” person to maintain it. But others can help anyway through PRs etc. So you should add yourself. |
Can you rebase to master? |
The x-checker won't work, try using anitya. |
Oops, how stupid of me... However anitya for SDL2_ttf seems to be wrong: https://release-monitoring.org/project/4784/ Would it be OK to use git for the sources instead? Like:
|
yea that's fine |
Would it make sense to switch to CMake + Ninja instead of autoconf since these libraries fully support it as a build system? That should make build recipe a bit cleaner. |
Good idea, @tothxa what do you think? |
I don't know if this would help, but I already ship SDL2_image with a game I maintain and in my case it builds and works just fine without specifying buildsystem or any other options. |
If you don't specify buildsystem then it uses autotools. Moreover, default behavior is to build static libs which you remove afterwards but could not build them in first place. So defaults work but are inferior to what can be done. |
Then you can leave --disable-static in config-opts. I just thought they wanted to switch to cmake-ninja in order to avoid needing these lines:
so I wanted to show that simply removing them is enough. Or does cmake-ninja do something better compared to autotools? |
autotools is legacy buildsystem, if upstream support cmake/meson it's better to use that. |
use anitya use default cmake build type clean up cmake dir too
OK, switched to BTW @user1-github @Erick555 Doesn't either of you want to take this over? You seem far more qualified than me. |
@bbhtt Looks like git needs to download too much stuff from too many places, so I fought |
I don't think it's actually using cmake now since a. Per @Erick555
b. It still accepts the decidedly non-cmake options from |
@tothxa Just add Btw, you don't need to specify If you're using anitya, you also need to change the source url and url template to Github, as www.libsdl.org urls won't work with that. See the link to my game manifest I provided in my first comment as an example. Unfortunately idk what maintaining shared modules involve. For me personally it's also much more convenient to just ship a dependency in my app manifest, unless it's a very old eol dependency that doesn't get updated anymore. |
remove redundant stuff
I know, it was just meant for extra safety. But OK, I removed it, as well as the not built static libs from cleanup.
What do you mean they won't work? I've tested it: changed the versions to some old ones and changed the sha256 randomly, then ran |
You mean the update with anitya checker worked with www.libsdl.org set as both source url and url template? From what I personally know, with anitya you use the source url and url template accordingly to the specified backend in the release-monitoring page. Since for both SDL2_image and SDL2_ttf the specified backend is Github, you're supposed to use the Github urls. At least that was always the case from my experience looking at many different manifests. But if you say it works with www.libsdl.org, then idk. If you verified that it actually works, I guess you can leave that? |
Yes. |
The runtime in question switched to SDL3 + sdl2-compat and dropped the helper SDL2_* family of libraries. As such, this currently switches to shipping build recipes for them with the project; this should be replaced by using a shared-modules submodule once they're accepted there (see flathub/shared-modules#401).
|
As far as I can tell, SDL3_mixer and SDL3_net are not yet released upstream, so their SDL2 versions are in the new runtime. We use SDL2_mixer too, and my test build succeeded without adding it as a module.
I've thought of that. E.g. it's strange that using the systemwide format libraries is disabled for SDL_image... it would be nice to know the reason, as I assume it must have been important at the time...
I see. Indeed, the releases link on libsdl.org points to github. Will do it. |
The runtime in question switched to SDL3 + sdl2-compat and dropped the helper SDL2_* family of libraries (except for SDL2_mixer and SDL2_net; these will probably be dropped next year). As such, this currently switches to shipping build recipes for them with the project; this should be replaced by using a shared-modules submodule once they're accepted there (see flathub/shared-modules#401).
My bad, the decision to remove only some libraries for the time being is a little counter-intuitive to me, but I suppose it makes sense.
Looking at what Still, I'm more concerned about toggles for image format support, since these are the ones I expect to bite people unexpectedly. |
You may see that all image formats are set to |
I see. Looks like this was changed relatively recently in libsdl-org/SDL_image@542c405. In this case, perhaps enable the related |
Yes, strict may be tried. |
The runtime in question switched to SDL3 + sdl2-compat and dropped the helper SDL2_* family of libraries (except for SDL2_mixer and SDL2_net; these will probably be dropped next year). As such, this currently switches to shipping build recipes for them with the project; this should be replaced by using a shared-modules submodule once they're accepted there (see flathub/shared-modules#401).
To elaborate on
|
download sources from github
Thanks for the investigation and explanation. |
These will be removed from the runtime in 25.08, but are likely required by many SDL2 apps. Feel free to postpone until the new runtime is released.
Tested at: flathub/org.widelands.Widelands#80
I didn't add myself to
CODEOWNERS
because as I see it theSDL1.2
modules don't have a maintainer either, and I don't think I'd be the right person.Actually, I just took the old modules from the
SDL
directory and updated the versions. They just worked as far as I can tell.