View | Details | Raw Unified | Return to bug 94667
Collapse All | Expand All

(-)/usr/ports/lang/polyml-new/Makefile (-39 / +20 lines)
Lines 6-18 Link Here
6
#
6
#
7
7
8
PORTNAME=	polyml
8
PORTNAME=	polyml
9
PORTVERSION=	4.1.3
9
PORTVERSION=	4.2.0
10
CATEGORIES=	lang
10
CATEGORIES=	lang
11
DISTFILES=	polyml-driver-4.1.3.tar.gz \
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
		polyml-mlsource-4.1.3.tar.gz \
12
MASTER_SITE_SUBDIR=	${PORTNAME}
13
		polyml-basis-4.1.3.tar.gz \
13
DISTFILES=	driver.420.tar.gz \
14
		polyml-4.1.3.i386.tar.gz
14
		mlsource.420.tar.gz \
15
		basis.420.tar.gz \
16
		DB420.i386.unix.gz
15
DIST_SUBDIR=	${PORTNAME}
17
DIST_SUBDIR=	${PORTNAME}
18
EXTRACT_ONLY=	driver.420.tar.gz \
19
		mlsource.420.tar.gz \
20
		basis.420.tar.gz
16
21
17
MAINTAINER=	timbob@bigpond.com
22
MAINTAINER=	timbob@bigpond.com
18
COMMENT=	Fast open-source implementation of Standard ML
23
COMMENT=	Fast open-source implementation of Standard ML
Lines 22-73 Link Here
22
HAS_CONFIGURE=	yes
27
HAS_CONFIGURE=	yes
23
CONFIGURE_ARGS=	${PREFIX}
28
CONFIGURE_ARGS=	${PREFIX}
24
29
25
SUB_FILES=	poly pkg-message
30
SUB_FILES=	poly
26
PLIST_FILES=	bin/poly \
31
PLIST_FILES=	bin/poly \
27
		lib/polyml/poly \
32
		lib/polyml/poly \
28
		lib/polyml/LICENCE \
33
		lib/polyml/COPYING \
29
		lib/polyml/ML_dbase \
34
		lib/polyml/ML_dbase \
30
		lib/polyml/DB413Release
35
		lib/polyml/DB420.i386.unix
31
PLIST_DIRS=	lib/polyml
36
PLIST_DIRS=	lib/polyml
32
37
33
RESTRICTED=	Downloading implies agreement to the licence.
34
35
NO_INSTALL_MANPAGES=yes
38
NO_INSTALL_MANPAGES=yes
36
39
37
.include <bsd.port.pre.mk>
40
post-extract:
38
TO_BE_FETCHED=
41
	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/DB420.i386.unix.gz \
39
42
		> ${WRKDIR}/DB420.i386.unix
40
.for f in ${DISTFILES}
41
.if ! exists (${DISTDIR}/${DIST_SUBDIR}/${f})
42
TO_BE_FETCHED+=		${f}
43
.endif
44
.endfor
45
46
do-fetch:
47
.if ${TO_BE_FETCHED} != ""
48
ECHO_MSG=/usr/bin/printf
49
IGNORE=	:\n\n\
50
------------------------------------------------------------------\n\
51
Downloading this software implies acceptance of the licence\n\
52
agreement, which may be found at: http://www.polyml.org/Get.html\n\
53
\n\
54
Please download the following files into ${DISTDIR}/${DIST_SUBDIR}\n\
55
\n
56
.for f in ${TO_BE_FETCHED}
57
IGNORE+=	${f}\n
58
.endfor
59
IGNORE+=------------------------------------------------------------------\n\n
60
.endif
61
43
62
post-build:
44
post-build:
63
	(cd ${WRKDIR}/mlsource/MLCompiler/CodeTree; ${LN} -fs CodeCons.i386 CodeCons)
45
	(cd ${WRKDIR}/mlsource/MLCompiler/CodeTree; ${LN} -fs CodeCons.i386 CodeCons)
64
	(cd ${WRKDIR}; ./driver/poly ML_dbase < mlsource/BuildAll.sml)
46
	(cd ${WRKDIR}; ./driver/poly DB420.i386.unix < mlsource/BuildAll.sml)
65
47
66
post-install:
48
post-install:
67
	@${INSTALL_DATA} ${WRKDIR}/DB413Release ${PREFIX}/lib/polyml/
49
	@${INSTALL_DATA} ${WRKDIR}/DB420.i386.unix ${PREFIX}/lib/polyml/
