# $Id: Portfile 27178 2007-07-23 11:26:00Z mww@macports.org $ PortSystem 1.0 name smlnj version 110.62 categories lang maintainers bfulgham@macports.org description Standard ML of New Jersey long_description \ Standard ML of New Jersey (abbreviated SML/NJ) is a \ compiler for the Standard ML '97 programming language \ with associated libraries, tools, and documentation. \ SML/NJ is free, open source software. homepage http://www.smlnj.org/ platforms darwin master_sites http://smlnj.cs.uchicago.edu/dist/working/${version}/ \ http://smlnj.cs.uchicago.edu/dist/working/110.62/ \ macports:mww/${name}-${version}/ dist_subdir ${name}/${version} distfiles checksums # Files needed for basic distribution. set srcs [list \ MLRISC.tgz 6aea4f5fe460769b0e1569c89d9d6dc15de39b1d \ ckit.tgz 33b204ca5b7ba7ef1fa43b90ece59d228be2bf04 \ cm.tgz c7ef9cda0fc782f1a89d9681066af55edef2394b \ cml.tgz ae4e0bb2020b5fdba0bf1a26477af329d19f2322 \ compiler.tgz 480ba1ad70a3468610866f1631330bd75142c225 \ config.tgz e26939683f2d6c5c6f4e7b92ed1e626e838f94eb \ eXene.tgz b52f670cc3b57017134ddfb51a8fbc1fd9178f93 \ lexgen.tgz 47522a0b4c131b3a3a9fe3277c7b434fb9470e91 \ ml-burg.tgz 96badba4f1615b2e31f385558c4eb486d9248983 \ ml-lex.tgz 62638e146cc1435d2a4b5ad3b10ba27bfe01bded \ ml-yacc.tgz a02bf2d17aa76a3cf56cdd45b09ce25299fc10ac \ pgraph.tgz b815fae92d142ab8f1eb79fa24a63b17b9918318 \ runtime.tgz e2c0a97bcccda91dfe631d6dc60203011cc9742d \ smlnj-c.tgz 587e89965821c29ce25a539cadbc83fce5323a35 \ smlnj-lib.tgz 903067f55f0050b3f84e6e4e1c7f9581278d0001 \ system.tgz 0adf14d72ce8d7a5d216daee1b67645f89892d39 \ heap2asm.tgz 83d8898039d1381d1c26642224a265d2bab7eb8f \ trace-debug-profile.tgz 2594cc62d712ada74d221be22a3bbd1ec6306d1c \ ml-lpt.tgz d44794a178c688b6f37accd17502fffd49420fcd \ nlffi.tgz 70c79b634fadc87f2525d5c06a92bec256dd513b \ ] foreach {tarball checksum} $srcs { distfiles-append $tarball checksums-append $tarball sha1 $checksum } # Platform-specific boot code (omitted: sparc-unix, x86-win32) platform powerpc { distfiles-append boot.ppc-unix.tgz checksums-append boot.ppc-unix.tgz sha1 f4e7db44e9b78fb8c99888e2cad8eb3a93391495 } platform i386 { distfiles-append boot.x86-unix.tgz checksums-append boot.x86-unix.tgz sha1 3336a1340ecc9db8de7d5199a8af5f465651d2dd } ### extract ### pre-extract { file mkdir ${worksrcpath} } extract.dir ${worksrcpath} extract.only config.tgz ### configure ### configure { reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \ ${worksrcpath}/config/srcarchiveurl reinplace "s|#request|request|" ${worksrcpath}/config/targets } ### build ### build.env URLGETTER=curl build.cmd ${worksrcpath}/config/install.sh build.target ### destroot ### destroot { set smlnj_home ${prefix}/share/smlnj file mkdir ${destroot}${smlnj_home} file copy ${worksrcpath}/bin ${destroot}${smlnj_home} file copy ${worksrcpath}/lib ${destroot}${smlnj_home} xinstall -m 555 ${filespath}/sml.sh ${destroot}${prefix}/bin/sml reinplace "s|__SMLNJ_HOME__|${smlnj_home}|g" \ ${destroot}${prefix}/bin/sml foreach prog [glob -directory ${worksrcpath}/bin *] { set progname [file tail $prog] if {![string equal $progname sml]} { system "ln -s sml ${destroot}${prefix}/bin/${progname}" } } }