# -*- 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.05 v
github.tarball_from archive
name                mediainfo
categories          multimedia
license             BSD
maintainers         {makr @mohd-akram} openmaintainer

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

checksums           rmd160  08159f31a87a71a2ff789a39a3909859f315682b \
                    sha256  90dd67f5a70bb87158d7024456339f5062f59776188427d7158d07a43e6a46d1 \
                    size    18038139

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
}

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}

    worksrcdir          ${worksrcdir}/Project/GNU/GUI

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

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