From cf129b2e861555ee12a95f02a1595b51cfe65456 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Sun, 9 Nov 2025 14:20:37 +0700 Subject: [PATCH] Fix some games --- recipes/demos/sdl2-gears/recipe.toml | 17 ++++------ .../games/action/openlara/assets/README.md | 2 ++ recipes/wip/games/action/openlara/recipe.toml | 17 +++++++++- .../wip/games/open-world/veloren/recipe.toml | 4 ++- .../wip/games/racing/supertuxkart/recipe.toml | 7 ++-- .../wip/games/racing/supertuxkart/redox.patch | 15 +++++++++ recipes/wip/games/space/osirion/recipe.toml | 2 -- recipes/wip/games/syobonaction/recipe.sh | 33 ------------------- recipes/wip/games/syobonaction/recipe.toml | 26 +++++++++++++++ 9 files changed, 74 insertions(+), 49 deletions(-) create mode 100644 recipes/wip/games/action/openlara/assets/README.md create mode 100644 recipes/wip/games/racing/supertuxkart/redox.patch delete mode 100644 recipes/wip/games/syobonaction/recipe.sh create mode 100644 recipes/wip/games/syobonaction/recipe.toml diff --git a/recipes/demos/sdl2-gears/recipe.toml b/recipes/demos/sdl2-gears/recipe.toml index bbe89f0ec..04ef051f6 100644 --- a/recipes/demos/sdl2-gears/recipe.toml +++ b/recipes/demos/sdl2-gears/recipe.toml @@ -4,17 +4,14 @@ dependencies = [ "sdl2-image", "sdl2-mixer", "sdl2-ttf", - "llvm18", ] script = """ DYNAMIC_INIT -cp "${COOKBOOK_SOURCE}/../gears.c" ./gears.c -rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/../assets" ./assets -${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS gears.c -o sdl2_gears \ - -dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital \ - $("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz -rm -rf "${COOKBOOK_STAGE}/usr/games/sdl2_gears" -mkdir -pv "${COOKBOOK_STAGE}/usr/games/sdl2_gears" -cp -v "sdl2_gears" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/sdl2_gears" -cp -rv "assets" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/assets" +mkdir -p "${COOKBOOK_STAGE}/usr/games/sdl2_gears" +${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS ${COOKBOOK_RECIPE}/gears.c \ + -o sdl2_gears -dynamic \ + -lSDL2_image -lSDL2_mixer -lSDL2_ttf $("${PKG_CONFIG}" --libs osmesa) \ + -lSDL2 -lorbital -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz +cp -rv "${COOKBOOK_RECIPE}/assets" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/" +cp -v sdl2_gears "${COOKBOOK_STAGE}/usr/games/sdl2_gears/" """ diff --git a/recipes/wip/games/action/openlara/assets/README.md b/recipes/wip/games/action/openlara/assets/README.md new file mode 100644 index 000000000..3979e4944 --- /dev/null +++ b/recipes/wip/games/action/openlara/assets/README.md @@ -0,0 +1,2 @@ + +To make assets working, purchase from https://www.gog.com/en/game/tomb_raider_123, then add 'audio', 'level', and 'video' to this folder. Additional info can be read from https://github.com/XProger/OpenLara/pull/414/files diff --git a/recipes/wip/games/action/openlara/recipe.toml b/recipes/wip/games/action/openlara/recipe.toml index 5f7318e79..4985f980e 100644 --- a/recipes/wip/games/action/openlara/recipe.toml +++ b/recipes/wip/games/action/openlara/recipe.toml @@ -1,5 +1,20 @@ -#TODO lacking a build system +#TODO: Compiled, not tested further [source] git = "https://github.com/XProger/OpenLara" + [build] template = "custom" +dependencies = [ + "sdl2", +] +script = """ +DYNAMIC_INIT +SRC="${COOKBOOK_SOURCE}/src" +mkdir -p "${COOKBOOK_STAGE}/usr/games/OpenLara" +${CXX} "-I${COOKBOOK_SYSROOT}/include" "-I$SRC/" ${LDFLAGS} -DSDL2_GLES -D_GAPI_GLES2 -std=c++11 \ + -O3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wl,--gc-sections -DNDEBUG -D__SDL2__ \ + -dynamic -lSDL2 -lGLESv2 -lEGL $("${PKG_CONFIG}" --libs osmesa) -o OpenLara \ + $SRC/platform/sdl2/main.cpp "$SRC/libs/stb_vorbis/stb_vorbis.c" "$SRC/libs/minimp3/minimp3.cpp" "$SRC/libs/tinf/tinflate.c" +cp -rv "${COOKBOOK_RECIPE}/assets" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/" +cp OpenLara ${COOKBOOK_STAGE}/usr/games/OpenLara/OpenLara +""" diff --git a/recipes/wip/games/open-world/veloren/recipe.toml b/recipes/wip/games/open-world/veloren/recipe.toml index 55216f399..0265a9d8b 100644 --- a/recipes/wip/games/open-world/veloren/recipe.toml +++ b/recipes/wip/games/open-world/veloren/recipe.toml @@ -1,8 +1,10 @@ -#TODO make all dependencies work +#TODO quinn-udp crate error [source] git = "https://github.com/veloren/veloren" +shallow = true [build] template = "cargo" +package_path="client" dependencies = [ "glib", "cairo", diff --git a/recipes/wip/games/racing/supertuxkart/recipe.toml b/recipes/wip/games/racing/supertuxkart/recipe.toml index c10bc8501..5ee6ff3c3 100644 --- a/recipes/wip/games/racing/supertuxkart/recipe.toml +++ b/recipes/wip/games/racing/supertuxkart/recipe.toml @@ -1,12 +1,15 @@ -#TODO not compiled or tested +#TODO requires ifaddrs.h # build instructions: https://github.com/supertuxkart/stk-code/blob/master/INSTALL.md#compiling [source] -tar = "https://github.com/supertuxkart/stk-code/releases/download/1.4/SuperTuxKart-1.4-src.tar.xz" +tar = "https://github.com/supertuxkart/stk-code/releases/download/1.5/SuperTuxKart-1.5-src.tar.gz" [build] template = "cmake" cmakeflags = [ "-DNO_SHADERC=ON", + "-DUSE_WIIUSE=OFF", + "-DUSE_DNS_C=ON", "-DBUILD_RECORDER=OFF", + "-DPTHREAD_LIBRARY=/dev/null" ] dependencies = [ "openal", diff --git a/recipes/wip/games/racing/supertuxkart/redox.patch b/recipes/wip/games/racing/supertuxkart/redox.patch new file mode 100644 index 000000000..cd42e2d90 --- /dev/null +++ b/recipes/wip/games/racing/supertuxkart/redox.patch @@ -0,0 +1,15 @@ +diff -ruwN source/src/guiengine/widgets/spinner_widget.cpp source-new/src/guiengine/widgets/spinner_widget.cpp +--- source/src/guiengine/widgets/spinner_widget.cpp 2025-10-20 04:04:17.000000000 +0700 ++++ source-new/src/guiengine/widgets/spinner_widget.cpp 2025-11-09 11:29:52.678400188 +0700 +@@ -493,10 +493,7 @@ + } + else + { +- std::wstringstream ws; +- ws << (m_value*m_step); +- std::wstring text = ws.str(); +- m_children[1].m_element->setText( text.c_str() ); ++ m_children[1].m_element->setText( stringw(m_value*m_step).c_str() ); + } + } + } diff --git a/recipes/wip/games/space/osirion/recipe.toml b/recipes/wip/games/space/osirion/recipe.toml index 5f982c2dd..b8707c179 100644 --- a/recipes/wip/games/space/osirion/recipe.toml +++ b/recipes/wip/games/space/osirion/recipe.toml @@ -10,8 +10,6 @@ dependencies = [ "libpng", "libjpeg", "sdl2", - "mesa", - "mesa-glu", "openal", "libvorbis", ] diff --git a/recipes/wip/games/syobonaction/recipe.sh b/recipes/wip/games/syobonaction/recipe.sh deleted file mode 100644 index dc2b7a3bd..000000000 --- a/recipes/wip/games/syobonaction/recipe.sh +++ /dev/null @@ -1,33 +0,0 @@ -VERSION=1.0-rc3 -GIT=https://github.com/angelXwind/OpenSyobonAction -BUILD_DEPENDS=(sdl1 liborbital sdl1-mixer sdl1-image sdl-gfx sdl1-ttf freetype2 libjpeg libpng zlib libogg libvorbis) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export SDL_CONFIG="${PKG_CONFIG} sdl" - export CPPFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib --static" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - mkdir -pv "$1/bin" - mkdir -pv "$1/share/syobonaction" - cp -Rv ./SyobonAction "$1/bin/syobonaction" - cp -Rv ./BGM "$1/share/syobonaction" - cp -Rv ./res "$1/share/syobonaction" - cp -Rv ./SE "$1/share/syobonaction" - skip=1 -} diff --git a/recipes/wip/games/syobonaction/recipe.toml b/recipes/wip/games/syobonaction/recipe.toml new file mode 100644 index 000000000..576a90103 --- /dev/null +++ b/recipes/wip/games/syobonaction/recipe.toml @@ -0,0 +1,26 @@ +[source] +git = "https://github.com/angelXwind/OpenSyobonAction" +patches = [ + "01_redox.patch" +] + +[build] +template = "custom" +dependencies = [ + "sdl1-mixer", + "sdl1-image", + "sdl-gfx", + "sdl1-ttf", +] +script = """ +DYNAMIC_INIT +export LDFLAGS="$LDFLAGS -lorbital" +rsync -a --delete "${COOKBOOK_SOURCE}/" ./ +make +mkdir -pv "${COOKBOOK_STAGE}/usr/bin" +mkdir -pv "${COOKBOOK_STAGE}/usr/share/syobonaction" +cp -Rv ./SyobonAction "${COOKBOOK_STAGE}/usr/bin/syobonaction" +cp -Rv ./BGM "${COOKBOOK_STAGE}/usr/share/syobonaction" +cp -Rv ./res "${COOKBOOK_STAGE}/usr/share/syobonaction" +cp -Rv ./SE "${COOKBOOK_STAGE}/usr/share/syobonaction" +"""