summaryrefslogtreecommitdiff
path: root/lang/cu-prolog
diff options
context:
space:
mode:
authorjtb <jtb>2001-02-24 15:38:48 +0000
committerjtb <jtb>2001-02-24 15:38:48 +0000
commitbc874535301e3213612302290fe3c7179ddbddf0 (patch)
treefd30c822a0849962a82e2ba675797ddbff899484 /lang/cu-prolog
parent717ceaa828744298b154e7e2ccb0f9a78c03b60f (diff)
downloadpkgsrc-bc874535301e3213612302290fe3c7179ddbddf0.tar.gz
Initial import of cu-prolog:
Experimental constraint logic programming language
Diffstat (limited to 'lang/cu-prolog')
-rw-r--r--lang/cu-prolog/Makefile36
-rw-r--r--lang/cu-prolog/files/md52
-rw-r--r--lang/cu-prolog/patches/patch-aa16
-rw-r--r--lang/cu-prolog/patches/patch-ab28
-rw-r--r--lang/cu-prolog/patches/patch-ac14
-rw-r--r--lang/cu-prolog/patches/patch-ad13
-rw-r--r--lang/cu-prolog/patches/patch-ae21
-rw-r--r--lang/cu-prolog/pkg/COMMENT1
-rw-r--r--lang/cu-prolog/pkg/DESCR11
-rw-r--r--lang/cu-prolog/pkg/PLIST22
10 files changed, 164 insertions, 0 deletions
diff --git a/lang/cu-prolog/Makefile b/lang/cu-prolog/Makefile
new file mode 100644
index 00000000000..69e5acb4c01
--- /dev/null
+++ b/lang/cu-prolog/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/02/24 15:38:48 jtb Exp $
+# New ports collection makefile for: cu-Prolog
+# Date created: 7 July 1999
+# Whom: Issei Suzuki <issei@jp.FreeBSD.ORG>
+#
+# FreeBSD: ports/lang/cu-prolog/Makefile,v 1.2 2000/04/12 06:18:03 obrien Exp
+#
+
+PORTNAME= cu-prolog
+PORTVERSION= 3.94
+CATEGORIES= lang
+MASTER_SITES= ftp://ftp.icot.or.jp/ifs/kbms-clp/unix/cuprolog/
+DISTFILES= ${DISTNAME}.tar.gz cupdoc.tar.gz
+DISTNAME= cupsrc
+
+MAINTAINER= issei@jp.FreeBSD.ORG
+
+WRKSRC= ${WRKDIR}/src
+MAKEFILE= makefile
+ALL_TARGET= cup
+PORTDOCS= CHANGES COPYRIGHT COPYRIGHT.j INSTALL INSTALL.j README \
+ README.j doc/cu3eman.dvi doc/cu3man.dvi doc/newpred_e.doc \
+ doc/newpred_j.doc
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cup3 ${PREFIX}/bin/cuprolog
+ ${MKDIR} ${PREFIX}/share/examples/cu-prolog
+ ${INSTALL_DATA} ${WRKDIR}/sample/* ${PREFIX}/share/examples/cu-prolog
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/cu-prolog
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKDIR}/$i ${PREFIX}/share/doc/cu-prolog
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/lang/cu-prolog/files/md5 b/lang/cu-prolog/files/md5
new file mode 100644
index 00000000000..548290b72b3
--- /dev/null
+++ b/lang/cu-prolog/files/md5
@@ -0,0 +1,2 @@
+MD5 (cupsrc.tar.gz) = 62b23ee48045d09579ab42ef62876d58
+MD5 (cupdoc.tar.gz) = 954f59489bb70bda5140118f1c5425d5
diff --git a/lang/cu-prolog/patches/patch-aa b/lang/cu-prolog/patches/patch-aa
new file mode 100644
index 00000000000..71217e1d412
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-aa
@@ -0,0 +1,16 @@
+--- makefile.old Wed Jul 7 02:03:58 1999
++++ makefile Wed Jul 7 02:04:19 1999
+@@ -6,11 +6,11 @@
+ refute.o unify.o defsysp.o syspred1.o\
+ syspred2.o trans.o tr_sub.o tr_split.o
+ #CFLAGS = -g
+-CFLAGS = -pg -g # for debug
++CFLAGS?= -pg -g # for debug
+ #CFLAGS = -O2 # for optimization
+ #CFLAGS = -O4
+ #CC = gcc
+-CC = cc
++CC?= cc
+ FLAGS = -lm
+
+ cup: $(OBJECTS)
diff --git a/lang/cu-prolog/patches/patch-ab b/lang/cu-prolog/patches/patch-ab
new file mode 100644
index 00000000000..4508cb32b44
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-ab
@@ -0,0 +1,28 @@
+--- include.h.orig Fri Jan 27 16:38:48 1995
++++ include.h Wed Jul 7 02:25:14 1999
+@@ -28,7 +28,11 @@
+ * else #define CPUTIME 0
+ */
+
++#ifdef __FreeBSD__
++#define CPUTIME 60
++#else
+ #define SUN4 1
++#endif
+ #define KANJI 1 /* 1: allow EUC Kanji for str functions */
+
+ /* Tee print macro */
+@@ -135,8 +139,13 @@
+ #define head_of_list(Term) (((struct clause *)Term)->c_form)
+ #define tail_of_list(Term) ((struct term *)((struct clause *)Term)->c_link)
+
++#ifdef __FreeBSD__
++#define is_readable(FP) (FP->_flags & __SRD)
++#define is_writable(FP) (FP->_flags & __SWR)
++#else
+ #define is_readable(FP) (FP->_flag & _IOREAD)
+ #define is_writable(FP) (FP->_flag & _IOWRT)
++#endif
+
+ #define is_functor(Term) ((Term)->type.ident > CONST_LIST_TYPE)
+ #define isconst_functor(Term) ((Term)->t_arity <= 0)
diff --git a/lang/cu-prolog/patches/patch-ac b/lang/cu-prolog/patches/patch-ac
new file mode 100644
index 00000000000..d2fb8d0e0d1
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-ac
@@ -0,0 +1,14 @@
+--- defsysp.c.old Wed Jul 7 02:21:11 1999
++++ defsysp.c Wed Jul 7 02:21:32 1999
+@@ -932,9 +932,9 @@
+ t1 = t2 = Nnum_val(0.0,TEMPORAL);
+ #else
+ times(&TIMES);
+- t1 = Nnum_val(((float)(TIMES.tms_stime+TIMES.tms_utime-OLD_TIME))/CPUTIME.0,
++ t1 = Nnum_val(((float)(TIMES.tms_stime+TIMES.tms_utime-OLD_TIME))/(float)CPUTIME,
+ TEMPORAL);
+- t2 = Nnum_val(((float)CONSTRAINT_HANDLING_TIME)/CPUTIME.0,TEMPORAL);
++ t2 = Nnum_val(((float)CONSTRAINT_HANDLING_TIME)/(float)CPUTIME,TEMPORAL);
+ #endif
+ #endif
+ upush(&(p1->p_body)); upush(&(p1->p_env));
diff --git a/lang/cu-prolog/patches/patch-ad b/lang/cu-prolog/patches/patch-ad
new file mode 100644
index 00000000000..c3e7d500cf9
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-ad
@@ -0,0 +1,13 @@
+--- mainsub.c.old Wed Jul 7 02:22:15 1999
++++ mainsub.c Wed Jul 7 02:22:30 1999
+@@ -1238,8 +1238,8 @@
+ times(&TIMES); /* get time */
+ ttemp = TIMES.tms_stime + TIMES.tms_utime;
+ tprint2 ("CPU time = %.3lf sec (Constraints Handling = %.3lf sec)\n",
+- (ttemp - TIMESAVE) / CPUTIME.0,
+- (CONSTRAINT_HANDLING_TIME / CPUTIME.0));
++ (ttemp - TIMESAVE) / (float)CPUTIME,
++ (CONSTRAINT_HANDLING_TIME / (float)CPUTIME));
+ }
+
+ void settimer() { /* set clock */
diff --git a/lang/cu-prolog/patches/patch-ae b/lang/cu-prolog/patches/patch-ae
new file mode 100644
index 00000000000..92d9238faa2
--- /dev/null
+++ b/lang/cu-prolog/patches/patch-ae
@@ -0,0 +1,21 @@
+--- main.c.old Wed Jul 7 02:26:00 1999
++++ main.c Wed Jul 7 02:27:38 1999
+@@ -303,13 +303,16 @@
+
+ void heap_realloc() /* reallocate system/user heaps */
+ {
++#if SUN4 == 1
+ cfree((char *)sheap); SHEAP_SIZE=SHEAP_SIZE*1.2; system_heap_alloc();
+-/* free(heap); HEAP_SIZE *= 1.2;
++#else
++ free(heap); HEAP_SIZE *= 1.2;
+ free(cheap); CHEAP_SIZE *= 1.2;
+ free(eheap); ESP_SIZE *= 1.2;
+ free(ustack); USTACK_SIZE *= 1.2;
+ free(nheap); NAME_SIZE *= 1.2;
+- heap_alloc(); */
++ heap_alloc();
++#endif /* SUN4 */
+ init_status();
+ }
+
diff --git a/lang/cu-prolog/pkg/COMMENT b/lang/cu-prolog/pkg/COMMENT
new file mode 100644
index 00000000000..1f2aa9723fe
--- /dev/null
+++ b/lang/cu-prolog/pkg/COMMENT
@@ -0,0 +1 @@
+Experimental constraint logic programming language
diff --git a/lang/cu-prolog/pkg/DESCR b/lang/cu-prolog/pkg/DESCR
new file mode 100644
index 00000000000..cb5a75a3bc3
--- /dev/null
+++ b/lang/cu-prolog/pkg/DESCR
@@ -0,0 +1,11 @@
+cu-Prolog is an experimental constraint logic programming language.
+Unlike most conventional CLP systems, cu-Prolog allows user-defined
+predicates as constraints and is suitable for implementing a natural
+language processing system based on the unification-based
+grammar. As an application of cu-Prolog, we developed
+a JPSG (Japanese Phrase Structure Grammar) parser
+with the JPSG Working Group (the chairman is Prof. GUNJI, Takao of
+Osaka University) at ICOT.
+
+cu-Prolog is also the complete implementation of the constraint
+unification and its name (cu) comes from the technique.
diff --git a/lang/cu-prolog/pkg/PLIST b/lang/cu-prolog/pkg/PLIST
new file mode 100644
index 00000000000..55ce4226d3a
--- /dev/null
+++ b/lang/cu-prolog/pkg/PLIST
@@ -0,0 +1,22 @@
+bin/cuprolog
+share/doc/cu-prolog/CHANGES
+share/doc/cu-prolog/COPYRIGHT
+share/doc/cu-prolog/COPYRIGHT.j
+share/doc/cu-prolog/INSTALL
+share/doc/cu-prolog/INSTALL.j
+share/doc/cu-prolog/README
+share/doc/cu-prolog/README.j
+share/doc/cu-prolog/cu3eman.dvi
+share/doc/cu-prolog/cu3man.dvi
+share/doc/cu-prolog/newpred_e.doc
+share/doc/cu-prolog/newpred_j.doc
+@dirrm share/doc/cu-prolog
+share/examples/cu-prolog/README
+share/examples/cu-prolog/bagof.p
+share/examples/cu-prolog/eisele.p
+share/examples/cu-prolog/hpsg.p
+share/examples/cu-prolog/jpsg.p
+share/examples/cu-prolog/kasper.p
+share/examples/cu-prolog/marcus.p
+share/examples/cu-prolog/memap.p
+@dirrm share/examples/cu-prolog