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

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

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.