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 94953 2012-07-02 18:40:08Z mww@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name smlnj |
---|
7 | version 110.75 |
---|
8 | categories lang ml |
---|
9 | license BSD |
---|
10 | maintainers bfulgham |
---|
11 | description Standard ML of New Jersey |
---|
12 | long_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. |
---|
17 | homepage http://www.smlnj.org/ |
---|
18 | platforms darwin |
---|
19 | |
---|
20 | master_sites http://smlnj.cs.uchicago.edu/dist/working/${version}/ |
---|
21 | dist_subdir ${name}/${version}_${revision} |
---|
22 | |
---|
23 | distfiles |
---|
24 | checksums |
---|
25 | |
---|
26 | # Files needed for basic distribution. |
---|
27 | set srcs [list \ |
---|
28 | config.tgz 527cb179b48abcf1463089d168b171fd05eb814d \ |
---|
29 | cm.tgz a4310413102c5649ed43d92962ffa307ebec4a39 \ |
---|
30 | compiler.tgz efd03a1cc84104c22776f56dca67e0ae5e9145e8 \ |
---|
31 | runtime.tgz dd81ce2963ca0ea4b1e92b22c7587d5ae64783f8 \ |
---|
32 | system.tgz 0f7536bbdcd6d1584f4dcbf3b30a553d98fb0cb1 \ |
---|
33 | MLRISC.tgz 041b6463d98d0effa0afc457fc5b09e74f081b85 \ |
---|
34 | smlnj-lib.tgz 33f4d3a8dc653cd015ed15a27776dd0e3f2fbb04 \ |
---|
35 | ckit.tgz 0dbca80174f969a549d85ef3e15a4a8ecce7ed22 \ |
---|
36 | nlffi.tgz b881390f58df7bbc5d84c45eec20af7fcfbfa40c \ |
---|
37 | cml.tgz 8938aa0685453c16f57bae23e96ed23b1409f419 \ |
---|
38 | eXene.tgz f8608de797634faaad632fbdfd43838c4de85e42 \ |
---|
39 | ml-lpt.tgz d0b68f304a5e29173a9599a3959c12e84ea479ee \ |
---|
40 | ml-lex.tgz 6557d928f85b28938d4c299925835a6d5eb1e68b \ |
---|
41 | ml-yacc.tgz 1bec52fbc6557dcd7d4363a1ae13be540bfc89a5 \ |
---|
42 | ml-burg.tgz 202f62c604e6d11b0ebed82ce78210a8e5224a9d \ |
---|
43 | pgraph.tgz 7b6425de5ca1648caf230dea5e8db34f90b481c9 \ |
---|
44 | trace-debug-profile.tgz c828e9d2728171a5d087a41fcbb923ac460a9d50 \ |
---|
45 | heap2asm.tgz 49c81c4343db2095fe7c28ae5ef40086d225421c \ |
---|
46 | smlnj-c.tgz adbc3874f8715d53bc1f032047c3289cff0af8e9 \ |
---|
47 | ] |
---|
48 | |
---|
49 | foreach {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) |
---|
56 | platform powerpc { |
---|
57 | distfiles-append boot.ppc-unix.tgz |
---|
58 | checksums-append boot.ppc-unix.tgz sha1 78e2aa861a2861c8a0e0678936a4b5d29a645979 |
---|
59 | } |
---|
60 | platform i386 { |
---|
61 | distfiles-append boot.x86-unix.tgz |
---|
62 | checksums-append boot.x86-unix.tgz sha1 0e459e33f54811750a42311a22bc4572ab16ebcb |
---|
63 | } |
---|
64 | |
---|
65 | post-patch { |
---|
66 | reinplace "s|__MACPORTS_CC__|${configure.cc}|" ${worksrcpath}/config/install.sh |
---|
67 | } |
---|
68 | |
---|
69 | ### extract ### |
---|
70 | pre-extract { |
---|
71 | file mkdir ${worksrcpath} |
---|
72 | } |
---|
73 | extract.dir ${worksrcpath} |
---|
74 | extract.only config.tgz |
---|
75 | |
---|
76 | ### patch ### |
---|
77 | patchfiles patch-install.sh.diff |
---|
78 | |
---|
79 | ### configure ### |
---|
80 | configure { |
---|
81 | reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \ |
---|
82 | ${worksrcpath}/config/srcarchiveurl |
---|
83 | |
---|
84 | reinplace "s|#request|request|" ${worksrcpath}/config/targets |
---|
85 | reinplace "s|request ml-antlr-grm-ext|#request ml-antlr-grm-ext|" ${worksrcpath}/config/targets |
---|
86 | reinplace "s|request ml-lex-lex-ext|#request ml-lex-lex-ext|" ${worksrcpath}/config/targets |
---|
87 | reinplace "s|request ml-lex-mllex-tool|#request ml-lex-mllex-tool|" ${worksrcpath}/config/targets |
---|
88 | } |
---|
89 | |
---|
90 | ### build ### |
---|
91 | build.env URLGETTER=curl |
---|
92 | build.cmd ${worksrcpath}/config/install.sh |
---|
93 | build.target |
---|
94 | |
---|
95 | ### destroot ### |
---|
96 | destroot { |
---|
97 | set smlnj_home ${prefix}/share/smlnj |
---|
98 | |
---|
99 | file mkdir ${destroot}${smlnj_home} |
---|
100 | file copy ${worksrcpath}/bin ${destroot}${smlnj_home} |
---|
101 | file copy ${worksrcpath}/lib ${destroot}${smlnj_home} |
---|
102 | |
---|
103 | xinstall -m 555 ${filespath}/sml.sh ${destroot}${prefix}/bin/sml |
---|
104 | reinplace "s|__SMLNJ_HOME__|${smlnj_home}|g" \ |
---|
105 | ${destroot}${prefix}/bin/sml |
---|
106 | |
---|
107 | foreach prog [glob -directory ${worksrcpath}/bin *] { |
---|
108 | set progname [file tail $prog] |
---|
109 | if {![string equal $progname sml]} { |
---|
110 | system "ln -s sml ${destroot}${prefix}/bin/${progname}" |
---|
111 | } |
---|
112 | } |
---|
113 | } |
---|