Ticket #11943: mzscheme.portfile

File mzscheme.portfile, 2.3 KB (added by lumimies@…, 18 years ago)

Portfile fixing the problem

Line 
1# $Id: Portfile 24749 2007-05-02 20:41:20Z sfiera@macports.org $
2
3PortSystem 1.0
4
5name            mzscheme
6version         360
7revision        1
8categories      lang scheme
9platforms       darwin
10maintainers     nomaintainer@macports.org
11description     MzScheme is an implementation of the Scheme programming language
12long_description    ${description}
13
14homepage        http://www.plt-scheme.org/software/mzscheme/
15set subdir      ${version}/mz/
16master_sites \
17  http://download.plt-scheme.org/bundles/${subdir} \
18  http://plt.cs.uchicago.edu/bundles/${subdir} \
19  http://www.cs.utah.edu/plt/download/${subdir} \
20  ftp://archive.informatik.uni-tuebingen.de/unix/language/plt/${subdir} \
21  ftp://infogroep.be/pub/plt/bundles/${subdir} \
22  http://gd.tuwien.ac.at/languages/scheme/plt/${subdir}
23distfiles       mz-${version}-src-unix.tgz
24checksums       md5 4ffdab3e26a5d13148b59ae2cdfa8460
25
26depends_lib     port:jpeg \
27                port:libpng \
28                port:libiconv
29
30worksrcdir      mz-${version}/src
31set frameworks  ${prefix}/Library/Frameworks
32
33post-patch {
34  reinplace "s|collects|share/mzscheme|g" \
35    ${worksrcpath}/mzscheme/src/startup.ss \
36    ${worksrcpath}/mzscheme/src/startup.inc
37  reinplace "s|~/Library/PLT Scheme/|${prefix}/share/mzscheme/|g" \
38    ${worksrcpath}/mzscheme/src/file.c
39  reinplace "s|@FRAMEWORK_INSTALL_DIR@|${destroot}${frameworks}|" \
40    ${worksrcpath}/mzscheme/Makefile.in
41  reinplace "s|@executable_path|${frameworks}|" \
42    ${worksrcpath}/mzscheme/Makefile.in
43}
44
45configure.args  --enable-libfw
46
47configure.env   CFLAGS="-I${prefix}/include" \
48                CPPFLAGS="-I${prefix}/include" \
49                LDFLAGS="-L${prefix}/lib"
50
51destroot.destdir    prefix=${destroot}${prefix}
52post-destroot {
53  file delete -force ${destroot}${prefix}/install \
54    ${destroot}${prefix}/share/man
55  file rename ${destroot}${prefix}/collects \
56    ${destroot}${prefix}/share/mzscheme
57  xinstall -m 755 -d ${destroot}${prefix}/share/doc/ \
58    ${destroot}${prefix}/share/mzscheme/${version}/
59  file rename ${destroot}${prefix}/man \
60    ${destroot}${prefix}/share/man
61  file delete -force ${destroot}${prefix}/lib/buildinfo
62
63  ln -s ${frameworks}/PLT_MzScheme.framework/Versions/${version}/PLT_MzScheme \
64    ${destroot}${prefix}/lib/libmzscheme.${version}.dylib
65
66  cd ${destroot}${prefix}/share/mzscheme/${version}
67  ln -s . collects
68}