source: trunk/dports/lang/smlnj/Portfile

Last change on this file was 144128, checked in by khindenburg@…, 21 months ago

smlnj: update to 110.79 maintainer timeout #49766

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 144128 2016-01-02 17:44:16Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                smlnj
7version             110.79
8categories          lang ml
9license             BSD
10maintainers         bfulgham
11description         Standard ML of New Jersey
12long_description \
13    Standard ML of New Jersey (abbreviated SML/NJ) is a \
14    compiler for the Standard ML '97 programming language \
15    with associated libraries, tools, and documentation. \
16    SML/NJ is free, open source software.
17homepage            http://www.smlnj.org/
18platforms           darwin
19
20master_sites        http://smlnj.cs.uchicago.edu/dist/working/${version}/
21dist_subdir         ${name}/${version}_${revision}
22
23distfiles
24checksums
25
26# Files needed for basic distribution.
27set srcs [list \
28    ckit.tgz bb39f5029531db138e408504259c16158884b782 \
29    cml.tgz 1ee263ca8da2147ebc3e6d318d8fa1cd26d59f06 \
30    cm.tgz 5779b26a500cf258ab5fc803f40ed41a9d177481 \
31    compiler.tgz 8e4ce5bd8f6605d4ef1d1b9db52dda68c6b3cc7d \
32    config.tgz 945a0ecd97365188f4c23d33c4d38e9bc073cb1a \
33    doc.tgz bf833b64029612d1c59864106894f78a0a4ba6aa \
34    eXene.tgz 53ea8dd1d930a1537a9a81c2d12032c2c98de501 \
35    heap2asm.tgz 0ba4d8c91dd8e1ed4f0543980757f29ab286241e \
36    ml-burg.tgz 0cfc5665b8b05e1249432330936357236f46cbb3 \
37    ml-lex.tgz f6e99b672be6bc689dbc24532ea8068a73c87fc2 \
38    ml-lpt.tgz 97e7d95718eec2d0fafc7dca9e3bd4c025171958 \
39    MLRISC.tgz 148b4256f6c7c6978355126cb38d6447c727a779 \
40    ml-yacc.tgz b28f3f06bf1494a9acabb2e8e463669b29693e54 \
41    nlffi.tgz 802e28b56fbb7d6dae039237144eb0a3286334b5 \
42    old-basis.tgz d79f72ad9b6e55c4df47fe73646700310d10b954 \
43    pgraph.tgz 0b9c1a9f08d3df618a4f374c493252c8b30d8c12 \
44    runtime.tgz f196e3b3568081e8666bc92ed5025f7738d9a6c5 \
45    smlnj-c.tgz d8fd5771f0c7d4baf6f4c25ebb17f0e4ccef0298 \
46    smlnj-lib.tgz 7cdeacf3fb2c45e7768efdcb716614261fff270f \
47    system.tgz 184ef6a6414e3b6f9bdc5ed5d523721d84dc3981 \
48    trace-debug-profile.tgz ab761a6480f00225e91dd40dd59d1f511e50d591 \
49]
50
51foreach {tarball checksum} $srcs {
52    distfiles-append $tarball
53    checksums-append $tarball sha1 $checksum
54}
55
56
57# Platform-specific boot code (omitted: sparc-unix, x86-win32)
58platform powerpc {
59    distfiles-append boot.ppc-unix.tgz
60    checksums-append boot.ppc-unix.tgz sha1 1f519ef4e31329cc1fe52e34fe927e54fe688815
61}
62platform i386 {
63    distfiles-append boot.x86-unix.tgz
64    checksums-append boot.x86-unix.tgz sha1 c2ab5569be827afea10e8b8bb07a597845d3d201
65}
66
67### extract ###
68extract.mkdir       yes
69extract.only        config.tgz
70
71### patch ###
72patchfiles          patch-config__install.sh-correct-compiler.diff
73
74post-patch {
75    reinplace "s|@CC@|${configure.cc}|" ${worksrcpath}/config/install.sh
76    reinplace "s|@CPP@|${configure.cc}|" ${worksrcpath}/config/install.sh
77    reinplace "s|@CFLAGS@|${configure.cflags}|" ${worksrcpath}/config/install.sh
78    reinplace "s|@LDFLAGS@|${configure.ldflags}|" ${worksrcpath}/config/install.sh
79}
80
81### configure ###
82configure {
83    reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \
84        ${worksrcpath}/config/srcarchiveurl
85    reinplace "s|#request src-smlnj|request src-smlnj|" \
86        ${worksrcpath}/config/targets
87    reinplace "s|#request eXene|request eXene|" \
88        ${worksrcpath}/config/targets
89    reinplace "s|#request mlrisc-tools|request mlrisc-tools|" \
90        ${worksrcpath}/config/targets
91    reinplace "s|#request heap2asm |request heap2asm|" \
92        ${worksrcpath}/config/targets
93}
94
95### build ###
96build.env           URLGETTER=curl
97build.cmd           ${worksrcpath}/config/install.sh
98build.target
99
100### destroot ###
101destroot {
102    set smlnj_home ${prefix}/share/smlnj
103
104    file mkdir ${destroot}${smlnj_home}
105    file copy ${worksrcpath}/bin ${destroot}${smlnj_home}
106    file copy ${worksrcpath}/lib ${destroot}${smlnj_home}
107
108    xinstall -m 555 ${filespath}/sml.sh ${destroot}${prefix}/bin/sml
109    reinplace "s|__SMLNJ_HOME__|${smlnj_home}|g" \
110        ${destroot}${prefix}/bin/sml
111
112    foreach prog [glob -directory ${worksrcpath}/bin *] {
113        set progname [file tail $prog]
114        if {![string equal $progname sml]} {
115            ln -s sml ${destroot}${prefix}/bin/${progname}
116        }
117    }
118}
119
120livecheck.type      regex
121livecheck.regex     {/working/([0-9.]+)/}
Note: See TracBrowser for help on using the repository browser.