235.3. gpgmepp-2.2.0
The C++ binding to GnuPG Made Easy
| Version | 2.2.0, release 1 |
| Shelf | crypto — Cryptographic libraries, PKCS#11, smartcards and TPM |
| Phase | 43_toolkits (Toolkits), 46 of 344 in build order |
| Licence | LGPL-2.0-or-later |
| Homepage | https://www.gnupg.org/software/gpgme/ |
| Build time | 0.2 SBU |
| Installed size | 926.7 KiB in 56 files |
| Recipe | ports/core/crypto/gpgmepp/kpkgbuild |
About
GpgME++ is the C++ binding to gpgme: key, context and operation classes over the C API. It is released separately from GPGME. In KDOS it is used by poppler for signed PDFs, by libreoffice, kate, ledger, and, directly and through qgpgme, by kleopatra and its libraries.
Sources
gpgmepp-2.2.0.tar.xz(121.0 KiB)
sha2566651c5f7f801543d5b676719df9fec8053b0a6f5aba40b98ca0d2bee11136f30
upstream: https://gnupg.org/ftp/gcrypt/gpgmepp/gpgmepp-2.2.0.tar.xz
archive copy: sources-1/crypto--gpgmepp-2.2.0.tar.xzrelease-tarball-version.patch
sha25645dbabcdd58b3c1ba8c1548cb6cda60fe6b82efa9e300182e4422f0369d42111
Dependencies
Depends on: cmake, ninja, pkgconf, libgpg-error, gpgme.
Required by (17): akonadi-calendar, isoimagewriter, kate, kdepim-addons, kget, kleopatra, kmail, kwallet, ledger, libkleo, libreoffice, mailcommon, merkuro, messagelib, mimetreeparser, poppler, qgpgme.
Patches
build.sh applies these; kpkg applies nothing by itself.
release-tarball-version.patch— Incmake/modules/G10GetFullVersion.cmake, a build with no.gitdirectory never runsgit describe, so the commit count it reads stays undefined, and the original test treats undefined the same as an empty answer and appends-unknownto the version. The patch separates the two cases: undefined leaves the version as it is, and only an empty answer fromgit describestill adds-unknown. The full version is written intogpgmepp.pc, so without the patch a build from the release tarball installs a pkg-config file that saysVersion: <version>-unknown.
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/43_toolkits/phase.env && kpkg install gpgmepp'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/crypto/gpgmepp.
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/crypto/gpgmepp
echo '6651c5f7f801543d5b676719df9fec8053b0a6f5aba40b98ca0d2bee11136f30 gpgmepp-2.2.0.tar.xz' | sha256sum -c -
echo '45dbabcdd58b3c1ba8c1548cb6cda60fe6b82efa9e300182e4422f0369d42111 release-tarball-version.patch' | 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/gpgmepp
SRC=$SRC_ROOT/gpgmepp-2.2.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf gpgmepp-2.2.0.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/release-tarball-version.patch"
mkdir -p build && cd build
cmake .. -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_SHARED=ON \
-DENABLE_STATIC=OFF \
-DBUILD_TESTING=OFF
ninja
DESTDIR=$PKG ninja install
The switches, and why each is set:
-DENABLE_SHARED=ON,-DENABLE_STATIC=OFF— Build the shared library only. These are the project’s own switches, and both values are upstream’s defaults.
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/gpgmepp, 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 gpgmepp-2.2.0-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/gpgmepp, and runs the triggers its paths call for.
Contents
Installed libraries: libgpgmepp.so.
Installed directories: /usr/include/gpgme++, /usr/lib/cmake/Gpgmepp, /usr/share/licenses/gpgmepp.
Short descriptions
gpgmepp.pc |
GnuPG Made Easy (C++ binding) |