# leptonica 1.85.0 — procesamiento de imágenes (libleptonica.so). Campaña KDE (ADR 0011): es la dep dura
# de tesseract, y tesseract lo exige spectacle (`pkg_check_modules(TESSERACT REQUIRED tesseract)`, sin
# flag para apagarlo).
#
# Wrapper zig PASS-THROUGH con "$@". Codecs recortados a los que ya tenemos en variantes .so/PIC:
# libjpeg-turbo-shared + libpng-shared + zlib-shared. TIFF/WEBP/OPENJPEG/GIF OFF (no sellados) — tesseract
# lee imágenes vía leptonica, y PNG/JPEG cubre el caso de spectacle (OCR sobre una captura de pantalla).
name    = "leptonica"
version = "1.85.0"

[source]
tarball = "https://github.com/DanBloomberg/leptonica/releases/download/1.85.0/leptonica-1.85.0.tar.gz"
sha256  = "3745ae3bf271a6801a2292eead83ac926e3a9bc1bf622e9cd4dd0f3786e17205"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "dynamic"
flags    = []

[build.phases]
configure = './configure --build=$CBUILD --host=$CHOST --prefix=/usr --enable-shared --disable-static --without-giflib --without-libwebp --without-libopenjpeg --without-libtiff'
compile   = 'make -j"$(nproc)"'
install   = "make DESTDIR=/out install && find /out -name '*.la' -delete"

[deps]
build = ["pkgconf", "zlib-shared", "libpng-shared", "libjpeg-turbo-shared"]
