151.6. libwpd-0.10.3
WordPerfect document import library
| Version | 0.10.3, release 1 |
| Shelf | office — Office suites, word processors, spreadsheets, presentations, accounting and finance, and office-format import libraries |
| Phase | 41_system (System), 824 of 1047 in build order |
| Licence | MPL-2.0 OR LGPL-2.1-or-later |
| Homepage | https://libwpd.sourceforge.net/ |
| Build time | 1.2 SBU |
| Installed size | 1000.2 KiB in 11 files |
| Recipe | ports/core/office/libwpd/kpkgbuild |
About
libwpd reads WordPerfect documents and replays them through the librevenge document interface. libreoffice and abiword use it to import .wpd files, and libwpg, the WordPerfect graphics importer, builds on it. The package also installs wpd2text, wpd2html and wpd2raw.
Sources
libwpd-0.10.3.tar.xz(522.2 KiB)
sha2562465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
upstream: https://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz
archive copy: sources-3/office--libwpd-0.10.3.tar.xz
Dependencies
Depends on: pkgconf, boost, librevenge.
Required by (4): abiword, calligra, libreoffice, libwpg.
Patches
build.sh applies these; kpkg applies nothing by itself.
libwpd-gcc11.patch— Include<cstddef>at the top ofsrc/lib/WPXContentListener.cppandsrc/lib/WPXTable.cpp. Both compile code that usessize_tunqualified (WPXTable.hdeclaresgetCell(size_t, size_t)after including only<vector>), and libstdc++’s<vector>does not declare it, so the two files fail to compile without 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/41_system/phase.env && kpkg install libwpd'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/office/libwpd.
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/libwpd
echo '2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09 libwpd-0.10.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/libwpd
SRC=$SRC_ROOT/libwpd-0.10.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libwpd-0.10.3.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:
patch -p1 -i "$PORT_SRC/libwpd-gcc11.patch"
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--disable-static \
--enable-tools \
--disable-fuzzers \
--disable-werror \
--without-docs
make
make DESTDIR=$PKG install
The switches, and why each is set:
--enable-tools— Build and install the three command-line converters undersrc/conv. It is configure’s default.--disable-fuzzers— Build no fuzzing programs; also the default.--disable-werror— Do not treat compiler warnings as errors; also the default.--without-docs— Generate no Doxygen API documentation.
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/libwpd, 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 libwpd-0.10.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/libwpd, and runs the triggers its paths call for.
Contents
Installed programs: wpd2html, wpd2raw, wpd2text.
Installed libraries: libwpd-0.10.so.
Installed directories: /usr/include/libwpd-0.10, /usr/share/licenses/libwpd.
Short descriptions
libwpd-0.10.pc |
A library for reading and writing Corel WordPerfect(tm) documents |