68
	@${INSTALL_SCRIPT} ${WRKDIR}/poly ${PREFIX}/bin/poly
50
	@${INSTALL_SCRIPT} ${WRKDIR}/poly ${PREFIX}/bin/poly
69
	(cd ${PREFIX}/lib/polyml; ${LN} -fs ./DB413Release ML_dbase)
51
	(cd ${PREFIX}/lib/polyml; ${LN} -fs ./DB420.i386.unix ML_dbase)
70
	@${CAT} ${PKGMESSAGE}
71
	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
52
	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
72
53
73
install-user:
54
install-user:
Lines 85-88 Link Here
85
	${CHMOD} 0600 ${HOME}/.polyml/ML_dbase
66
	${CHMOD} 0600 ${HOME}/.polyml/ML_dbase
86
.endif
67
.endif
87
68
88
.include <bsd.port.post.mk>
69
.include <bsd.port.mk>
(-)/usr/ports/lang/polyml-new/distinfo (-12 / +8 lines)
Lines 1-12 Link Here
1
MD5 (polyml/polyml-driver-4.1.3.tar.gz) = 814cea1cfb376d4bb3977f78bad3d5eb
1
MD5 (polyml/driver.420.tar.gz) = 3855385041e1a7d860ba72734c153ce4
2
SHA256 (polyml/polyml-driver-4.1.3.tar.gz) = 895c5e633fb172853896052dbb48b5fd6c63292f80d8323c74d0431e69f1c9c4
2
SIZE (polyml/driver.420.tar.gz) = 496596
3
SIZE (polyml/polyml-driver-4.1.3.tar.gz) = 448918
3
MD5 (polyml/mlsource.420.tar.gz) = 873b02beab2e083232d6a8bbddab5225
4
MD5 (polyml/polyml-mlsource-4.1.3.tar.gz) = c316411eb44e61bc85762e5742761936
4
SIZE (polyml/mlsource.420.tar.gz) = 923393
5
SHA256 (polyml/polyml-mlsource-4.1.3.tar.gz) = b184ceb5715aa5d3a0e095d2ee577d374ff9c4a9f648cb97f227feb98645c5a0
5
MD5 (polyml/basis.420.tar.gz) = fa307ceda8a6556d8407c4b5edc6e303
6
SIZE (polyml/polyml-mlsource-4.1.3.tar.gz) = 942603
6
SIZE (polyml/basis.420.tar.gz) = 148810
7
MD5 (polyml/polyml-basis-4.1.3.tar.gz) = aaaebb967ddafcbf9ff27ea815be5414
7
MD5 (polyml/DB420.i386.unix.gz) = 7591ad2e94002c3827918c4846c0a4c4
8
SHA256 (polyml/polyml-basis-4.1.3.tar.gz) = 7039569ba04224bb8cacf3df98353ededf57371d6d966c0dd3ae3cfe32b7833a
8
SIZE (polyml/DB420.i386.unix.gz) = 1848015
9
SIZE (polyml/polyml-basis-4.1.3.tar.gz) = 130932
10
MD5 (polyml/polyml-4.1.3.i386.tar.gz) = 4309deffef425ef2052a2bfd37539f31
11
SHA256 (polyml/polyml-4.1.3.i386.tar.gz) = e98b8748b1380b2c461f252901e87e597c50a0b14de5d1b6b481771f3e98d8fb
12
SIZE (polyml/polyml-4.1.3.i386.tar.gz) = 1110381
(-)/usr/ports/lang/polyml-new/files/patch-driver-Makefile.in (-40 / +4 lines)
Lines 1-49 Link Here
1
--- Makefile.in.orig	Tue Nov 14 22:01:18 2000
1
--- Makefile.in.orig	Thu Nov 24 20:54:04 2005
2
+++ Makefile.in	Fri Jun 10 15:27:34 2005
2
+++ Makefile.in	Thu Nov 24 20:56:19 2005
3
@@ -15,6 +15,7 @@
3
@@ -32,7 +32,9 @@
4
 AFLAGS    = $(CPUFLAGS) $(OSFLAGS)
5
 ASFLAGS	  = $(AFLAGS)
6
 CFLAGS    = $(CPUFLAGS) $(OSFLAGS) @OPTFLAGS@ @INCLUDES@ -DDEFAULT_POLYPATH=$(DEFAULT_POLYPATH)
