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

# update along with mediainfolib
github.setup        MediaArea MediaInfo 26.01 v
github.tarball_from archive
checksums           rmd160  002ccd68e9dcc14447cead7eefd6674df9ffca20 \
                    sha256  cec53d8aa143376965d8da72cfaaed4e1e432e23a19ed26cbdf8e69a14e93365 \
                    size    5767018

name                mediainfo
categories          multimedia
maintainers         {makr @mohd-akram} openmaintainer
license             BSD

description         technical and tag data for video and audio files

long_description    MediaInfo is a convenient unified display of the most \
                    relevant technical and tag data for video and audio files.

homepage            https://mediaarea.net/en/MediaInfo
installs_libs       no

depends_build       path:bin/pkg-config:pkgconfig

depends_lib         port:mediainfolib \
                    port:zenlib \
                    port:zlib

if {${name} eq ${subport}} {
    worksrcdir      ${worksrcdir}/Project/GNU/CLI
} else {
    worksrcdir      ${worksrcdir}/Project/GNU/GUI
}

compiler.cxx_standard   2011

use_autoreconf      yes

subport mediainfo-gui {
    PortGroup           app 1.0
    PortGroup           wxWidgets 1.0

    if {${os.platform} eq "darwin" && ${os.major} > 15} {
        wxWidgets.use   wxWidgets-3.2
    } elseif {${os.platform} eq "darwin" && ${os.major} > 11} {
        wxWidgets.use   wxWidgets-3.0-cxx11
    } else {
        wxWidgets.use   wxGTK-3.0-cxx11
    }

    revision            0

    depends_lib-append  port:${wxWidgets.port}

    patchfiles          patch-configure.diff

    configure.args      --with-wxdir=${wxWidgets.wxdir}

    app.executable      mediainfo-gui
    app.name            MediaInfo
    app.icon            ../../../Source/GUI/Cocoa/mediainfo.icns
}
