diff --git a/recipes/games/neverball/recipe.sh b/recipes/games/neverball/recipe.sh deleted file mode 100644 index 39a3e5f5c..000000000 --- a/recipes/games/neverball/recipe.sh +++ /dev/null @@ -1,54 +0,0 @@ -VERSION=1.6.0 -TAR="https://neverball.org/neverball-${VERSION}.tar.gz" -BUILD_DEPENDS=(freetype2 libjpeg libogg liborbital libpng libvorbis llvm18 mesa sdl2 sdl2-ttf zlib) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - set -x - env -i \ - LDFLAGS="-static -ljpeg -lpng16 -lz" \ - PATH="/usr/bin:/bin" \ - PKG_CONFIG="pkg-config" \ - "$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio mapc sols - sysroot="$(realpath ../sysroot)" - export CPPFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib -static -z noexecstack" - "$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio ENABLE_NLS=0 clean-src - "$REDOX_MAKE" -j"$($NPROC)" ENABLE_FS=stdio ENABLE_NLS=0 neverball neverputt - set +x - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - - # Create install directories - mkdir -pv "${dest}/usr/games/neverball" "${dest}/ui/apps" "${dest}/ui/icons/apps" - - # Copy assets - cp -rv data "${dest}/usr/games/neverball" - - # For each game - for bin in neverball neverputt - do - # Install binary - "${STRIP}" -v "${bin}" -o "${dest}/usr/games/neverball/${bin}" - - # Install manifest - cp -v "${COOKBOOK_RECIPE}/manifest-${bin}" "${dest}/ui/apps/${bin}" - - # Install icon - cp -v "dist/${bin}_64.png" "${dest}/ui/icons/apps/${bin}.png" - done - - skip=1 -} diff --git a/recipes/games/neverball/recipe.toml b/recipes/games/neverball/recipe.toml new file mode 100644 index 000000000..718156a18 --- /dev/null +++ b/recipes/games/neverball/recipe.toml @@ -0,0 +1,54 @@ +[source] +tar = "https://neverball.org/neverball-1.6.0.tar.gz" +blake3 = "74f3b68595f475e89fd2ca8b5fc349837ff36fbbe141f321dfc232dbf8fccf51" +patches = ["redox.patch"] + +[build] +dependencies = [ + "freetype2", + "libjpeg", + "libogg", + "liborbital", + "libpng", + "libvorbis", + "llvm18", + "mesa", + "sdl2", + "sdl2-ttf", + "zlib", +] +template = "custom" +script = """ +DYNAMIC_INIT + +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ + +env -i \ + LDFLAGS="-static -ljpeg -lpng16 -lz" \ + PATH="/usr/bin:/bin" \ + PKG_CONFIG="pkg-config" \ +"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio mapc sols + +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -z noexecstack" +"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 clean-src +"${COOKBOOK_MAKE}" -j"${COOKBOOK_MAKE_JOBS}" ENABLE_FS=stdio ENABLE_NLS=0 neverball neverputt + +# Create install directories +mkdir -pv "${COOKBOOK_STAGE}/usr/games/neverball" "${COOKBOOK_STAGE}/ui/apps" "${COOKBOOK_STAGE}/ui/icons/apps" + +# Copy assets +cp -rv data "${COOKBOOK_STAGE}/usr/games/neverball" + +# For each game +for bin in neverball neverputt +do + # Install binary + "${STRIP}" -v "${bin}" -o "${COOKBOOK_STAGE}/usr/games/neverball/${bin}" + + # Install manifest + cp -v "${COOKBOOK_RECIPE}/manifest-${bin}" "${COOKBOOK_STAGE}/ui/apps/${bin}" + + # Install icon + cp -v "dist/${bin}_64.png" "${COOKBOOK_STAGE}/ui/icons/apps/${bin}.png" +done +""" diff --git a/recipes/games/neverball/redox.patch b/recipes/games/neverball/redox.patch index 6bc6dd4b0..7457ccff7 100644 --- a/recipes/games/neverball/redox.patch +++ b/recipes/games/neverball/redox.patch @@ -52,7 +52,7 @@ diff -ruwN neverball-1.6.0/Makefile source/Makefile -OGG_LIBS := -lvorbisfile -TTF_LIBS := -lSDL2_ttf -+OGG_LIBS := $(shell $(PKG_CONFIG) vorbisfile --libs) ++OGG_LIBS := $(shell $(PKG_CONFIG) ogg vorbis vorbisfile --libs) +TTF_LIBS := $(shell $(PKG_CONFIG) SDL2_ttf --libs) -lfreetype ALL_LIBS := $(HMD_LIBS) $(TILT_LIBS) $(INTL_LIBS) $(TTF_LIBS) \