Skip to content

SDL: migrate to SDL3 via sdl2-compat and add SDL3 Doom#140

Merged
dangowrt merged 9 commits into
openwrt:masterfrom
dangowrt:sdl3-transition
Jun 11, 2026
Merged

SDL: migrate to SDL3 via sdl2-compat and add SDL3 Doom#140
dangowrt merged 9 commits into
openwrt:masterfrom
dangowrt:sdl3-transition

Conversation

@dangowrt

@dangowrt dangowrt commented Jun 9, 2026

Copy link
Copy Markdown
Member

📦 Package Details

Maintainer: @dangowrt

Description:

Migrate the SDL stack from SDL2 to SDL3 while keeping existing SDL2 consumers building:

  • add sdl3 (libsdl3, with installed-tests)
  • add sdl2-compat (libsdl2-compat, only PROVIDES libsdl2) on top of SDL3 and drop the standalone sdl2 package, so SDL2 consumers resolve to the compat layer
  • keep sdl2-mixer (2.8.2) and sdl2-image on the SDL2 line via the compat layer; build sdl2-image against the system libpng/libjpeg/libtiff/libwebp
  • add the SDL3-native sdl3-mixer (3.2.4) and sdl3-image (3.4.4)
  • add sdl3-doom (raydelto/sdl3_doom), the first real SDL3 application, replacing the orphaned sdl2-doom

The sdl3-doom port carries nine patches porting both audio backends to the SDL3_mixer 3.2 MIX_* API, sharing a single mixer device, building the sound-effect module, restoring the Chocolate DOOM OPL backend for authentic FM music (no soundfont needed) and fixing a status-bar crash. These are suitable to submit upstream.


🧪 Run Testing Details

sdl3 and sdl3-doom were run-tested on x86_64 (Arch Linux build host): SDL3 Doom runs and plays with authentic OPL FM music and sound effects. The remaining packages in this PR are compile-tested only on mediatek/filogic (aarch64_cortex-a53).

  • OpenWrt Version: snapshot
  • OpenWrt Target/Subtarget: mediatek/filogic (compile); x86_64 host (sdl3 / sdl3-doom run test)
  • OpenWrt Device:

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc.
  • It is structured in a way that it is potentially upstreamable

@dangowrt dangowrt requested a review from blogic June 9, 2026 18:03
dangowrt added 2 commits June 10, 2026 00:27
Core Simple DirectMedia Layer 3 library, the base for the SDL2 to SDL3
transition. CMake build with the same backend selection as the SDL2
package (KMSDRM, Wayland, Vulkan, OpenGL/ES, ALSA and PulseAudio with
dlopen, HIDAPI, dummy video/audio; X11 and dbus off). Provides
libSDL3.so and the SDL3 development files, plus a libsdl3-tests package
with the upstream installed-tests (SDL_INSTALL_TESTS).

https://github.com/libsdl-org/SDL/releases/tag/release-3.4.10
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The SDL2 library is now provided by the sdl2-compat package built on top
of SDL3, so the standalone SDL2 2.32.x package is no longer needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
dangowrt added 5 commits June 10, 2026 02:09
sdl2-compat implements the SDL2 API on top of SDL3, shipping the
libSDL2-2.0 shared library and SDL2 development files. The package is
named libsdl2-compat and only PROVIDES libsdl2, so existing SDL2
consumers resolve to it without a package name collision while the
single SDL3 build backs both APIs.

https://github.com/libsdl-org/sdl2-compat/releases/tag/release-2.32.70
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Stay on the SDL2 line (libSDL2_mixer), now built against the sdl2-compat
layer. 2.8.2 is the current latest SDL2-targeting SDL_mixer release; the
SDL3-native line is packaged separately as sdl3-mixer.

https://github.com/libsdl-org/SDL_mixer/releases/tag/release-2.8.2
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SDL3-native image loading library (libSDL3_image), built directly
against SDL3 so it coexists with sdl2-image's libSDL2_image. PNG, JPEG,
TIFF and WebP are handled by the libpng, libjpeg, libtiff and libwebp
packages, listed as dependencies so the cross-built target libraries
are used instead of host libraries; the bundled stb backend is disabled.

https://github.com/libsdl-org/SDL_image/releases/tag/release-3.4.4
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Build PNG, JPEG, TIFF and WebP support against the libpng, libjpeg,
libtiff and libwebp packages rather than the bundled stb_image backend.
Listing them as dependencies ensures the cross-built target libraries
are picked up instead of host libraries.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
SDL3-native audio mixer library (libSDL3_mixer), built directly against
SDL3 so it coexists with sdl2-mixer's libSDL2_mixer. MIDI, Opus, WavPack
and MOD support via libfluidsynth, libopusfile, libwavpack and libxmp.

https://github.com/libsdl-org/SDL_mixer/releases/tag/release-3.2.4
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
dangowrt added 2 commits June 10, 2026 21:25
A source port of DOOM to SDL3 (raydelto/sdl3_doom), the first real SDL3
application in the feed, replacing the orphaned sdl2-doom. It builds
against libsdl3 and libsdl3-mixer and plays authentic OPL FM music from
the IWAD's GENMIDI lump, needing no soundfont.

The upstream port targets an early SDL3_mixer prerelease (Mix_* API,
removed in SDL_mixer 3.2.0) and had dropped the OPL music backend. Carry
nine patches: port both audio backends to the track-based MIX_* API,
share a single mixer device, link the exported SDL3 CMake targets, build
the sound-effect module (FEATURE_SOUND), restore the Chocolate DOOM OPL
backend for native FM music, fix a pre-existing status-bar crash and drop
the stale SDL2_mixer cmake module. These are also suitable to submit
upstream.

https://github.com/raydelto/sdl3_doom
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The orphaned sdl2-doom port is superseded by sdl3-doom, which targets SDL3 directly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@dangowrt dangowrt merged commit b59c3b5 into openwrt:master Jun 11, 2026
6 of 11 checks passed
@dangowrt dangowrt deleted the sdl3-transition branch June 11, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant