# $Id: Portfile 57522 2009-09-12 13:36:39Z devans@macports.org $

PortSystem 1.0

name		xine-lib
version		1.1.16.1
revision        1
description	xine-lib is a free multimedia engine, released under the GPL.
long_description        ${description}
maintainers	nomaintainer
categories	multimedia
platforms	darwin
homepage	http://www.xine-project.org
master_sites    sourceforge:xine
use_bzip2   yes
checksums   md5     9de11db7e262c564cfdba9841a092ebe \
            sha1    82709254a0603e3971058aacf8578926b75d4a20 \
            rmd160  3c76b12fae8cba87e6d3bceafcbf2fb3ef94e164
depends_lib port:aalib	\
            port:esound \
            port:faad2 \
            path:lib/libavcodec.dylib:ffmpeg \
            port:flac \
            port:libogg \
            port:libvorbis \
            port:zlib \
            port:xorg-libXinerama \
            port:xorg-libXt \
            port:xorg-libXvMC \
            port:fontconfig \
            port:libpng \
            port:xorg-xcb-util

configure.env-append    LIBTOOL=glibtool
configure.args  --with-external-libfaad \
                --with-external-ffmpeg
post-configure {
    # See #17952
    reinplace "s|#define HAVE_FFMPEG_AVUTIL_H 1|#undef HAVE_FFMPEG_AVUTIL_H|" \
        ${worksrcpath}/include/configure.h
}

livecheck.distname	${name} (xine core)

platform macosx {
    configure.args-append   --enable-macosx-video \
                            --enable-coreaudio
}
