# $Id: Portfile,v 1.5 2005/10/19 08:10:18 blb Exp $

PortSystem			1.0
name				xplanet
version				1.2.0
categories			x11 graphics
maintainers			blb@opendarwin.org
description			Render an image of a planet into an X window or file
long_description \
	Xplanet is similar to Xearth, where an image of the earth is rendered \
	into an X window.  All of the major planets and most satellites can be \
	drawn.   A number of different map projections are also supported, \
	including azimuthal, Mercator, Mollweide, orthographic, and rectangular.

platforms			darwin

homepage			http://xplanet.sourceforge.net/
master_sites		sourceforge

checksums			md5 87d62fcdf43ad1beec677bfb6e299ac1

depends_lib			lib:libX11:XFree86 lib:libjpeg:jpeg lib:libpng:libpng \
					lib:libtiff:tiff

configure.args		--with-x --with-xscreensaver --without-gif \
					--with-jpeg --with-png --with-tiff \
					--without-freetype --without-pango \
					--mandir=${prefix}/share/man
configure.env		CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"

post-destroot {
	file mkdir ${destroot}${prefix}/share/doc/${name}
	cd ${worksrcpath}
	file copy AUTHORS COPYING ChangeLog NEWS README TODO \
		${destroot}${prefix}/share/doc/${name}
}

variant freetype {
	configure.args-delete	--without-freetype
	configure.args-append	--with-freetype
	depends_lib				lib:libfreetype:freetype
}

variant gif {
	configure.args-delete	--without-gif
	configure.args-append	--with-gif
	depends_lib-append		lib:libungif:libungif
}

variant pango {
	configure.args-delete	--without-pango
	configure.args-append	--with-pango
	depends_lib-append		lib:libpango:pango
}

variant aqua {
	depends_lib-delete		lib:libX11:XFree86
	configure.args-delete	--with-x
	configure.args-append	--without-x --with-aqua
}

variant pnm {
	depends_lib-append		lib:libnetpbm.10:netpbm
}

