318.12. milkytracker-1.06
Fast Tracker II–style music tracker for XM and MOD files, on SDL2
| Version | 1.06, release 1 |
| Shelf | studio — Music production: DAWs, audio editors, trackers, drum machines and notation |
| Phase | 44_apps (Applications), 382 of 422 in build order |
| Licence | GPL-3.0-or-later AND BSD-3-Clause |
| Homepage | https://milkytracker.org |
| Build time | 0.7 SBU |
| Installed size | 4.5 MiB in 14 files |
| Recipe | ports/core/studio/milkytracker/kpkgbuild |
About
MilkyTracker is a music tracker in the style of Fast Tracker II: it composes and plays XM and MOD modules, with Fast Tracker II’s screen layout and keys. It draws its interface itself on SDL2 (sdl2-compat), plays through ALSA (and so PipeWire) and SDL, and takes MIDI input through rtmidi.
Sources
milkytracker-1.06.tar.gz(3.7 MiB)
sha2566e70590dfed324e6d6ac813e33d9f9dcfaa13b2f57fdec9e178e9dda05538cb0
upstream: https://github.com/milkytracker/MilkyTracker/archive/refs/tags/v1.06.tar.gz
archive copy: sources-4/studio--milkytracker-1.06.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, sdl2-compat, alsa-lib, rtmidi, zlib, lhasa, zziplib.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
milkytracker-cmake4.patch— Deletescmake_policy(SET CMP0004 OLD)from the top-levelCMakeLists.txt, a workaround for a bug in SDL2 releases older than 2.0.5. CMake 4 refusesOLDfor that policy and stops the configure (see a policy set to its removed behaviour), and the tree’s SDL2, sdl2-compat, is a later release than the bug affects.
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 milkytracker'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/studio/milkytracker.
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/studio/milkytracker
echo '6e70590dfed324e6d6ac813e33d9f9dcfaa13b2f57fdec9e178e9dda05538cb0 milkytracker-1.06.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/milkytracker
SRC=$SRC_ROOT/milkytracker-1.06
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf milkytracker-1.06.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:
patch -p1 -i "$PORT_SRC/milkytracker-cmake4.patch"
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_DISABLE_FIND_PACKAGE_JACK=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_LHASA=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_ZZIPLIB=ON
ninja
DESTDIR=$PKG ninja install
cd ..
install -Dm644 resources/pictures/carton.png \
"$PKG/usr/share/icons/hicolor/128x128/apps/milkytracker.png"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/milkytracker.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=MilkyTracker
GenericName=Music Tracker
Comment=Compose music in the Fast Tracker II style
TryExec=milkytracker
Exec=milkytracker %f
Icon=milkytracker
Terminal=false
StartupWMClass=milkytracker
Categories=AudioVideo;Audio;Sequencer;Music;
Keywords=tracker;fasttracker;module;xm;mod;music;
DESKTOP
chmod 644 "$PKG/usr/share/applications/milkytracker.desktop"
The switches, and why each is set:
-DCMAKE_DISABLE_FIND_PACKAGE_JACK=ON— never look for JACK. On Linux the CMakeLists callsfind_package(JACK)and builds the JACK output whenever it is found; the pipewire port installs alibjack, so without this switch the result would depend on what the build root holds.-DCMAKE_REQUIRE_FIND_PACKAGE_LHASA=ON— and-DCMAKE_REQUIRE_FIND_PACKAGE_ZZIPLIB=ON: MilkyTracker opens modules packed in LHA and ZIP archives through lhasa and zziplib, and its CMakeLists looks for both as optional. Required, a missing one stops the configure instead of building a tracker that cannot open those archives (see a graphical application).
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/milkytracker, 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 milkytracker-1.06-1.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/milkytracker, and runs the triggers its paths call for.
Contents
Installed programs: milkycli, milkytracker.
Installed directories: /usr/share/doc/MilkyTracker, /usr/share/licenses/milkytracker, /usr/share/milkytracker.
Notes
MIDI support is built only when the configure finds ALSA and RtMidi, and it is not required: a missing rtmidi prints MIDI support disabled (RtMidi unavailable) and builds a tracker with no MIDI input.
Upstream installs the program, its documents and example songs, but no icon or desktop entry. The recipe installs resources/pictures/carton.png, upstream’s 128-pixel icon, as the milkytracker icon, and writes its own desktop entry. SDL names the window after the program, milkytracker, which the entry repeats in StartupWMClass. The source tree’s own resources/milkytracker.desktop, which the install does not copy, claims the MOD and XM types; the recipe’s entry claims none.