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

Last change on this file since 30235 was 30235, checked in by jmpp@…, 10 years ago

nomaintainer address abstraction in lang category.

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