90.2. libzip-1.11.4
C library for reading and writing zip archives
1.11.4-1 · BSD-3-Clause · 0.7 SBU · 826.0 KiB, 154 files · 41_system, 7 of 1047 · ports/core/archiver/libzip
Homepage: https://libzip.org/
Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/archiver.txt:
Zip archives as a library: ark, the emulators, the CAD and 3D tools and libsigrok read theirs through it.
libzip reads, creates and modifies ZIP archives, with the zipcmp, zipmerge and ziptool commands. ark, the emulators, the CAD and 3D programs, imagemagick and libsigrok read and write their ZIP files through it. Besides deflate it reads and writes the bzip2, xz and zstd methods, and AES-encrypted entries through OpenSSL.
Depends on: cmake, zlib, bzip2, xz, zstd, openssl, musl-fts.
Required by (18): ark, dsda-doom, ebook-tools, graphicsmagick, imagemagick, kfilemetadata, lib3mf, libsigrok, mgba, netcdf-c, openrct2, openscad, ppsspp, qgis, rizin, sc-im, viking, warzone2100.
Sources: libzip-1.11.4.tar.xz (774.7 KiB). Every step kpkg takes applies to this port.
Optional, off in KDOS. These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libzip'
build.sh:
mkdir -p build && cd build
cmake .. \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_DOC=ON \
-DDOCUMENTATION_FORMAT=man \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_TOOLS=ON \
-DENABLE_COMMONCRYPTO=OFF \
-DENABLE_GNUTLS=OFF \
-DENABLE_MBEDTLS=OFF \
-DENABLE_OPENSSL=ON \
-DENABLE_BZIP2=ON \
-DENABLE_LZMA=ON \
-DENABLE_ZSTD=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_OpenSSL=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_BZip2=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_LibLZMA=ON \
-DCMAKE_REQUIRE_FIND_PACKAGE_zstd=ON
make
make DESTDIR=$PKG install
-DENABLE_OPENSSL=ON— with-DENABLE_GNUTLS=OFF,-DENABLE_MBEDTLS=OFFand-DENABLE_COMMONCRYPTO=OFF: take AES encryption from openssl alone. libzip prefers OpenSSL over GnuTLS and mbed TLS when it finds several, so the twoOFFswitches change which library is used only when OpenSSL is missing; they keep CMake from probing for them. CommonCrypto is Apple’s.-DENABLE_BZIP2=ON— with-DENABLE_LZMA=ONand-DENABLE_ZSTD=ON: the bzip2, xz and zstd compression methods, each upstream’s default, named.-DCMAKE_REQUIRE_FIND_PACKAGE_OpenSSL=ON— and the same switch forBZip2,LibLZMAandzstd: turn each of thosefind_packagecalls into a required one. libzip answers a missing library with a warning and builds without the method, so without these a library missing at build time would give a libzip that cannot open such an archive.-DBUILD_DOC=ON— with-DDOCUMENTATION_FORMAT=man: install the manual pages for the library and the commands, from the preformattedmansources in the release. Left to itself, libzip picks the format from the tools it finds (mdocwhenmandocorgroffis there,manwhennroffis,htmlotherwise), so the installed pages would depend on what the build root holds.-DBUILD_TOOLS=ON— buildzipcmp,zipmergeandziptool, upstream’s default, named.-DBUILD_EXAMPLES=OFF— with-DBUILD_REGRESS=OFF: skip the example programs and the regression tests, which upstream builds by default.
Programs: zipcmp, zipmerge, ziptool.
Libraries: libzip.so.
Directories: /usr/lib/cmake/libzip, /usr/share/licenses/libzip.
musl-fts is in depends because zipcmp walks directories with fts_open and fts_read, which musl does not provide; the installed zipcmp links libfts.so.0.