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
libreoffice-26.8.0.3.tar.xz(288.2 MiB)
sha25642116e256933aa575974e420ffa04f7cd7096f4b7ca5d0907ddeaf2a07f68f94
upstream: https://download.documentfoundation.org/libreoffice/src/26.8.0/libreoffice-26.8.0.3.tar.xz
archive copy: sources-3/office--libreoffice-26.8.0.3.tar.xzlibreoffice-help-26.8.0.3.tar.xz(51.0 MiB)
sha2568443f21b7127cbd084b472c01ff494ec6a31814f0b1b382004b68103ece90e35
upstream: https://download.documentfoundation.org/libreoffice/src/26.8.0/libreoffice-help-26.8.0.3.tar.xz
archive copy: sources-3/office--libreoffice-help-26.8.0.3.tar.xzlibreoffice-vendor-26.8.0.3.tar.xz(812.0 MiB)
sha2564439491fd0dba904603de211d6509495c162cf44a48f52273edbb1cb82041485
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-3/office--libreoffice-vendor-26.8.0.3.tar.xz
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.
--without-lxml, line 43: python3-lxml (explained with the switches below)--without-krb5, line 44: krb5 (explained with the switches below)--without-gssapi, line 45: krb5--disable-avahi, line 53: avahi--disable-dconf, line 54: dconf (explained with the switches below)--disable-gtk4, line 74: gtk4 (explained with the switches below)--disable-qt5, line 77: qt5-qtbase
Patches
build.sh applies these; kpkg applies nothing by itself.
externals-ldflags.patch— adds gbuild’s external-project link flags, which begin with$(LDFLAGS), to the link of six bundled libraries: to theLDFLAGSthat the build recipes of libetonyek, liblangtag, raptor, rasqal and redland set to little more than the$ORIGINrun path, and to theCCthat lp_solve’s recipe passes its build script. Without the patch the six are linked without the tree’s link flags, among them-z now, whose absence the package lint reports.musl-libintl.patch— adds-lintlto the libraries ofunotools. Thelibintl.hof gettext renamesbindtextdomaintolibintl_bindtextdomain, which musl does not define, sounotools, which calls it, does not link without the library.musl-stacksize.patch— replaces the platform test insal/osl/unx/thread.cxxwith#if 1, sosalsets the stack size of every thread it creates, 1 MiB in an optimised build. Upstream does that on Linux only in builds without runtime optimisations; otherwise a thread gets the C library’s default, which on musl is 128 KiB, and the parser and layout threads overflow it.sfinae-probe-cxxflags.patch— corrects the-Wsfinae-incompleteprobe inconfigure, which saves$CFLAGSand restores it as$CXXFLAGS. Without the patch every later C++ probe passes the tree’s-std=gnu11tog++and, under-Werror, fails, and the C++20 probe stops configure.
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:
container=kdos-chroot— LibreOffice’s top-level Makefile refuses to run as root unless$containeris set. The chroot build runs as root.PYTHON_CFLAGS=$(pkg-config --cflags python3-embed)— withPYTHON_LIBS, exported before configure: the compile and link flags for embedding Python in pyuno. Unless both are set, configure asks Python’sdistutilsfor them, which the Python standard library does not have.--enable-release-build— Mark the build as a release rather than a development build. Upstream notes that the choice is independent of symbols, debug information and optimisation.--with-vendor=KDOS— The vendor of the build.--with-external-tar="$SRC_ROOT/externals",--disable-fetch-external— Find the bundled third-party tarballs inexternals/, which is where the vendor bundle unpacks, and never download one: a file missing from the bundle is a build error.--with-help=html— Build the help as local HTML pages from the help tarball, which unpacks ashelpcontent2inside the source tree, where configure looks for it.--without-java,--without-junit— No Java components, and so none of the parts written in Java: the HSQLDB embedded database, the report builder, and the BeanShell and Rhino script providers.--without-junitdrops the JUnit tests, which need Java anyway.--without-doxygen,--disable-odk— No Office Development Kit, the SDK that extensions are built against, and no Doxygen run for its C and C++ documentation.--without-lxml— Thegla11yaccessibility check of the UI files runs without Python’s lxml, so it reports only widget classes and ids and never builds a local copy of lxml.--without-krb5,--without-gssapi— No Kerberos 5 or GSSAPI authentication in the modules that support it. configure enables both when it finds a usable system library.--disable-online-update,--disable-extension-update— No update check for LibreOffice itself and no update of installed extensions. Software on KDOS is updated bykpkg.--disable-breakpad— No crash reporter.--disable-libcmis— No CMIS connectors to remote document stores. libcmis is not a port.--disable-sdremote,--disable-sdremote-bluetooth,--disable-avahi— No Impress remote control server, neither over the network nor over Bluetooth, and no Avahi advertisement of it.--disable-dconf— No dconf configuration backend; settings stay in LibreOffice’s own registry in the user profile.--disable-cpdb— No Common Print Dialog Backends support; printing goes through CUPS. cpdb-libs is not a port.--disable-skia— Do not build Skia. The GTK 3 and Qt 6 plugins draw through cairo and Qt; only the plain X11 backend would use Skia.--disable-eot— No Embedded OpenType font support. Its library, libeot, is not a port.--disable-coinmp,--enable-lpsolve— Calc’s Solver uses lp_solve, built from the bundle, and not the CoinMP solver.--disable-firebird-sdbc,--disable-mariadb-sdbc,--enable-postgresql-sdbc— Base has no embedded database: Firebird is not proven on musl and not a port, and with Java off there is no HSQLDB either. It connects to PostgreSQL, LDAP and file sources (dBase, CSV, spreadsheets); there is no MariaDB or MySQL driver.--enable-ldap,--enable-cups,--enable-dbus,--enable-gio,--enable-randr,--enable-opengl,--enable-gstreamer-1-0— LDAP address books and directory sources, printing through CUPS, the D-Bus features (screensaver control in a presentation, among them), GIO file access, RandR in the X11 code, OpenGL support, and media playback through GStreamer.--enable-pdfimport,--enable-pdfium— Open a PDF in Draw for editing, and build the PDFium copy from the bundle, which LibreOffice uses to render PDFs and to verify PDF signatures. Without PDFium, upstream warns, signature verification is insecure.--enable-python=system— Scripting and pyuno against the system python3, not a Python built from the bundle.--enable-gtk3,--enable-qt6,--enable-qt6-multimedia,--enable-kf6— The three front ends (VCL plugins), with media playback inside the Qt 6 plugin through Qt Multimedia. The KF6 plugin is the Qt 6 one with KDE Frameworks’ file dialogs and settings, and LibreOffice picks it by itself in a Plasma session, so Open and Save show the same dialog as every KDE application. It links kcoreaddons, ki18n, kconfig, kwindowsystem and kio;configurefinds them by theKF6/KIOFileWidgets/KFileWidgetheader under/usr/include.--disable-gtk4,--disable-qt5,--disable-kf5,--disable-gtk3-kde5— No GTK 4 plugin, no Qt 5 plugin, no plugin integrating with KDE Frameworks 5, and no GTK 3 plugin with KDE file dialogs.--disable-introspection— Generate no GObject introspection files.--with-tls=nss— nss for TLS and cryptography in LibreOffice’s own code, which also restricts its use of OpenSSL. NSS is upstream’s default.--without-fonts— Do not install the fonts LibreOffice bundles. The recipe depends on font-liberation, font-carlito and font-caladea instead, the metric-compatible faces documents most often ask for.--without-myspell-dicts,--with-system-dicts— Bundle no dictionaries and use the system’s.--with-external-dict-dir=/usr/share/hunspell,--with-external-hyph-dir=/usr/share/hyphen,--with-external-thes-dir=/usr/share/mythes— Where those are: the spelling dictionaries of hunspell-en, and the hyphenation patterns and thesauri directories of hyphen and mythes.--with-system-zlib— and every other--with-system-*flag: link the library the tree builds as a port, not the copy in the bundle. Each one is a port LibreOffice accepts at any release.--with-system-zstd=yesis the same switch with its value spelled out.--without-system-boost— and every other--without-system-*flag: build the library from the bundle. Most of these are not ports. Boost, abseil, poppler, mdds and orcus are, but LibreOffice pins their C++ APIs to the releases itsdownload.lstnames, so their bundled copies are used. Argon2, colamd and the ODBC headers also come from the bundle, although argon2, suitesparse and unixodbc are ports.ENVCFLAGS=-D_LARGEFILE64_SOURCE— withENVCFLAGSCXX, exported after configure: gbuild adds both to every library it compiles itself. With_LARGEFILE64_SOURCE, musl’s headers definestat64,fstat64andlseek64as the plain calls, which the Linux configuration of the bundled CLucene names; without it the search library of the help indexer does not compile. See A glibc-only call on musl.
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.