source: trunk/dports/lang/itcl/Portfile @ 60534

Last change on this file since 60534 was 60534, checked in by ryandesign@…, 8 years ago

Remove darwin 7 bits; MacPorts itself no longer compiles on Panther.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: Portfile 60534 2009-11-14 23:10:00Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    itcl
6version                 3.3
7revision                2
8categories              lang
9maintainers             nomaintainer
10description             Object oriented extension to Tcl.
11long_description        ${description}
12homepage                http://incrtcl.sourceforge.net/
13platforms               darwin
14master_sites            sourceforge:incrtcl:itcl \
15                        sourceforge:tcl:tcl
16distname                ${name}${version}
17# Set tclv and md5 checksum to the current MacPorts Tcl port version, though port doesn't
18# break if they aren't in sync.
19
20set tclv                8.4.14
21
22distfiles               ${distname}.tar.gz:itcl \
23                                tcl${tclv}-src.tar.gz:tcl
24checksums               ${name}${version}.tar.gz md5 d958b3d1c52fa5336b5aacc1251b5ce3 \
25                                tcl${tclv}-src.tar.gz md5 51c6bf74d3ffdb0bd866ecdac6ff6460
26depends_build           port:tcl port:tk
27build.args              CPPFLAGS=-I${prefix}/include
28worksrcdir              ${name}${version}
29
30set tclconfig ${prefix}/lib
31
32configure.env           TCLROOT=${prefix}
33configure.cflags        "-I${workpath}/tcl${tclv}/generic"
34configure.ldflags-append        "-tcl8.4"
35
36configure.args          --with-tcl=${tclconfig} --with-tk=${prefix}/lib
37
38post-patch {
39        reinplace "s|@itcl_LIB_FILE@|${prefix}/lib/libitcl3.3.dylib|g" \
40               ${worksrcpath}/itclConfig.sh.in
41        reinplace "s|@PACKAGE_VERSION@|3.3|g" \
42                ${worksrcpath}/itclConfig.sh.in
43        reinplace "s|@itcl_BUILD_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
44                ${worksrcpath}/itclConfig.sh.in
45        reinplace "s|@itcl_LIB_SPEC@|-L${prefix}/lib -litcl|g" \
46                ${worksrcpath}/itclConfig.sh.in
47        reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \
48                ${worksrcpath}/pkgIndex.tcl.in
49}
50
51post-build {
52                system "ranlib ${worksrcpath}/libitclstub3.3.a"
53}
54
55destroot {
56        set _d ${destroot}${prefix}
57        set _w ${worksrcpath}
58        file mkdir -p ${_d}/lib/itcl3.3
59        xinstall -m 755 ${_w}/itclConfig.sh ${_d}/lib/itcl3.3
60        file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itcl3.3
61        file copy -force ${_w}/library/itcl.tcl ${_d}/lib/itcl3.3
62        file copy -force ${_w}/libitcl3.3.dylib ${_d}/lib
63        file copy -force ${_w}/libitclstub3.3.a ${_d}/lib
64
65        file mkdir -p ${_d}/include
66        foreach x {itcl.h itclDecls.h itclInt.h itclIntDecls.h } {
67                file copy -force ${_w}/generic/$x ${_d}/include
68        }
69
70        foreach x [glob ${_w}/doc/*.n] {
71                file copy -force $x ${_d}/share/man/mann
72        }
73}
Note: See TracBrowser for help on using the repository browser.