# $Id: Portfile,v 1.39 2006/05/19 06:05:58 mww Exp $

PortSystem 1.0
name		libpng
version		1.2.10
revision	2
categories	graphics
maintainers	waqar@opendarwin.org
description	Library for manipulating PNG images
long_description	\
	Libpng was written as a companion to the PNG specification, as a  \
	way to reduce the amount of time and effort it takes to support   \
	the PNG file format in application programs.  Most users will not \
	have to modify the library significantly, advanced users may want \
	to modify it more.  The library was coded for both users.  All    \
	attempts were made to make it as complete as possible, while      \
	keeping the code easy to understand.  Currently, this library     \
	only supports C.  Support for other languages is being considered.
platforms	darwin openbsd freebsd sunos linux
homepage	http://www.libpng.org/pub/png/
use_bzip2	yes
master_sites	sourceforge
checksums	md5 4f23eebd59ddd01a8f91ff8c823dd7d6	\
			sha1 075fe05e25012470d0351187b57e8256b95d2e89

depends_lib	port:zlib

configure.args	--mandir=${prefix}/share/man
configure.env	CFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"

post-destroot	{
	system "ranlib ${destroot}${prefix}/lib/libpng12.a"
	xinstall -d -m 755 ${destroot}${prefix}/share/${name}
	file copy ${worksrcpath}/example.c ${destroot}${prefix}/share/${name}
}

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