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

318.3. musescore-4.7.5

MuseScore Studio — music notation: write, play back, print and export scores, with the MS Basic soundfont

Version 4.7.5, release 2
Shelf studio — Music production: DAWs, audio editors, trackers, drum machines and notation
Phase 44_apps (Applications), 373 of 422 in build order
Licence GPL-3.0-only AND MIT
Homepage https://musescore.org/
Build time 46.5 SBU
Installed size 207.4 MiB in 771 files
Recipe ports/core/studio/musescore/kpkgbuild

About

MuseScore Studio is a music notation program: scores are written on the staff, played back with a built-in synthesiser, and printed or exported as PDF, MusicXML, MIDI and audio. The interface is Qt 6 and QML on upstream’s “muse” framework, which Audacity 4 also uses. The package installs the program as mscore with a musescore link beside it, and ships the MS Basic soundfont that playback uses.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, gzip, qt6-qtbase, qt6-qtdeclarative, qt6-qtsvg, qt6-qtshadertools, qt6-qt5compat, qt6-qtnetworkauth, qt6-qttools, qt6-qtwayland, alsa-lib, pipewire, flac, opus, libopusenc, lame, harfbuzz, freetype2, pugixml, utfcpp, nlohmann-json.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

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 musescore'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/studio/musescore.

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/musescore
echo 'b9db52e139e925adfc56e3ab59244f44da4db7e5e133d5084c5da5dfc3dfb9d1  musescore-4.7.5.tar.gz' | sha256sum -c -
echo '308b413cf8288e872715fcdede0ec8504693f7bbadcc50bd5969ed7ea1d35baa  mnxdom-488aa8757ec602c20ff8cf599a2c6857339d8e93.tar.gz' | sha256sum -c -
echo '36d7e99a73aa6076834736f0fb108fa8e232c4739aa4b3e2089fe96efb21fa8d  json-schema-validator-40af3ec39670e768fc3f01f935140af311d71024.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/musescore
SRC=$SRC_ROOT/musescore-4.7.5
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf musescore-4.7.5.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf mnxdom-488aa8757ec602c20ff8cf599a2c6857339d8e93.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf json-schema-validator-40af3ec39670e768fc3f01f935140af311d71024.tar.gz -C "$SRC_ROOT"

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 recipe’s helpers _mnxdom, _jsv 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-destdir-symlinks.patch"
patch -p1 -i "$PORT_SRC/wayland-platform.patch"

export CXXFLAGS="$CXXFLAGS -D_LARGEFILE64_SOURCE"
cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D CMAKE_SKIP_RPATH=ON \
	-D FETCHCONTENT_FULLY_DISCONNECTED=ON \
	-D FETCHCONTENT_SOURCE_DIR_MNXDOM="$SRC_ROOT/mnxdom-$_mnxdom" \
	-D FETCHCONTENT_SOURCE_DIR_JSON_SCHEMA_VALIDATOR="$SRC_ROOT/json-schema-validator-$_jsv" \
	-D USE_SYSTEM_NLOHMANN_JSON=ON \
	-D USE_SYSTEM_JSON_SCHEMA_VALIDATOR=OFF \
	-D mnxdom_BUILD_TESTING=OFF \
	-D JSON_VALIDATOR_BUILD_TESTS=OFF \
	-D JSON_VALIDATOR_BUILD_EXAMPLES=OFF \
	-D JSON_VALIDATOR_INSTALL=OFF \
	-D MUSESCORE_BUILD_CONFIGURATION=app \
	-D MUSE_APP_BUILD_MODE=release \
	-D MUSE_ENABLE_UNIT_TESTS=OFF \
	-D MUSE_COMPILE_USE_COMPILER_CACHE=OFF \
	-D MUSE_COMPILE_USE_UNITY=OFF \
	-D MUSE_MODULE_UPDATE=OFF \
	-D MUSE_MODULE_CLOUD=OFF \
	-D MUSE_MODULE_LEARN=OFF \
	-D MUSE_MODULE_MUSESAMPLER=OFF \
	-D MUE_BUILD_MUSESOUNDS_MODULE=OFF \
	-D MUE_BUILD_MUSESOUNDS_QML=ON \
	-D MUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT=OFF \
	-D MUSE_MODULE_VST=OFF \
	-D MUSE_MODULE_AUDIO_JACK=OFF \
	-D MUSE_MODULE_AUDIO_PIPEWIRE=ON \
	-D MUE_DOWNLOAD_SOUNDFONT=OFF \
	-D MUE_INSTALL_SOUNDFONT=ON \
	-D MUE_RUN_LRELEASE=OFF \
	-D MUE_COMPILE_USE_SYSTEM_FLAC=ON \
	-D MUE_COMPILE_USE_SYSTEM_OPUS=ON \
	-D MUE_COMPILE_USE_SYSTEM_OPUSENC=ON \
	-D MUE_COMPILE_USE_SYSTEM_LAME=ON \
	-D MUE_COMPILE_USE_SYSTEM_HARFBUZZ=ON \
	-D MUE_COMPILE_USE_SYSTEM_FREETYPE=ON \
	-D MUE_COMPILE_USE_SYSTEM_PUGIXML=ON \
	-D MUE_COMPILE_USE_SYSTEM_UTF8CPP=ON \
	-D MUE_COMPILE_USE_SYSTEM_MNXDOM=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

rm -rf "$PKG/usr/include" "$PKG/usr/lib/pkgconfig"
find "$PKG/usr/lib" -name '*.a' -delete

find "$PKG/usr/share" -path '*/locale/*.qm' -delete

cat > "$PKG/usr/share/applications/org.musescore.MuseScore.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=MuseScore Studio
GenericName=Music Notation
Comment=Create, play and print sheet music
TryExec=mscore
Exec=mscore %U
Icon=mscore
Terminal=false
StartupNotify=true
StartupWMClass=org.musescore.MuseScore
MimeType=application/x-musescore;application/x-musescore+xml;application/vnd.recordare.musicxml;application/vnd.recordare.musicxml+xml;application/x-mei+xml;application/x-bww;application/x-biab;application/x-capella;audio/x-gtp;application/x-musedata;application/x-overture;audio/x-ptb;application/x-tef;
Categories=AudioVideo;Audio;Midi;Sequencer;Music;Publishing;Qt;
Keywords=music;notation;composition;composing;arranging;sheet music;score;scorewriter;midi;musicxml;musescore;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.musescore.MuseScore.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/musescore, 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 musescore-4.7.5-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/musescore, and runs the triggers its paths call for.

Contents

Installed programs: mscore, musescore.

Installed directories: /usr/share/licenses/musescore, /usr/share/mscore-4.7.

Short descriptions

mscore MuseScore 4 sheet music editor

Notes

After the install, build.sh deletes /usr/include, /usr/lib/pkgconfig and every static archive under /usr/lib: they come from mnxdom’s own install rules, a static library, its headers and a mnxdom.pc that nothing on the system links against.

The recipe writes its own org.musescore.MuseScore.desktop. MuseScore sets its desktop file name to org.musescore.MuseScore, which is its Wayland app id and the entry’s StartupWMClass. The entry claims MuseScore’s score formats and the notation formats it imports, and leaves MIDI files and soundfonts to the players and synthesisers.