aboutsummaryrefslogtreecommitdiff
path: root/lang/sml-nj-devel
diff options
context:
space:
mode:
authorJoseph Koshy <jkoshy@FreeBSD.org>2006-06-10 12:47:00 +0000
committerJoseph Koshy <jkoshy@FreeBSD.org>2006-06-10 12:47:00 +0000
commite5e672d151ed164c729126ca3f6fb3dd35f795c5 (patch)
tree3885994c6468b2e93310c6568bb2cd493bb25e10 /lang/sml-nj-devel
parent865119d2fb595bc957f863b2545cc5eb86347e81 (diff)
downloadports-e5e672d151ed164c729126ca3f6fb3dd35f795c5.tar.gz
ports-e5e672d151ed164c729126ca3f6fb3dd35f795c5.zip
Notes
Diffstat (limited to 'lang/sml-nj-devel')
-rw-r--r--lang/sml-nj-devel/Makefile61
-rw-r--r--lang/sml-nj-devel/distinfo114
-rw-r--r--lang/sml-nj-devel/files/do-patch-src::system::installml15
-rw-r--r--lang/sml-nj-devel/files/do-patch-src::system::makeml31
-rw-r--r--lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcgetattr.c11
-rw-r--r--lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcsetattr.c11
-rw-r--r--lang/sml-nj-devel/files/patch-config::_arch-n-opsys10
-rw-r--r--lang/sml-nj-devel/files/patch-config_allsources7
-rw-r--r--lang/sml-nj-devel/files/patch-config_install.sh14
-rw-r--r--lang/sml-nj-devel/files/patch-config_unpack12
-rw-r--r--lang/sml-nj-devel/pkg-plist9
11 files changed, 134 insertions, 161 deletions
diff --git a/lang/sml-nj-devel/Makefile b/lang/sml-nj-devel/Makefile
index 394017ab8cb8..46c1de70a74e 100644
--- a/lang/sml-nj-devel/Makefile
+++ b/lang/sml-nj-devel/Makefile
@@ -6,24 +6,11 @@
#
PORTNAME= smlnj
-PORTVERSION= 110.57
+PORTVERSION= 110.59
CATEGORIES= lang
MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/ \
ftp://mirror.free.de/http/smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/
DISTFILES= config.tgz runtime.tgz
-.include <bsd.port.pre.mk>
-.if (${ARCH} == "i386")
-DISTFILES+= boot.x86-unix.tgz
-#.elif (${ARCH} == "alpha")
-#DISTFILES+= boot.alpha32-unix.tgz
-.endif
-DISTFILES+= ml-yacc.tgz ml-lex.tgz smlnj-lib.tgz cml.tgz MLRISC.tgz ckit.tgz
-.if defined(WITH_EVERYTHING) || defined(WITH_RECOMPILE)
-DISTFILES+= ml-burg.tgz \
- ml-nlffi-lib.tgz ml-nlffigen.tgz smlnj-c.tgz \
- eXene.tgz \
- cm.tgz compiler.tgz system.tgz tools.tgz
-.endif
EXTRACT_ONLY= config.tgz
MAINTAINER= joemann@beefree.free.de
@@ -38,11 +25,20 @@ CONFLICTS= smlnj-110.0.*
ONLY_FOR_ARCHS= i386
+OPTIONS= EVERYTHING "install everything from the SML/NJ distribution" off \
+ RECOMPILE "recompile the SML compiler - implies EVERYTHING" off
+
+.include <bsd.port.pre.mk>
+
.if (${ARCH} == "i386")
MLARCH= x86
+DISTFILES+= boot.x86-unix.tgz
#.elif (${ARCH} == "alpha")
#MLARCH= alpha32
+#DISTFILES+= boot.alpha32-unix.tgz
.endif
+DISTFILES+= ml-yacc.tgz ml-lex.tgz lexgen.tgz smlnj-lib.tgz cml.tgz \
+ MLRISC.tgz ckit.tgz heap2asm.tgz
PLIST_SUB= MLARCH=${MLARCH}
@@ -50,16 +46,21 @@ PLIST_SUB= MLARCH=${MLARCH}
WITH_EVERYTHING?= ${WITH_RECOMPILE}
.endif
+.if defined(WITH_EVERYTHING)
+DISTFILES+= ml-burg.tgz ml-nlffi-lib.tgz ml-nlffigen.tgz smlnj-c.tgz \
+ eXene.tgz cm.tgz compiler.tgz system.tgz tools.tgz
+.endif
+
MLROOTRELATIVE= smlnj
MLROOT= ${PREFIX}/${MLROOTRELATIVE}
MLBIN= ${MLROOT}/bin
MLLIB= ${MLROOT}/lib
MLSRCSBASE= ckit src
-MLSRCSRELATIVE= ${MLROOTRELATIVE}/ckit ${MLROOTRELATIVE}/src
MLSRCS= ${MLROOT}/ckit ${MLROOT}/src
-MLEXE= sml ml-yacc ml-lex ml-build ml-makedepend
+MLTARGETS= heap2asm
+MLEXE= sml ml-yacc lexgen ml-lex ml-build ml-makedepend heap2exec
.if defined(WITH_EVERYTHING)
-MLTARGETS= ml-burg eXene src-smlnj \
+MLTARGETS+= ml-burg eXene src-smlnj \
ml-nlffi-lib ml-nlffigen nowhere pgraph-util
MLEXE+= ml-burg ml-nlffigen nowhere
PLIST= ${WRKDIR}/.PLIST
@@ -93,13 +94,14 @@ post-extract:
# lines of config/targets. Dependency details are handled by
# src/system/smlnj/installer using config/dependencies.
-.if defined(WITH_EVERYTHING)
do-configure:
- ${ECHO_CMD} -n > ${WRKDIR}/.tmp.sed
+.if defined(MLTARGETS)
+ ${ECHO_CMD} -n > "${WRKDIR}/.tmp.sed"
.for t in ${MLTARGETS}
- ${ECHO_CMD} '/^#request[ ]+${t}$$/s/^#//' >> ${WRKDIR}/.tmp.sed
+ ${ECHO_CMD} '/^#request[ ]+${t}$$/s/^#//' >> "${WRKDIR}/.tmp.sed"
.endfor
- ${SED} -i .default -E -f ${WRKDIR}/.tmp.sed "${WRKDIR}/config/targets"
+ ${SED} -i .default -E -f "${WRKDIR}/.tmp.sed" "${WRKDIR}/config/targets"
+.endif
# Recompilation requires ml-lex and ml-yacc. All requested targets
# will be built later using the recompiled core system after
# removing targets.customized. See "do-build" below.
@@ -109,7 +111,6 @@ do-configure:
${ECHO_CMD} "request src-smlnj" ) \
> "${WRKDIR}/config/targets.customized"
.endif
-.endif
# The build target patches, builds, and installs the system within WRKDIR.
# src/runtime is not cleaned afterwards to avoid its recompilation during
@@ -129,11 +130,11 @@ AUXDEVNULL!= if [ -w ${AUXDEV}/null ]; then ${ECHO_CMD} -n ${AUXDEV}/null; \
else ${ECHO_CMD} -n '${WRKDIR}/.devnull'; fi
MLRUNTIMEPATCHES!= cd ${FILESDIR} && \
- ( ${LS} do-patch-src::runtime::* 2> ${AUXDEVNULL} || \
+ ( ${LS} do-patch-src_runtime_* 2> ${AUXDEVNULL} || \
${TRUE} )
.if defined(WITH_EVERYTHING)
MLSOURCEPATCHES!= cd ${FILESDIR} && \
- ( ${LS} do-patch-src::* 2> ${AUXDEVNULL} || \
+ ( ${LS} do-patch-src_* 2> ${AUXDEVNULL} || \
${TRUE} )
.else
MLSOURCEPATCHES=
@@ -183,6 +184,9 @@ MLSRCEXCLUDEREGEX= -e '^(@dirrm\ )?${MLROOTRELATIVE}/src/runtime'
.for excl in ${MLNOINSTALL}
MLSRCEXCLUDEREGEX+= -e '/${excl}$$' -e '/${excl}/'
.endfor
+MLPATCHPATHREGEX= -E -e 's%(^|[^_])_([^_]|$$)%\1/\2%g' \
+ -e 's%(^|[^_])__([^_]|$$)%\1_\2%g' \
+ -e 's%(^|[^_])___([^_]|$$)%\1/_\2%g'
pre-install:
@${ECHO} -n '(* Computing package list ...'
@@ -190,11 +194,12 @@ pre-install:
${SED} -E -e 's%^(.*[^/])$$%${MLROOTRELATIVE}/src/\1%' \
-e 's%^(.*)/$$%@dirrm\ ${MLROOTRELATIVE}/src/\1%' \
> ${MLRUNTIMEPLIST}
- -@cd ${FILESDIR} && \
- ( ${LS} do-patch-src::runtime::* 2> ${AUXDEVNULL} ) | \
- ${SED} -e 's%::%/%g' | \
- ${SED} -E -e 's%^do-patch-(.*)%${MLROOTRELATIVE}/\1.orig%' \
+.for p in ${MLRUNTIMEPATCHES}
+ @${ECHO_CMD} '${p}' | \
+ ${SED} ${MLPATCHPATHREGEX} | \
+ ${SED} -E -e 's%^do-patch-(src/.*)%${MLROOTRELATIVE}/\1.orig%' \
>> ${MLRUNTIMEPLIST}
+.endfor
@cd "${WRKDIR}" && ( \
( ${FIND} -s -d ${MLSRCSBASE} \! -type d | \
${AWK} '{ print "${MLROOTRELATIVE}/" $$0 }' ) ; \
diff --git a/lang/sml-nj-devel/distinfo b/lang/sml-nj-devel/distinfo
index 22e437f8a16d..0db0271a71d3 100644
--- a/lang/sml-nj-devel/distinfo
+++ b/lang/sml-nj-devel/distinfo
@@ -1,54 +1,60 @@
-MD5 (sml-nj/110.57/config.tgz) = a0f556961bc93fb63fc8cc38813e8659
-SHA256 (sml-nj/110.57/config.tgz) = 1e2bfdc300d92bcfe43591430fa2e330b79192ed8f3159b5e6c5fd8b8231a19c
-SIZE (sml-nj/110.57/config.tgz) = 14424
-MD5 (sml-nj/110.57/runtime.tgz) = 3e5bc506dffdbd93c004b33ae12ff49e
-SHA256 (sml-nj/110.57/runtime.tgz) = 8d0b31abc24f25e567e99b99f394a21fc83c3d97b8b3269b7a97418a6f84e9f0
-SIZE (sml-nj/110.57/runtime.tgz) = 313742
-MD5 (sml-nj/110.57/boot.x86-unix.tgz) = 4af368d68bd472c35bc5aa83f9a59f34
-SHA256 (sml-nj/110.57/boot.x86-unix.tgz) = f85d238a7ac124d169c71f28b0b4329e656265adcf64ceaed4986f531c3afb63
-SIZE (sml-nj/110.57/boot.x86-unix.tgz) = 5416104
-MD5 (sml-nj/110.57/ml-yacc.tgz) = b06c5be6d557751616fa430e421bf706
-SHA256 (sml-nj/110.57/ml-yacc.tgz) = b582630dafff89a4c3566820cd26931f88026cc7c9890eea66a316535e109268
-SIZE (sml-nj/110.57/ml-yacc.tgz) = 95234
-MD5 (sml-nj/110.57/ml-lex.tgz) = 25d64f79f7de8e41d37911cdabad89b3
-SHA256 (sml-nj/110.57/ml-lex.tgz) = e388c750f62f215bef4e7af664d85f261c2b9acc980ada2fc50a7ccfa8b84df9
-SIZE (sml-nj/110.57/ml-lex.tgz) = 32410
-MD5 (sml-nj/110.57/smlnj-lib.tgz) = e32800489430b8f598f849ab1524aac7
-SHA256 (sml-nj/110.57/smlnj-lib.tgz) = 839851cb96641b7b82a8d3b768a42e5f6c5f61664e08d7c1ba8ac11138b58ce0
-SIZE (sml-nj/110.57/smlnj-lib.tgz) = 226978
-MD5 (sml-nj/110.57/cml.tgz) = 6b23cc3b33465511ef9cca46cea5d9ab
-SHA256 (sml-nj/110.57/cml.tgz) = 7c3f70a3776c95fb528d0f1a795599bafa5438a5e75db41ef1b3f8492e455f0a
-SIZE (sml-nj/110.57/cml.tgz) = 104136
-MD5 (sml-nj/110.57/MLRISC.tgz) = 3f0b6ff18038e0cbc08b317169917206
-SHA256 (sml-nj/110.57/MLRISC.tgz) = 0e9ab13b6555a5fb10c41fc54db3560308c55593f4c2bb59b449241c11fef141
-SIZE (sml-nj/110.57/MLRISC.tgz) = 1225850
-MD5 (sml-nj/110.57/ckit.tgz) = 78530579023597067deabac1e3109afa
-SHA256 (sml-nj/110.57/ckit.tgz) = c9d6b7c587f6803403ab6fc945156a4cb502811eacbc9e5ed656428aa1e7b923
-SIZE (sml-nj/110.57/ckit.tgz) = 168167
-MD5 (sml-nj/110.57/ml-burg.tgz) = cbbf80c5cb007e83eb63a5cd94977b68
-SHA256 (sml-nj/110.57/ml-burg.tgz) = 037f60a03e8175966f3e88f8fdff280726010a7f4336be5ccb4c5b0b0271c18a
-SIZE (sml-nj/110.57/ml-burg.tgz) = 31547
-MD5 (sml-nj/110.57/ml-nlffi-lib.tgz) = 3bb54918075534506b3d01a722c37aca
-SHA256 (sml-nj/110.57/ml-nlffi-lib.tgz) = 95c3a67848884571b56ff4f818aa3b931f5b0ba60ec37fcc210567a87af4ac16
-SIZE (sml-nj/110.57/ml-nlffi-lib.tgz) = 44212
-MD5 (sml-nj/110.57/ml-nlffigen.tgz) = 62b30439b8d2be80c2db995dbb51dbaa
-SHA256 (sml-nj/110.57/ml-nlffigen.tgz) = bbdbda357653e21327c5f1a7ccf69aa411f7d7d6777c9f7a60251fe077bfc8bc
-SIZE (sml-nj/110.57/ml-nlffigen.tgz) = 29495
-MD5 (sml-nj/110.57/smlnj-c.tgz) = c438ab652699c7d5afbd89f45be90486
-SHA256 (sml-nj/110.57/smlnj-c.tgz) = db5297463563b4e2884d2ee87b6fbb460a4e6fc9cc178049e7880bc84374097a
-SIZE (sml-nj/110.57/smlnj-c.tgz) = 10537
-MD5 (sml-nj/110.57/eXene.tgz) = 656508ff3828344e7e6b59e3429f0f19
-SHA256 (sml-nj/110.57/eXene.tgz) = 13d46babaffda4153cf324a91e8a38e666ad0dc762eab6a6a6eed81530400544
-SIZE (sml-nj/110.57/eXene.tgz) = 705649
-MD5 (sml-nj/110.57/cm.tgz) = 7c286667e8be55a33287b02b1b4aa2d5
-SHA256 (sml-nj/110.57/cm.tgz) = 5d8bcd0c5d0ea3a75b4d2554f61030b4131b22932e2a6c1f98a3bcbdff00cf10
-SIZE (sml-nj/110.57/cm.tgz) = 206226
-MD5 (sml-nj/110.57/compiler.tgz) = 7dba6d725648414733f11b8a1292c86e
-SHA256 (sml-nj/110.57/compiler.tgz) = dc68762bf022ae050ff2b8c88a0d377bcca0e8d3dcd7d2f0272304213d43dc02
-SIZE (sml-nj/110.57/compiler.tgz) = 736854
-MD5 (sml-nj/110.57/system.tgz) = 3a15e19305803ca5dbc3d4d28c278b53
-SHA256 (sml-nj/110.57/system.tgz) = 3929cb046f3cd88a0d9d563076e503bab88a498c4cc4d447b94b67b7f354567a
-SIZE (sml-nj/110.57/system.tgz) = 220290
-MD5 (sml-nj/110.57/tools.tgz) = d96d685bdc258c55b15844faf057166f
-SHA256 (sml-nj/110.57/tools.tgz) = 793f0455c06143d5e99dbf69981b44f0defb75d9c62fb03fef43f46b1b3ab5c3
-SIZE (sml-nj/110.57/tools.tgz) = 3917
+MD5 (sml-nj/110.59/MLRISC.tgz) = 9a3df76e0dfa8048867c12babbe00c5a
+SHA256 (sml-nj/110.59/MLRISC.tgz) = 8d41a136d985b558662237fded521cc0b71fc97890f8331502cfe173a9e7471e
+SIZE (sml-nj/110.59/MLRISC.tgz) = 1227156
+MD5 (sml-nj/110.59/boot.x86-unix.tgz) = 64845eb1c7dc234692dac699e4840c56
+SHA256 (sml-nj/110.59/boot.x86-unix.tgz) = 99aabcf6db6d1a3741faad67d32ec9b564ab9041ff3106ca443c4b186bb4bb1c
+SIZE (sml-nj/110.59/boot.x86-unix.tgz) = 5490738
+MD5 (sml-nj/110.59/ckit.tgz) = 441d58363f776001bc0fbf27b5bdf334
+SHA256 (sml-nj/110.59/ckit.tgz) = fe1a5366e1a08e57050c775541ae61eb07589082811eead65523f8156faf2ec9
+SIZE (sml-nj/110.59/ckit.tgz) = 168162
+MD5 (sml-nj/110.59/cm.tgz) = c2bf097819d8979d0362c5d9bd68ce20
+SHA256 (sml-nj/110.59/cm.tgz) = ca36f7c748a6b4dcea5e67292cb5c2dc146b69442ce196b0ad4845c10b09992a
+SIZE (sml-nj/110.59/cm.tgz) = 206267
+MD5 (sml-nj/110.59/cml.tgz) = ddb1f52ada206126367b7d9c4b666c41
+SHA256 (sml-nj/110.59/cml.tgz) = 03e1e1bee5146cf2194b74a92e257260027d8abfc1619a556d9892b4e568d39e
+SIZE (sml-nj/110.59/cml.tgz) = 104357
+MD5 (sml-nj/110.59/compiler.tgz) = 236cd470dc6d01c57ccac74fd39e3900
+SHA256 (sml-nj/110.59/compiler.tgz) = 94bf74de9cbbfc2c575b89fdf37b8e933d41a7fa5cbf480b10ccc6fb58bde066
+SIZE (sml-nj/110.59/compiler.tgz) = 737756
+MD5 (sml-nj/110.59/config.tgz) = be71ac7054667e17a0e3376bcc07f847
+SHA256 (sml-nj/110.59/config.tgz) = cf6b1c377eb4df73d61adcd469ad6e828b61fd01992e173fc13f3643789802a6
+SIZE (sml-nj/110.59/config.tgz) = 15213
+MD5 (sml-nj/110.59/eXene.tgz) = 919f878c43b02edc581c1a0542db6322
+SHA256 (sml-nj/110.59/eXene.tgz) = 03e4eef280a2f5518637f3611a5f3a98fadba18aaebf4a0fe053985a7c53b29c
+SIZE (sml-nj/110.59/eXene.tgz) = 708186
+MD5 (sml-nj/110.59/heap2asm.tgz) = 394931085f4e1975f771cfcedb9334ff
+SHA256 (sml-nj/110.59/heap2asm.tgz) = bb7fce6cc1dcc6d19676df78f92289074f28c03c29ed30e66b2bb962f0befc92
+SIZE (sml-nj/110.59/heap2asm.tgz) = 1311
+MD5 (sml-nj/110.59/lexgen.tgz) = 9be393e787950fffaaf123682b47a3f3
+SHA256 (sml-nj/110.59/lexgen.tgz) = b4dfc703c2d51b411c9bd636f231e8ca913e1c667c4e169d0df8c0c418fde12a
+SIZE (sml-nj/110.59/lexgen.tgz) = 57569
+MD5 (sml-nj/110.59/ml-burg.tgz) = c5fad291f6ee29d14ecd22ad8f3de029
+SHA256 (sml-nj/110.59/ml-burg.tgz) = f9e8f9e018b49c1d92cba513f387701b9f49a2973401ed1795125c8ba49bddce
+SIZE (sml-nj/110.59/ml-burg.tgz) = 31552
+MD5 (sml-nj/110.59/ml-lex.tgz) = ab9df0b18949282200d874c50a655540
+SHA256 (sml-nj/110.59/ml-lex.tgz) = 4d3128e9b4fcb54f26061e0077af3b648bf433fc6469373aed3ff8e1abee31f0
+SIZE (sml-nj/110.59/ml-lex.tgz) = 32408
+MD5 (sml-nj/110.59/ml-nlffi-lib.tgz) = 8d02ca80da7547930c98734d74155261
+SHA256 (sml-nj/110.59/ml-nlffi-lib.tgz) = c3d85b932f08e36d7b2335c579a6df3956c403cd381e54db0732bac48b83dc30
+SIZE (sml-nj/110.59/ml-nlffi-lib.tgz) = 44216
+MD5 (sml-nj/110.59/ml-nlffigen.tgz) = e8b2c9375897c003996db5314584ece1
+SHA256 (sml-nj/110.59/ml-nlffigen.tgz) = 5a9307a7d5db173ddceaff57a14bb782c2733521cc436cd269abe270d1871217
+SIZE (sml-nj/110.59/ml-nlffigen.tgz) = 29496
+MD5 (sml-nj/110.59/ml-yacc.tgz) = 4b0660904def5e719cc4b8beb4ec3c89
+SHA256 (sml-nj/110.59/ml-yacc.tgz) = 6f8b619849c4934f698a2cf8295c9669994177b85bc532858738a5515923e0f7
+SIZE (sml-nj/110.59/ml-yacc.tgz) = 95230
+MD5 (sml-nj/110.59/runtime.tgz) = c7708cf9e4e52b075da026cc9abe1d35
+SHA256 (sml-nj/110.59/runtime.tgz) = 8babcef45fc631fc02ecac3b17da73ae4363e5adef1345be9379d5e793893d53
+SIZE (sml-nj/110.59/runtime.tgz) = 314457
+MD5 (sml-nj/110.59/smlnj-c.tgz) = eb80ae9aa86af377e99125859d7284cd
+SHA256 (sml-nj/110.59/smlnj-c.tgz) = 4970fce217393efa7ee486c27d1144df0b29fec357892f3a71d7c9c7bfb5cc68
+SIZE (sml-nj/110.59/smlnj-c.tgz) = 10535
+MD5 (sml-nj/110.59/smlnj-lib.tgz) = 00657168132e000db7b47866b1db3322
+SHA256 (sml-nj/110.59/smlnj-lib.tgz) = 55b0833a962acdcc0172bd002185f074e558bf496e89a584d2becc98329edc88
+SIZE (sml-nj/110.59/smlnj-lib.tgz) = 226975
+MD5 (sml-nj/110.59/system.tgz) = 47caa72a48daaaae88fc7fd585747e69
+SHA256 (sml-nj/110.59/system.tgz) = b09afa939a8f2e96d5cb716559fdc7b4953c86335243a8a35341dcb79172d0ff
+SIZE (sml-nj/110.59/system.tgz) = 220608
+MD5 (sml-nj/110.59/tools.tgz) = 80f4a7da13ba713615142609283b3ef7
+SHA256 (sml-nj/110.59/tools.tgz) = 7937fae4903e91551a6710cc41f63cbcaf6ed4f51048a9d9f24c2a398646766c
+SIZE (sml-nj/110.59/tools.tgz) = 3919
diff --git a/lang/sml-nj-devel/files/do-patch-src::system::installml b/lang/sml-nj-devel/files/do-patch-src::system::installml
deleted file mode 100644
index 4b74cb918d0d..000000000000
--- a/lang/sml-nj-devel/files/do-patch-src::system::installml
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/system/installml.orig Tue May 11 21:20:17 2004
-+++ src/system/installml Thu Aug 5 22:17:28 2004
-@@ -11,8 +11,10 @@
- twoup=`pwd`
- cd $here
-
--MAIN_HEAP_DIR=$twoup/bin/.heap
--MAIN_LIB_DIR=$twoup/lib
-+INSTALLROOT=${INSTALLROOT:-$twoup}
-+
-+MAIN_HEAP_DIR=$INSTALLROOT/bin/.heap
-+MAIN_LIB_DIR=$INSTALLROOT/lib
-
- if [ $# -gt 0 ] ; then
- STEM=$1
diff --git a/lang/sml-nj-devel/files/do-patch-src::system::makeml b/lang/sml-nj-devel/files/do-patch-src::system::makeml
deleted file mode 100644
index 8be80ccde9de..000000000000
--- a/lang/sml-nj-devel/files/do-patch-src::system::makeml
+++ /dev/null
@@ -1,31 +0,0 @@
---- src/system/makeml.orig Fri May 17 22:48:38 2002
-+++ src/system/makeml Thu May 23 02:25:57 2002
-@@ -6,7 +6,9 @@
- twoup=`pwd`
- cd $here
-
--LINK=$twoup/bin/.link-sml
-+INSTALLROOT=${INSTALLROOT:-$twoup}
-+
-+LINK=$INSTALLROOT/bin/.link-sml
-
- if [ ! -x $LINK ] ; then
- echo $this: link script $LINK is not operational.
-@@ -47,14 +49,14 @@
- # ... unless it was already set at the time we run this script.
- #
-
--CM_PATHCONFIG=${CM_PATHCONFIG:-$twoup/lib/pathconfig}
-+CM_PATHCONFIG=${CM_PATHCONFIG:-$INSTALLROOT/lib/pathconfig}
- export CM_PATHCONFIG
-
- #
- # use the arch-n-opsys script to determine the ARCH/OS if possible
- #
--if [ -f $twoup/bin/.arch-n-opsys ]; then
-- ARCH_N_OPSYS=`$twoup/bin/.arch-n-opsys`
-+if [ -f $INSTALLROOT/bin/.arch-n-opsys ]; then
-+ ARCH_N_OPSYS=`$INSTALLROOT/bin/.arch-n-opsys`
- if [ "$?" = "0" ]; then
- eval $ARCH_N_OPSYS
- echo $this: architecture = $ARCH
diff --git a/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcgetattr.c b/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcgetattr.c
new file mode 100644
index 000000000000..94444085efbe
--- /dev/null
+++ b/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcgetattr.c
@@ -0,0 +1,11 @@
+--- src/runtime/c-libs/posix-tty/tcgetattr.c.orig Thu Jun 1 20:33:46 2000
++++ src/runtime/c-libs/posix-tty/tcgetattr.c Fri Jun 9 12:33:48 2006
+@@ -40,7 +40,7 @@
+
+ /* allocate the vector; note that this might cause a GC */
+ cc = ML_AllocString (msp, NCCS);
+- memcpy (PTR_MLtoC(void, cc), data.c_cc, NCCS);
++ memcpy (GET_SEQ_DATAPTR(void, cc), data.c_cc, NCCS);
+
+ ML_AllocWrite (msp, 0, MAKE_DESC(DTAG_record, 7));
+ ML_AllocWrite (msp, 1, iflag);
diff --git a/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcsetattr.c b/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcsetattr.c
new file mode 100644
index 000000000000..02628ad4c5e3
--- /dev/null
+++ b/lang/sml-nj-devel/files/do-patch-src_runtime_c-libs_posix-tty_tcsetattr.c
@@ -0,0 +1,11 @@
+--- src/runtime/c-libs/posix-tty/tcsetattr.c.orig Thu Jun 1 20:33:46 2000
++++ src/runtime/c-libs/posix-tty/tcsetattr.c Fri Jun 9 12:33:59 2006
+@@ -30,7 +30,7 @@
+ data.c_oflag = REC_SELWORD(termio_rep, 1);
+ data.c_cflag = REC_SELWORD(termio_rep, 2);
+ data.c_lflag = REC_SELWORD(termio_rep, 3);
+- memcpy (data.c_cc, REC_SELPTR(void, termio_rep, 4), NCCS);
++ memcpy (data.c_cc, GET_SEQ_DATAPTR(void, REC_SEL(termio_rep, 4)), NCCS);
+ sts = cfsetispeed (&data, REC_SELWORD(termio_rep, 5));
+ if (sts < 0)
+ return RAISE_SYSERR(msp, sts);
diff --git a/lang/sml-nj-devel/files/patch-config::_arch-n-opsys b/lang/sml-nj-devel/files/patch-config::_arch-n-opsys
deleted file mode 100644
index 36dd80841a37..000000000000
--- a/lang/sml-nj-devel/files/patch-config::_arch-n-opsys
+++ /dev/null
@@ -1,10 +0,0 @@
---- config/_arch-n-opsys.orig Fri May 6 05:10:32 2005
-+++ config/_arch-n-opsys Sat May 28 18:00:11 2005
-@@ -95,6 +95,7 @@
- HEAP_OPSYS=bsd
- case `uname -m` in
- *86) ARCH=x86;;
-+ alpha) ARCH=alpha32;;
- *) exit 1;;
- esac
- ;;
diff --git a/lang/sml-nj-devel/files/patch-config_allsources b/lang/sml-nj-devel/files/patch-config_allsources
deleted file mode 100644
index 0445636cfda5..000000000000
--- a/lang/sml-nj-devel/files/patch-config_allsources
+++ /dev/null
@@ -1,7 +0,0 @@
---- config/allsources.orig Tue May 11 18:36:07 2004
-+++ config/allsources Wed Mar 9 23:16:54 2005
-@@ -23,3 +23,4 @@
- mlrisc
- mlrisc-tools
- smlnj-c
-+tools
diff --git a/lang/sml-nj-devel/files/patch-config_install.sh b/lang/sml-nj-devel/files/patch-config_install.sh
index 1dc0668ef961..a16dc077b7de 100644
--- a/lang/sml-nj-devel/files/patch-config_install.sh
+++ b/lang/sml-nj-devel/files/patch-config_install.sh
@@ -1,5 +1,5 @@
--- config/install.sh.orig Sun Nov 20 06:32:27 2005
-+++ config/install.sh Thu Jan 12 15:13:59 2006
++++ config/install.sh Tue Apr 11 14:26:13 2006
@@ -18,6 +18,8 @@
nolib=false
fi
@@ -64,16 +64,22 @@
cd "$SRCDIR"/runtime/objs
echo $this: Compiling the run-time system.
$MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
-@@ -324,7 +358,7 @@
+@@ -324,7 +358,13 @@
if [ -f runx.$ARCH-$OPSYS ]; then
mv runx.$ARCH-$OPSYS "$RUNDIR"
fi
- $MAKE MAKE=$MAKE clean
++ if [ -f run.$ARCH-$OPSYS.so ]; then
++ mv run.$ARCH-$OPSYS.so "$RUNDIR"
++ fi
++ if [ -f run.$ARCH-$OPSYS.a ]; then
++ mv run.$ARCH-$OPSYS.a "$RUNDIR"
++ fi
+ [ "$MLNORUNTIMECLEAN" ] || $MAKE MAKE=$MAKE clean
else
complain "$this: !!! Run-time system build failed for some reason."
fi
-@@ -350,7 +384,7 @@
+@@ -350,7 +390,7 @@
complain "$this !!! Unable to re-create heap image (sml.$HEAP_SUFFIX)."
fi
else
@@ -82,7 +88,7 @@
fish "$ROOT"/"$BOOT_FILES"/smlnj/basis
-@@ -421,5 +455,12 @@
+@@ -421,5 +461,12 @@
complain "$this: !!! Installation of libraries and programs failed."
fi
fi
diff --git a/lang/sml-nj-devel/files/patch-config_unpack b/lang/sml-nj-devel/files/patch-config_unpack
deleted file mode 100644
index 5da9469a6eaa..000000000000
--- a/lang/sml-nj-devel/files/patch-config_unpack
+++ /dev/null
@@ -1,12 +0,0 @@
---- config/unpack.orig Sat Jan 15 00:53:18 2005
-+++ config/unpack Wed Mar 9 23:12:31 2005
-@@ -283,6 +283,9 @@
- heap2asm)
- unpack "Heap->ASM tool" "$SRCDIR" heap2asm heap2asm
- ;;
-+ tools)
-+ unpack "(profiling) tools" "$SRCDIR" tools tools
-+ ;;
- doc)
- echo Package doc is currently unavailable.
- # unpack Doc $ROOT doc doc
diff --git a/lang/sml-nj-devel/pkg-plist b/lang/sml-nj-devel/pkg-plist
index c48ee536217d..9e436f50a0a4 100644
--- a/lang/sml-nj-devel/pkg-plist
+++ b/lang/sml-nj-devel/pkg-plist
@@ -1,16 +1,24 @@
+bin/heap2exec
+bin/lexgen
bin/ml-build
bin/ml-lex
bin/ml-makedepend
bin/ml-yacc
bin/sml
smlnj/bin/.arch-n-opsys
+smlnj/bin/.heap/heap2asm.%%MLARCH%%-bsd
+smlnj/bin/.heap/lexgen.%%MLARCH%%-bsd
smlnj/bin/.heap/ml-lex.%%MLARCH%%-bsd
smlnj/bin/.heap/ml-yacc.%%MLARCH%%-bsd
smlnj/bin/.heap/sml.%%MLARCH%%-bsd
smlnj/bin/.link-sml
smlnj/bin/.run/run.%%MLARCH%%-freebsd
+smlnj/bin/.run/run.%%MLARCH%%-freebsd.a
+smlnj/bin/.run/run.%%MLARCH%%-freebsd.so
smlnj/bin/.run-sml
+smlnj/bin/heap2asm
smlnj/bin/heap2exec
+smlnj/bin/lexgen
smlnj/bin/ml-build
smlnj/bin/ml-lex
smlnj/bin/ml-makedepend
@@ -106,6 +114,7 @@ smlnj/lib/smlnj/internal/.cm/%%MLARCH%%-unix/smlnj-version.cm
smlnj/lib/smlnj/internal/.cm/%%MLARCH%%-unix/srcpath-lib.cm
smlnj/lib/smlnj/ml-yacc/.cm/%%MLARCH%%-unix/ml-yacc-lib.cm
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/controls-lib.cm
+smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/html-lib.cm
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/pp-lib.cm
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/smlnj-lib.cm
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/alpha32.cm