# $Id: Portfile,v 1.2 2006/05/07 19:18:23 markd Exp $
PortSystem      1.0

name                    tclx
version                 8.4
revision		1
categories              lang
maintainers             markd@opendarwin.org
description             API for parsing XML documents using Tcl
long_description        ${description}
homepage                http://tclx.sourceforge.net/
platforms               darwin
distname                ${name}${version}
master_sites            sourceforge http://www.opendarwin.org/~markd/:tclpheaders
distfiles		${distname}.tar.bz2 tcl8.4.12-privateheaders.tar.bz2:tclpheaders
checksums               ${distname}.tar.bz2 md5 395c2fbe35e1723570b005161b9fc8f8 \
			tcl8.4.12-privateheaders.tar.bz2 md5 290b81dc9e2745d887f3cf749ee56a70
use_bzip2		yes

depends_lib             port:tcl \
			port:tk

configure.env           CPPFLAGS="-L${prefix}/lib" \
                        CFLAGS="-I${prefix}/include" \
                        LDFLAGS="-L${prefix}/lib"

configure.args		--enable-shared \
			--with-help=Help \
			--with-tcl=${prefix}/lib \
			--with-tk=${prefix}/lib

destroot.target		install-binaries install-libraries

post-extract {
# Private headers from Tcl 8.4.12
	file copy -force ${workpath}/tclInt.h ${worksrcpath}/generic
	file copy -force ${workpath}/tclIntDecls.h ${worksrcpath}/generic
	file copy -force ${workpath}/tclIntPlatDecls.h ${worksrcpath}/generic
	file copy -force ${workpath}/tclUnixPort.h ${worksrcpath}/unix
}
