# $Id: Portfile,v 1.26 2006/03/28 08:54:29 blb Exp $

PortSystem 1.0
name			tcl
version			8.4.12
# Tk (x11/tk) port depends on this version
categories		lang
maintainers		landonf@opendarwin.org
description		Tool Command Language
platforms		darwin freebsd
master_sites		sourceforge
dist_subdir		tcltk
distname		${portname}${portversion}-src
worksrcdir		${portname}${portversion}/unix
checksums		md5 7480432d8730263f267952788eb4839b
destroot.destdir	INSTALL_ROOT=${destroot}
configure.args		--mandir=${prefix}/share/man

post-destroot {
	cd ${destroot}${prefix}/bin
	system "ln -s ${prefix}/bin/tclsh8.4 tclsh"
	cd ${destroot}${prefix}/lib
	system "ln -s ${prefix}/lib/libtcl8.4.dylib libtcl.dylib"
	file delete -force ${destroot}${prefix}/share/man/man3/Panic.3
	# Install *all* Tcl headers
	#eval xinstall -m 755 [glob ${workpath}/tcl${version}/generic/*.h] ${destroot}${prefix}/include
	#eval xinstall -m 755 [glob ${workpath}/tcl${version}/unix/*.h] ${destroot}${prefix}/include
	#reinplace "s|../unix/tclUnixPort.h|tclUnixPort.h|g" \
		#${destroot}${prefix}/include/tclPort.h

}
