description \[incr Tk\] A.K.A. \"itk\". Object oriented extension to Tk.
long_description ${description}
homepage http://incrtcl.sourceforge.net/itk/itk.html
master_sites sourceforge:incrtcl:itk \
distname ${name}${version}
# Set tclv and md5 checksum to the current MacPorts Tcl port version, though port doesn't
# break if they aren't in sync.
distfiles ${distname}.tar.gz:itk \
tcl${tclv}-src.tar.gz:tcl
checksums ${name}${version}.tar.gz md5 a97c17f3cfa5e377f43073c653c501b5 \
tcl${tclv}-src.tar.gz md5 8512d8db3233041dd68a81476906012a
depends_build port:tk port:itcl
build.args CPPFLAGS=-I${prefix}/include
worksrcdir ${name}${version}
set tclconfig ${prefix}/lib
configure.env TCLROOT=${prefix}
configure.cflags "-I${workpath}/tcl${tclv}/generic -I${workpath}/tcl${tclv}/unix"
configure.ldflags-append -ltcl -lX11
configure.args --with-tcl=${tclconfig} \
--with-itcl=${prefix}/lib/itcl3.4 \
reinplace "s|@itk_LIB_SPEC@|-L${prefix}/lib -litk|g" \
${worksrcpath}/itkConfig.sh.in
reinplace "s|@ITK_BUILD_LIB_SPEC@|-L${prefix}/lib -litk|g" \
${worksrcpath}/itkConfig.sh.in
reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \
${worksrcpath}/pkgIndex.tcl.in
set _d ${destroot}${prefix}
file mkdir ${_d}/lib/itk3.3
xinstall -m 755 ${_w}/itkConfig.sh ${_d}/lib/itk3.3
foreach x [glob ${worksrcpath}/library/*] {
file copy -force $x ${_d}/lib/itk3.3
file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itk3.3
file copy -force ${_w}/libitk3.3.dylib ${_d}/lib