151.10. wv-1.2.9
Library and converters for Microsoft Word 2000, 97, 95 and 6 documents
| Version | 1.2.9, release 2 |
| Shelf | office — Office suites, word processors, spreadsheets, presentations, accounting and finance, and office-format import libraries |
| Phase | 41_system (System), 828 of 1047 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://sourceforge.net/projects/wvware/ |
| Build time | 1.2 SBU |
| Installed size | 888.8 KiB in 484 files |
| Recipe | ports/core/office/wv/kpkgbuild |
About
wv reads Microsoft Word 6, 95, 97 and 2000 documents, and the text of Word 2 ones. It is a library, libwv, and the programs built on it: wvWare, wvRTF, wvSummary, wvConvert and wvVersion, and the scripts around wvWare such as wvHtml, wvText and wvLatex. In KDOS abiword links it to open .doc files.
Sources
wv-1.2.9.tar.gz(601.8 KiB)
sha2564c730d3b325c0785450dd3a043eeb53e1518598c4f41f155558385dd2635c19d
upstream: https://deb.debian.org/debian/pool/main/w/wv/wv_1.2.9.orig.tar.gz
archive copy: sources-3/office--wv-1.2.9.tar.gz
Dependencies
Depends on: pkgconf, glib, libxml2, libgsf, libpng, zlib.
Required by (1): abiword.
Patches
build.sh applies these; kpkg applies nothing by itself.
werrorformat.patch— InwvRTF.c, pass a colour string tortf_output()as the argument of a"%s"format instead of as the format itself, so a%in the string cannot be read as a conversion.wvsummary-gsf-include.patch— Include<gsf/gsf-doc-meta-data.h>inwvSummary.c, which callsgsf_doc_meta_data_new()andgsf_doc_meta_data_foreach()from it without declaring them.
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 wv'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/office/wv.
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/wv
echo '4c730d3b325c0785450dd3a043eeb53e1518598c4f41f155558385dd2635c19d wv-1.2.9.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/wv
SRC=$SRC_ROOT/wv-1.2.9
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf wv-1.2.9.tar.gz -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/werrorformat.patch"
patch -p1 -i "$PORT_SRC/wvsummary-gsf-include.patch"
export CFLAGS="$CFLAGS -Werror=int-conversion"
MKDIR_P="mkdir -p" \
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--mandir=/usr/share/man \
--disable-static \
--with-zlib \
--with-png \
--without-libwmf
make
make DESTDIR=$PKG install
The switches, and why each is set:
-Werror=int-conversion— Make an implicit conversion between an integer and a pointer a compile error. configure gives GCC-ansi, C90, and in C90 GCC reports such a conversion only as a warning. A function called with no prototype in scope is taken to returnint, and storing thatintin a pointer drops the upper half of the address on x86-64; with the flag such a call stops the build instead of producing a program that crashes when it uses the pointer.wvsummary-gsf-include.patchsupplies the prototypes for the calls inwvSummary.c.MKDIR_P— Given to configure asmkdir -p, which configure keeps instead of probing. Its probe accepts only amkdirwhose--versionnames GNU coreutils (or fileutils 4.1), and falls back to the bundledinstall-sh -dfor any other. wv’sinstall-shis X11R5’s and has no-d, so with that fallbackmake installstops at the first directory it creates.--with-zlib— Link zlib and, with--with-png, libpng, which wv uses for pictures embedded in documents.--without-libwmf— Build without libwmf, so Windows Metafile pictures embedded in a document are skipped when it is converted. The tree has no libwmf port.
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/wv, 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 wv-1.2.9-2.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/wv, and runs the triggers its paths call for.
Contents
Installed programs: wvAbw, wvCleanLatex, wvConvert, wvDVI, wvDocBook, wvHtml, wvLatex, wvMime, wvPDF, wvPS, wvRTF, wvSummary, wvText, wvVersion, wvWare, wvWml.
Installed libraries: libwv-1.2.so, libwv.so.
Installed directories: /usr/include/wv, /usr/share/licenses/wv, /usr/share/wv.
Short descriptions
wvAbw |
convert msword documents to Abiword's format |
wvCleanLatex |
convert msword documents to LaTeX |
wvDVI |
convert msword documents to DVI |
wvHtml |
convert msword documents to HTML4.0 |
wvLatex |
convert msword documents to LaTeX |
wvMime |
view MSWord documents |
wvPDF |
convert msword documents to PDF |
wvPS |
convert msword documents to PS |
wvRTF |
convert msword documents to RTF |
wvSummary |
view word document's summary info |
wvText |
convert msword documents to text |
wvVersion |
view word document's version # |
wvWare |
convert msword documents |
wvWml |
convert msword documents to WML |
wv-1.0.pc |
Word Document Filter library and utilities |