source: trunk/dports/lang/smlnj/Portfile @ 27178

Last change on this file since 27178 was 27178, checked in by mww@…, 13 years ago

add macports as mirror for distfiles

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# $Id: Portfile 27178 2007-07-23 11:26:00Z mww@macports.org $
2
3PortSystem 1.0
4name             smlnj
5version          110.62
6categories       lang
7maintainers      bfulgham@macports.org
8description      Standard ML of New Jersey
9long_description \
10        Standard ML of New Jersey (abbreviated SML/NJ) is a \
11        compiler for the Standard ML '97 programming language \
12        with associated libraries, tools, and documentation. \
13        SML/NJ is free, open source software.
14homepage         http://www.smlnj.org/
15platforms        darwin
16
17master_sites     http://smlnj.cs.uchicago.edu/dist/working/${version}/ \
18                 http://smlnj.cs.uchicago.edu/dist/working/110.62/ \
19                 macports:mww/${name}-${version}/
20dist_subdir      ${name}/${version}
21
22distfiles
23checksums
24
25# Files needed for basic distribution.
26set srcs [list \
27        MLRISC.tgz 6aea4f5fe460769b0e1569c89d9d6dc15de39b1d \
28        ckit.tgz 33b204ca5b7ba7ef1fa43b90ece59d228be2bf04 \
29        cm.tgz c7ef9cda0fc782f1a89d9681066af55edef2394b \
30        cml.tgz ae4e0bb2020b5fdba0bf1a26477af329d19f2322 \
31        compiler.tgz 480ba1ad70a3468610866f1631330bd75142c225 \
32        config.tgz e26939683f2d6c5c6f4e7b92ed1e626e838f94eb \
33        eXene.tgz b52f670cc3b57017134ddfb51a8fbc1fd9178f93 \
34        lexgen.tgz 47522a0b4c131b3a3a9fe3277c7b434fb9470e91 \
35        ml-burg.tgz 96badba4f1615b2e31f385558c4eb486d9248983 \
36        ml-lex.tgz 62638e146cc1435d2a4b5ad3b10ba27bfe01bded \
37        ml-yacc.tgz a02bf2d17aa76a3cf56cdd45b09ce25299fc10ac \
38        pgraph.tgz b815fae92d142ab8f1eb79fa24a63b17b9918318 \
39        runtime.tgz e2c0a97bcccda91dfe631d6dc60203011cc9742d \
40        smlnj-c.tgz 587e89965821c29ce25a539cadbc83fce5323a35 \
41        smlnj-lib.tgz 903067f55f0050b3f84e6e4e1c7f9581278d0001 \
42        system.tgz 0adf14d72ce8d7a5d216daee1b67645f89892d39 \
43        heap2asm.tgz 83d8898039d1381d1c26642224a265d2bab7eb8f \
44        trace-debug-profile.tgz 2594cc62d712ada74d221be22a3bbd1ec6306d1c \
45        ml-lpt.tgz d44794a178c688b6f37accd17502fffd49420fcd \
46        nlffi.tgz 70c79b634fadc87f2525d5c06a92bec256dd513b \
47]
48
49foreach {tarball checksum} $srcs {
50        distfiles-append $tarball
51        checksums-append $tarball sha1 $checksum
52}
53
54
55# Platform-specific boot code (omitted: sparc-unix, x86-win32)
56platform powerpc {
57        distfiles-append boot.ppc-unix.tgz
58        checksums-append boot.ppc-unix.tgz sha1 f4e7db44e9b78fb8c99888e2cad8eb3a93391495
59}
60platform i386 {
61        distfiles-append boot.x86-unix.tgz
62        checksums-append boot.x86-unix.tgz sha1 3336a1340ecc9db8de7d5199a8af5f465651d2dd
63}
64
65### extract ###
66pre-extract {
67        file mkdir ${worksrcpath}
68}
69extract.dir          ${worksrcpath}
70extract.only         config.tgz
71
72### configure ###
73configure {
74        reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \
75                ${worksrcpath}/config/srcarchiveurl
76
77        reinplace "s|#request|request|" ${worksrcpath}/config/targets
78}
79
80### build ###
81build.env            URLGETTER=curl
82build.cmd            ${worksrcpath}/config/install.sh
83build.target
84
85### destroot ###
86destroot {
87        set smlnj_home ${prefix}/share/smlnj
88
89        file mkdir ${destroot}${smlnj_home}
90        file copy ${worksrcpath}/bin ${destroot}${smlnj_home}
91        file copy ${worksrcpath}/lib ${destroot}${smlnj_home}
92
93        xinstall -m 555 ${filespath}/sml.sh ${destroot}${prefix}/bin/sml
94        reinplace "s|__SMLNJ_HOME__|${smlnj_home}|g" \
95                ${destroot}${prefix}/bin/sml
96
97        foreach prog [glob -directory ${worksrcpath}/bin *] {
98                set progname [file tail $prog]
99                if {![string equal $progname sml]} {
100                        system "ln -s sml ${destroot}${prefix}/bin/${progname}"
101                }
102        }
103}
Note: See TracBrowser for help on using the repository browser.