7
+CFLAGSO1  = $(CPUFLAGS) $(OSFLAGS) -O1 @INCLUDES@ -DDEFAULT_POLYPATH=$(DEFAULT_POLYPATH)
8
 LINTFLAGS = $(CPUFLAGS) $(OSFLAGS) @IFLAGS@
9
 XLFLAGS   = @LIBS@
10
 
11
@@ -32,7 +33,9 @@
12
 all: $(TARGETS)
4
 all: $(TARGETS)
13
 
5
 
14
 install: $(TARGETS)
6
 install: $(TARGETS)
15
-	cp $(TARGETS) $(INSTALLDIR)
7
-	cp $(TARGETS) $(INSTALLDIR)
16
+	mkdir -p $(INSTALLDIR)
8
+	mkdir -p $(INSTALLDIR)
17
+	$(BSD_INSTALL_PROGRAM) $(TARGETS) $(INSTALLDIR)
9
+	$(BSD_INSTALL_PROGRAM) $(TARGETS) $(INSTALLDIR)
18
+	$(BSD_INSTALL_DATA) LICENCE $(INSTALLDIR)
10
+	$(BSD_INSTALL_DATA) COPYING $(INSTALLDIR)
19
  
11
  
20
 POLYOBJS = \
12
 POLYOBJS = \
21
   mpoly.o \
13
   mpoly.o \
22
@@ -95,7 +98,26 @@
23
 	rm -f powtemp.s
24
 
25
 xwindows.o: xwindows.c
26
-	$(CC) $(CFLAGS) -c xwindows.c -o xwindows.o
27
+	$(CC) $(CFLAGSO1) -c xwindows.c -o xwindows.o
28
+
29
+# Use -O1 rather than -O2 to avoid:
30
+#    dereferencing type-punned pointer will break strict-aliasing rules
31
+# warnings (and subsequent problems with Isabelle logic compilation)
32
+
33
+arb.o: arb.c
34
+	$(CC) $(CFLAGSO1) -c $<
35
+
36
+processes.o: processes.c
37
+	$(CC) $(CFLAGSO1) -c $<
38
+
39
+realconv.o: realconv.c
40
+	$(CC) $(CFLAGSO1) -c $<
41
+
42
+run_time.o: run_time.c
43
+	$(CC) $(CFLAGSO1) -c $<
44
+
45
+i386_dep.o: i386_dep.c
46
+	$(CC) $(CFLAGSO1) -c $<
47
 
48
 # Make sure the version is updated whenever anything is recompiled.
49
 version.o: $(POLYOBJS) $(DISCGARBOBJS)
(-)/usr/ports/lang/polyml-new/files/patch-driver-i386_dep.c (-17 lines)
Lines 1-17 Link Here
1
--- i386_dep.c.orig	Sun Jun 12 14:32:11 2005
2
+++ i386_dep.c	Sun Jun 12 14:45:17 2005
3
@@ -473,9 +473,14 @@
4
   else
5
   {
6
      signal(SIGSEGV,SIG_DFL);
7
+#ifdef FREEBSD
8
+     fprintf(stderr,"catchSEGV; &context = %p, in_run_time_system=%i, context.trapno=%ld\n",
9
+             scp, in_run_time_system, scp->sc_trapno);
10
+#else
11
      fprintf(stderr,"catchSEGV; &context = %p, in_run_time_system=%i, context.trapno=%ld\n",
12
              &context, in_run_time_system, context.trapno);
13
      signal(SIGSEGV,catchSEGV);
14
+#endif
15
   }
16
 #endif
17
 
(-)/usr/ports/lang/polyml-new/files/patch-driver-mmap.c (-11 lines)
Lines 1-11 Link Here
1
--- mmap.c.orig	Fri Jun 10 09:54:34 2005
2
+++ mmap.c	Fri Jun 10 09:55:57 2005
3
@@ -60,7 +60,7 @@
4
 #include <sys/uio.h>
5
 #include <sys/param.h>
6
 #include <unistd.h> 
7
-#ifdef MACOSX
8
+#if (defined(FREEBSD) || defined(MACOSX))
9
 #include <limits.h>
10
 #else
11
 #include <values.h> /* FreeBSD warns about this but it's needed in Solaris. */
