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

336.2. stellarium-26.2

Planetarium — a realistic sky in 3D, as seen with the eye, binoculars or a telescope

Version 26.2, release 1
Shelf astronomy — Astronomy, planetaria, ephemerides, FITS and satellite prediction
Phase 44_apps (Applications), 9 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://stellarium.org/
Build time 22.2 SBU
Installed size 481.3 MiB in 2997 files
Recipe ports/core/astronomy/stellarium/kpkgbuild

About

Stellarium is a planetarium: it draws the sky as it looks from any place on Earth at any time, to the eye, through binoculars or through a telescope, with its stars, planets, deep-sky objects and the sky cultures of many peoples. It is a Qt 6 program with OpenGL rendering and a set of plugins built into it, among them telescope control, satellites, oculars and a lens distortion estimator.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtdeclarative, qt6-qtsvg, qt6-qtcharts, qt6-qtmultimedia, qt6-qtspeech, qt6-qtpositioning, qt6-qtserialport, qt6-qttools, qt6-qtimageformats, qt6-qtwayland, exiv2, gpsd, nlopt, zlib, python3, noto-fonts, ttf-dejavu, onetbb.

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

What kpkg does

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

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/astronomy/stellarium
echo '9a068d00aac82151f2b24c7f278847a2f9416f31f17c0326fc56ee4cc4cb1aed  stellarium-26.2.tar.xz' | sha256sum -c -
echo '27dad1aa0e477b43990f6cbbfb30988f417a6f3629c880c397574ae17bfb4b34  stellarium-qxlsx-9f545935a1effa0144ba76598e95a7597210553a.zip' | sha256sum -c -
echo 'c3941d803ce94228cef0e74da1b72e2135ba2ea80c97f72f7e5056cdbb595536  stellarium-indi-2.1.3.zip' | sha256sum -c -
echo '55d0111d48fb11883aaee91465e642b8b640775a4d6993c2d0e7a8092758ef21  md4c-0.5.2.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/stellarium
SRC=$SRC_ROOT/stellarium-26.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf stellarium-26.2.tar.xz -C "$SRC" --strip-components=1
cp stellarium-qxlsx-9f545935a1effa0144ba76598e95a7597210553a.zip "$SRC"
cp stellarium-indi-2.1.3.zip "$SRC"
tar --no-same-permissions --warning=no-unknown-keyword -xf md4c-0.5.2.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 _qxlsx, _indi, _md4c and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

cmake -E chdir "$SRC_ROOT" cmake -E tar xf "$SRC/stellarium-qxlsx-$_qxlsx.zip"
cmake -E chdir "$SRC_ROOT" cmake -E tar xf "$SRC/stellarium-indi-$_indi.zip"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D STELLARIUM_RELEASE_BUILD=1 \
	-D ENABLE_TESTING=0 \
	-D ENABLE_CCACHE=0 \
	-D ENABLE_PODIR=0 \
	-D ENABLE_SHOWMYSKY=0 \
	-D ENABLE_QTWEBENGINE=0 \
	-D ENABLE_GPS=1 \
	-D ENABLE_MEDIA=1 \
	-D ENABLE_SPEECH=1 \
	-D ENABLE_XLSX=1 \
	-D ENABLE_INDI=1 \
	-D USE_PLUGIN_ONLINEQUERIES=0 \
	-D PREFER_SYSTEM_INDILIB=0 \
	-D CMAKE_REQUIRE_FIND_PACKAGE_GPS=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_exiv2=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_NLopt=ON \
	-D CPM_QXlsxQt6_SOURCE="$SRC_ROOT/QXlsx-$_qxlsx" \
	-D CPM_indiclient_SOURCE="$SRC_ROOT/indi-$_indi" \
	-D CPM_md4c_SOURCE="$SRC_ROOT/md4c-release-$_md4c" \
	-D FETCHCONTENT_FULLY_DISCONNECTED=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

data="$PKG/usr/share/stellarium/data"
ln -sf /usr/share/fonts/noto/NotoSans-Regular.ttf "$data/NotoSans-Regular.ttf"
ln -sf /usr/share/fonts/noto/NotoSansMono-Regular.ttf "$data/NotoSansMono-Regular.ttf"
ln -sf /usr/share/fonts/TTF/DejaVuSans.ttf "$data/DejaVuSans.ttf"
ln -sf /usr/share/fonts/TTF/DejaVuSansMono.ttf "$data/DejaVuSansMono.ttf"

rm -f "$PKG/usr/share/applications/org.stellarium.Stellarium.desktop"
cat > "$PKG/usr/share/applications/org.stellarium.stellarium.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Stellarium
GenericName=Planetarium
Comment=A realistic sky in 3D, as seen with the eye, binoculars or a telescope
TryExec=stellarium
Exec=stellarium --startup-script=%f
Icon=stellarium
Terminal=false
StartupWMClass=org.stellarium.stellarium
MimeType=application/x-stellarium-script;
Categories=Qt;Education;Science;Astronomy;
Keywords=astronomy;planetarium;sky;stars;planets;constellation;telescope;stellarium;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.stellarium.stellarium.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/stellarium, 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 stellarium-26.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/stellarium, and runs the triggers its paths call for.

Contents

Installed programs: stellarium.

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

Short descriptions

stellarium A real-time realistic planetarium

Notes

The three extra sources are the versions Stellarium’s own CMake names in its CPMAddPackage and CPMFindPackage calls, with the same SHA-256 sums, so a Stellarium bump has to move _qxlsx, _indi and _md4c to whatever the new release names. kpkg unpacks a later tarball into $SRC_ROOT by itself, which is where md4c comes from; a zip is not a tarball and is only copied into $SRC, so build.sh unpacks the QXlsx and INDI zips into $SRC_ROOT with cmake -E tar.

After the install, four of the faces upstream ships in /usr/share/stellarium/data (Noto Sans, Noto Sans Mono, DejaVu Sans and DejaVu Sans Mono) are replaced with links to the same faces from noto-fonts and ttf-dejavu. The fifth, NotoSansSC-Regular.otf, ships as upstream built it (see what is built from source). Upstream’s org.stellarium.Stellarium.desktop is replaced by org.stellarium.stellarium.desktop, with StartupWMClass=org.stellarium.stellarium, TryExec and search keywords. The file name and the class are org.stellarium.stellarium because that is the Wayland app id Qt gives the window: the organisation domain stellarium.org reversed, then the executable’s name. The entry keeps upstream’s Exec=stellarium --startup-script=%f and drops its desktop actions.