# $Id: Portfile 85023 2011-10-07 18:57:36Z jmr@macports.org $

PortSystem 1.0

name		smpeg
version		0.4.4
revision	9
categories	multimedia
# libs are LGPL, executables are GPL
# the readme says LGPLv2 but the actual source files say "or any later version"
license		{GPL-2+ LGPL} BSD IJG
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 freebsd

checksums	md5 59c76ac704088ef5539210190c4e1fe3

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

patchfiles	patch-smpeg.h.diff patch-glmovie-tile.c.diff \
		patch-glmovie.c.diff \
		patch-smpeg.m4.diff patch-MPEGaudio.h.diff patch-video.h.diff \
		patch-MPEG.cpp.diff patch-smpeg-gtkm4.diff patch-automake-as.diff \
		patch-configure-flags.diff patch-Makefile.am.diff

post-patch {
	file delete ${worksrcpath}/acinclude.m4
	touch ${worksrcpath}/NEWS
	touch ${worksrcpath}/AUTHORS
	touch ${worksrcpath}/ChangeLog
}

use_autoreconf  yes
autoreconf.args --include=${worksrcpath}/m4

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

configure.ldflags-append -framework OpenGL

use_parallel_build	no
