# $Id: Portfile,v 1.16 2006/06/30 04:05:35 ben Exp $

PortSystem 1.0
name			libsdl_image
version			1.2.5
revision		1
categories		devel graphics
maintainers		darwinports@opendarwin.org
description		Add on library for libSDL handling several image formats
long_description	This is a simple library to load images of various \
			formats as SDL surfaces. This library supports BMP, \
			PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.
platforms		macosx
master_sites		http://www.libsdl.org/projects/SDL_image/release/
homepage        	http://www.libsdl.org/
distname		SDL_image-${version}
checksums		md5 cd006109a73bf7dcc93e1c3ed15ee782
depends_lib		port:libsdl port:libpng port:jpeg port:tiff port:zlib

configure.env	CFLAGS="-I${prefix}/include" \
				LDFLAGS="-L${prefix}/lib"
configure.args	--disable-sdltest

build.env	${configure.env}

post-destroot	{
	xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 0644 -W ${worksrcpath} CHANGES COPYING README \
		${destroot}${prefix}/share/doc/${name}
}

platform darwin 6 {
	depends_lib-append	lib:libdl:dlcompat
}

platform darwin 8 {
	configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