(-)/usr/ports/lang/polyml-new/files/patch-driver-mpoly.c (-29 / +29 lines)
Lines 1-33 Link Here
1
--- mpoly.c.orig	Thu Jun 20 02:27:30 2002
1
--- mpoly.c.orig	Thu Nov 24 20:11:47 2005
2
+++ mpoly.c	Sat Jul  9 08:57:27 2005
2
+++ mpoly.c	Thu Nov 24 20:50:45 2005
3
@@ -636,6 +636,30 @@
3
@@ -648,6 +648,30 @@
4
 
4
   if (! be_silent)
5
   {
5
   proper_printf("Poly/ML RTS version %s\n",poly_runtime_system_version);
6
   proper_printf("Poly/ML RTS version %s\n",poly_runtime_system_version);
6
 
7
+
7
+#if defined(FREEBSD)
8
+#if defined(FREEBSD)
8
+  /* FreeBSD 5.x links dynamic libraries above the user heap, rather
9
+    /* FreeBSD 5.x links dynamic libraries above the user heap, rather
9
+     than below the user stack. It determines the base address from
10
+       than below the user stack. It determines the base address from
10
+     the allowed process data size (ulimit -d, limit datasize), the
11
+       the allowed process data size (ulimit -d, limit datasize), the
11
+     maximum value of which is set by the kernel maxdsiz parameter.
12
+       maximum value of which is set by the kernel maxdsiz parameter.
12
+     If this datasize value is too low, there will be conflicts
13
+       If this datasize value is too low, there will be conflicts
13
+     with the Poly/ML heaps, database or IO Area. Such problems are
14
+       with the Poly/ML heaps, database or IO Area. Such problems are
14
+     difficult to diagnose, thus the check here.
15
+       difficult to diagnose, thus the check here.
15
+  */
16
+    */
16
+  struct rlimit rlim;
17
+    struct rlimit rlim;
17
+  if (getrlimit(RLIMIT_DATA, &rlim) != 0) {
18
+    if (getrlimit(RLIMIT_DATA, &rlim) != 0) {
18
+    proper_fprintf(stderr, "unable to check the datasize resource limit.\n");
19
+      proper_fprintf(stderr, "unable to check the datasize resource limit.\n");
19
+    rlim.rlim_max = 0;
20
+      rlim.rlim_max = 0;
20
+  }
21
+    }
21
+  if (rlim.rlim_max < ((rlim_t)IO_TOP - 0x08000000)) {
22
+    if (rlim.rlim_max < ((rlim_t)IO_TOP - 0x08000000)) {
22
+    proper_fprintf(stderr,
23
+      proper_fprintf(stderr,
23
+	"WARNING: The maximum datasize limit is too low (>= 896M recommended).\n");
24
+	  "WARNING: The maximum datasize limit is too low (>= 896M recommended).\n");
24
+    proper_fprintf(stderr,
25
+      proper_fprintf(stderr,
25
+	"WARNING: Large databases may cause problematic behaviour.\n");
26
+	  "WARNING: Large databases may cause problematic behaviour.\n");
26
+    proper_fprintf(stderr,
27
+      proper_fprintf(stderr,
27
+    "WARNING: Please increase resources with limit/ulimit and/or kern.maxdsiz\n");
28
+      "WARNING: Please increase resources with limit/ulimit and/or kern.maxdsiz\n");
28
+  }
29
+    }
29
+#endif
30
+#endif
30
+
31
   }
32
 
31
   if (A.filename == 0)
33
   if (A.filename == 0)
32
   {
33
 #ifdef WINDOWS_PC
(-)/usr/ports/lang/polyml-new/files/patch-driver-process_env.c (-13 lines)
Lines 1-13 Link Here
1
--- process_env.c.orig	Fri Jun 10 10:10:07 2005
2
+++ process_env.c	Fri Jun 10 10:10:31 2005
3
@@ -14,6 +14,10 @@
4
 #include <sys/param.h>
5
 #endif
6
 
7
+#ifdef FREEBSD
8
+#include <unistd.h>
9
+#endif
10
+
11
 #include "globals.h"
12
 #include "sys.h"
13
 #include "run_time.h"
(-)/usr/ports/lang/polyml-new/files/pkg-message.in (-8 lines)
Lines 1-8 Link Here
1
------------------------------------------------------------
2
  Use of Poly/ML is subject to a licence.
3
  Please uninstall this port if you do not agree with the
4
  terms outlined in:
5
     %%PREFIX%%/lib/polyml/LICENCE
6
  or at:
7
     http://www.polyml.org/Get.html
8
------------------------------------------------------------

Return to bug 94667