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

331.3. libreoffice-26.8.0.3

Office suite — Writer, Calc, Impress, Draw, Math and Base, with the gtk3, qt6 and kf6 front ends

Version 26.8.0.3, release 1
Shelf office — Office suites, word processors, spreadsheets, presentations, accounting and finance, and office-format import libraries
Phase 44_apps (Applications), 312 of 422 in build order
Licence MPL-2.0 AND LGPL-3.0-or-later
Homepage https://www.libreoffice.org/
Build time 90.5 SBU
Installed size 572.9 MiB in 12131 files
Recipe ports/core/office/libreoffice/kpkgbuild

About

LibreOffice is the office suite: Writer, Calc, Impress, Draw, Math and Base, sharing one runtime under /usr/lib/libreoffice. Like every application it is ported with the toolkits it is written for, and this build carries three front ends: the GTK 3 plugin, the Qt 6 plugin and the KDE Frameworks 6 plugin built on it, which a Plasma session uses. Writer, Calc, Impress, Draw and Math are the programs the shipped file associations open office documents in. It is built from three sources: its own, a separate help tarball, and a vendor bundle of the libraries it builds itself. See Applications bring their own toolkit.

Sources

Dependencies

Depends on: python3, zip, unzip, gettext, libintl, libxml2, libxslt, zlib, bzip2, xz, zstd, expat, curl, openssl, nss, icu, freetype2, harfbuzz, graphite2, fontconfig, cairo, libpng, libjpeg-turbo, libtiff, libwebp, lcms2, openjpeg, libepoxy, glm, hunspell, hyphen, mythes, zxing-cpp, gpgmepp, openldap, postgresql, sqlite, sane-backends, librevenge, libwpd, libwpg, libcdr, libvisio, glib, at-spi2-core, gtk3, qt6-qtbase, qt6-qtmultimedia, kcoreaddons, ki18n, kconfig, kwindowsystem, kio, gstreamer, gst-plugins-base, dbus, cups, libX11, libXext, libICE, libSM, libXrender, libXrandr, libXinerama, libxcb, mesa, hunspell-en, font-liberation, font-carlito, font-caladea.

Required by: no port names it.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

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

What kpkg does

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

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/office/libreoffice
echo '42116e256933aa575974e420ffa04f7cd7096f4b7ca5d0907ddeaf2a07f68f94  libreoffice-26.8.0.3.tar.xz' | sha256sum -c -
echo '8443f21b7127cbd084b472c01ff494ec6a31814f0b1b382004b68103ece90e35  libreoffice-help-26.8.0.3.tar.xz' | sha256sum -c -
echo '4439491fd0dba904603de211d6509495c162cf44a48f52273edbb1cb82041485  libreoffice-vendor-26.8.0.3.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/libreoffice
SRC=$SRC_ROOT/libreoffice-26.8.0.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libreoffice-26.8.0.3.tar.xz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf libreoffice-help-26.8.0.3.tar.xz -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 _series and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

tar -xf "$PORT_SRC/$name-vendor-$version.tar.xz" -C "$SRC_ROOT"

patch -p1 -i "$PORT_SRC/musl-libintl.patch"
patch -p1 -i "$PORT_SRC/musl-stacksize.patch"
patch -p1 -i "$PORT_SRC/sfinae-probe-cxxflags.patch"
patch -p1 -i "$PORT_SRC/externals-ldflags.patch"

export container=kdos-chroot

export QT6DIR=/usr/lib/qt6

PYTHON_CFLAGS=$(pkg-config --cflags python3-embed)
PYTHON_LIBS=$(pkg-config --libs python3-embed)
export PYTHON_CFLAGS PYTHON_LIBS

