# $Id: Portfile 30224 2007-10-22 22:49:14Z jmpp@macports.org $

PortSystem 1.0
name		readline-5
set shortname	readline
version		5.0.005
distname	${shortname}-5.0
categories	devel
maintainers	nomaintainer
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	\
		5.0. Only the dynamic library is installed, and the	\
		include files are kept in PREFIX/include/readline5.	 

homepage	http://cnswww.cns.cwru.edu/~chet/readline/rltop.html
master_sites	gnu:${shortname}	\
		ftp://ftp.cwru.edu/pub/bash/:${shortname}

patch_sites     ftp://ftp.cwru.edu/pub/bash/readline-5.0-patches/
patchfiles      readline50-001 \
                readline50-002 \
                readline50-003 \
                readline50-004 \
                readline50-005

platform darwin 8 { patchfiles-append   patch-shobj-conf }

checksums       ${distname}${extract.suffix} md5 9a39d15f1ed592883f8c6671e8c13120 \
                readline50-001 md5 5b47ed61b6b8413746750127c70e843d \
                readline50-002 md5 9f803005e7e4c7d675146a9a805acbf1 \
                readline50-003 md5 05d59c91f80fa99ab177783229b0f769 \
                readline50-004 md5 aa1f6343e47f8e024488c63281d77809 \
                readline50-005 md5 1dc2654e0161f2e7b4f536b12e1d54b7

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.5.dylib

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

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