# -*- 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                libgeotiff
version             1.7.3
revision            0
categories          graphics
license             X11

maintainers         {stromnov @stromnov} openmaintainer

description         Library and tools for dealing with GeoTIFF

long_description    This software provides support for the Tag Image File \
                    Format (TIFF) Geo extensions.

homepage            https://geotiff.osgeo.org/
master_sites        https://download.osgeo.org/geotiff/libgeotiff/

checksums           rmd160  ff504fcff8f2dfb427ea339411c95a33fe1809fd \
                    sha256  ba23a3a35980ed3de916e125c739251f8e3266be07540200125a307d7cf5a704 \
                    size    547548

depends_lib         port:proj \
                    port:tiff \
                    port:zlib \
                    path:include/turbojpeg.h:libjpeg-turbo

configure.args-append \
                    --with-zip=${prefix} \
                    --with-jpeg=${prefix} \
                    --with-proj=${prefix}/lib/proj9

compiler.c_standard 1999

# cpl_serv.c:277: error: ‘for’ loop initial declaration used outside C99 mode
if {[string match *gcc-4.* ${configure.compiler}]} {
    configure.cflags-append \
                    -std=c99
}

use_parallel_build  no

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)\\.\[tz\]
