1998-07-15 10:05:45 +00:00
|
|
|
# New ports collection makefile for: sml/nj
|
|
|
|
# Date created: 7 July 1998
|
|
|
|
# Whom: jkoshy
|
|
|
|
#
|
1999-08-25 06:35:40 +00:00
|
|
|
# $FreeBSD$
|
1998-07-15 10:05:45 +00:00
|
|
|
#
|
|
|
|
|
2000-04-12 06:21:15 +00:00
|
|
|
PORTNAME= smlnj
|
2000-10-27 12:49:21 +00:00
|
|
|
PORTVERSION= 110.0.7
|
2000-04-12 06:21:15 +00:00
|
|
|
CATEGORIES= lang
|
2000-10-27 12:49:21 +00:00
|
|
|
MASTER_SITES= ftp://ftp.research.bell-labs.com/dist/smlnj/release/110.0.7/ \
|
|
|
|
ftp://rodin.stanford.edu/pub/smlnj/release/110.0.7/ \
|
|
|
|
ftp://ftp.ntua.gr//pub/lang/smlnj/release/110.0.7/
|
|
|
|
DISTFILES= bin.x86-unix.tar.Z cm.tar.Z cml.tar.Z \
|
|
|
|
config.tar.Z eXene.tar.Z \
|
|
|
|
ml-burg.tar.Z ml-lex.tar.Z \
|
|
|
|
ml-yacc.tar.Z runtime.tar.Z \
|
|
|
|
smlnj-c.tar.Z smlnj-lib.tar.Z
|
|
|
|
EXTRACT_ONLY= config.tar.Z
|
2000-04-12 06:21:15 +00:00
|
|
|
|
|
|
|
MAINTAINER= jkoshy@freebsd.org
|
1998-07-15 10:05:45 +00:00
|
|
|
|
1998-11-22 04:46:10 +00:00
|
|
|
# Other mirror sites that generally carry only released versions of SML
|
|
|
|
# ftp://rodin.stanford.edu/pub/smlnj/release/
|
|
|
|
# ftp://ftp.cl.cam.ac.uk/MIRRORED/smlnj/release/
|
|
|
|
# ftp://ftp.ntua.gr/pub/lang/smlnj/release/
|
|
|
|
# Mirror sites that keep files around in gzipped format
|
2000-06-14 11:09:01 +00:00
|
|
|
# ftp://flint.cs.yale.edu/pub/smlnj/release/110.0.6/
|
1998-11-22 04:46:10 +00:00
|
|
|
|
2000-10-27 12:49:21 +00:00
|
|
|
DIST_SUBDIR= sml-nj/${PORTVERSION}
|
2000-04-12 06:21:15 +00:00
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
USE_GMAKE= yes
|
1998-07-15 10:05:45 +00:00
|
|
|
|
2000-04-12 06:21:15 +00:00
|
|
|
SML_BASE= ${PREFIX}/lib/sml-nj
|
|
|
|
SML_LIBDIR= ${SML_BASE}/lib
|
|
|
|
SML_BINDIR= ${SML_BASE}/bin
|
|
|
|
SML_SRCDIR= ${SML_BASE}/src
|
2000-06-14 11:09:01 +00:00
|
|
|
SML_EXES= ml-burg ml-lex ml-yacc sml sml-cm
|
1998-07-15 10:05:45 +00:00
|
|
|
|
1998-11-20 08:14:12 +00:00
|
|
|
# make symlinks to the dist files
|
|
|
|
post-extract:
|
|
|
|
cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* .
|
1998-07-20 07:56:58 +00:00
|
|
|
|
1998-07-15 10:05:45 +00:00
|
|
|
# The build target needs to run $WRKDIR/config/install.sh
|
|
|
|
do-build:
|
1999-02-02 03:52:32 +00:00
|
|
|
cd ${WRKDIR} && unset PWD && \
|
|
|
|
FILESDIR="$(FILESDIR)" PATCH="$(PATCH)" PATCH_ARGS="$(PATCH_ARGS)" \
|
|
|
|
./config/install.sh
|
1998-07-15 10:05:45 +00:00
|
|
|
|
1998-11-20 08:14:12 +00:00
|
|
|
# install target
|
|
|
|
# 1. create installation directories
|
|
|
|
# 2. copy the ./bin directory across
|
|
|
|
# 3. edit bin/.run_sml to override BIN_DIR
|
2000-06-14 11:09:01 +00:00
|
|
|
# 4. copy all x86-unix directories
|
1998-11-20 08:14:12 +00:00
|
|
|
# 5. find all .cm files reachable from $WRKDIR/lib and copy them across
|
|
|
|
# 6. copy the aliases in ./lib changing WRKDIR to SML_LIBDIR
|
|
|
|
# 7. install links to executables in $PREFIX/bin
|
1998-07-15 10:05:45 +00:00
|
|
|
do-install:
|
1998-11-20 08:14:12 +00:00
|
|
|
${MKDIR} ${SML_BASE} ${SML_BINDIR} ${SML_LIBDIR}
|
1998-07-15 10:05:45 +00:00
|
|
|
tar -C ${WRKDIR} -cf - bin | tar -C ${SML_BASE} -xf -
|
1998-11-20 08:14:12 +00:00
|
|
|
${RM} -f ${SML_BINDIR}/.run-sml
|
1998-07-15 10:05:45 +00:00
|
|
|
${SED} -e "s,^BIN_DIR=.*\$$,BIN_DIR=${SML_BINDIR}," \
|
|
|
|
< ${WRKDIR}/bin/.run-sml > ${SML_BINDIR}/.run-sml
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 755 ${SML_BINDIR}/.run-sml
|
2000-06-14 11:09:01 +00:00
|
|
|
cd ${WRKDIR} && tar -cf - `find . -name x86-unix` | \
|
1998-11-20 08:14:12 +00:00
|
|
|
tar -C ${SML_BASE} -xf -
|
|
|
|
cd ${WRKDIR} && tar -cf - `${SCRIPTDIR}/get-cm ${WRKDIR}` | \
|
|
|
|
tar -C ${SML_BASE} -xf -
|
|
|
|
for file in ${WRKDIR}/lib/*; do\
|
|
|
|
${SED} -e "s,${WRKDIR},${SML_BASE}," < $$file > \
|
1999-08-22 23:33:47 +00:00
|
|
|
${SML_LIBDIR}/`${BASENAME} $$file`; \
|
1998-11-20 08:14:12 +00:00
|
|
|
done
|
2001-12-24 07:26:31 +00:00
|
|
|
@${CHOWN} -R ${BINOWN}:${BINGRP} ${SML_BINDIR}
|
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${SML_SRCDIR}
|
1998-07-15 10:05:45 +00:00
|
|
|
.for file in ${SML_EXES}
|
|
|
|
-${LN} -s ${SML_BINDIR}/${file} ${PREFIX}/bin/${file}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|