# -*- 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           perl5 1.0

name                exiftool

perl5.require_variant   yes
perl5.conflict_variants yes
perl5.branches          5.28 5.30 5.32 5.34
perl5.default_branch    5.34
perl5.create_variants   ${perl5.branches}

# keep version in sync with p5-image-exiftool
perl5.setup         Image-ExifTool 13.38

license             {Artistic-1 GPL}
maintainers         {devans @dbevans} openmaintainer

platforms           {darwin any}
supported_archs     noarch

description         exiftool - General command line utility to read, write and edit EXIF metadata
long_description    {*}${description}

homepage            https://exiftool.org

distname
distfiles

depends_lib         port:p${perl5.major}-image-exiftool

use_configure       no
build               {}

destroot {
# this directory is required to keep portgroup perl5 happy even if nothing is installed in it
# it will be removed at the end of destroot with other empty directories
    xinstall -d ${destroot}${prefix}/lib/perl5/vendor_perl/${perl5.major}
    ln -s ${prefix}/libexec/perl${perl5.major}/exiftool ${destroot}${prefix}/bin/exiftool
    ln -s ${prefix}/share/perl${perl5.major}/man/man1/exiftool.1pm ${destroot}${prefix}/share/man/man1/exiftool.1pm
}

livecheck.type      regex
livecheck.url       ${homepage}/rss.xml
livecheck.regex     ${perl5.module}-(\[0-9.\]+)${extract.suffix}
