Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

323.4. neverball-1.6.0

Neverball and Neverputt — tilt the floor to roll a ball through 3D obstacle courses, and minigolf on the same engine

Version 1.6.0, release 2
Shelf games-action — Action, arcade, racing, platform and sandbox games
Phase 44_apps (Applications), 139 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://neverball.org
Build time 1.8 SBU
Installed size 140.2 MiB in 1384 files
Recipe ports/core/games-action/neverball/kpkgbuild

About

Neverball is a 3D game in which the player tilts the floor to roll a ball through an obstacle course, collecting coins against the clock. Neverputt, a hot-seat minigolf game for up to four players, is built from the same source on the same engine, and mapc compiles the levels of both. The two games draw with OpenGL through SDL2.

Sources

Dependencies

Depends on: sdl2-compat, sdl2-ttf, libvorbis, libpng, libjpeg-turbo, physfs, libglvnd, mesa, pkgconf.

Required by: no port names it.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install neverball'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/games-action/neverball.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/games-action/neverball
echo '73fe63cca4f96e2d355480d03bc0b2904e83a0abdf65fe8c52db5cc3cca88fa0  neverball-1.6.0.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/neverball
SRC=$SRC_ROOT/neverball-1.6.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf neverball-1.6.0.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

mk() {
	make \
		CFLAGS="$CFLAGS -fcommon" \
		SDL_CPPFLAGS="$(pkg-config --cflags sdl2)" \
		SDL_LIBS="$(pkg-config --libs sdl2)" \
		PNG_CPPFLAGS="$(pkg-config --cflags libpng)" \
		PNG_LIBS="$(pkg-config --libs libpng)" \
		OGL_LIBS=-lOpenGL \
		ENABLE_NLS=0 \
		DATADIR=/usr/share/neverball \
		"$@"
}
mk neverball neverputt mapc
mk sols

install -Dm755 neverball "$PKG/usr/bin/neverball"
install -Dm755 neverputt "$PKG/usr/bin/neverputt"
install -Dm755 mapc "$PKG/usr/bin/neverball-mapc"
install -Dm644 dist/neverball.6 "$PKG/usr/share/man/man6/neverball.6"
install -Dm644 dist/neverputt.6 "$PKG/usr/share/man/man6/neverputt.6"
install -Dm644 dist/mapc.1 "$PKG/usr/share/man/man1/neverball-mapc.1"

install -d "$PKG/usr/share/neverball"
cp -R data/. "$PKG/usr/share/neverball/"
find "$PKG/usr/share/neverball" -name '*.map' -delete
chmod -R a+rX "$PKG/usr/share/neverball"

for s in 16 24 32 48 64 128 256 512; do
	install -Dm644 dist/neverball_$s.png \
		"$PKG/usr/share/icons/hicolor/${s}x$s/apps/neverball.png"
	install -Dm644 dist/neverputt_$s.png \
		"$PKG/usr/share/icons/hicolor/${s}x$s/apps/neverputt.png"
done

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/neverball.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Neverball
GenericName=Ball-rolling Game
Comment=Tilt the floor to roll a ball through obstacle courses
Exec=neverball
Icon=neverball
Terminal=false
StartupWMClass=neverball
Categories=Game;ArcadeGame;
Keywords=ball;tilt;arcade;3d;neverball;
DESKTOP
cat > "$PKG/usr/share/applications/neverputt.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Neverputt
GenericName=Minigolf Game
Comment=Hot-seat minigolf for up to four players
Exec=neverputt
Icon=neverputt
Terminal=false
StartupWMClass=neverputt
Categories=Game;SportsGame;
Keywords=golf;minigolf;putt;neverputt;
DESKTOP
chmod 644 "$PKG/usr/share/applications/"*.desktop

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/neverball, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf neverball-1.6.0-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/neverball, and runs the triggers its paths call for.

Contents

Installed programs: neverball, neverball-mapc, neverputt.

Installed directories: /usr/share/licenses/neverball, /usr/share/neverball.

Short descriptions

neverball 3D floor-tilting game
neverball-mapc A map compiler for Neverball and Neverputt
neverputt 3D miniature golf game

Notes

Only the programs and the compiled levels are built: make neverball neverputt mapc, then make sols, which runs mapc over every .map level source in data/ and writes the compiled .sol beside it. build.sh then copies data/ whole and deletes the .map files, which nothing reads once the levels are compiled. mapc is installed as neverball-mapc, with its manual page renamed to match. The makefile’s desktops target, which translates upstream’s desktop entries, is not run; build.sh writes both entries itself, and each window’s Wayland app id is SDL’s default, the executable’s name, which is what StartupWMClass names.