# $Id: Portfile 137209 2015-06-06 18:24:21Z khindenburg@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	https://icculus.org/smpeg/
master_sites	macports freebsd

checksums	rmd160  d55249ad53417fa0df3d925aed0e83d2204e28b7 \
		sha256  1efa7984d0aada0c2954cd0aaef357e9d7871dadd3368dbe742ab5f260523e57

depends_lib	port: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 -fvi

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

livecheck.type	none
