# $Id: Portfile 92849 2012-05-09 05:09:59Z jmr@macports.org $

PortSystem 1.0

name		glpong
version		1.3
categories	games
platforms	darwin
maintainers	nomaintainer
description	Implementation of pong using OpenGL, playable vs. AI.
long_description	Implementation of pong using OpenGL, SDL, SDL_image, \
			and SDL_mixer. Only mode of play is you against an AI.

homepage	http://math.missouristate.edu/~erik/software.php?id=72
master_sites	http://math.missouristate.edu/~erik/files/
checksums	md5 7e6f5a0e048623f3425d2e309ba86453 \
		sha1 e391d12a50f2d82e581b9f85de33b308a3a3152d \
		rmd160 a0077de5855b8a66f90fbf10c10275546b922772

depends_lib	path:lib/pkgconfig/sdl.pc:libsdl \
		port:libsdl_image \
		port:libsdl_mixer

patchfiles	src_image.c.patch

configure.args	--disable-sdltest

post-configure	{
	reinplace "s|-lGLU||g" ${worksrcpath}/src/Makefile
	reinplace "s|-lGL||g" ${worksrcpath}/src/Makefile
}

platform darwin 9 {
	# http://developer.apple.com/qa/qa2007/qa1567.html
	configure.ldflags-append -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
}
