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

(-)Makefile (-17 / +15 lines)
Lines 2-8 Link Here
2
# Date created:        08 August 2005
2
# Date created:        08 August 2005
3
# Whom:                Timothy Bourke <timbob@bigpond.com>
3
# Whom:                Timothy Bourke <timbob@bigpond.com>
4
#
4
#
5
# $FreeBSD: ports/math/isabelle/Makefile,v 1.3 2006/08/10 12:04:59 rafan Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	isabelle
8
PORTNAME=	isabelle
Lines 22-28 Link Here
22
COMMENT=	A generic proof assistant
22
COMMENT=	A generic proof assistant
23
23
24
OPTIONS=	SMLNJ "Use SML/NJ (devel) instead of the faster Poly/ML" Off
24
OPTIONS=	SMLNJ "Use SML/NJ (devel) instead of the faster Poly/ML" Off
25
NO_PACKAGE=	Requires non-standard kernel setting.
26
25
27
.include <bsd.port.pre.mk>
26
.include <bsd.port.pre.mk>
28
27
Lines 30-40 Link Here
30
ML_SYSTEM=	smlnj-110
29
ML_SYSTEM=	smlnj-110
31
ML_HOME=	${LOCALBASE}/smlnj/bin
30
ML_HOME=	${LOCALBASE}/smlnj/bin
32
ML_OPTIONS=	@SMLdebug=/dev/null
31
ML_OPTIONS=	@SMLdebug=/dev/null
32
ML_PLATFORM=	x86-bsd
33
.else
33
.else
34
ML_SYSTEM=	polyml-4.2.0
34
ML_SYSTEM=	polyml-5.0
35
ML_HOME=	${LOCALBASE}/lib/polyml/
35
ML_HOME=	${LOCALBASE}/bin
36
ML_OPTIONS=	-H 80
36
ML_OPTIONS=	-H 500
37
ML_DBASE=	""
37
ML_DBASE=	""
38
ML_PLATFORM=	""
38
.endif
39
.endif
39
40
40
USE_PERL5=	yes
41
USE_PERL5=	yes
Lines 43-54 Link Here
43
44
44
DOCFILES=	Contents *.pdf *.eps *.ps *.dvi
45
DOCFILES=	Contents *.pdf *.eps *.ps *.dvi
45
46
46
PLIST_SUB=	HEAPSUBDIR=${ML_SYSTEM}_x86-bsd
47
48
.if defined(WITH_SMLNJ)
47
.if defined(WITH_SMLNJ)
48
PLIST_SUB=	HEAPSUBDIR=${ML_SYSTEM}_${ML_PLATFORM}
49
BUILD_DEPENDS+=	sml:${PORTSDIR}/lang/sml-nj-devel
49
BUILD_DEPENDS+=	sml:${PORTSDIR}/lang/sml-nj-devel
50
RUN_DEPENDS+=	sml:${PORTSDIR}/lang/sml-nj-devel
50
RUN_DEPENDS+=	sml:${PORTSDIR}/lang/sml-nj-devel
51
.else
51
.else
52
PLIST_SUB=	HEAPSUBDIR=${ML_SYSTEM}
52
BUILD_DEPENDS+=	poly:${PORTSDIR}/lang/polyml
53
BUILD_DEPENDS+=	poly:${PORTSDIR}/lang/polyml
53
RUN_DEPENDS+=	poly:${PORTSDIR}/lang/polyml
54
RUN_DEPENDS+=	poly:${PORTSDIR}/lang/polyml
54
.endif
55
.endif
Lines 57-64 Link Here
57
58
58
post-extract:
59
post-extract:
59
	@${CP} ${FILESDIR}/Makefile ${WRKSRC}
60
	@${CP} ${FILESDIR}/Makefile ${WRKSRC}
60
	@${CP} ${FILESDIR}/polyml-4.1.4-patch.ML ${WRKSRC}/src/Pure/ML-Systems/
61
	@${CP} ${FILESDIR}/run-polyml-5.0 ${WRKSRC}/lib/scripts/
61
	@${CP} ${FILESDIR}/polyml-4.2.0.ML ${WRKSRC}/src/Pure/ML-Systems/
62
	@${CHMOD} ugo+x ${WRKSRC}/lib/scripts/run-polyml-5.0
63
	@${CP} ${FILESDIR}/polyml-5.0.ML ${WRKSRC}/src/Pure/ML-Systems/
64
.if !defined(WITH_SMLNJ)
65
	@${CP} ${FILESDIR}/proofgeneral-settings.el ${WRKSRC}/etc/
66
.endif
62
67
63
post-patch:
68
post-patch:
64
	@${MV} ${WRKSRC}/etc/settings ${WRKSRC}/etc/settings.presed
69
	@${MV} ${WRKSRC}/etc/settings ${WRKSRC}/etc/settings.presed
