336.1. celestia-1.7.0.git20260926
Real-time 3D space simulator — fly through the solar system, the stars and the galaxies
| Version | 1.7.0.git20260926, release 1 |
| Shelf | astronomy — Astronomy, planetaria, ephemerides, FITS and satellite prediction |
| Phase | 44_apps (Applications), 8 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://celestiaproject.space/ |
| Build time | 12.0 SBU |
| Installed size | 8.8 MiB in 72 files |
| Recipe | ports/core/astronomy/celestia/kpkgbuild |
About
Celestia is a real-time 3D space simulator: it flies from the planets of the solar system out to the stars and galaxies, at any date, and runs scripted tours. The source is upstream’s git tree at a fixed commit. The package installs two programs over one engine, celestia-qt6 with the full Qt 6 interface and celestia-sdl, a lighter SDL one with a Dear ImGui overlay. The catalogues, textures and models it draws come from celestia-content.
Sources
celestia-1.7.0.git20260926.tar.gz(4.3 MiB)
sha256b8779c69b577cf5ed1a6b2e3f64386d562d03f9ccadc2eccf56c36bf6cbb3bfb
upstream: https://github.com/CelestiaProject/Celestia/archive/57a862dae9fada30ad04d8e93bec68942f5d20b0.tar.gz
archive copy: sources-1/astronomy--celestia-1.7.0.git20260926.tar.gzimgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz(1.8 MiB)
sha256e7881abd9544100f2aa66fcee80e92f18a15b74455c33334613d8c965922c53d
upstream: https://github.com/ocornut/imgui/archive/97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz
archive copy: sources-1/astronomy--imgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gzminiaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.tar.gz(4.3 MiB)
sha2561a3a79b80fc6f0b0cc155e28b954a598e0ddfa2db64e2afa8466be88c476fa55
upstream: https://github.com/mackron/miniaudio/archive/9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.tar.gz
archive copy: sources-1/astronomy--miniaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, qt6-qtbase, qt6-qtwayland, sdl2-compat, libglvnd, libepoxy, eigen, fmt, libpng, libjpeg-turbo, lua, freetype2, icu, boost, gperf, ffmpeg, libavif, imagemagick, ttf-dejavu, celestia-content, cspice.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
app-id.patch— Name each window's Wayland app id after the installed desktop entryQt: set the desktop file name space.celestiaproject.celestia_qt6 before the splash screen, in place of celestia-qt6 after it. SDL: set SDL_APP_ID to space.celestiaproject.celestia_sdl before SDL_Init. Both names are the entries and metainfo launchables Celestia installs.
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 celestia'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/astronomy/celestia.
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/celestia
echo 'b8779c69b577cf5ed1a6b2e3f64386d562d03f9ccadc2eccf56c36bf6cbb3bfb celestia-1.7.0.git20260926.tar.gz' | sha256sum -c -
echo 'e7881abd9544100f2aa66fcee80e92f18a15b74455c33334613d8c965922c53d imgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz' | sha256sum -c -
echo '1a3a79b80fc6f0b0cc155e28b954a598e0ddfa2db64e2afa8466be88c476fa55 miniaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.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/celestia
SRC=$SRC_ROOT/celestia-1.7.0.git20260926
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf celestia-1.7.0.git20260926.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf imgui-97428e8ac99e339ce05eee531cf55b77b29ea709.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf miniaudio-9634bedb5b5a2ca38c1ee7108a9358a4e233f14d.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 _commit, _imgui, _miniaudio and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/app-id.patch"
cp -a "$SRC_ROOT/imgui-$_imgui/." thirdparty/imgui/
cp -a "$SRC_ROOT/miniaudio-$_miniaudio/." thirdparty/miniaudio/
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D ENABLE_QT6=ON \
-D ENABLE_SDL=ON \
-D ENABLE_CELX=ON \
-D ENABLE_FFMPEG=ON \
-D ENABLE_LIBAVIF=ON \
-D ENABLE_MINIAUDIO=ON \
-D ENABLE_NLS=OFF \
-D ENABLE_SPICE=ON \
-D ENABLE_TOOLS=OFF \
-D ENABLE_TESTS=OFF \
-D ENABLE_GLES=OFF \
-D CMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/share/celestia/locale"
ln -sf /usr/share/fonts/TTF/DejaVuSans.ttf "$PKG/usr/share/celestia/fonts/DejaVuSans.ttf"
ln -sf /usr/share/fonts/TTF/DejaVuSans-Bold.ttf "$PKG/usr/share/celestia/fonts/DejaVuSans-Bold.ttf"
install -d "$PKG/usr/share/icons/hicolor/128x128/apps"
magick celestia-logo.png -resize 128x128 \
"$PKG/usr/share/icons/hicolor/128x128/apps/celestia.png"
install -Dm644 /dev/stdin "$PKG/usr/share/mime/packages/kdos-celestia.xml" <<'MIMEXML'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-celestia-script">
<comment>Celestia script</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.cel"/>
<glob pattern="*.celx"/>
</mime-type>
</mime-info>
MIMEXML
rm -f "$PKG"/usr/share/applications/space.celestiaproject.celestia_*.desktop
cat > "$PKG/usr/share/applications/space.celestiaproject.celestia_qt6.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Celestia
GenericName=Space Simulator
Comment=Explore the universe in a detailed 3D space simulation
TryExec=celestia-qt6
Exec=celestia-qt6 %f
Icon=celestia
Terminal=false
StartupWMClass=space.celestiaproject.celestia_qt6
MimeType=application/x-celestia-script;
Categories=Qt;Education;Science;Astronomy;
Keywords=astronomy;space;planets;stars;galaxy;simulator;celestia;
DESKTOP
cat > "$PKG/usr/share/applications/space.celestiaproject.celestia_sdl.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Celestia (SDL)
GenericName=Space Simulator
Comment=Explore the universe, with the light SDL interface
TryExec=celestia-sdl
Exec=celestia-sdl
Path=/usr/share/celestia
Icon=celestia
Terminal=false
StartupWMClass=space.celestiaproject.celestia_sdl
Categories=Education;Science;Astronomy;
Keywords=astronomy;space;planets;stars;galaxy;simulator;celestia;
DESKTOP
chmod 644 "$PKG"/usr/share/applications/space.celestiaproject.celestia_*.desktop
The switches, and why each is set:
-D ENABLE_QT6=ON,-D ENABLE_SDL=ON— Build both front ends; upstream builds neither unless asked.-D ENABLE_CELX=ON— CELX, Celestia’s Lua scripting, used by.celxscripts and add-ons. On by default; named so it cannot drop out.-D CMAKE_DISABLE_FIND_PACKAGE_LuaJIT=ON— With CELX on, Celestia links LuaJIT whenever it finds it and the reference lua otherwise.luajitis a port too, so which one is linked would depend on whether it happened to be installed; this pins the build tolua, the one independs.-D ENABLE_FFMPEG=ON— Video capture of the view, and video files as overlays, through ffmpeg. Off upstream.-D ENABLE_LIBAVIF=ON— AVIF textures through libavif. Off upstream.-D ENABLE_MINIAUDIO=ON— Sound playback for scripts through miniaudio, a single-header library compiled in fromthirdparty/miniaudio. Off upstream.-D ENABLE_SPICE=ON— Read spacecraft and body trajectories from NAIF SPICE kernels with the cspice toolkit, which is then required. Off upstream.-D ENABLE_NLS=OFF— No gettext translation of the interface. kpkg removes every non-English catalogue from the package anyway (see size and language policy).-D ENABLE_TOOLS=OFF,-D ENABLE_TESTS=OFF— Build neither the data-preparation tools nor the unit tests; both are off upstream.-D ENABLE_GLES=OFF— Render through desktop OpenGL 3.3 core rather than OpenGL ES 3.0; upstream’s default.
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/celestia, 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 celestia-1.7.0.git20260926-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/celestia, and runs the triggers its paths call for.
Contents
Installed programs: celestia-qt6, celestia-sdl.
Installed libraries: libcelestia.so.
Installed directories: /usr/share/celestia/fonts, /usr/share/celestia/help, /usr/share/celestia/images, /usr/share/celestia/scripts, /usr/share/celestia/shaders, /usr/share/celestia/splash, /usr/share/licenses/celestia.
Short descriptions
celestia-qt6 |
A real-time visual space simulation |
celestia-sdl |
A real-time visual space simulation |
Notes
app-id.patch gives every window the Wayland app id of the desktop entry it is started from: space.celestiaproject.celestia_qt6 for the Qt interface, set before the splash screen, and space.celestiaproject.celestia_sdl for the SDL one, through the SDL_APP_ID hint. KWin finds a Wayland window’s icon only in the entry whose file name is its app id, and these are the file names upstream’s entries and metainfo launchables use. Unpatched, the Qt interface sets celestia-qt6 only after the splash, and SDL takes the executable’s name.
GitHub’s archive of a commit carries no git submodules, and thirdparty/imgui and thirdparty/miniaudio are submodules. The recipe fetches each at the commit in _imgui and _miniaudio, and build.sh copies them into place before the configure. Those two must be the commits the Celestia tree at _commit pins for its submodules, so a bump of _commit moves them to whatever the new tree pins.
After the install, build.sh:
- removes
/usr/share/celestia/locale, which holds only translations: the key lists (controls_<lang>.txt) and the start, demo and guide scripts (*_<lang>.cel). The system is English only; - replaces the two DejaVu faces upstream bundles in
/usr/share/celestia/fontswith links to the ones ttf-dejavu compiles, so the package carries no font it did not build (see what is built from source); - scales
celestia-logo.pngto a 128-pixel icon inhicolor/128x128/appswith ImageMagick. Upstream installs the logo only as/usr/share/pixmaps/celestia.png, at its own size; - installs
kdos-celestia.xml, which definesapplication/x-celestia-scriptfor*.celand*.celx. Upstream’s desktop entries claim that type, and without a definition in the shared MIME database the claim resolves to nothing (see desktop entries); - writes both desktop entries in place of upstream’s, under upstream’s file names, with
TryExec,StartupWMClassand search keywords. The Qt one is named plainCelestiaand keeps the script type withExec=celestia-qt6 %f. The SDL one,Celestia (SDL), claims no type and passes no file, becausecelestia-sdlreads no command-line argument. It setsPath=/usr/share/celestia:celestia-sdlreadscelestia.cfgfrom the working directory before it changes into its data directory, so started anywhere else it stops on “Error reading configuration file”.