# $Id: Portfile,v 1.4 2005/05/27 21:42:25 waqar Exp $

PortSystem 1.0
name		AfterStep
version		2.1.0
categories	x11-wm x11
maintainers	waqar@opendarwin.org
description	Window Manager based on NeXTStep interface.
long_description	\
	AfterStep is a window manager for the Unix X Window System. 	\
	Originally based on the look and feel of the NeXTStep interface,\
	it provides end users with a consistent, clean, and elegant 	\
	desktop. The goal of AfterStep development is to provide for 	\
	flexibility of desktop configuration, improving aestetics, 	\
	and efficient use of system resources. 
homepage	http://www.afterstep.org
platforms	darwin
master_sites    afterstep:stable
use_bzip2	yes

checksums	md5 b2dba216770c322aadf3953bae1502d7		\
		sha1 e3da2bb499691eb3a558a0e8a0df9f53de050e17

depends_build	bin:pkg-config:pkgconfig

depends_lib	lib:libX11.6:XFree86 lib:libXext.6:XFree86 	\
		lib:libjpeg.62:jpeg lib:libpng.3:libpng		\
		lib:libfreetype:freetype lib:libtiff:tiff	\
		lib:libungif:libungif lib:libgtk.2:gtk2

configure.args	--mandir=${prefix}/share/man 		\
		--infodir=${prefix}/share/info		\
		--enable-i18n --with-ungif --with-x 	\
		--with-gif-includes=${prefix}/include	\
		--with-tiff-includes=${prefix}/include	\
		--with-jpeg-includes=${prefix}/include	\
		--with-png-includes=${prefix}/include	\
		--with-ttf-includes=${prefix}/include

platform darwin	{
	configure.env 	LDFLAGS="-L${prefix}/lib -bind_at_load"	\
			PKG_CONFIG=${prefix}/bin/pkg-config
	patchfiles	patch-parser.c
	pre-configure	{
		reinplace "s|-rdynamic|-dynamic|g" 	    \
		  ${worksrcpath}/configure		    \
		  ${worksrcpath}/libAfterBase/configure     \
		  ${worksrcpath}/libAfterBase/configure.in  \
		  ${worksrcpath}/libAfterImage/configure    \
		  ${worksrcpath}/libAfterImage/configure.in
	}
	post-destroot	{
		file rename ${destroot}/${prefix}/bin/Animate	\
			${destroot}/${prefix}/bin/Animate.as
	}
}
