# $Id: Portfile,v 1.1 2005/07/24 20:51:55 mww Exp $

PortSystem 1.0

name			esdl
version			0.95.0630
categories		graphics devel erlang
platforms		darwin
maintainers		bfulgham@mac.com
description		Erlang OpenGL/SDL API and Utilities
long_description	ESDL is a library that gives you access to SDL and \
				OpenGL functionality from your Erlang program. \
				SDL handles 2D graphics, user events, and \
				audio, while OpenGL handles 3D graphics.

homepage		http://esdl.sourceforge.net/
master_sites		sourceforge
distfiles		${distname}.src.tar.gz
checksums		md5 e892f64e9c5f6eca037757e5c38667ce

depends_build		port:libsdl port:erlang

platform darwin 8	{
	patchfiles patch-c_src-Makefile.macOSX patch-c_src-esdl_driver.c patch-Makefile
}

use_configure		no

pre-build		{
			# Use Macintosh Makefile
			system "cd ${build.dir}/c_src && ln -sf Makefile.macOSX Makefile"
}

build.target		
destroot.destdir		DPORTSDIR=${destroot}

post-destroot		{
	xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
	xinstall -m 0644 -W ${worksrcpath} Readme Readme.MacOSX-Cocoa license.terms \
		${destroot}${prefix}/share/doc/${name}
	file copy ${worksrcpath}/test ${destroot}${prefix}/share/doc/${name}/test
}
