Debian Patches
Status for rockdodger/1.1.4-5
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| Makefile.diff | Makefile adjustments for Debian integration | Martin A. Godisch <godisch@debian.org> | no | |||
| make-shuffle.diff | Fix FTBFS with make --shuffle=random The generated header config.h is included by almost every source file (via globals.h), but no object file declares an explicit dependency on it. On a clean build the -MMD .d files do not exist yet, so make has no way to know about that dependency and only happens to generate config.h first because it is the left-most prerequisite of the $(EXENAME) rule. With "make --shuffle=random" the prerequisite order is randomised, so an object can be compiled before config.h exists, aborting the build with "fatal error: config.h: No such file or directory". . Declare the dependency explicitly so config.h is always generated before any object is compiled, regardless of evaluation order. |
Martin A. Godisch <godisch@debian.org> | no | debian | ||
| sdl2-port.diff | Port from SDL 1.2 to SDL 2 SDL 1.2 is unmaintained and is being replaced in Debian by sdl12-compat. This ports Rock Dodger to SDL 2 natively. . The game draws by poking pixels straight into a single "video surface" and then flipping it, an SDL 1.2 model that SDL 2 no longer provides. To keep the ~6500 lines of game logic untouched, a small shim (sdlport.h) is added: set_video_mode() now creates a window, an accelerated renderer (with vsync) and a streaming RGB565 texture, while surf_screen stays an ordinary 16bpp software surface that the game keeps drawing into. rd_flip() uploads that surface to the texture and presents it via SDL_RenderCopy(). Fullscreen uses SDL_WINDOW_FULLSCREEN, i.e. a real video mode switch to the game's fixed resolution (as SDL 1.2 did), which keeps the framebuffer rendered 1:1 and preserves the crisp text of the original. . The shim also re-implements the handful of SDL 1.2 surface calls dropped by SDL 2 (SDL_DisplayFormat, the SDL_SRCALPHA/SDL_SRCCOLORKEY variants of SDL_SetAlpha/SDL_SetColorKey, the SDL_HWSURFACE/SDL_SWSURFACE creation flags) so the call sites stay almost identical. Keyboard handling moves from the removed SDL_GetKeyState (keysym-indexed) to SDL_GetKeyboardState (scancode-indexed) via a KEYDOWN() macro that maps keycodes back to scancodes, preserving the original layout-aware behaviour. Text entry of high-score names moves from SDL_EnableUNICODE to SDL_TextInput events. Build now links against SDL2, SDL2_image and SDL2_mixer. |
Martin A. Godisch <godisch@debian.org> | no | debian | ||
| ftbr-compiledate.diff | make build reproducible Remove COMPILEDATE in order to build reproducibly. Also drop the now-unused COMPILEDATE definition (and the date(1) call computing it) from the Makefile, so no timestamp is computed or passed to the compiler at all. |
Martin A. Godisch <godisch@debian.org> | no | |||
| harden-runtime-paths.diff | Harden runtime path and string handling Defensive fixes found during a QA/security review; none is known to be remotely exploitable, but the binary is installed setgid "games", so robustness against a hostile environment and crafted data files matters. . 1. hs_fopen()/save_setup()/load_setup() passed getenv("HOME") straight to snprintf("%s", ...). When HOME is unset this is a NULL "%s" argument (undefined behaviour). Only use the per-user fallback path when HOME is actually set. 2. display_version_n_text() and display_highscores() formatted a data-file edition name and the on-disk high-score names with sprintf() into fixed stack buffers. The inputs are length-capped elsewhere, but switch to snprintf() so the bound is enforced at the point of use. |
Martin A. Godisch <godisch@debian.org> | no | |||
| desktop-entry-polish.diff | Polish the .desktop entry GenericName should be a short generic class name, not a copy of the long Comment. Also add a Keywords entry to improve menu search. |
Martin A. Godisch <godisch@debian.org> | no |
