151.17. libetonyek-0.1.13
Import filter library and conversion tools for Apple Keynote, Pages and Numbers documents
| Version | 0.1.13, release 1 |
| Shelf | office — Office suites, word processors, spreadsheets, presentations, accounting and finance, and office-format import libraries |
| Phase | 41_system (System), 835 of 1047 in build order |
| Licence | MPL-2.0 |
| Homepage | https://wiki.documentfoundation.org/DLP/Libraries/libetonyek |
| Build time | 3.4 SBU |
| Installed size | 4.8 MiB in 16 files |
| Recipe | ports/core/office/libetonyek/kpkgbuild |
About
libetonyek reads Apple’s iWork formats, Keynote presentations above all and Pages and Numbers documents too, through librevenge’s interfaces. Calligra’s Keynote import filter is its consumer, writing ODF through libodfgen (calligra). The package also carries the command-line converters key2*, numbers2* and pages2*, which write raw calls, text, CSV, HTML or XHTML.
Sources
libetonyek-0.1.13.tar.xz(1.4 MiB)
sha256032b71cb597edd92a0b270b916188281bc35be55296b263f6817b29adbcb1709
upstream: https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.13.tar.xz
archive copy: sources-3/office--libetonyek-0.1.13.tar.xz
Dependencies
Depends on: pkgconf, gperf, boost, glm, mdds, librevenge, libxml2, zlib, liblangtag.
Required by (1): calligra.
Patches
build.sh applies these; kpkg applies nothing by itself.
The patch comes from Alpine’s libetonyek package. mdds 3’s flat_segment_tree has valid_tree() and no is_tree_valid(), which src/lib/IWORKTable.cpp calls, so without the patch that file does not compile against mdds 3.
mdds3.patch— call flat_segment_tree::valid_tree() in IWORKTable.cppmdds 3's flat_segment_tree has valid_tree() and no is_tree_valid(), which IWORKTable.cpp calls, so the file does not compile against mdds 3. From Alpine community/libetonyek.
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 libetonyek'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/office/libetonyek.
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/libetonyek
echo '032b71cb597edd92a0b270b916188281bc35be55296b263f6817b29adbcb1709 libetonyek-0.1.13.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/libetonyek
SRC=$SRC_ROOT/libetonyek-0.1.13
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libetonyek-0.1.13.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/mdds3.patch"
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--disable-static \
--disable-werror \
--disable-debug \
--disable-tests \
--disable-fuzzers \
--with-mdds=3.0 \
--with-liblangtag \
--with-tools \
--without-docs
make
make DESTDIR=$PKG install
The switches, and why each is set:
--disable-static— Shared library only; nothing links the archive.--disable-werror— Upstream’s default, stated: warnings stay warnings.--disable-debug— Upstream’s default, stated. It is what puts-DNDEBUGon the compile line.--disable-tests— No unit tests. Upstream’s default builds them, andconfigurethen requires CppUnit.--disable-fuzzers— No fuzzing harnesses; upstream’s default, stated.--with-mdds=3.0— The mdds API version to build against.configurelooks for the pkg-config modulemdds-<version>and defaults tomdds-2.1; mdds 3 installsmdds-3.0.--with-liblangtag— Language tags through liblangtag, upstream’s default, stated. It maps the language codes in a document’s styles to proper BCP 47 tags; without it every text is left without a language.--with-tools— The conversion tools.--without-docs— No Doxygen API reference.
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/libetonyek, 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 libetonyek-0.1.13-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/libetonyek, and runs the triggers its paths call for.
Contents
Installed programs: key2raw, key2text, key2xhtml, numbers2csv, numbers2raw, numbers2text, pages2html, pages2raw, pages2text.
Installed libraries: libetonyek-0.1.so.
Installed directories: /usr/include/libetonyek-0.1, /usr/share/licenses/libetonyek.
Short descriptions
libetonyek-0.1.pc |
Library for parsing Apple Keynote file format structure |
Notes
The headers of boost and glm, and the mdds-3.0, libxml-2.0, zlib and librevenge-0.0 modules are required by configure. The token tables are generated by gperf from the .gperf files, and the tarball ships the generated .inc files too, so gperf is in depends for the case where a timestamp makes make regenerate one.