mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-19 11:24:18 +08:00
Merge branch 'master' of https://gitlab.redox-os.org/redox-os/cookbook
This commit is contained in:
commit
c8ae88ea91
4
recipes/games/quakespasm/manifest
Normal file
4
recipes/games/quakespasm/manifest
Normal file
@ -0,0 +1,4 @@
|
||||
name=QuakeSpasm
|
||||
category=Games
|
||||
binary=/usr/games/quakespasm
|
||||
icon=/ui/icons/apps/quakespasm.png
|
||||
48
recipes/games/quakespasm/recipe.toml
Normal file
48
recipes/games/quakespasm/recipe.toml
Normal file
@ -0,0 +1,48 @@
|
||||
# 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
|
||||
"""
|
||||
110
recipes/games/quakespasm/redox.patch
Normal file
110
recipes/games/quakespasm/redox.patch
Normal file
@ -0,0 +1,110 @@
|
||||
diff '--color=auto' -rupwN source/Makefile source-new/Makefile
|
||||
--- source/Makefile 2024-10-15 21:21:14.824589882 -0400
|
||||
+++ source-new/Makefile 2024-10-16 00:42:27.651948743 -0400
|
||||
@@ -4,28 +4,34 @@
|
||||
# "make SDL_CONFIG=/path/to/sdl-config" for unusual SDL installations.
|
||||
# "make DO_USERDIRS=1" to enable user directories support
|
||||
|
||||
+# Base install directory
|
||||
+DESTDIR ?= "/"
|
||||
+INSTALLDIR = "${DESTDIR}/usr/games/"
|
||||
+DATADIR = "${DESTDIR}/usr/share/games/quake1/id1/"
|
||||
+ICODIR = "${DESTDIR}/ui/icons/apps/"
|
||||
+
|
||||
# Enable/Disable user directories support
|
||||
-DO_USERDIRS=0
|
||||
+DO_USERDIRS ?= 0
|
||||
|
||||
### Enable/Disable SDL2
|
||||
-USE_SDL2=0
|
||||
+USE_SDL2 ?= 0
|
||||
|
||||
### Enable/Disable codecs for streaming music support
|
||||
-USE_CODEC_WAVE=1
|
||||
-USE_CODEC_FLAC=0
|
||||
-USE_CODEC_MP3=1
|
||||
-USE_CODEC_VORBIS=1
|
||||
-USE_CODEC_OPUS=0
|
||||
+USE_CODEC_WAVE ?= 1
|
||||
+USE_CODEC_FLAC ?= 0
|
||||
+USE_CODEC_MP3 ?= 1
|
||||
+USE_CODEC_VORBIS ?= 1
|
||||
+USE_CODEC_OPUS ?= 0
|
||||
# either xmp or mikmod (or modplug)
|
||||
-USE_CODEC_MIKMOD=0
|
||||
-USE_CODEC_XMP=0
|
||||
-USE_CODEC_MODPLUG=0
|
||||
-USE_CODEC_UMX=0
|
||||
+USE_CODEC_MIKMOD ?= 0
|
||||
+USE_CODEC_XMP ?= 0
|
||||
+USE_CODEC_MODPLUG ?= 0
|
||||
+USE_CODEC_UMX ?= 0
|
||||
|
||||
# which library to use for mp3 decoding: mad or mpg123
|
||||
-MP3LIB=mad
|
||||
+MP3LIB ?= mad
|
||||
# which library to use for ogg decoding: vorbis or tremor
|
||||
-VORBISLIB=vorbis
|
||||
+VORBISLIB ?= vorbis
|
||||
|
||||
# ---------------------------
|
||||
# Helper functions
|
||||
@@ -35,7 +41,7 @@ check_gcc = $(shell if echo | $(CC) $(1)
|
||||
|
||||
# ---------------------------
|
||||
|
||||
-HOST_OS = $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
|
||||
+HOST_OS ?= $(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
@@ -49,7 +55,7 @@ LINKER = $(CC)
|
||||
STRIP ?= strip
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
-CPUFLAGS=
|
||||
+CPUFLAGS ?=
|
||||
LDFLAGS?=
|
||||
DFLAGS ?=
|
||||
CFLAGS ?= -Wall -Wno-trigraphs -MMD
|
||||
@@ -81,11 +87,19 @@ endif
|
||||
|
||||
ifeq ($(USE_SDL2),1)
|
||||
SDL_CONFIG ?= sdl2-config
|
||||
+SDL_VERSION = sdl2
|
||||
else
|
||||
SDL_CONFIG ?= sdl-config
|
||||
+SDL_VERSION = sdl
|
||||
endif
|
||||
+
|
||||
+ifeq ($(HOST_OS),redox)
|
||||
+SDL_CFLAGS = $(shell $(PKG_CONFIG) --cflags $(SDL_VERSION))
|
||||
+SDL_LIBS = $(shell $(PKG_CONFIG) --libs $(SDL_VERSION))
|
||||
+else
|
||||
SDL_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
|
||||
SDL_LIBS = $(shell $(SDL_CONFIG) --libs)
|
||||
+endif
|
||||
|
||||
NET_LIBS =
|
||||
ifeq ($(HOST_OS),sunos)
|
||||
@@ -164,6 +178,8 @@ endif
|
||||
|
||||
ifeq ($(HOST_OS),haiku)
|
||||
COMMON_LIBS= -lGL
|
||||
+else ifeq ($(HOST_OS),redox)
|
||||
+COMMON_LIBS= -lorbital $(shell $(PKG_CONFIG) --libs osmesa zlib)
|
||||
else
|
||||
COMMON_LIBS= -lGL -lm
|
||||
endif
|
||||
@@ -290,7 +306,10 @@ install: quakespasm
|
||||
cp quakespasm.pak $(QS_APP_DIR)
|
||||
else
|
||||
install: quakespasm
|
||||
- cp quakespasm /usr/local/games/quake
|
||||
+ mkdir -p "${INSTALLDIR}" "${DATADIR}" "${ICODIR}"
|
||||
+ cp quakespasm "${INSTALLDIR}/quakespasm"
|
||||
+ # xxx Probably requires resizing
|
||||
+ cp Misc/QuakeSpasm_512.png "${ICODIR}/quakespasm.png"
|
||||
endif
|
||||
|
||||
sinclude $(OBJS:.o=.d)
|
||||
3
recipes/wip/games/fps/quake1-shareware/manifest
Normal file
3
recipes/wip/games/fps/quake1-shareware/manifest
Normal file
@ -0,0 +1,3 @@
|
||||
name=Quake shareware
|
||||
category=Games
|
||||
binary=/usr/games/quakespasm -basedir /use/share/games/quake/
|
||||
1
recipes/wip/games/fps/quake1-shareware/pak0.pak.sha
Normal file
1
recipes/wip/games/fps/quake1-shareware/pak0.pak.sha
Normal file
@ -0,0 +1 @@
|
||||
35a9c55e5e5a284a159ad2a62e0e8def23d829561fe2f54eb402dbc0a9a946af /mnt/games1/home/steam_games/steamapps/common/Quake/id1/PAK0.PAK
|
||||
1
recipes/wip/games/fps/quake1-shareware/quake106.zip.sha
Normal file
1
recipes/wip/games/fps/quake1-shareware/quake106.zip.sha
Normal file
@ -0,0 +1 @@
|
||||
ec6c9d34b1ae0252ac0066045b6611a7919c2a0d78a3a66d9387a8f597553239 quake106.zip
|
||||
24
recipes/wip/games/fps/quake1-shareware/recipe.toml
Normal file
24
recipes/wip/games/fps/quake1-shareware/recipe.toml
Normal file
@ -0,0 +1,24 @@
|
||||
# TODO:
|
||||
# * Requires unarchivers
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = ["lhasa", "unzrip"]
|
||||
script = """
|
||||
curl -O "https://github.com/Jason2Brownlee/QuakeOfficialArchive/raw/refs/heads/main/bin/quake106.zip"
|
||||
sha256sum -c quake106.zip.sha
|
||||
|
||||
# The zip file contains a DOS installer which we don't need
|
||||
# The actual demo content is within another archive
|
||||
7z x quake106.zip
|
||||
|
||||
# Actual game contents
|
||||
lha xv resource.1
|
||||
sha256sum -c pak0.pak.sha
|
||||
|
||||
# Now, the ID1 folder contains PAK0, the demo file
|
||||
# Non-Windows/non-DOS systems expect the directory and file to be lowercased
|
||||
OUT_DIR = "${COOKBOOK_STAGE}/usr/share/games/quake/id1/"
|
||||
mkdir -p "${OUT_DIR}"
|
||||
cp -v ID1/PAK0.PAK "${OUT_DIR}/pak0.pak"
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user