# $Id: Portfile 60534 2009-11-14 23:10:00Z ryandesign@macports.org $ PortSystem 1.0 name itcl version 3.3 revision 2 categories lang maintainers nomaintainer description Object oriented extension to Tcl. long_description ${description} homepage http://incrtcl.sourceforge.net/ platforms darwin master_sites sourceforge:incrtcl:itcl \ sourceforge:tcl:tcl 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. set tclv 8.4.14 distfiles ${distname}.tar.gz:itcl \ tcl${tclv}-src.tar.gz:tcl checksums ${name}${version}.tar.gz md5 d958b3d1c52fa5336b5aacc1251b5ce3 \ tcl${tclv}-src.tar.gz md5 51c6bf74d3ffdb0bd866ecdac6ff6460 depends_build port:tcl port:tk build.args CPPFLAGS=-I${prefix}/include worksrcdir ${name}${version} set tclconfig ${prefix}/lib configure.env TCLROOT=${prefix} configure.cflags "-I${workpath}/tcl${tclv}/generic" configure.ldflags-append "-tcl8.4" configure.args --with-tcl=${tclconfig} --with-tk=${prefix}/lib post-patch { reinplace "s|@itcl_LIB_FILE@|${prefix}/lib/libitcl3.3.dylib|g" \ ${worksrcpath}/itclConfig.sh.in reinplace "s|@PACKAGE_VERSION@|3.3|g" \ ${worksrcpath}/itclConfig.sh.in reinplace "s|@itcl_BUILD_LIB_SPEC@|-L${prefix}/lib -litcl|g" \ ${worksrcpath}/itclConfig.sh.in reinplace "s|@itcl_LIB_SPEC@|-L${prefix}/lib -litcl|g" \ ${worksrcpath}/itclConfig.sh.in reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \ ${worksrcpath}/pkgIndex.tcl.in } post-build { system "ranlib ${worksrcpath}/libitclstub3.3.a" } destroot { set _d ${destroot}${prefix} set _w ${worksrcpath} file mkdir -p ${_d}/lib/itcl3.3 xinstall -m 755 ${_w}/itclConfig.sh ${_d}/lib/itcl3.3 file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itcl3.3 file copy -force ${_w}/library/itcl.tcl ${_d}/lib/itcl3.3 file copy -force ${_w}/libitcl3.3.dylib ${_d}/lib file copy -force ${_w}/libitclstub3.3.a ${_d}/lib file mkdir -p ${_d}/include foreach x {itcl.h itclDecls.h itclInt.h itclIntDecls.h } { file copy -force ${_w}/generic/$x ${_d}/include } foreach x [glob ${_w}/doc/*.n] { file copy -force $x ${_d}/share/man/mann } }