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

github.setup        Exiv2 exiv2 0.27.7 v
revision            0
checksums           rmd160  e8359f65a27aba526e4bb555492c706e629519ea \
                    sha256  551b1266e3aabd321f6d555dccd776128ee449d5039feafee927a1f33f7a9753 \
                    size    32423091

categories          graphics
license             GPL-2+
maintainers         {ryandesign @ryandesign} openmaintainer

description         EXIF and IPTC metadata manipulation library and tools
long_description    Exiv2 comprises of a C++ library and a command line utility \
                    which allows you to manipulate EXIF and IPTC image metadata.

homepage            https://www.exiv2.org
github.tarball_from archive

set python_version  3.14

depends_build-append \
                    port:gmake \
                    port:python[string map {. {}} ${python_version}]

depends_lib-append  port:expat \
                    port:gettext \
                    port:libiconv \
                    port:zlib

compiler.cxx_standard 2011
# error: use of undeclared identifier '__builtin_sadd_overflow'
compiler.blacklist-append \
                    { clang < 426 } \
                    macports-clang-3.3

patchfiles-append   patch-remove-no-format-overflow.diff

configure.args-append \
                    -DEXIV2_ENABLE_BMFF=ON \
                    -DIconv_INCLUDE_DIR=${prefix}/include \
                    -DIconv_LIBRARY=${prefix}/lib/libiconv.dylib \
                    -DPython3_EXECUTABLE=${prefix}/bin/python${python_version} \
                    -DZLIB_ROOT=${prefix}

github.livecheck.regex  {(\d+(?:\.\d+)+)}
