PortSystem 1.0
PortGroup	github 1.0

github.setup	erikg glpong 1.3 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision	0
checksums	rmd160  a0077de5855b8a66f90fbf10c10275546b922772 \
		sha256  e77fb2c08875da08f1f28ed76faa464953d4546b3f2ebbc788b4983053bc1f32 \
		size    251959

categories	games
license		GPL-2+
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.

master_sites	macports_distfiles

depends_lib	port:libsdl \
		port:libsdl_image \
		port:libsdl_mixer

patchfiles	src_image.c.patch

# Update config.guess and config.sub to be able to build on arm64.
depends_build-append    port:automake
post-patch {
    set automake_dirs [glob -directory ${prefix}/share automake-*]
    set automake_dir [lindex [lsort -command vercmp $automake_dirs] end]
    copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \
        ${worksrcpath}
}

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
}
