source: trunk/dports/x11/itk/Portfile

Last change on this file was 96243, checked in by jmr@…, 5 years ago

itk: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1# $Id: Portfile 96243 2012-08-06 03:01:26Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    itk
6version                 3.3
7revision                3
8categories              x11 tk
9license                 Tcl/Tk MIT
10maintainers             nomaintainer
11description             \[incr Tk\] A.K.A. \"itk\".  Object oriented extension to Tk.
12long_description        ${description}
13homepage                http://incrtcl.sourceforge.net/itk/itk.html
14platforms               darwin
15
16master_sites            sourceforge:incrtcl:itk \
17                        sourceforge:tcl:tcl
18dist_subdir             tcltk
19distname                ${name}${version}
20# Set tclv and md5 checksum to the current MacPorts Tcl port version, though port doesn't
21# break if they aren't in sync.
22
23set tclv                8.5.9
24
25distfiles               ${distname}.tar.gz:itk \
26                                tcl${tclv}-src.tar.gz:tcl
27checksums               ${name}${version}.tar.gz md5 a97c17f3cfa5e377f43073c653c501b5 \
28                                tcl${tclv}-src.tar.gz md5 8512d8db3233041dd68a81476906012a
29depends_build           port:tk port:itcl
30build.args              CPPFLAGS=-I${prefix}/include
31worksrcdir              ${name}${version}
32
33set tclconfig ${prefix}/lib
34
35configure.env           TCLROOT=${prefix}
36configure.cflags        "-I${workpath}/tcl${tclv}/generic -I${workpath}/tcl${tclv}/unix"
37configure.ldflags-append        -ltcl -lX11
38
39configure.args          --with-tcl=${tclconfig} \
40                        --with-itcl=${prefix}/lib/itcl3.4 \
41                        --with-tk=${prefix}/lib
42
43post-patch {
44        reinplace "s|@itk_LIB_SPEC@|-L${prefix}/lib -litk|g" \
45                ${worksrcpath}/itkConfig.sh.in
46        reinplace "s|@ITK_BUILD_LIB_SPEC@|-L${prefix}/lib -litk|g" \
47                ${worksrcpath}/itkConfig.sh.in
48        reinplace "s|\"@PKG_LIB_FILE@\"|.. @PKG_LIB_FILE@|g" \
49                ${worksrcpath}/pkgIndex.tcl.in
50}
51
52destroot {
53        set _d ${destroot}${prefix}
54        set _w ${worksrcpath}
55        file mkdir ${_d}/lib/itk3.3
56        xinstall -m 755 ${_w}/itkConfig.sh ${_d}/lib/itk3.3
57
58        foreach x [glob ${worksrcpath}/library/*] {
59                file copy -force $x ${_d}/lib/itk3.3
60        }
61        file copy -force ${_w}/pkgIndex.tcl ${_d}/lib/itk3.3
62
63        file copy -force ${_w}/libitk3.3.dylib ${_d}/lib
64
65        file mkdir ${_d}/include
66        foreach x {itk.h itkDecls.h } {
67                file copy -force ${_w}/generic/$x ${_d}/include
68        }
69        foreach x [glob ${_w}/doc/*.n] {
70                file copy -force $x ${_d}/share/man/mann
71        file delete -force ${_d}/share/man/mann/Toplevel.n
72        }
73}
Note: See TracBrowser for help on using the repository browser.