Lines 66-84 Link Here
66
		 s|%%ML_HOME%%|${ML_HOME}|;		\
71
		 s|%%ML_HOME%%|${ML_HOME}|;		\
67
		 s|%%ML_OPTIONS%%|\"${ML_OPTIONS}\"|;	\
72
		 s|%%ML_OPTIONS%%|\"${ML_OPTIONS}\"|;	\
68
		 s|%%ML_DBASE%%|${ML_DBASE}|;		\
73
		 s|%%ML_DBASE%%|${ML_DBASE}|;		\
74
		 s|%%ML_PLATFORM%%|${ML_PLATFORM}|;	\
69
		 s|%%PREFIX%%|${PREFIX}|"		\
75
		 s|%%PREFIX%%|${PREFIX}|"		\
70
		${WRKSRC}/etc/settings.presed > ${WRKSRC}/etc/settings
76
		${WRKSRC}/etc/settings.presed > ${WRKSRC}/etc/settings
71
	@${RM} ${WRKSRC}/etc/settings.presed
77
	@${RM} ${WRKSRC}/etc/settings.presed
72
	@${TOUCH} ${WRKSRC}/contrib/.keep
78
	@${TOUCH} ${WRKSRC}/contrib/.keep
73
79
74
pre-build:
75
.if !defined(WITH_SMLNJ)
76
	@if ${TEST} `ulimit -Hd` -lt 917504; then	\
77
		${CAT} ${FILESDIR}/badmaxdsiz;		\
78
		exit 1;					\
79
	fi
80
.endif
81
82
post-install:
80
post-install:
83
	${WRKSRC}/bin/isatool ${INSTALL} -d ${PREFIX}/share/isabelle -p ${PREFIX}/bin
81
	${WRKSRC}/bin/isatool ${INSTALL} -d ${PREFIX}/share/isabelle -p ${PREFIX}/bin
84
.if !defined(NOPORTDOCS)
82
.if !defined(NOPORTDOCS)
(-)pkg-install (-23 lines)
Removed Link Here
1
#!/bin/sh
2
3
if [ "$2" = "POST-INSTALL" ]; then
4
	if test `ulimit -Hd` -lt 917504; then
5
		cat <<END
6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
! The system process data segment value is too low!                  !
8
!                                                                    !
9
! Under these circumstances Isabelle may not function reliably, or   !
10
! may fail completely.                                               !
11
!                                                                    !
12
! The setting may be viewed and modified with the commands:          !
13
!   sh:  ulimit -Hd                                                  !
14
!   csh: limit -h datasize                                           !
15
!                                                                    !
16
! It may be necessary to lift the maximum limit. One way of doing    !
17
! this is to add a line to /boot/loader.conf and then to restart the !
18
! system:                                                            !
19
!    kern.maxdsiz="896M"                                             !
20
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21
END
22
	fi
