diff options
author | Simon Barner <barner@FreeBSD.org> | 2005-07-29 07:19:56 +0000 |
---|---|---|
committer | Simon Barner <barner@FreeBSD.org> | 2005-07-29 07:19:56 +0000 |
commit | fbc1517ea717dc322deef60c6070ed186a37c29f (patch) | |
tree | 98fee6d0ad295caa4aab3758488d70c37a358ba6 /lang/polyml | |
parent | f5310d8e955f1d1aaf097bd9f8592fd5435b6b00 (diff) | |
download | ports-fbc1517ea717dc322deef60c6070ed186a37c29f.tar.gz ports-fbc1517ea717dc322deef60c6070ed186a37c29f.zip |
Notes
Diffstat (limited to 'lang/polyml')
-rw-r--r-- | lang/polyml/Makefile | 88 | ||||
-rw-r--r-- | lang/polyml/distinfo | 8 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-Makefile.in | 49 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-configure | 13 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-i386_dep.c | 17 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-mmap.c | 11 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-mpoly.c | 33 | ||||
-rw-r--r-- | lang/polyml/files/patch-driver-process_env.c | 13 | ||||
-rw-r--r-- | lang/polyml/files/pkg-message.in | 8 | ||||
-rw-r--r-- | lang/polyml/files/poly.in | 9 | ||||
-rw-r--r-- | lang/polyml/pkg-descr | 5 | ||||
-rw-r--r-- | lang/polyml/pkg-install | 36 |
12 files changed, 290 insertions, 0 deletions
diff --git a/lang/polyml/Makefile b/lang/polyml/Makefile new file mode 100644 index 000000000000..45adbb8279f9 --- /dev/null +++ b/lang/polyml/Makefile @@ -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> diff --git a/lang/polyml/distinfo b/lang/polyml/distinfo new file mode 100644 index 000000000000..f5f5ba24139e --- /dev/null +++ b/lang/polyml/distinfo @@ -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 diff --git a/lang/polyml/files/patch-driver-Makefile.in b/lang/polyml/files/patch-driver-Makefile.in new file mode 100644 index 000000000000..37b40f806529 --- /dev/null +++ b/lang/polyml/files/patch-driver-Makefile.in @@ -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) diff --git a/lang/polyml/files/patch-driver-configure b/lang/polyml/files/patch-driver-configure new file mode 100644 index 000000000000..dabdb4e83b47 --- /dev/null +++ b/lang/polyml/files/patch-driver-configure @@ -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` diff --git a/lang/polyml/files/patch-driver-i386_dep.c b/lang/polyml/files/patch-driver-i386_dep.c new file mode 100644 index 000000000000..c906ff188768 --- /dev/null +++ b/lang/polyml/files/patch-driver-i386_dep.c @@ -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 + diff --git a/lang/polyml/files/patch-driver-mmap.c b/lang/polyml/files/patch-driver-mmap.c new file mode 100644 index 000000000000..97ef361f49b2 --- /dev/null +++ b/lang/polyml/files/patch-driver-mmap.c @@ -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. */ diff --git a/lang/polyml/files/patch-driver-mpoly.c b/lang/polyml/files/patch-driver-mpoly.c new file mode 100644 index 000000000000..ce9a5cdf0165 --- /dev/null +++ b/lang/polyml/files/patch-driver-mpoly.c @@ -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 diff --git a/lang/polyml/files/patch-driver-process_env.c b/lang/polyml/files/patch-driver-process_env.c new file mode 100644 index 000000000000..1c3b10e553cb --- /dev/null +++ b/lang/polyml/files/patch-driver-process_env.c @@ -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" diff --git a/lang/polyml/files/pkg-message.in b/lang/polyml/files/pkg-message.in new file mode 100644 index 000000000000..eae3edda27aa --- /dev/null +++ b/lang/polyml/files/pkg-message.in @@ -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 +------------------------------------------------------------ diff --git a/lang/polyml/files/poly.in b/lang/polyml/files/poly.in new file mode 100644 index 000000000000..3fa3f863eaa7 --- /dev/null +++ b/lang/polyml/files/poly.in @@ -0,0 +1,9 @@ +#!/bin/sh + +USERDB="$HOME/.polyml/ML_dbase" +if [ ! -f "$USERDB" ]; then + USERDB="" +fi + +exec %%PREFIX%%/lib/polyml/poly $USERDB $* + diff --git a/lang/polyml/pkg-descr b/lang/polyml/pkg-descr new file mode 100644 index 000000000000..5e653ac3fb1b --- /dev/null +++ b/lang/polyml/pkg-descr @@ -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 diff --git a/lang/polyml/pkg-install b/lang/polyml/pkg-install new file mode 100644 index 000000000000..35cd94efe874 --- /dev/null +++ b/lang/polyml/pkg-install @@ -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 |