Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

235.4. qca-qt5-2.3.12

Qt Cryptographic Architecture for Qt 5, with the OpenSSL, GnuPG and SASL providers

Version 2.3.12, release 2
Shelf crypto — Cryptographic libraries, PKCS#11, smartcards and TPM
Phase 43_toolkits (Toolkits), 81 of 344 in build order
Licence LGPL-2.1-or-later
Homepage https://invent.kde.org/libraries/qca
Build time 1.2 SBU
Installed size 3.4 MiB in 33 files
Recipe ports/core/crypto/qca-qt5/kpkgbuild

About

QCA, the Qt Cryptographic Architecture, gives Qt programs one API for hashing, ciphers, TLS, certificates, OpenPGP and SASL, and does the work in provider plugins over real crypto libraries. This port is the Qt 5 build, libqca-qt5, for the Qt 5 programs in the tree (quassel); the Qt 6 build is the qca port, from the same tarball and with the same group = qca, so the version checker offers the two only as one bump.

The ossl provider is the reason the build is long. A Qt 5 process may load only OpenSSL 3, never OpenSSL 4, so this port carries the OpenSSL 3 release that the openssl3 slot is built from, configures it with the slot’s own switches to generate its headers, and compiles the provider against those headers and the slot’s libssl.so.3 and libcrypto.so.3. The rule and the reason are in A second version beside the first.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, perl, qt5-qtbase, openssl3, cyrus-sasl, gnupg.

Required by (1): quassel.

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 qca-qt5'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/crypto/qca-qt5.

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/qca-qt5
echo 'd4a2b3aa0272d73ea0c4cd2140960177fa34ddc2030e59a48ecfb80c757572c3  qca-2.3.12.tar.xz' | sha256sum -c -
echo '603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a  openssl3-3.5.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/qca-qt5
SRC=$SRC_ROOT/qca-qt5-2.3.12
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qca-2.3.12.tar.xz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf openssl3-3.5.9.tar.gz -C "$SRC_ROOT"

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 recipe’s helpers _openssl, group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

_ossl="$SRC_ROOT/openssl-$_openssl"
(
	cd "$_ossl"
	./config \
		--prefix=/usr \
		--libdir=lib \
		--openssldir=/etc/ssl \
		enable-ec_nistp_64_gcc_128 \
		enable-camellia \
		enable-seed \
		enable-rfc3779 \
		enable-ktls \
		enable-argon2 \
		no-mdc2 \
		no-ec2m \
		no-sm2 \
		no-sm4 \
		no-module \
		no-tests \
		shared \
		threads \
		zlib
	make build_generated
)
cmake -S . -B build -G Ninja \
	-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_WITH_QT6=OFF \
	-D QCA_SUFFIX=qt5 \
	-D BUILD_TESTS=OFF \
	-D BUILD_TOOLS=OFF \
	-D BUILD_PLUGINS="ossl;gnupg;cyrus-sasl;logger;softstore" \
	-D QCA_FEATURE_INSTALL_DIR=/usr/lib/qt5/mkspecs/features \
	-D OPENSSL_INCLUDE_DIR="$_ossl/include" \
	-D OPENSSL_SSL_LIBRARY=/usr/lib/libssl.so.3 \
	-D OPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so.3 \
	-D CMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
_need=$(readelf -d "$PKG/usr/lib/qca-qt5/crypto/libqca-ossl.so")
case $_need in *libssl.so.3*) ;; *) exit 1 ;; esac
case $_need in *libssl.so.4*|*libcrypto.so.4*) exit 1 ;; esac

The switches, and why each is set:

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/qca-qt5, 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 qca-qt5-2.3.12-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/qca-qt5, and runs the triggers its paths call for.

Contents

Installed libraries: libqca-qt5.so.

Installed directories: /usr/include/Qca-qt5, /usr/lib/cmake/Qca-qt5, /usr/lib/qca-qt5, /usr/share/licenses/qca-qt5.

Short descriptions

qca2-qt5.pc Qt Cryptographic Architecture library

Notes

_openssl in the recipe pins the OpenSSL release and must equal the openssl3 port’s version, as qt5-qtbase’s and mumble’s do; otherwise the provider is compiled against headers of one release and loads the library of another.

The three lines after the install read the ossl provider’s NEEDED entries and stop the build unless it links libssl.so.3 and neither libssl.so.4 nor libcrypto.so.4, so a provider that picked up OpenSSL 4 cannot ship into a Qt 5 process.