23
fi
(-)pkg-plist (-2 / +2 lines)
Lines 2070-2075 Link Here
2070
%%DATADIR%%/lib/scripts/polyml-version
2070
%%DATADIR%%/lib/scripts/polyml-version
2071
%%DATADIR%%/lib/scripts/run-mosml
2071
%%DATADIR%%/lib/scripts/run-mosml
2072
%%DATADIR%%/lib/scripts/run-polyml
2072
%%DATADIR%%/lib/scripts/run-polyml
2073
%%DATADIR%%/lib/scripts/run-polyml-5.0
2073
%%DATADIR%%/lib/scripts/run-smlnj
2074
%%DATADIR%%/lib/scripts/run-smlnj
2074
%%DATADIR%%/lib/scripts/showtime
2075
%%DATADIR%%/lib/scripts/showtime
2075
%%DATADIR%%/lib/scripts/unsymbolize.pl
2076
%%DATADIR%%/lib/scripts/unsymbolize.pl
Lines 3341-3348 Link Here
3341
%%DATADIR%%/src/Pure/ML-Systems/cpu-timer-basis.ML
3342
%%DATADIR%%/src/Pure/ML-Systems/cpu-timer-basis.ML
3342
%%DATADIR%%/src/Pure/ML-Systems/cpu-timer-gc.ML
3343
%%DATADIR%%/src/Pure/ML-Systems/cpu-timer-gc.ML
3343
%%DATADIR%%/src/Pure/ML-Systems/mosml.ML
3344
%%DATADIR%%/src/Pure/ML-Systems/mosml.ML
3344
%%DATADIR%%/src/Pure/ML-Systems/polyml-4.1.4-patch.ML
3345
%%DATADIR%%/src/Pure/ML-Systems/polyml-5.0.ML
3345
%%DATADIR%%/src/Pure/ML-Systems/polyml-4.2.0.ML
3346
%%DATADIR%%/src/Pure/ML-Systems/polyml-posix.ML
3346
%%DATADIR%%/src/Pure/ML-Systems/polyml-posix.ML
3347
%%DATADIR%%/src/Pure/ML-Systems/polyml-time-limit.ML
3347
%%DATADIR%%/src/Pure/ML-Systems/polyml-time-limit.ML
3348
%%DATADIR%%/src/Pure/ML-Systems/polyml.ML
3348
%%DATADIR%%/src/Pure/ML-Systems/polyml.ML
(-)files/badmaxdsiz (-18 lines)
Removed Link Here
1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2
! The system process data segment value is too low!                  !
3
!                                                                    !
4
! Under these circumstances the Isabelle build process for logics    !
5
! such as HOL will not terminate, or otherwise fail.                 !
6
!                                                                    !
7
! The setting may be viewed and modified with the commands:          !
8
!   sh:  ulimit -Hd                                                  !
9
!   csh: limit -h datasize                                           !
10
!                                                                    !
11
! It may be necessary to lift the maximum limit. One way of doing    !
12
! this is to add a line to /boot/loader.conf and then to restart the !
13
! system:                                                            !
14
!    kern.maxdsiz="896M"                                             !
15
!                                                                    !
16
! This problem only affects Poly/ML. Isabelle may also be configured !
17
! to use SML/NJ (build with WITH_SMLNJ=yes).                         !
18
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(-)files/patch-etc-settings (-1 / +1 lines)
Lines 34-40 Link Here
34
+ML_SYSTEM=%%ML_SYSTEM%%
34
+ML_SYSTEM=%%ML_SYSTEM%%
35
+ML_HOME=%%ML_HOME%%
35
+ML_HOME=%%ML_HOME%%
36
+ML_OPTIONS=%%ML_OPTIONS%%
36
+ML_OPTIONS=%%ML_OPTIONS%%
37
+ML_PLATFORM=x86-bsd
37
+ML_PLATFORM=%%ML_PLATFORM%%
38
+ML_DBASE=%%ML_DBASE%%
38
+ML_DBASE=%%ML_DBASE%%
39
 
39
 
40
 ###
40
 ###
(-)files/polyml-4.1.4-patch.ML (-31 lines)
Removed Link Here
1
(*  Title:      Pure/ML-Systems/polyml-4.1.4-patch.ML
2
    ID:         $Id$
3
    Author:     Makarius
4
5
Patch for PolyML 4.1.4 to make it work with Isabelle2005.  We commit
6
this into ML_dbase!
7
*)
8
9
structure Posix =
10
struct
11
  open Posix;
12
  structure IO =
13
  struct
14
    open IO;
15
    val mkReader = mkTextReader;
16
    val mkWriter = mkTextWriter;
17
  end;
18
end;
19
20
structure TextIO =
21
struct
22
  open TextIO;
23
  fun inputLine is = Option.getOpt (TextIO.inputLine is, "");
24
end;
25
26
structure Substring =
27
struct
28
  open Substring;
29
  val all = full;
30
end;
31
(-)files/polyml-4.2.0.ML (-9 lines)
Removed Link Here
1
(*  Title:      Pure/ML-Systems/polyml-4.2.0.ML
2
    ID:         $Id: polyml-4.2.0.ML,v 1.1 2005/11/14 13:36:46 wenzelm Exp $
3
    Author:     Makarius
4
5
Compatibility wrapper for Poly/ML 4.2.0.
6
*)
7
8
use "ML-Systems/polyml-4.1.4-patch.ML";
9
use "ML-Systems/polyml.ML";
(-)files/polyml-5.0.ML (+33 lines)
Added Link Here
1
(*  Title:      Pure/ML-Systems/polyml-5.0.ML
2
    ID:         $Id: polyml-5.0.ML,v 1.1 2006/12/07 13:11:39 wenzelm Exp $
3
4
Compatibility wrapper for Poly/ML 5.0 -- version for Isabelle2005.
5
*)
6
7
structure Posix =
8
struct
9
  open Posix;
10
  structure IO =
11
  struct
12
    open IO;
13
    val mkReader = mkTextReader;
14
    val mkWriter = mkTextWriter;
15
  end;
16
end;
17
18
structure TextIO =
19
struct
20
  open TextIO;
21
  fun inputLine is = Option.getOpt (TextIO.inputLine is, "");
22
end;
23
24
structure Substring =
25
struct
26
  open Substring;
27
  val all = full;
