wolf: fix ti99sim-sdl build — it needs real SDL 1.2, not SDL2
Confirmed live: the previous sdl-config shim got past the tooling problem, but hit a much deeper one — ti99sim's SDL frontend (src/sdl/main.cpp) is written against the actual SDL 1.2 API and uses symbols SDL2 genuinely removed (SDL_keysym, SDL_WM_SetCaption, SDL_EnableUNICODE, SDL_JoystickOpened, the old integer-index SDL_JoystickName). No shim can paper over missing symbols — this needed the real thing. Swapped libsdl2-dev + the hand-rolled sdl-config shim for libsdl1.2-compat-dev — the SDL project's own official compatibility package (libsdl-org/sdl12-compat, packaged in Ubuntu's universe repo): genuine SDL 1.2 headers and its own real sdl-config, implemented on top of actual SDL2 underneath. The code compiles against the API it was actually written for, while still running on modern SDL2 at runtime. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6
This commit is contained in:
+13
-21
@@ -1003,32 +1003,24 @@ XMLEOF
|
||||
# it (copies to /opt/ti99sim/bin, symlinks into
|
||||
# /usr/local/bin), so use that instead of guessing the exact
|
||||
# build subpath.
|
||||
# ti99sim's own Makefile.linux calls the old SDL 1.x `sdl-config`
|
||||
# tool, which no longer exists — modern libsdl2-dev ships only
|
||||
# pkg-config .pc files (and sometimes sdl2-config, itself already
|
||||
# a thin wrapper over pkg-config). Confirmed live: without this,
|
||||
# every sdl-config call silently returns nothing, so the compile
|
||||
# gets no -I/-L flags at all and fails on "SDL.h: No such file or
|
||||
# directory" — not a real incompatibility, just a stale tool
|
||||
# name. A tiny shim mapping the handful of flags this build
|
||||
# actually uses (--cflags/--libs/--version) onto pkg-config sdl2
|
||||
# fixes it without patching the project's own Makefiles.
|
||||
# ti99sim's SDL frontend (src/sdl/main.cpp) is written against
|
||||
# the real SDL 1.2 API, not SDL2 — confirmed live: compiling
|
||||
# against libsdl2-dev fails outright on symbols SDL2 genuinely
|
||||
# removed (SDL_keysym, SDL_WM_SetCaption, SDL_EnableUNICODE,
|
||||
# SDL_JoystickOpened, the old integer-index SDL_JoystickName),
|
||||
# not a tooling/config problem a shim can paper over. The actual
|
||||
# fix: libsdl1.2-compat-dev, the SDL project's own official
|
||||
# compatibility package (libsdl-org/sdl12-compat) — real SDL 1.2
|
||||
# headers and its own sdl-config, implemented on top of real
|
||||
# SDL2 underneath, so the code compiles against the API it
|
||||
# actually expects while still running on modern SDL2 at
|
||||
# runtime. Packaged in Ubuntu's universe repo.
|
||||
if docker run --rm -u root --entrypoint /bin/bash \
|
||||
-v "$GAME_STORAGE_DIR/emulators:/output" \
|
||||
ghcr.io/games-on-whales/es-de:edge -c '
|
||||
set -e
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq git build-essential libsdl2-dev pkgconf ca-certificates
|
||||
cat > /usr/local/bin/sdl-config << "SDLCFG"
|
||||
#!/bin/sh
|
||||
case "$1" in
|
||||
--cflags) exec pkg-config sdl2 --cflags ;;
|
||||
--libs) exec pkg-config sdl2 --libs ;;
|
||||
--version) exec pkg-config sdl2 --modversion ;;
|
||||
*) exec pkg-config sdl2 --cflags --libs ;;
|
||||
esac
|
||||
SDLCFG
|
||||
chmod +x /usr/local/bin/sdl-config
|
||||
apt-get install -y -qq git build-essential libsdl1.2-compat-dev ca-certificates
|
||||
git clone -q https://github.com/billzajac/ti99sim.git /tmp/ti99sim
|
||||
cd /tmp/ti99sim
|
||||
make
|
||||
|
||||
Reference in New Issue
Block a user