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

github.setup        saintmatthieu loop-tempo-estimator 0.0.5 v
revision            0
categories          audio devel
license             GPL-3
maintainers         {makr @mohd-akram} openmaintainer

description         loop classifier and tempo estimator

long_description    An efficient C++ loop classifier and tempo estimator.

distname            ${name}-${github.tag_prefix}${version}

checksums           rmd160  5083b0873987f3af821d2c62960e2039aae27ec0 \
                    sha256  e70f2356bbea1bcec3a77e26dddd87b1dd0d5f24c8aed6351aa9d6ec42a66be0 \
                    size    31846

worksrcdir          ${worksrcdir}/source

depends_lib         port:pffft

post-patch {
    # Do not fetch pffft, use installed version
    system "> ${worksrcpath}/cmake/pffft.cmake"
}

configure.cppflags  -I${prefix}/include/pffft

configure.args      -DBUILD_SHARED_LIBS=ON \
                    -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON

destroot {
    copy ${worksrcpath}/include/LoopTempoEstimator ${destroot}${prefix}/include
    copy ${workpath}/build/libloop-tempo-estimator.dylib ${destroot}${prefix}/lib
}
