# $Id: Portfile,v 1.1 2006/03/07 22:32:46 mww Exp $

PortSystem 1.0
name		zsh-devel
version		4.3.2
categories	shells
maintainers	darwinports@opendarwin.org
description	Zsh is a UNIX command interpreter (shell)
long_description	Zsh is a UNIX command interpreter (shell) which of \
			the standard shells most resembles the Korn shell \
			(ksh), although it is not completely compatible. \
			It includes enhancements of many types, notably in \
			the command-line editor, options for customising its \
			behaviour, filename globbing, features to make \
			C-shell (csh) users feel more at home and extra \
			features drawn from tcsh (another `custom' shell).
homepage	http://www.zsh.org
platforms	darwin
use_bzip2 	yes
master_sites	http://www.zsh.org/pub/ ftp://ftp.zsh.org/zsh/ \
 		ftp://ftp.sterling.com/zsh/ \
 		ftp://ftp.rge.com/pub/shells/zsh/ \
 		ftp://ftp.fu-berlin.de/pub/unix/shells/zsh \
 		ftp://ftp.ips.oz.au/pub/packages/zsh/ \
 		ftp://ftp.uit.no/pub/unix/shells/zsh/ \
 		ftp://ftp.iij.ad.jp/pub/misc/zsh/ \
 		ftp://ftp.icm.edu.pl/vol/wojsyl/zsh/\
 		ftp://ftp.sunsite.auc.dk/disk1/zsh/
distname    zsh-${version}
checksums	sha1 a6dd50c7578812bdb30f4cb65c8ac280c86dbfc3
depends_lib	port:libiconv
configure.args	--mandir=${prefix}/share/man --infodir=${prefix}/share/info \
		--enable-libs=-liconv --enable-cppflags=-I${prefix}/include \
		--enable-cflags=-I${prefix}/include --enable-ldflags=-L${prefix}/lib

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
	post-configure {
		reinplace "s|#define HAVE_POLL 1|#undef HAVE_POLL|" ${worksrcpath}/config.h
	}
}

variant dp_completion {
	post-destroot	{
			file copy -force ${filespath}/_port \
			${destroot}${prefix}/share/zsh/${version}/functions
	}	
}

variant utf8 { configure.args-append --enable-multibyte }

