# $Id: Portfile 76602 2011-03-02 00:29:01Z ryandesign@macports.org $

PortSystem			1.0
name				xplanet
version				1.2.2
categories			x11 graphics
maintainers			nomaintainer
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			sha1    3c9cc4be7cd87121884162204eff376af2fc03e3 \
					rmd160  431c9223b2b122599a8c4bdca18c17fea0dcd5ab

depends_build \
	port:pkgconfig
depends_lib \
	port:xorg-libXScrnSaver \
	port:fontconfig \
	port:libpng \
	port:jpeg \
	port:tiff

patchfiles			objc-flags.diff

use_autoreconf		yes

configure.args		--with-x --with-xscreensaver --without-gif \
					--with-jpeg --with-png --with-tiff \
					--without-freetype --without-pango --without-pnm \
					--mandir=${prefix}/share/man

post-destroot {
	set docdir ${destroot}${prefix}/share/doc/${name}
	xinstall -d ${docdir}
	xinstall -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README TODO ${docdir}
}

variant freetype description "Enable Freetype support for TrueType fonts" {
	configure.args-delete	--without-freetype
	configure.args-append	--with-freetype
	depends_lib-append	port:freetype
}

variant gif description "Enable GIF support" {
	configure.args-delete	--without-gif
	configure.args-append	--with-gif
	depends_lib-append		path:include/gif_lib.h:giflib
}

variant pango description "Enable Pango" {
	configure.args-delete	--without-pango
	configure.args-append	--with-pango
	depends_lib-append		path:lib/pkgconfig/pango.pc:pango
}

variant aqua description "Use aqua instead of X11" {
	supported_archs	i386 ppc
	depends_lib-delete	port:xorg-libXScrnSaver
	configure.args-delete	--with-x --with-xscreensaver
	configure.args-append	--without-x --with-aqua
}

variant pnm description "Enable PNM support" {
	depends_lib-append		port:netpbm
	configure.args-delete	--without-pnm
	configure.args-append	--with-pnm
}

