105.19. poco-1.15.4
POCO C++ libraries — foundation, XML, JSON, Zip, networking and TLS classes
| Version | 1.15.4, release 1 |
| Shelf | net-libs — Networking and protocol libraries |
| Phase | 41_system (System), 797 of 1047 in build order |
| Licence | BSL-1.0 |
| Homepage | https://pocoproject.org/ |
| Build time | 5.5 SBU |
| Installed size | 13.2 MiB in 759 files |
| Recipe | ports/core/net-libs/poco/kpkgbuild |
About
POCO is a family of C++ class libraries for networked applications: Foundation (threads, streams, logging, Unicode, regular expressions) and, on top of it, Encodings, XML, JSON, Util, Net, Crypto, NetSSL, JWT and Zip. mumble is the port that needs it, for Poco::XML and Poco::Zip. This build installs the libraries listed above and no others.
Sources
poco-1.15.4.tar.gz(9.1 MiB)
sha256efdfbc8ce78a67c6c713c533bd6f95bff4b2ce1507bab4e53a86c60160bcdc54
upstream: https://pocoproject.org/releases/poco-1.15.4/poco-1.15.4-all.tar.gz
archive copy: sources-3/net-libs--poco-1.15.4.tar.gz
Dependencies
Depends on: cmake, ninja, zlib, pcre2, utf8proc, expat, openssl.
Required by (1): mumble.
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 poco'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/net-libs/poco.
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/net-libs/poco
echo 'efdfbc8ce78a67c6c713c533bd6f95bff4b2ce1507bab4e53a86c60160bcdc54 poco-1.15.4.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/poco
SRC=$SRC_ROOT/poco-1.15.4
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf poco-1.15.4.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:
cmake -S . -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DPOCO_UNBUNDLED=ON \
-DENABLE_FASTLOGGER=OFF \
-DENABLE_TRACE=OFF \
-DENABLE_ENCODINGS=ON \
-DENABLE_XML=ON \
-DENABLE_JSON=ON \
-DENABLE_UTIL=ON \
-DENABLE_NET=ON \
-DENABLE_CRYPTO=ON \
-DENABLE_NETSSL=ON \
-DENABLE_JWT=ON \
-DENABLE_ZIP=ON \
-DENABLE_DATA=OFF \
-DENABLE_DATA_SQLITE=OFF \
-DENABLE_DATA_MYSQL=OFF \
-DENABLE_DATA_POSTGRESQL=OFF \
-DENABLE_DATA_ODBC=OFF \
-DENABLE_MONGODB=OFF \
-DENABLE_REDIS=OFF \
-DENABLE_PROMETHEUS=OFF \
-DENABLE_ACTIVERECORD=OFF \
-DENABLE_ACTIVERECORD_COMPILER=OFF \
-DENABLE_PAGECOMPILER=OFF \
-DENABLE_PAGECOMPILER_FILE2PAGE=OFF \
-DENABLE_APACHECONNECTOR=OFF \
-DENABLE_PDF=OFF \
-DENABLE_SEVENZIP=OFF \
-DENABLE_DNSSD=OFF \
-DENABLE_CPPPARSER=OFF \
-DENABLE_POCODOC=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_SAMPLES=OFF \
-DENABLE_BENCHMARK=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-DPOCO_UNBUNDLED=ON— Link the system zlib, pcre2, utf8proc and expat instead of compiling the copies POCO keeps underdependencies/, and fail configure when one is missing. It also switches SQLite and libpng to the system copies, for the components this build leaves out. It is off by default.-DENABLE_FASTLOGGER=OFF— Build noFastLogger, which compiles in the bundled Quill logging library. It is on by default on Linux, and POCO has no switch to link a system Quill, so with it onPOCO_UNBUNDLEDwould still compile POCO’s copy.-DENABLE_TRACE=OFF— No stack traces in exceptions, which would compile in the bundled cpptrace. It is the default.-DENABLE_ENCODINGS=ON— The extra character encodings ofPocoEncodings. This and-DENABLE_XML=ON,-DENABLE_JSON=ON,-DENABLE_UTIL=ON,-DENABLE_NET=ON,-DENABLE_ZIP=ONare on by default;-DENABLE_CRYPTO=ON,-DENABLE_NETSSL=ONand-DENABLE_JWT=ONdefault on only when OpenSSL is found, so naming them stops a missing OpenSSL from dropping them silently.-DENABLE_DATA=OFF— Build none of the database layer.-DENABLE_DATA_SQLITE=OFF,-DENABLE_DATA_MYSQL=OFF,-DENABLE_DATA_POSTGRESQL=OFF,-DENABLE_DATA_ODBC=OFF,-DENABLE_ACTIVERECORD=OFFand-DENABLE_ACTIVERECORD_COMPILER=OFFgo with it: any of them left on turnsENABLE_DATAback on, and SQLite and both ActiveRecord components are on by default.-DENABLE_MONGODB=OFF— No MongoDB, Redis (-DENABLE_REDIS=OFF) or Prometheus (-DENABLE_PROMETHEUS=OFF) clients, and no web server page compilers (-DENABLE_PAGECOMPILER=OFF,-DENABLE_PAGECOMPILER_FILE2PAGE=OFF) or Apache module (-DENABLE_APACHECONNECTOR=OFF). Nothing in the tree uses them.-DENABLE_PDF=OFF— No PDF library, which compiles the bundled libharu; noSevenZip(-DENABLE_SEVENZIP=OFF), which compiles the bundled 7-Zip code; no DNS-SD (-DENABLE_DNSSD=OFF); no C++ parser or documentation generator (-DENABLE_CPPPARSER=OFF,-DENABLE_POCODOC=OFF). All five are off by default.-DENABLE_SAMPLES=OFF— Build no samples, with-DENABLE_TESTS=OFFno tests and with-DENABLE_BENCHMARK=OFFno benchmarks.
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/poco, 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 poco-1.15.4-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/poco, and runs the triggers its paths call for.
Contents
Installed libraries: libPocoCrypto.so, libPocoEncodings.so, libPocoFoundation.so, libPocoJSON.so, libPocoJWT.so, libPocoNet.so, libPocoNetSSL.so, libPocoUtil.so, libPocoXML.so, libPocoZip.so.
Installed directories: /usr/include/Poco, /usr/lib/cmake/Poco, /usr/share/licenses/poco.
Notes
Even unbundled, libPocoFoundation compiles two files of POCO’s own PCRE2 copy, pcre2_ucd.c and pcre2_tables.c, whenever the system PCRE2 is a shared library: its Unicode.cpp reads PCRE2’s internal Unicode property tables, which libpcre2-8.so does not export. Those tables are POCO’s PCRE2 version, not the pcre2 port’s.
POCO_UNBUNDLED covers only the libraries that have a system build to find. The copies under dependencies/v8_double_conversion, dependencies/pdjson and dependencies/tessil have no unbundled path and are built into the libraries that use them in every build.