# -*- 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
PortGroup           github 1.0

github.setup        seebk GIMP-Lensfun 0.2.4
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            6
categories          graphics
license             GPL-3
maintainers         {mascguy @mascguy} openmaintainer

description         GimpLensfun is a GIMP plugin to correct lens distortion
long_description    {*}${description} using the lensfun library and database.
homepage            https://seebk.github.io/${name}

checksums           rmd160  529285a05fed3c3fd5669d22a9686cad31564227 \
                    sha256  00c83de0b35c84f8ff85862badabafe581812b85513d35d31f46d0271b7bc1b4 \
                    size    29061

patchfiles-append   patch-Makefile.diff
patchfiles-append   patch-exiv2-0.27.1.diff

depends_build-append \
                    port:pkgconfig

depends_lib-append \
                    port:exiv2 \
                    path:lib/pkgconfig/gimp-2.0.pc:gimp2 \
                    port:lensfun

# 2011 compiler needed for exiv2
compiler.cxx_standard 2011

use_configure       no

build.env-append \
                    CXX=${configure.cxx}

destroot {
    set dest ${destroot}${prefix}/lib/gimp/2.0/plug-ins
    xinstall -d ${dest}
    xinstall ${worksrcpath}/gimp-lensfun ${dest}
}

livecheck.regex "(\\d+(?:\\.\\d+)*)${extract.suffix}"
