# $Id: Portfile 66247 2010-04-08 02:35:06Z jmr@macports.org $

PortSystem 1.0

name		smpeg
version		0.4.4
revision	8
categories	multimedia
license		GPLv2
maintainers	mww
platforms	darwin
description	a general purpose MPEG video/audio player/library
long_description	smpeg is a general purpose MPEG video/audio player and \
			library programmed by Loki entertainment and others

homepage	http://www.lokigames.com/development/smpeg.php3
master_sites	ftp://ftp.lokigames.com/pub/open-source/smpeg/ \
		macports macports:lt:lt freebsd
distfiles-append	ltconfig13:lt ltmain13:lt
extract.only	${distname}${extract.suffix}

checksums	${distname}${extract.suffix} md5 59c76ac704088ef5539210190c4e1fe3 \
		ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \
		ltmain13 md5 e094ae92724c4015dbab97de151c2525

depends_build	port:libtool

depends_lib	path:lib/pkgconfig/sdl.pc:libsdl

patchfiles	patch-smpeg.h.diff patch-glmovie-tile.c.diff \
		patch-glmovie.c.diff patch-Makefile.in.diff patch-configure.diff \
		patch-smpeg.m4.diff patch-MPEGaudio.h.diff patch-video.h.diff \
		patch-MPEG.cpp.diff
post-patch {
	file copy -force ${distpath}/ltconfig13 ${worksrcpath}/ltconfig
	file copy -force ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh
}

configure.args	--without-x \
		--disable-gtktest \
		--disable-gtk-player \
		--disable-static \
		--disable-sdltest \
		--mandir=${prefix}/share/man \
		--enable-shared=no

configure.ccache no
configure.ldflags-append -framework OpenGL

use_parallel_build	no

post-configure {
	# It's too much of a PITA to autoreconf
	delete ${worksrcpath}/libtool
	file copy -force ${prefix}/bin/glibtool ${worksrcpath}/libtool
}
