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

# normally update mediainfo port at the same time
github.setup        MediaArea MediaInfoLib 24.05 v
github.tarball_from archive
checksums           rmd160  4d6ec02e54fb19ae425237d956ef7fd89a6318a0 \
                    sha256  98fa7516fc50772231575da0362bb03ab0bf050c90a8e2de75987127263154af \
                    size    2943932

name                mediainfolib
description         Supplies technical and tag information about a video or audio file
long_description    {*}${description}
homepage            https://mediaarea.net
categories          devel multimedia
maintainers         {ctreleaven @ctreleaven} openmaintainer
license             BSD

# make pkg-config act like on Linux, no '-I/opt/local/include' in cflags
configure.env-append \
                    PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include

# cascade of errors if no autoreconf
use_autoreconf      yes
autoreconf.args-append \
                    --force --install
configure.args      --with-libcurl

# otherwise may find headers from libmd, maybe others
configure.cppflags-delete \
                    -I${prefix}/include

depends_build-append \
                    path:bin/pkg-config:pkgconfig
depends_lib-append  port:curl \
                    port:zenlib \
                    port:zlib

worksrcdir          ${worksrcdir}/Project/GNU/Library

compiler.cxx_standard \
                    2011
# see https://trac.macports.org/ticket/67223
compiler.blacklist-append \
                    {clang < 900}