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 | ckit.tgz 0dbca80174f969a549d85ef3e15a4a8ecce7ed22 \ |
---|
29 | cml.tgz 8938aa0685453c16f57bae23e96ed23b1409f419 \ |
---|
30 | cm.tgz a4310413102c5649ed43d92962ffa307ebec4a39 \ |
---|
31 | compiler.tgz efd03a1cc84104c22776f56dca67e0ae5e9145e8 \ |
---|
32 | config.tgz 527cb179b48abcf1463089d168b171fd05eb814d \ |
---|
33 | eXene.tgz f8608de797634faaad632fbdfd43838c4de85e42 \ |
---|
34 | heap2asm.tgz 49c81c4343db2095fe7c28ae5ef40086d225421c \ |
---|
35 | ml-burg.tgz 202f62c604e6d11b0ebed82ce78210a8e5224a9d \ |
---|
36 | ml-lex.tgz 6557d928f85b28938d4c299925835a6d5eb1e68b \ |
---|
37 | ml-lpt.tgz d0b68f304a5e29173a9599a3959c12e84ea479ee \ |
---|
38 | MLRISC.tgz 041b6463d98d0effa0afc457fc5b09e74f081b85 \ |
---|
39 | ml-yacc.tgz 1bec52fbc6557dcd7d4363a1ae13be540bfc89a5 \ |
---|
40 | nlffi.tgz b881390f58df7bbc5d84c45eec20af7fcfbfa40c \ |
---|
41 | pgraph.tgz 7b6425de5ca1648caf230dea5e8db34f90b481c9 \ |
---|
42 | runtime.tgz dd81ce2963ca0ea4b1e92b22c7587d5ae64783f8 \ |
---|
43 | smlnj-c.tgz adbc3874f8715d53bc1f032047c3289cff0af8e9 \ |
---|
44 | smlnj-lib.tgz 33f4d3a8dc653cd015ed15a27776dd0e3f2fbb04 \ |
---|
45 | system.tgz 0f7536bbdcd6d1584f4dcbf3b30a553d98fb0cb1 \ |
---|
46 | trace-debug-profile.tgz c828e9d2728171a5d087a41fcbb923ac460a9d50 \ |
---|
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 815447275d6321f85b6c97e84aa223f6d710b516 |
---|
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 | |
---|
78 | ### configure ### |
---|
79 | configure { |
---|
80 | reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \ |
---|
81 | ${worksrcpath}/config/srcarchiveurl |
---|
82 | reinplace "s|#request src-smlnj|request src-smlnj|" \ |
---|
83 | ${worksrcpath}/config/targets |
---|
84 | reinplace "s|#request eXene|request eXene" \ |
---|
85 | ${worksrcpath}/config/targets |
---|
86 | reinplace "s|#request mlrisc-tools|request mlrisc-tools|" \ |
---|
87 | ${worksrcpath}/config/targets |
---|
88 | reinplace "s|#request heap2asm |request heap2asm|" \ |
---|
89 | ${worksrcpath}/config/targets |
---|
90 | |
---|
91 | } |
---|
92 | |
---|
93 | ### build ### |
---|
94 | build.env URLGETTER=curl |
---|
95 | build.cmd ${worksrcpath}/config/install.sh |
---|
96 | build.target |
---|
97 | |
---|
98 | ### destroot ### |
---|
99 | destroot { |
---|
100 | set smlnj_home ${prefix}/share/smlnj |
---|
101 | |
---|
102 | file mkdir ${destroot}${smlnj_home} |
---|
103 | file copy ${worksrcpath}/bin ${destroot}${smlnj_home} |
---|
104 | file copy ${worksrcpath}/lib ${destroot}${smlnj_home} |
---|
105 | |
---|
106 | xinstall -m 555 ${filespath}/sml.sh ${destroot}${prefix}/bin/sml |
---|
107 | reinplace "s|__SMLNJ_HOME__|${smlnj_home}|g" \ |
---|
108 | ${destroot}${prefix}/bin/sml |
---|
109 | |
---|
110 | foreach prog [glob -directory ${worksrcpath}/bin *] { |
---|
111 | set progname [file tail $prog] |
---|
112 | if {![string equal $progname sml]} { |
---|
113 | system "ln -s sml ${destroot}${prefix}/bin/${progname}" |
---|
114 | } |
---|
115 | } |
---|
116 | } |
---|