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

118.16. leptonica-1.87.0

The image processing tesseract does its page analysis with

1.87.0-1 · BSD-2-Clause · 0.7 SBU · 4.0 MiB, 51 files · 41_system, 690 of 1047 · ports/core/image-libs/leptonica

Homepage: http://www.leptonica.org/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/image-libs.txt:

leptonica answers a missing image library by dropping that format silently, and the one it drops is usually multi-page TIFF — what every document feeder writes. tesseract with no .traineddata starts and fails, which reads as a broken build, so tesseract depends on tessdata-eng, the English model.

Depends on: pkgconf, libpng, libjpeg-turbo, giflib, libtiff, libwebp, zlib, openjpeg.

Required by (4): gimagereader, mupdf, skanpage, tesseract.

Sources: leptonica-1.87.0.tar.gz (14.1 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 leptonica'

build.sh:

./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--disable-static \
	--with-libpng \
	--with-jpeg \
	--with-giflib \
	--with-libtiff \
	--with-libwebp \
	--with-libwebpmux \
	--with-libopenjpeg \
	--with-zlib
make
make DESTDIR=$PKG install

install -Dm644 "$SRC/leptonica-license.txt" "$PKG/usr/share/licenses/$name/leptonica-license.txt"

Programs: convertfilestopdf, convertfilestops, convertformat, convertsegfilestopdf, convertsegfilestops, converttopdf, converttops, fileinfo, imagetops, xtractprotos.

Libraries: libleptonica.so.

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