neverball: convert to toml

This commit is contained in:
Jeremy Soller 2025-06-13 13:19:05 -06:00
parent 71e2295e99
commit eabfac4d69
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
3 changed files with 55 additions and 55 deletions

View File

@ -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
}

View File

@ -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
"""

View File

@ -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) \