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

github.setup        OpenShot libopenshot-audio 0.6.0 v

github.tarball_from archive
checksums           rmd160  7539a4e7a5e04ba4c8a655a1771ecf3f6e10683f \
                    sha256  f4df0429db6efc8441817da23d2536fbfb198c723309698cd2de4cb0533afc26 \
                    size    2261237
homepage            https://www.openshot.org/
categories          multimedia devel
license             GPL-3+
platforms           {darwin >= 13}
maintainers         nomaintainer

description         Library for creating and editing videos
long_description    ${description}

patchfiles          patch-cmake.diff

post-patch {
    #MacPorts buildbots are case sensitive and capitalization of the framework name
    #   leads to a build failure
    reinplace -locale C "s|framework CoreMidi|framework CoreMIDI|" \
        ${worksrcpath}/CMakeLists.txt
}

compiler.cxx_standard 2011

# needs atomics support which is a C11 feature; references
# https://stackoverflow.com/questions/26440606/xcode-and-c11-stdatomic-h
# https://stackoverflow.com/questions/20326604/stdatomic-h-in-gcc-4-8
# indicates compatible compilers are Xcode > Xcode 7, clang > 3.7, and gcc > 4.8
compiler.blacklist-append *gcc-3.* *gcc-4.*
compiler.blacklist-append { clang < 700 } macports-clang-3.3 macports-clang-3.4

depends_lib         port:zlib

# ./src/openshot-audio-test-sound  (This should play a test sound)
