# $Id: Portfile,v 1.1 2004/08/26 19:47:38 gwright Exp $

PortSystem 1.0
name		readline-4
version		4.3
revision	0
categories	devel
maintainers	gwright@opendarwin.org
platforms	darwin

description	Library that provides command line editing
long_description\
		The GNU Readline library provides a set of functions	\
		for use by applications that allow users to edit	\
		command lines as they are typed in. Both Emacs and vi	\
		editing modes are available. The Readline library	\
		includes additional functions to maintain a list of	\
 		previously-entered command lines, to recall and perhaps	\
		reedit those lines, and perform csh-like history	\
		expansion on previous commands.				\
									\
		This version provides limited functionality. It is	\
		intended to be used by ports that require version	\
		4.3. Only the dynamic library is installed, and the	\
		include files are kept in PREFIX/include/readline4.	 

homepage	http://cnswww.cns.cwru.edu/~chet/readline/rltop.html
master_sites	ftp://ftp.cwru.edu/pub/bash/

distfiles	readline-${version}${extract.suffix}

checksums	md5 f86f7cb717ab321fe15f1bbcb058c11e

variant darwin {
	patchfiles	patch-shlib-Makefile.in
}

worksrcdir	readline-4.3

configure.args	--mandir=\\\${prefix}/share/man \
		--infodir=\\\${prefix}/share/info

post-destroot	{ file delete -force ${destroot}${prefix}/share

		  file delete ${destroot}${prefix}/lib/libhistory.a
		  file delete ${destroot}${prefix}/lib/libhistory.dylib
		  file delete ${destroot}${prefix}/lib/libhistory.4.dylib

		  file delete ${destroot}${prefix}/lib/libreadline.a
		  file delete ${destroot}${prefix}/lib/libreadline.dylib
		  file delete ${destroot}${prefix}/lib/libreadline.4.dylib

		  file rename ${destroot}${prefix}/include/readline ${destroot}${prefix}/include/readline4
		}
