redox/recipes/games/quakespasm/recipe.toml
Josh Megnauth facbbc8846
package(games): QuakeSpasm, a Quake 1 source port
QuakeSpasm is a simple source port that primarily focuses on bug fixes
and backwards compatibility.

Its build system is a small Makefile which required a few patches in
order to compile on Redox. Currently, it compiles with both SDL1 and
SDL2. MP3 support is hard disabled since neither `libmad` nor `mpg123`
would compile. However, the default OGG container and Vorbis decoder
compiles fine.

Like Doom, Quake requires commercial assets or free replications in
order to run. I'm currently trying to write a small recipe for the
shareware files, but ironically that has more blockers than the source
port itself.

Beyond the lack of content, I think this port is good to go.
2024-10-16 23:17:51 -04:00

49 lines
1.2 KiB
TOML

# TODO: Promote
# Version: 0.96.3
# Version date: 31-July-2024
[source]
git = "https://github.com/sezero/quakespasm"
rev = "cc32abe09ed417ce3be10af300d2dc2f686349ba"
patches = ["redox.patch"]
[build]
template = "custom"
dependencies = [
"llvm18",
"libiconv",
"libogg",
"liborbital",
"libvorbis",
"mesa",
# "sdl1",
"sdl2",
"zlib",
]
script = """
# Skip configuring because QuakeSpasm uses a custom build system
COOKBOOK_CONFIGURE="true"
COOKBOOK_CONFIGURE_FLAGS=""
# Ensure the build system is aware of Redox
# The build system uses sdl-config for Unix, but SDL recommends using pkg-config
export HOST_OS="redox"
export PKG_CONFIG="${TARGET}-pkg-config"
# Config options for the Makefile. Set as necessary (see Makefile).
# MP3 is disabled because libmad doesn't compile at the moment
# Other options weren't tested, but SDL and SDL2 both compile fine
export USE_SDL2=1
export USE_CODEC_MP3=0
export DO_USERDIRS=1
# Source is in Quake/ and icons are in Misc/
rsync -av --delete "${COOKBOOK_SOURCE}/Quake/" "${COOKBOOK_SOURCE}/Misc" ./
# According to frantic grepping, the Redox build system doesn't apply patches to git
git apply "${COOKBOOK_RECIPE}/redox.patch"
cookbook_configure
"""