28
end;
29
30
31
use "ML-Systems/polyml.ML";
32
33
val pointer_eq = PolyML.pointerEq;
(-)files/proofgeneral-settings.el (+17 lines)
Added Link Here
1
;;;
2
;;; $Id: proofgeneral-settings.el,v 1.2 2001/09/28 18:08:05 wenzelm Exp $
3
;;;
4
;;; Options for Proof General
5
6
;; Examples for sensible settings:
7
8
;(custom-set-variables '(isar-eta-contract nil))
9
10
;(custom-set-faces
11
; '(proof-locked-face
12
;   ((((type x) (class color) (background light)) (:background "lightsteelblue2")))))
13
14
; Makarius' Poly/ML 5.0 patches
15
(custom-set-variables
16
 '(proof-shell-pre-interrupt-hook (lambda () t)))
17
(-)files/run-polyml-5.0 (+93 lines)
Added Link Here
1
#!/usr/bin/env bash
2
#
3
# $Id: run-polyml-5.0,v 1.2 2006/12/08 21:18:35 wenzelm Exp $
4
# Author: Makarius
5
#
6
# Poly/ML startup script (for 5.0)
7
8
export -n INFILE OUTFILE COPYDB COMPRESS MLTEXT TERMINATE NOWRITE
9
10
11
## diagnostics
12
13
function fail_out()
14
{
15
  echo "Unable to create output heap file: \"$OUTFILE\"" >&2
16
  exit 2
17
}
18
19
function check_file()
20
{
21
  if [ ! -f "$1" ]; then
22
    echo "Unable to locate $1" >&2
23
    echo "Please check your ML system settings!" >&2
24
    exit 2
25
  fi
26
}
27
28
29
## compiler executables and libraries
30
31
POLY="$ML_HOME/poly"
32
check_file "$POLY"
33
34
if [ "$(basename "$ML_HOME")" = bin ]; then
35
  POLYLIB="$(cd "$ML_HOME"; cd "$(pwd -P)"; cd ../lib; pwd)"
36
else
37
  POLYLIB="$ML_HOME"
38
fi
39
40
export LD_LIBRARY_PATH="$POLYLIB:$LD_LIBRARY_PATH"
41
export DYLD_LIBRARY_PATH="$POLYLIB:$DYLD_LIBRARY_PATH"
42
43
44
## prepare databases
45
46
if [ -z "$INFILE" ]; then
47
  EXIT="fun exit 0 = (OS.Process.exit OS.Process.success): unit | exit _ = OS.Process.exit OS.Process.failure;"
48
else
49
  check_file "$INFILE"
50
  POLY="$INFILE"
51
  EXIT=""
52
fi
53
54
ROOT_FUNCTION="fn () => (Signal.signal (2, Signal.SIG_HANDLE (fn _ => Process.interruptConsoleProcesses ())); PolyML.rootFunction ())"
55
56
if [ -z "$OUTFILE" ]; then
57
  COMMIT='fun commit () = (TextIO.output (TextIO.stdErr, "Error - Database is not opened for writing.\n"); false);'
58
else
59
  if [ -z "$COMPRESS" ]; then
60
    COMMIT="fun commit () = (TextIO.output (TextIO.stdOut, \"Exporting $OUTFILE\n\"); PolyML.export (\"$OUTFILE\", $ROOT_FUNCTION); true);"
61
  else
62
    COMMIT="fun commit () = (PolyML.shareCommonData PolyML.rootFunction; TextIO.output (TextIO.stdOut, \"Exporting $OUTFILE\n\"); PolyML.export (\"$OUTFILE\", $ROOT_FUNCTION); true);"
63
  fi
64
  [ -f "$OUTFILE" ] && { chmod +w "$OUTFILE" || fail_out; }
65
  rm -f "${OUTFILE}.o" || fail_out
66
fi
67
68
69
## run it!
70
71
MLTEXT="PolyML.Compiler.printInAlphabeticalOrder := false; $EXIT $COMMIT $MLTEXT"
72
MLEXIT="commit();"
73
74
if [ -z "$TERMINATE" ]; then
75
  FEEDER_OPTS=""
76
else
77
  FEEDER_OPTS="-q"
78
fi
79
80
"$ISABELLE_HOME/lib/scripts/feeder" -p -h "$MLTEXT" -t "$MLEXIT" $FEEDER_OPTS | \
81
  { read FPID; "$POLY" $ML_OPTIONS; RC="$?"; kill -HUP "$FPID"; exit "$RC"; }
82
RC="$?"
83
84
if [ -n "$OUTFILE" ]; then
85
  if [ -e "${OUTFILE}.o" ]; then
86
    cc -o "$OUTFILE" "${OUTFILE}.o" -L"$POLYLIB" -lpolymain -lpolyml -lstdc++ || fail_out
87
    rm -f "${OUTFILE}.o"
88
    [ -e "${OUTFILE}.exe" ] && mv "${OUTFILE}.exe" "$OUTFILE"
89
  fi
90
  [ -f "$OUTFILE" -a -n "$NOWRITE" ] && chmod -w "$OUTFILE"
91
fi
92
93
exit "$RC"

Return to bug 109958