# -*- 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           python 1.0
PortGroup           legacysupport 1.1

# strnlen
legacysupport.newest_darwin_requires_legacy 10

name                py-aubio
version             0.4.9
revision            0

categories-append   audio
license             GPL-3+
maintainers         nomaintainer

description         a collection of tools for music analysis
long_description    {*}${description}

homepage            https://aubio.org/

checksums           rmd160  27d2b00ff798c284e7b071edd560e520bbf525bc \
                    sha256  df1244f6c4cf5bea382c8c2d35aa43bc31f4cf631fe325ae3992c219546a4202 \
                    size    479008

python.versions     39 310 311 312 313

if {${name} ne ${subport}} {
    depends_build-append \
                    port:pkgconfig

    depends_lib-append \
                    port:py${python.version}-numpy

    # upstream patch to "add const qualifiers to ufuncs prototypes for latest numpy"
    patchfiles      95ff046c698156f21e2ca0d1d8a02c23ab76969f.diff

    # macOS 10.8 (Mountain Lion, darwin 12) or below requires fftw-3
    if {${os.platform} eq "darwin" && ${os.major} < 13} {
        depends_lib-append \
                    port:fftw-3-single

        patchfiles  fftw3-setup.py.patch
    }
}