bash ./configure \
	--prefix=/usr \
	--sysconfdir=/etc \
	--libdir=/usr/lib \
	--mandir=/usr/share/man \
	--localstatedir=/var \
	--disable-dependency-tracking \
	--disable-ccache \
	--enable-release-build \
	--with-vendor=KDOS \
	--with-external-tar="$SRC_ROOT/externals" \
	--disable-fetch-external \
	--with-help=html \
	--without-java \
	--without-junit \
	--without-doxygen \
	--without-lxml \
	--without-krb5 \
	--without-gssapi \
	--disable-odk \
	--disable-online-update \
	--disable-extension-update \
	--disable-breakpad \
	--disable-libcmis \
	--disable-sdremote \
	--disable-sdremote-bluetooth \
	--disable-avahi \
	--disable-dconf \
	--disable-cpdb \
	--disable-skia \
	--disable-eot \
	--disable-coinmp \
	--enable-lpsolve \
	--disable-firebird-sdbc \
	--disable-mariadb-sdbc \
	--enable-postgresql-sdbc \
	--enable-ldap \
	--enable-cups \
	--enable-dbus \
	--enable-gio \
	--enable-randr \
	--enable-opengl \
	--enable-gstreamer-1-0 \
	--enable-pdfimport \
	--enable-pdfium \
	--enable-python=system \
	--enable-gtk3 \
	--disable-gtk4 \
	--enable-qt6 \
	--enable-qt6-multimedia \
	--disable-qt5 \
	--disable-kf5 \
	--enable-kf6 \
	--disable-gtk3-kde5 \
	--disable-introspection \
	--with-tls=nss \
	--without-fonts \
	--without-myspell-dicts \
	--with-system-dicts \
	--with-external-dict-dir=/usr/share/hunspell \
	--with-external-hyph-dir=/usr/share/hyphen \
	--with-external-thes-dir=/usr/share/mythes \
	--with-system-zlib \
	--with-system-bzip2 \
	--with-system-lzma \
	--with-system-zstd=yes \
	--with-system-expat \
	--with-system-libxml \
	--with-system-curl \
	--with-system-openssl \
	--with-system-nss \
	--with-system-icu \
	--with-system-freetype \
	--with-system-fontconfig \
	--with-system-cairo \
	--with-system-libpng \
	--with-system-jpeg \
	--with-system-libtiff \
	--with-system-libwebp \
	--with-system-lcms2 \
	--with-system-openjpeg \
	--with-system-epoxy \
	--with-system-glm \
	--with-system-hunspell \
	--with-system-altlinuxhyph \
	--with-system-mythes \
	--with-system-zxing \
	--with-system-gpgmepp \
	--with-system-openldap \
	--with-system-postgresql \
	--with-system-sqlite3 \
	--with-system-sane \
	--with-system-librevenge \
	--with-system-libwpd \
	--with-system-libwpg \
	--with-system-libcdr \
	--with-system-libvisio \
	--with-system-harfbuzz \
	--with-system-graphite \
	--without-system-boost \
	--without-system-abseil \
	--without-system-poppler \
	--without-system-afdko \
	--without-system-mdds \
	--without-system-orcus \
	--without-system-clucene \
	--without-system-argon2 \
	--without-system-box2d \
	--without-system-liblangtag \
	--without-system-libexttextcat \
	--without-system-libnumbertext \
	--without-system-redland \
	--without-system-xmlsec \
	--without-system-libodfgen \
	--without-system-libepubgen \
	--without-system-libwps \
	--without-system-libmspub \
	--without-system-libmwaw \
	--without-system-libetonyek \
	--without-system-libfreehand \
	--without-system-libebook \
	--without-system-libabw \
	--without-system-libpagemaker \
	--without-system-libqxp \
	--without-system-libzmf \
	--without-system-libstaroffice \
	--without-system-lpsolve \
	--without-system-colamd \
	--without-system-cppunit \
	--without-system-md4c \
	--without-system-dragonbox \
	--without-system-frozen \
	--without-system-fast-float \
	--without-system-libfixmath \
	--without-system-zxcvbn \
	--without-system-odbc

export ENVCFLAGS=-D_LARGEFILE64_SOURCE ENVCFLAGSCXX=-D_LARGEFILE64_SOURCE

make build
make DESTDIR="$PKG" distro-pack-install

