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

github.setup        shibatch SSRC 4adf75116dfc0ef709fef74a0e2f3360bd15007f
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                ssrc
version             1.33
categories          audio
maintainers         nomaintainer
license             LGPL-2.1

description         A fast and high quality sampling rate converter SSRC

long_description    SSRC converts sampling rate of PCM wav file. Also, this program has \
                    a function to apply dither to its output and extend perceived dynamic range. \
                    Sampling rates of 44.1kHz and 48kHz are populary used, but ratio of these \
                    two frequency is 147:160, and it's not a small numbers. Therefore, sampling \
                    rate conversion without degradation of sound quality requires filter with very \
                    large order, and it's difficult to achive both quality and speed. This program \
                    achived relatively fast and high quality with two different kinds of filters \
                    combined skillfully.

homepage            https://shibatch.sourceforge.net/

checksums           rmd160  9bcd76351fadfb830f54a331fb1180985c0447de \
                    sha256  0e61a8bb3bb3d9b2b7c481da39c2ebe60c48641d4f99ca2861d8e3038401a072 \
                    size    1001253

platform powerpc {
    patchfiles-append           patch-ppc.diff
    compiler.blacklist-append   *gcc-4.* clang
}

use_configure       no
use_parallel_build  no

variant universal   {}

build.args          CC=${configure.cc} CFLAGS="${configure.cflags} [get_canonical_archflags]"

destroot {
    xinstall -m 755 -W ${worksrcpath} \
        ssrc \
        ssrc_hp \
        ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} \
        ssrc.txt \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)\\.
