# $Id: Portfile 86676 2011-10-31 18:19:22Z jmr@macports.org $

PortSystem              1.0

name                    qtplay
version                 1.3.1
categories              audio
license                 BSD
platforms               macosx
maintainers             nomaintainer

description \
    a command line utility to play Audio CDs and music files

long_description \
    ${name} is ${description}. \
    Plays any audio file supported by QuickTime \
    Special flag for simply playing CDs, for lazy people. \
    Playlist features such as loop, shuffle, and random. \
    Special flag for reading playlist via standard input. \
    Support for process signals: SIGINT, SIGTSTP, and SIGCONT.

homepage                http://rainbowflight.googlepages.com/
master_sites            ${homepage}
distname                ${name}${version}

checksums               md5     f6cb47521afbfc5b40efdd2d8433830d \
                        sha1    fd7394675c972377a48c2ff8e0a774853c0be6a3 \
                        rmd160  4c97ee8d38537f52547cb7a4d31eced0a93f2054

use_parallel_build      no

extract.mkdir           yes
post-extract {
    file delete ${worksrcpath}/${name}
}

use_configure           no

configure.ldflags       -framework Carbon -framework QuickTime

# Force 32-bit (#21115)
supported_archs         ppc i386
installs_libs           no

build {
    set cmd "cd ${worksrcpath} && ${configure.cc} -o ${name} ${configure.ldflags} ${configure.cc_archflags} ${name}.c"
    ui_debug ${cmd}
    system ${cmd}
}

destroot {
    xinstall -m 755 -W ${worksrcpath} ${name} \
        ${destroot}${prefix}/bin
    xinstall -m 644 -W ${worksrcpath} ${name}.1 \
        ${destroot}${prefix}/share/man/man1
}

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