# $Id: Portfile,v 1.4 2005/04/11 11:21:51 toby Exp $

PortSystem 1.0
name             poc
version          0.3.7.1
revision         1
categories       audio
maintainers      toby@opendarwin.org
description      mp3 and ogg streamer
long_description \
	poc is a mp3 and ogg streamer supporting HTTP \
	(mp3 and ogg), RTP (RFC 2250) (mp3 only), RTP \
	(RFC 3119) (mp3 only), and a homegrown FEC \
	protocol (mp3 only).
homepage         http://www.bl0rg.net/software/poc/
platforms        darwin

master_sites     ${homepage}
checksums        md5 d96ed857d3a9e075210653c434d655d1

# Need a newish version of bison.
depends_build    bin:XXX:bison

patchfiles       patch-fec-pkt.h \
                 patch-network.h \
                 patch-network4.c \
                 patch-pob-2250.c \
                 patch-poc-2250.c \
                 patch-poc-3119.c \
                 patch-poc-fec.c \
                 patch-poc-http.c \
                 patch-pogg-http.c
post-patch {
	reinplace "s|YACC=bison|YACC=${prefix}/bin/bison|" \
		${worksrcpath}/Makefile
}

configure        {}

build.target     servers clients

destroot {
	file mkdir ${destroot}${prefix}/share/doc/poc
	xinstall -m 444 ${worksrcpath}/README ${destroot}${prefix}/share/doc/poc

	set binaries {poc-2250 poc-3119 poc-2250-ploss poc-3119-ploss \
		poc-fec poc-fec-ploss poc-http pogg-http \
		pob-2250 pob-3119 pob-fec pob-3119-rb pob-2250-rb}

	foreach binary $binaries {
		xinstall -m 555 ${worksrcpath}/${binary} ${destroot}${prefix}/bin
	}
}
