48.4. libxslt-1.1.45
XSLT libraries used for extending libxml2 libraries to support XSLT files
| Version | 1.1.45, release 1 |
| Shelf | formats — Data-format and serialisation libraries (XML, JSON, YAML, TOML, INI, RDF, protobuf, thrift), plus data query and convert tools |
| Phase | 30_foundation (Build Foundation), 119 of 127 in build order |
| Licence | MIT |
| Homepage | https://gitlab.gnome.org/GNOME/libxslt |
| Build time | 0.2 SBU |
| Installed size | 1.4 MiB in 110 files |
| Recipe | ports/core/formats/libxslt/kpkgbuild |
About
libxslt is the XSLT processor built on libxml2, with libexslt for the EXSLT extension functions, and xsltproc is its command line. In KDOS its main work is at build time: every port that renders manual pages from DocBook runs xsltproc with the docbook-xsl stylesheets, directly or through xmlto and asciidoc’s a2x. Applications link it too, among them GIMP, Inkscape, LibreOffice, darktable and digiKam.
docbook-xsl’s patch makes its string replacement call str:replace, an EXSLT function libexslt provides, when the processor has it; see that port’s page.
Sources
libxslt-1.1.45.tar.xz(1.4 MiB)
sha2569acfe68419c4d06a45c550321b3212762d92f41465062ca4ea19e632ee5d216e
upstream: https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.45.tar.xz
archive copy: sources-2/formats--libxslt-1.1.45.tar.xz
Dependencies
Required by (70): abiword, akonadi, akonadi-mime, alsa-utils, appstream, asciidoc, bubblewrap, calcurse, cantor, chemical-mime-data, cppcheck, darktable, dbus, dconf, deutex, digikam, elogind, freedoom, gimp, gimp-help, gnome-disk-utility, gnucash, goffice, gtk-doc, gtk3, gvfs, imv, inkscape, kdoctools, kio, kodi, libnotify, libosinfo, libreoffice, libsecret, libvirt, linuxcnc, lirc, lyx, mkvtoolnix, mobile-broadband-provider-info, mosquitto, ocl-icd, opensc, p11-kit, parley, partclone, polkit, postgresql, procs, python3-lxml, python3-pyside6, recoll, samba, system-config-printer, talloc, tdb, udisks2, umbrello, upower, viking, webkitgtk, webkitgtk6, wsjtx, xdg-dbus-proxy, xdg-user-dirs, xfburn, xkeyboard-config, xmlto, zbar.
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/30_foundation/phase.env && kpkg install libxslt'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/formats/libxslt.
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/formats/libxslt
echo '9acfe68419c4d06a45c550321b3212762d92f41465062ca4ea19e632ee5d216e libxslt-1.1.45.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/libxslt
SRC=$SRC_ROOT/libxslt-1.1.45
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libxslt-1.1.45.tar.xz -C "$SRC" --strip-components=1
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 five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-python=/usr/bin/python3
make
make DESTDIR=$PKG install
The switches, and why each is set:
--with-python=/usr/bin/python3— Builds the Python bindings, thelibxsltmodule and itslibxsltmod.so. configure tests only whether the value isno, which upstream’s default is not, and finds the interpreter itself withAM_PATH_PYTHON; the path given here is not read.
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/libxslt, 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 libxslt-1.1.45-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/libxslt, and runs the triggers its paths call for.
Contents
Installed programs: xslt-config, xsltproc.
Installed libraries: libexslt.so, libxslt.so.
Installed directories: /usr/include/libexslt, /usr/include/libxslt, /usr/lib/cmake/libxslt, /usr/share/doc/libxslt, /usr/share/gtk-doc/html/libexslt, /usr/share/gtk-doc/html/libxslt, /usr/share/licenses/libxslt.
Short descriptions
xsltproc |
command line XSLT processor |
libexslt.pc |
EXSLT Extension library |
libxslt.pc |
XSLT library version 2. |