# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                leptonica
version             1.86.0
revision            0
categories          graphics science devel
license             BSD

maintainers         {stromnov @stromnov} openmaintainer

description         image processing and image analysis library
long_description    ${name} is an {*}${description}.

homepage            http://www.leptonica.org/
master_sites        http://www.leptonica.org/source/

checksums           rmd160  cfbbf0b6087749509fc110e3ba6e1ee1a0c3388c \
                    sha256  1fa08e40bb37fd45802d5e6e7b43927449a5c47d4608ef99d3bd3f0fa76baedc \
                    size    14802116

depends_build       port:pkgconfig

depends_lib         port:tiff \
                    port:zlib \
                    port:libpng \
                    path:include/turbojpeg.h:libjpeg-turbo \
                    port:openjpeg \
                    port:giflib5 \
                    port:webp

# stdatomic.h
compiler.blacklist-append {clang < 700}

use_autoreconf      yes

configure.args      --disable-silent-rules
configure.cflags-prepend \
                    -I${prefix}/include/giflib5
configure.cppflags-prepend \
                    -I${prefix}/include/giflib5
configure.ldflags-prepend \
                    -L${prefix}/lib/giflib5/lib

livecheck.type      regex
livecheck.url       http://www.leptonica.org/download.html
livecheck.regex     {leptonica-(\d+(?:\.\d+)*)\.[tz]}
