# $Id: Portfile 52944 2009-06-26 00:02:21Z ryandesign@macports.org $

PortSystem              1.0

name                    qtplay
version                 1.3.1
categories              audio
platforms               macosx
maintainers             nomaintainer

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

long_description \
    Quicktime player is a command line utility  \
    to play Audio CDs and music files. \
    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
use_parallel_build      no

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

use_configure           no

set my_ldflags          "-framework Carbon -framework QuickTime"
build {
    system "cd ${worksrcpath} && ${configure.cc} -o ${name} ${my_ldflags} ${name}.c"
}

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

platform darwin 7 {
    set my_ldflags "${my_ldflags} -lc /usr/lib/libgcc_s.1.dylib"
}
