Add polyml 4.1.3, a fast open-source implementation of Standard ML.
PR: 83433 Submitted by: Timothy Bourke <timbob@bigpond.com>
This commit is contained in:
parent
f5310d8e95
commit
fbc1517ea7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140373
@ -203,6 +203,7 @@
|
||||
SUBDIR += pnet-base
|
||||
SUBDIR += pnetc
|
||||
SUBDIR += pnetlib
|
||||
SUBDIR += polyml
|
||||
SUBDIR += ptoc
|
||||
SUBDIR += pugs
|
||||
SUBDIR += py-compiler
|
||||
|
88
lang/polyml/Makefile
Normal file
88
lang/polyml/Makefile
Normal file
@ -0,0 +1,88 @@
|
||||
# New ports collection makefile for: polyml
|
||||
# Date created: 09 July 2005
|
||||
# Whom: Timothy Bourke <timbob@bigpond.com>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= polyml
|
||||
PORTVERSION= 4.1.3
|
||||
CATEGORIES= lang
|
||||
DISTFILES= polyml-driver-4.1.3.tar.gz \
|
||||
polyml-mlsource-4.1.3.tar.gz \
|
||||
polyml-basis-4.1.3.tar.gz \
|
||||
polyml-4.1.3.i386.tar.gz
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
MAINTAINER= timbob@bigpond.com
|
||||
COMMENT= Fast open-source implementation of Standard ML
|
||||
|
||||
WRKSRC= ${WRKDIR}/driver
|
||||
ONLY_FOR_ARCHS= i386
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= ${PREFIX}
|
||||
|
||||
SUB_FILES= poly pkg-message
|
||||
PLIST_FILES= bin/poly \
|
||||
lib/polyml/poly \
|
||||
lib/polyml/LICENCE \
|
||||
lib/polyml/ML_dbase \
|
||||
lib/polyml/DB413Release
|
||||
PLIST_DIRS= lib/polyml
|
||||
|
||||
RESTRICTED= Downloading implies agreement to the licence.
|
||||
|
||||
NO_INSTALL_MANPAGES=yes
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
TO_BE_FETCHED=
|
||||
|
||||
.for f in ${DISTFILES}
|
||||
.if ! exists (${DISTDIR}/${DIST_SUBDIR}/${f})
|
||||
TO_BE_FETCHED+= ${f}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
do-fetch:
|
||||
.if ${TO_BE_FETCHED} != ""
|
||||
ECHO_MSG=/usr/bin/printf
|
||||
IGNORE= :\n\n\
|
||||
------------------------------------------------------------------\n\
|
||||
Downloading this software implies acceptance of the licence\n\
|
||||
agreement, which may be found at: http://www.polyml.org/Get.html\n\
|
||||
\n\
|
||||
Please download the following files into ${DISTDIR}/${DIST_SUBDIR}\n\
|
||||
\n
|
||||
.for f in ${TO_BE_FETCHED}
|
||||
IGNORE+= ${f}\n
|
||||
.endfor
|
||||
IGNORE+=------------------------------------------------------------------\n\n
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
(cd ${WRKDIR}/mlsource/MLCompiler/CodeTree; ${LN} -fs CodeCons.i386 CodeCons)
|
||||
(cd ${WRKDIR}; ./driver/poly ML_dbase < mlsource/BuildAll.sml)
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${WRKDIR}/DB413Release ${PREFIX}/lib/polyml/
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/poly ${PREFIX}/bin/poly
|
||||
(cd ${PREFIX}/lib/polyml; ${LN} -fs ./DB413Release ML_dbase)
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
install-user:
|
||||
.if !exists (${LOCALBASE}/lib/polyml/ML_dbase)
|
||||
@${ECHO_CMD}
|
||||
@${ECHO_CMD} "You need to install the Poly/ML port first!"
|
||||
@${ECHO_CMD}
|
||||
.elif exists (${HOME}/.polyml/ML_dbase)
|
||||
@${ECHO_CMD}
|
||||
@${ECHO_CMD} "User copy of database already exists. Aborting!"
|
||||
@${ECHO_CMD}
|
||||
.else
|
||||
${MKDIR} ${HOME}/.polyml
|
||||
${CP} ${LOCALBASE}/lib/polyml/ML_dbase ${HOME}/.polyml
|
||||
${CHMOD} 0600 ${HOME}/.polyml/ML_dbase
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
8
lang/polyml/distinfo
Normal file
8
lang/polyml/distinfo
Normal file
@ -0,0 +1,8 @@
|
||||
MD5 (polyml/polyml-driver-4.1.3.tar.gz) = 814cea1cfb376d4bb3977f78bad3d5eb
|
||||
SIZE (polyml/polyml-driver-4.1.3.tar.gz) = 448918
|
||||
MD5 (polyml/polyml-mlsource-4.1.3.tar.gz) = c316411eb44e61bc85762e5742761936
|
||||
SIZE (polyml/polyml-mlsource-4.1.3.tar.gz) = 942603
|
||||
MD5 (polyml/polyml-basis-4.1.3.tar.gz) = aaaebb967ddafcbf9ff27ea815be5414
|
||||
SIZE (polyml/polyml-basis-4.1.3.tar.gz) = 130932
|
||||
MD5 (polyml/polyml-4.1.3.i386.tar.gz) = 4309deffef425ef2052a2bfd37539f31
|
||||
SIZE (polyml/polyml-4.1.3.i386.tar.gz) = 1110381
|
49
lang/polyml/files/patch-driver-Makefile.in
Normal file
49
lang/polyml/files/patch-driver-Makefile.in
Normal file
@ -0,0 +1,49 @@
|
||||
--- Makefile.in.orig Tue Nov 14 22:01:18 2000
|
||||
+++ Makefile.in Fri Jun 10 15:27:34 2005
|
||||
@@ -15,6 +15,7 @@
|
||||
AFLAGS = $(CPUFLAGS) $(OSFLAGS)
|
||||
ASFLAGS = $(AFLAGS)
|
||||
CFLAGS = $(CPUFLAGS) $(OSFLAGS) @OPTFLAGS@ @INCLUDES@ -DDEFAULT_POLYPATH=$(DEFAULT_POLYPATH)
|
||||
+CFLAGSO1 = $(CPUFLAGS) $(OSFLAGS) -O1 @INCLUDES@ -DDEFAULT_POLYPATH=$(DEFAULT_POLYPATH)
|
||||
LINTFLAGS = $(CPUFLAGS) $(OSFLAGS) @IFLAGS@
|
||||
XLFLAGS = @LIBS@
|
||||
|
||||
@@ -32,7 +33,9 @@
|
||||
all: $(TARGETS)
|
||||
|
||||
install: $(TARGETS)
|
||||
- cp $(TARGETS) $(INSTALLDIR)
|
||||
+ mkdir -p $(INSTALLDIR)
|
||||
+ $(BSD_INSTALL_PROGRAM) $(TARGETS) $(INSTALLDIR)
|
||||
+ $(BSD_INSTALL_DATA) LICENCE $(INSTALLDIR)
|
||||
|
||||
POLYOBJS = \
|
||||
mpoly.o \
|
||||
@@ -95,7 +98,26 @@
|
||||
rm -f powtemp.s
|
||||
|
||||
xwindows.o: xwindows.c
|
||||
- $(CC) $(CFLAGS) -c xwindows.c -o xwindows.o
|
||||
+ $(CC) $(CFLAGSO1) -c xwindows.c -o xwindows.o
|
||||
+
|
||||
+# Use -O1 rather than -O2 to avoid:
|
||||
+# dereferencing type-punned pointer will break strict-aliasing rules
|
||||
+# warnings (and subsequent problems with Isabelle logic compilation)
|
||||
+
|
||||
+arb.o: arb.c
|
||||
+ $(CC) $(CFLAGSO1) -c $<
|
||||
+
|
||||
+processes.o: processes.c
|
||||
+ $(CC) $(CFLAGSO1) -c $<
|
||||
+
|
||||
+realconv.o: realconv.c
|
||||
+ $(CC) $(CFLAGSO1) -c $<
|
||||
+
|
||||
+run_time.o: run_time.c
|
||||
+ $(CC) $(CFLAGSO1) -c $<
|
||||
+
|
||||
+i386_dep.o: i386_dep.c
|
||||
+ $(CC) $(CFLAGSO1) -c $<
|
||||
|
||||
# Make sure the version is updated whenever anything is recompiled.
|
||||
version.o: $(POLYOBJS) $(DISCGARBOBJS)
|
13
lang/polyml/files/patch-driver-configure
Normal file
13
lang/polyml/files/patch-driver-configure
Normal file
@ -0,0 +1,13 @@
|
||||
--- configure.orig Mon Sep 30 19:25:39 2002
|
||||
+++ configure Sun Jun 12 11:57:31 2005
|
||||
@@ -12,8 +12,8 @@
|
||||
INCLUDES=""
|
||||
LIBS=""
|
||||
OBJS=""
|
||||
-INSTALLDIR="/usr/bin"
|
||||
-DEFAULT_POLYPATH=.:/usr/lib/poly:/usr/local/lib/poly
|
||||
+INSTALLDIR=$1/lib/polyml
|
||||
+DEFAULT_POLYPATH=.:$1/lib/polyml
|
||||
|
||||
# Basic operating system. Use this to find the other parameters.
|
||||
OS=`uname`
|
17
lang/polyml/files/patch-driver-i386_dep.c
Normal file
17
lang/polyml/files/patch-driver-i386_dep.c
Normal file
@ -0,0 +1,17 @@
|
||||
--- i386_dep.c.orig Sun Jun 12 14:32:11 2005
|
||||
+++ i386_dep.c Sun Jun 12 14:45:17 2005
|
||||
@@ -473,9 +473,14 @@
|
||||
else
|
||||
{
|
||||
signal(SIGSEGV,SIG_DFL);
|
||||
+#ifdef FREEBSD
|
||||
+ fprintf(stderr,"catchSEGV; &context = %p, in_run_time_system=%i, context.trapno=%ld\n",
|
||||
+ scp, in_run_time_system, scp->sc_trapno);
|
||||
+#else
|
||||
fprintf(stderr,"catchSEGV; &context = %p, in_run_time_system=%i, context.trapno=%ld\n",
|
||||
&context, in_run_time_system, context.trapno);
|
||||
signal(SIGSEGV,catchSEGV);
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
11
lang/polyml/files/patch-driver-mmap.c
Normal file
11
lang/polyml/files/patch-driver-mmap.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- mmap.c.orig Fri Jun 10 09:54:34 2005
|
||||
+++ mmap.c Fri Jun 10 09:55:57 2005
|
||||
@@ -60,7 +60,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
-#ifdef MACOSX
|
||||
+#if (defined(FREEBSD) || defined(MACOSX))
|
||||
#include <limits.h>
|
||||
#else
|
||||
#include <values.h> /* FreeBSD warns about this but it's needed in Solaris. */
|
33
lang/polyml/files/patch-driver-mpoly.c
Normal file
33
lang/polyml/files/patch-driver-mpoly.c
Normal file
@ -0,0 +1,33 @@
|
||||
--- mpoly.c.orig Thu Jun 20 02:27:30 2002
|
||||
+++ mpoly.c Sat Jul 9 08:57:27 2005
|
||||
@@ -636,6 +636,30 @@
|
||||
|
||||
proper_printf("Poly/ML RTS version %s\n",poly_runtime_system_version);
|
||||
|
||||
+#if defined(FREEBSD)
|
||||
+ /* FreeBSD 5.x links dynamic libraries above the user heap, rather
|
||||
+ than below the user stack. It determines the base address from
|
||||
+ the allowed process data size (ulimit -d, limit datasize), the
|
||||
+ maximum value of which is set by the kernel maxdsiz parameter.
|
||||
+ If this datasize value is too low, there will be conflicts
|
||||
+ with the Poly/ML heaps, database or IO Area. Such problems are
|
||||
+ difficult to diagnose, thus the check here.
|
||||
+ */
|
||||
+ struct rlimit rlim;
|
||||
+ if (getrlimit(RLIMIT_DATA, &rlim) != 0) {
|
||||
+ proper_fprintf(stderr, "unable to check the datasize resource limit.\n");
|
||||
+ rlim.rlim_max = 0;
|
||||
+ }
|
||||
+ if (rlim.rlim_max < ((rlim_t)IO_TOP - 0x08000000)) {
|
||||
+ proper_fprintf(stderr,
|
||||
+ "WARNING: The maximum datasize limit is too low (>= 896M recommended).\n");
|
||||
+ proper_fprintf(stderr,
|
||||
+ "WARNING: Large databases may cause problematic behaviour.\n");
|
||||
+ proper_fprintf(stderr,
|
||||
+ "WARNING: Please increase resources with limit/ulimit and/or kern.maxdsiz\n");
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (A.filename == 0)
|
||||
{
|
||||
#ifdef WINDOWS_PC
|
13
lang/polyml/files/patch-driver-process_env.c
Normal file
13
lang/polyml/files/patch-driver-process_env.c
Normal file
@ -0,0 +1,13 @@
|
||||
--- process_env.c.orig Fri Jun 10 10:10:07 2005
|
||||
+++ process_env.c Fri Jun 10 10:10:31 2005
|
||||
@@ -14,6 +14,10 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
+#ifdef FREEBSD
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
+
|
||||
#include "globals.h"
|
||||
#include "sys.h"
|
||||
#include "run_time.h"
|
8
lang/polyml/files/pkg-message.in
Normal file
8
lang/polyml/files/pkg-message.in
Normal file
@ -0,0 +1,8 @@
|
||||
------------------------------------------------------------
|
||||
Use of Poly/ML is subject to a licence.
|
||||
Please uninstall this port if you do not agree with the
|
||||
terms outlined in:
|
||||
%%PREFIX%%/lib/polyml/LICENCE
|
||||
or at:
|
||||
http://www.polyml.org/Get.html
|
||||
------------------------------------------------------------
|
9
lang/polyml/files/poly.in
Normal file
9
lang/polyml/files/poly.in
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
USERDB="$HOME/.polyml/ML_dbase"
|
||||
if [ ! -f "$USERDB" ]; then
|
||||
USERDB=""
|
||||
fi
|
||||
|
||||
exec %%PREFIX%%/lib/polyml/poly $USERDB $*
|
||||
|
5
lang/polyml/pkg-descr
Normal file
5
lang/polyml/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
Poly/ML is a full implementation of Standard ML available as
|
||||
open-source. It includes a symbolic debugger which allows breakpoints
|
||||
to be set and local variables to be viewed as ML values.
|
||||
|
||||
WWW: http://www.polyml.org
|
36
lang/polyml/pkg-install
Normal file
36
lang/polyml/pkg-install
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ]; then
|
||||
if test `ulimit -Hd` -lt 917504; then
|
||||
cat <<END
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! Poly/ML memory regions (heaps, database and IO Area) are stored at !
|
||||
! fixed addresses in the processes virtual memory space, for reasons !
|
||||
! of speed. !
|
||||
! !
|
||||
! The address space available to FreeBSD processes for heap and !
|
||||
! data storage is limited by an administrative setting: !
|
||||
! sh: ulimit -Hd !
|
||||
! csh: limit -h datasize !
|
||||
! !
|
||||
! The maximum administrative setting is limited in turn by a kernel !
|
||||
! parameter: maxdsiz. If the maximum datasize is too low, the !
|
||||
! dynamic linker will load libraries into the memory regions used !
|
||||
! by Poly/ML -- this may cause problems, including non-termination !
|
||||
! when committing large databases. !
|
||||
! !
|
||||
! One fix is to add the following line to /boot/loader.conf before !
|
||||
! restarting: !
|
||||
! kern.maxdsiz="896M" !
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
! In order to be able to commit changes to Poly/ML's database, each !
|
||||
! user needs to have her/his own writable copy. !
|
||||
! !
|
||||
! Please login with the user you plan to use Poly/ML with and run !
|
||||
! "make install-user" from ports/lang/polyml. !
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
END
|
||||
fi
|
||||
fi
|
Loading…
Reference in New Issue
Block a user