# -*- 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.4
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  20f79f5d16e89706b9cdcc33f702ba043abcc95d \
                    sha256  c598d04fdf2ba25c4352844dafa81dde3f7fd968daa7ad131228cd91e9d3dc47 \
                    size    549848

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\]
