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

name             alac_decoder
version          0.2.0
categories       audio
license          MIT
maintainers      nomaintainer
description      Basic decoder for Apple Lossless Audio Codec files
long_description This is a basic decoder for Apple Lossless Audio Codec files (ALAC). \
                 ALAC is a proprietary lossless audio compression scheme. Apple never \
                 released any documents on the format. What is provided here is a C \
                 implementation of a decoder, written from reverse engineering the \
                 file format. It turns out that most of the algorithms in the codec \
                 are fairly well known. ALAC uses an adaptive FIR prediction algorithm \
                 and stores the error values using a modified Rice or Golomb algorithm. \
                 This program will not be able to handle all ALAC files, it can only \
                 handle mono or stereo files. ALAC allows up to 8 channels. The ALAC \
                 decoder supports both 16 and 24 bit sample sizes. The decoder is fairly \
                 self explanatory, it can read an ALAC stream from either a file or from \
                 stdin, and write it as raw PCM data or as a WAV file to either stdout or \
                 a file. In theory one should be able to stream data to the decoder.

homepage         https://web.archive.org/web/20150427073148/http://craz.net/programs/itunes/alac.html
platforms        darwin
master_sites     https://web.archive.org/web/20150427073148/http://craz.net/programs/itunes/files/
checksums        md5 cec75c35f010d36e7bed91935b57f2d1 \
                 sha1 a620f6293ef2d9490927d21ec341bbeff13eabe8 \
                 rmd160 72664dff4eeff6e484314f625f74337e60ba39fb

extract.suffix   .tgz

worksrcdir       ${name}

use_configure    no

build.target

destroot {
    xinstall -m 755 ${worksrcpath}/alac ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
}

livecheck.type  regex
livecheck.regex "<li><b>(.+)</b>"
