# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 55122 2009-08-07 01:20:10Z snc@macports.org $

PortSystem 1.0

name             ices2
version          2.0.1
categories       audio net
maintainers      nomaintainer
description      Stream audio to an icecast server
long_description \
	source client for broadcasting in Ogg Vorbis format \
	to an icecast2 server
homepage         http://www.icecast.org/ices.php
platforms        darwin

master_sites     http://downloads.us.xiph.org/releases/ices/
distname         ices-${version}
checksums        sha1 045e8419c494d77162668e8362b3c9ddc4b4974c
use_bzip2        yes

depends_build    bin:pkg-config:pkgconfig
depends_lib      lib:libshout:libshout2 port:libxml2

post-configure {
	reinplace "s|VORBIS_CFLAGS = -I${prefix}/include|VORBIS_CFLAGS = -I${prefix}/include -D_MACOSX_ |g" ${worksrcpath}/Makefile
	reinplace "s|#include <unistd.h>|#include <sys/select.h>\\\n#include <unistd.h>|g" ${worksrcpath}/src/metadata.c
}
