1 | # $Id: Portfile 24749 2007-05-02 20:41:20Z sfiera@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name mzscheme |
---|
6 | version 360 |
---|
7 | revision 1 |
---|
8 | categories lang scheme |
---|
9 | platforms darwin |
---|
10 | maintainers nomaintainer@macports.org |
---|
11 | description MzScheme is an implementation of the Scheme programming language |
---|
12 | long_description ${description} |
---|
13 | |
---|
14 | homepage http://www.plt-scheme.org/software/mzscheme/ |
---|
15 | set subdir ${version}/mz/ |
---|
16 | master_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} |
---|
23 | distfiles mz-${version}-src-unix.tgz |
---|
24 | checksums md5 4ffdab3e26a5d13148b59ae2cdfa8460 |
---|
25 | |
---|
26 | depends_lib port:jpeg \ |
---|
27 | port:libpng \ |
---|
28 | port:libiconv |
---|
29 | |
---|
30 | worksrcdir mz-${version}/src |
---|
31 | set frameworks ${prefix}/Library/Frameworks |
---|
32 | |
---|
33 | post-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 | |
---|
45 | configure.args --enable-libfw |
---|
46 | |
---|
47 | configure.env CFLAGS="-I${prefix}/include" \ |
---|
48 | CPPFLAGS="-I${prefix}/include" \ |
---|
49 | LDFLAGS="-L${prefix}/lib" |
---|
50 | |
---|
51 | destroot.destdir prefix=${destroot}${prefix} |
---|
52 | post-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 | } |
---|