318.7. lmms-1.2.2
Pattern-based music production: sequencer, synthesizers, samples and LADSPA effects (Qt 5)
| Version | 1.2.2, release 1 |
| Shelf | studio — Music production: DAWs, audio editors, trackers, drum machines and notation |
| Phase | 44_apps (Applications), 377 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://lmms.io/ |
| Build time | 4.7 SBU |
| Installed size | 32.4 MiB in 3085 files |
| Recipe | ports/core/studio/lmms/kpkgbuild |
About
LMMS is a pattern-based music production program: a song editor, beat and bassline patterns, a piano roll and a mixer, with built-in synthesizers (among them ZynAddSubFX, an emulated NES, SID and OPL2), a sampler, and LADSPA effects. It is built against Qt 5. The bundled ZynAddSubFX editor is drawn with FLTK.
Sources
lmms-1.2.2.tar.xz(21.7 MiB)
sha256b185507fb64ecfd8e31145135b58ab244b637f9efc09c4176caf70aa3cbaae1e
upstream: https://github.com/LMMS/lmms/releases/download/v1.2.2/lmms_1.2.2.tar.xz
archive copy: sources-4/studio--lmms-1.2.2.tar.xz
Dependencies
Depends on: cmake, ninja, pkgconf, qt5-qtbase, qt5-qttools, qt5-qtwayland, libsndfile, libsamplerate, fftw, alsa-lib, libpulse, pipewire, portaudio, lame, libvorbis, libogg, fluidsynth, libgig, stk, libsoundio, sdl12-compat, fltk, cairo, zlib, perl.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
fix-cmake-policy.patch— In the top-levelCMakeLists.txt, sets policiesCMP0026andCMP0050toNEWinstead ofOLD, which CMake 4 refuses (see a policy set to its removed behaviour), and replaces the one read of a target’sLOCATIONproperty (GET_TARGET_PROPERTY(BIN2RES bin2res LOCATION), whichCMP0026NEWforbids) with the generator expression$<TARGET_FILE:bin2res>.
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 lmms'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/studio/lmms.
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/lmms
echo 'b185507fb64ecfd8e31145135b58ab244b637f9efc09c4176caf70aa3cbaae1e lmms-1.2.2.tar.xz' | 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/lmms
SRC=$SRC_ROOT/lmms-1.2.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf lmms-1.2.2.tar.xz -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/fix-cmake-policy.patch"
cmake -S . -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-deprecated-declarations $(pkg-config --cflags cairo)" \
-DFORCE_VERSION=$version \
-DBASHCOMP_PKG_PATH="$PKG/usr/share/bash-completion/completions" \
-DWANT_QT5=ON \
-DWANT_ALSA=ON \
-DWANT_PULSEAUDIO=ON \
-DWANT_PORTAUDIO=ON \
-DWANT_JACK=ON \
-DWANT_WEAKJACK=OFF \
-DWANT_CARLA=OFF \
-DWANT_VST=OFF \
-DWANT_SDL=ON \
-DWANT_SNDIO=OFF \
-DWANT_SOUNDIO=ON \
-DWANT_GIG=ON \
-DWANT_STK=ON \
-DWANT_SF2=ON \
-DWANT_MP3LAME=ON \
-DWANT_OGGVORBIS=ON \
-DWANT_CALF=ON \
-DWANT_CAPS=ON \
-DWANT_CMT=ON \
-DWANT_SWH=ON \
-DWANT_TAP=ON
for _h in LMMS_HAVE_ALSA LMMS_HAVE_PULSEAUDIO LMMS_HAVE_PORTAUDIO LMMS_HAVE_JACK \
LMMS_HAVE_SOUNDIO LMMS_HAVE_SDL LMMS_HAVE_STK; do
grep -qx "#define $_h" build/lmmsconfig.h
done
cmake --build build
DESTDIR=$PKG cmake --install build
cat > "$PKG/usr/share/applications/lmms.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=LMMS
GenericName=Music Production
Comment=Compose music with a pattern sequencer, synthesizers, samples and effects
Exec=lmms %f
Icon=lmms
Terminal=false
StartupWMClass=lmms
Categories=Qt;AudioVideo;Audio;Midi;Sequencer;
MimeType=application/x-lmms-project;
Keywords=music;daw;sequencer;synthesizer;beat;midi;sample;
DESKTOP
chmod 644 "$PKG/usr/share/applications/lmms.desktop"
test -e "$PKG/usr/lib/lmms/libmalletsstk.so"
test -e "$PKG/usr/lib/lmms/libgigplayer.so"
test -f "$PKG/usr/share/bash-completion/completions/lmms"
The switches, and why each is set:
-DCMAKE_CXX_FLAGS— the tree’sCXXFLAGS,-Wno-deprecated-declarations, which silences the deprecation warnings, and$(pkg-config --cflags cairo). The fltk port is built with Cairo, soFL/Fl_Cairo.Hincludes<cairo.h>, which sits in/usr/include/cairo; LMMS finds FLTK through CMake’sFindFLTK, which gives the ZynAddSubFX editor FLTK’s include directory alone (see FLTK’s headers needing Cairo’s). That is also why cairo is independs.-DFORCE_VERSION=$version— the version LMMS reports. Without it the version is read fromgit describewhen git is installed, and a source tarball is not a git checkout.-DBASHCOMP_PKG_PATH="$PKG/usr/share/bash-completion/completions"— where the bash completion script goes. LMMS’s install script writes to this directory directly, withoutDESTDIR, whenever it is writable, so a plain/usr/share/bash-completion/completionswould put the file in the build root instead of the package.build.shchecks that it landed in$PKG.-DWANT_QT5=ON— build against Qt 5; without it, upstream builds against Qt 4.-DWANT_ALSA=ON— andWANT_PULSEAUDIO,WANT_PORTAUDIO,WANT_SOUNDIO,WANT_SDL,WANT_JACK: the audio back ends, through ALSA, PulseAudio, portaudio, libsoundio, SDL 1.2 (sdl12-compat) and JACK, all of which PipeWire serves on KDOS.-DWANT_WEAKJACK=OFF— link JACK directly, against thelibjackthe pipewire port provides, instead of loading its functions withdlsymat run time (upstream’s default).-DWANT_CARLA=OFF— no Carla plugin host; Carla is not a port.-DWANT_VST=OFF— no VST plugin hosting, which LMMS builds against Wine.-DWANT_SNDIO=OFF— no sndio back end; sndio is not a port.-DWANT_GIG=ON— andWANT_STK,WANT_SF2: the GIG sample player on libgig, the Mallets instrument on stk, which loads its samples from STK’s/usr/share/stk/rawwaves/, and the SoundFont player on fluidsynth.-DWANT_MP3LAME=ON— andWANT_OGGVORBIS: MP3 export through lame and Ogg Vorbis export.-DWANT_CALF=ON— andWANT_CAPS,WANT_CMT,WANT_SWH,WANT_TAP: the LADSPA plugin suites LMMS carries in its own tree underplugins/LadspaEffect/.
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/lmms, 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 lmms-1.2.2-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/lmms, and runs the triggers its paths call for.
Contents
Installed programs: lmms.
Installed directories: /usr/include/lmms, /usr/lib/lmms, /usr/share/licenses/lmms, /usr/share/lmms.
Short descriptions
lmms |
software for easy music production |
Notes
Each WANT_* switch asks for its library and, when the library is not found, drops the feature with a status line only. So after the configure, build.sh checks that build/lmmsconfig.h defines LMMS_HAVE_ALSA, LMMS_HAVE_PULSEAUDIO, LMMS_HAVE_PORTAUDIO, LMMS_HAVE_JACK, LMMS_HAVE_SOUNDIO, LMMS_HAVE_SDL and LMMS_HAVE_STK, and after the install that the Mallets and GIG player plugins were installed, so a missing library fails the build. Qt takes the Wayland app id from the program name, lmms, which the recipe’s desktop entry repeats in StartupWMClass.