find "$PKG" -mindepth 1 -maxdepth 1 -type f -delete

for _e in "$PKG"/usr/share/applications/*.desktop; do
	[ -L "$_e" ] || continue
	_t=$(readlink "$_e")
	rm "$_e"
	cp "$PKG$_t" "$_e"
	chmod 644 "$_e"
done

cat > "$PKG/usr/lib/libreoffice/share/registry/kdos.xcd" <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oor="http://openoffice.org/2001/registry">
<dependency file="main"/>
<oor:component-data oor:package="org.openoffice.Office.UI" oor:name="Infobar">
 <node oor:name="Enabled">
  <prop oor:name="Donate" oor:op="fuse"><value>false</value></prop>
  <prop oor:name="GetInvolved" oor:op="fuse"><value>false</value></prop>
  <prop oor:name="WhatsNew" oor:op="fuse"><value>false</value></prop>
 </node>
</oor:component-data>
<oor:component-data oor:package="org.openoffice.Office" oor:name="Common">
 <node oor:name="Misc">
  <prop oor:name="ShowDonation" oor:op="fuse"><value>false</value></prop>
  <prop oor:name="CrashReport" oor:op="fuse"><value>false</value></prop>
 </node>
</oor:component-data>
<oor:component-data oor:package="org.openoffice" oor:name="Setup">
 <node oor:name="Product">
  <prop oor:name="WhatsNew" oor:op="fuse"><value>false</value></prop>
  <prop oor:name="WhatsNewDialog" oor:op="fuse"><value>false</value></prop>
 </node>
</oor:component-data>
</oor:data>
EOF
chmod 644 "$PKG/usr/lib/libreoffice/share/registry/kdos.xcd"

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/libreoffice, 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 libreoffice-26.8.0.3-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/libreoffice, and runs the triggers its paths call for.

Contents

Installed programs: libreoffice, lobase, localc, lodraw, loffice, lofromtemplate, loimpress, lomath, loweb, lowriter, soffice, unopkg.

Installed directories: /usr/lib/libreoffice, /usr/share/licenses/libreoffice.

Short descriptions

libreoffice LibreOffice office suite
unopkg LibreOffice Extension Manager

Notes

The vendor bundle, libreoffice-vendor-<version>.tar.xz, is every file LibreOffice’s download.lst names, at the name and sha256 that file gives it. build.sh unpacks it into the source root, where --with-external-tar finds it. Which of its tarballs are built is decided by the --with-system-* and --without-system-* flags, so moving a library from one list to the other needs no new source. No tool writes this bundle: on a version bump it is rebuilt by hand from the new download.lst, each *_TARBALL (or *_JAR, *_TTF) with its *_SHA256SUM, fetched from dev-www.libreoffice.org/src or /extern, checked against its sum, placed under externals/ and packed with the vendor tar flags of ports/fetch plus --mode=go-w. See A bundle no tool writes.

sfinae-probe-cxxflags.patch changes the generated configure and not configure.ac. A configure.ac newer than the configuration makes the build rerun autogen.sh, which would regenerate configure without the fix.

make build is the product. Plain make would also run the unit tests.

distro-pack-install leaves its per-module file lists (gid_Module_*) as plain files at the top of DESTDIR, for a distribution that splits the suite into several packages. One package owns every path here, and a file at the top of $PKG would be installed in /, so build.sh deletes them.

The desktop entries in /usr/share/applications are installed as absolute links into /usr/lib/libreoffice/share/xdg. They resolve on the installed system and dangle anywhere else, so the preflight checks of an entry’s name, icon and command would skip every one. build.sh replaces each link with a copy of its target, removing the link first: toybox’s cp follows a link at the destination, and this one leads nowhere inside $PKG.

build.sh writes share/registry/kdos.xcd, settings layered over the defaults and read like any other .xcd in that directory: no donation or get-involved bars, no what’s-new bar or dialog after an upgrade, each of which opens a web page, and no crash-report consent, since no reporter is built.