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

name                organya
github.setup        TTK-qmmp qmmp-${name} 1.0.1 v
revision            0
epoch               1
categories          audio
license             GPL-3
maintainers         nomaintainer
description         Input plugin for qmmp to play organya modules
long_description    {*}${description}
checksums           rmd160  2e61697cbb9c50a3e7267af3449c0af5eb4e5220 \
                    sha256  c41e683a88451e354924119a27ae214d25a7508d9ea6980ec443a011e6613a9a \
                    size    147256
github.tarball_from archive

post-extract {
    copy ${filespath}/Makefile ${worksrcpath}/
}

depends_lib-append  port:zlib

compiler.cxx_standard   2011

destroot {
    xinstall -m 644 ${worksrcpath}/lib${name}.dylib ${destroot}${prefix}/lib/
    set incdir1 ${prefix}/include/lib${name}/${name}
    set incdir2 ${prefix}/include/lib${name}/pxtone
    xinstall -d ${destroot}${incdir1}
    xinstall -d ${destroot}${incdir2}
    fs-traverse h ${worksrcpath}/lib${name}/${name} {
        if {[file isfile ${h}] && [file extension ${h}] == ".h"} {
            copy ${h} ${destroot}${incdir1}/
        }
    }
    fs-traverse h ${worksrcpath}/lib${name}/pxtone {
        if {[file isfile ${h}] && [file extension ${h}] == ".h"} {
            copy ${h} ${destroot}${incdir2}/
        }
    }
}
