# $Id$ PortSystem 1.0 name smlnj version 110.68 revision 1 categories lang ml maintainers bfulgham 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}/ dist_subdir ${name}/${version}_${revision} distfiles checksums # Files needed for basic distribution. set srcs [list \ config.tgz 6e371ad266779321c9154ff8baf3103ce8bf5d66 \ cm.tgz caa2225d28ba0f01508914278f7e97ecd428d7a2 \ compiler.tgz 8fea61d9d51f29e7c9434ce71f7a45b74c6696bc \ runtime.tgz 5c7e306a04c3f0113a257a5b55f835fd73847c84 \ system.tgz e86c8abb16ceca4b681e2f268a3c5d82b6edc3cd \ MLRISC.tgz 0f5822c16e64ba8439b1a196cfcd420e5562b666 \ smlnj-lib.tgz 3fc8dbe30853de51420c9786a7dfdba7ef6d1650 \ ckit.tgz 8f960c048f972337d262d60d10d1a6ffeb08ce29 \ nlffi.tgz 6f7b4cd7b5dae8b0f2dd8f2dc214a1adaadfaa2e \ cml.tgz e854c1658e58c551817735ee374fba8956ee81e4 \ eXene.tgz b0d9c43cae9ec4c8cdadeaafa460c32387d9c58a \ ml-lex.tgz 783449998f4ec5456d48e7a4be4b25b8cefbb7aa \ ml-yacc.tgz f3706b4156f5b06ccf02e391f4a997d59e62f439 \ ml-burg.tgz af35d920a133485b35ecf3897c3add47e7924590 \ ml-lpt.tgz 7868689cc23ea994693c90828502b0f6672f12fa \ pgraph.tgz ce8b0f2adc9e6b830f4ea3bfa584f6ffabecdd44 \ trace-debug-profile.tgz 4650c1d23ea53af810f3f38f40df75c9cf745523 \ heap2asm.tgz 251d42964558d870519a032dae4dd4471bef7744 \ smlnj-c.tgz 810824592d9c02a101209dbb25b4c9265d7f2605 \ ] 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 e264fd6f168aaf0124adb1b3727cbf7c5c6c2705 } platform i386 { distfiles-append boot.x86-unix.tgz checksums-append boot.x86-unix.tgz sha1 433e02047ce1377af5b2d5fbd53cb9142bb8b15c } post-patch { reinplace "s|__MACPORTS_CC__|${configure.cc}|" ${worksrcpath}/config/install.sh } ### extract ### pre-extract { file mkdir ${worksrcpath} } extract.dir ${worksrcpath} extract.only config.tgz ### patch ### patchfiles _arch-n-opsys.diff patch-install.sh.diff ### configure ### configure { reinplace "s|SRCARCHIVEURL=.*|SRCARCHIVEURL=file://${distpath}|" \ ${worksrcpath}/config/srcarchiveurl reinplace "s|#request|request|" ${worksrcpath}/config/targets reinplace "s|request ml-antlr|#request ml-antlr|" ${worksrcpath}/config/targets reinplace "s|request ml-lex-|#request ml-lex-|" ${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}" } } }