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

158.1. htslib-1.24

The SAM/BAM/CRAM/VCF reader samtools and bcftools are built on

1.24-1 · MIT AND BSD-3-Clause · 1.1 SBU · 8.5 MiB, 49 files · 41_system, 209 of 1047 · ports/core/bioscience/htslib

Homepage: https://www.htslib.org/

Why it is in KDOS. The comment above the 3 ports from htslib to bcftools in script/phases/41_system/packages.d/bioscience.txt:

The three move together on one version number and each checks the library it was built against — a mismatch is a runtime complaint, not a link error. samtools bundles its own htslib, which is why --with-htslib=system matters.

Depends on: pkgconf, zlib, bzip2, xz, curl, openssl, libdeflate.

Required by (2): bcftools, samtools.

Sources: htslib-1.24.tar.bz2 (4.8 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install htslib'

build.sh:

LDFLAGS= ./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--enable-libcurl \
	--enable-s3 \
	--enable-gcs \
	--enable-ref-cache \
	--enable-bz2 \
	--enable-lzma \
	--with-libdeflate \
	--disable-plugins
make LDFLAGS="$LDFLAGS"
make LDFLAGS="$LDFLAGS" DESTDIR=$PKG install

Programs: annot-tsv, bgzip, htsfile, ref-cache, tabix.

Libraries: libhts.a, libhts.so.

Directories: /usr/include/htslib, /usr/share/licenses/htslib.