From owner-freebsd-ports Tue Jul 6 11:30: 6 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id D45C714FE3 for ; Tue, 6 Jul 1999 11:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA28716; Tue, 6 Jul 1999 11:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from mx.issei.org (mx.issei.org [210.169.187.134]) by hub.freebsd.org (Postfix) with ESMTP id 8386F14FBB for ; Tue, 6 Jul 1999 11:23:02 -0700 (PDT) (envelope-from issei@issei.org) Received: from localhost (localhost [127.0.0.1]) by mx.issei.org (Postfix) with ESMTP id EDE0B1F26 for ; Wed, 7 Jul 1999 03:22:57 +0900 (JST) Message-Id: <19990707032301R.issei@issei.org> Date: Wed, 07 Jul 1999 03:23:01 +0900 From: issei@jp.freebsd.org Reply-To: issei@jp.freebsd.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/12536: New port: lang/cu-prolog Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12536 >Category: ports >Synopsis: New port: lang/cu-prolog >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 6 11:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Issei Suzuki >Release: FreeBSD 3.2-STABLE i386 >Organization: Personal >Environment: I build and check this port skelton on FreeBSD 3.2-STABLE. Note: Portlint checker complains nothing about this port skelton. >Description: 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. >How-To-Repeat: >Fix: I attach the complete port skelton as shar archive. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # cu-prolog # cu-prolog/Makefile # cu-prolog/files # cu-prolog/files/md5 # cu-prolog/pkg # cu-prolog/pkg/COMMENT # cu-prolog/pkg/DESCR # cu-prolog/pkg/PLIST # cu-prolog/patches # cu-prolog/patches/patch-aa # cu-prolog/patches/patch-ab # cu-prolog/patches/patch-ac # cu-prolog/patches/patch-ad # cu-prolog/patches/patch-ae # echo c - cu-prolog mkdir -p cu-prolog > /dev/null 2>&1 echo x - cu-prolog/Makefile sed 's/^X//' >cu-prolog/Makefile << 'END-of-cu-prolog/Makefile' X# New ports collection makefile for: cu-Prolog X# Version required: 3.94 X# Date created: 7 July 1999 X# Whom: Issei Suzuki X# X# $Id$ X# X XDISTNAME= cupsrc XPKGNAME= cu-prolog-3.94 XCATEGORIES= lang XMASTER_SITES= ftp://ftp.icot.or.jp/ifs/kbms-clp/unix/cuprolog/ XDISTFILES= ${DISTNAME}.tar.gz cupdoc.tar.gz X XMAINTAINER= issei@jp.FreeBSD.ORG X XWRKSRC= ${WRKDIR}/src XMAKEFILE= makefile XALL_TARGET= cup XPORTDOCS= CHANGES COPYRIGHT COPYRIGHT.j INSTALL INSTALL.j README \ X README.j doc/cu3eman.dvi doc/cu3man.dvi doc/newpred_e.doc \ X doc/newpred_j.doc X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/cup3 ${PREFIX}/bin/cuprolog X ${MKDIR} ${PREFIX}/share/examples/cu-prolog X ${INSTALL_DATA} ${WRKDIR}/sample/* ${PREFIX}/share/examples/cu-prolog X.if !defined(NOPORTDOCS) X ${MKDIR} ${PREFIX}/share/doc/cu-prolog X.for i in ${PORTDOCS} X ${INSTALL_DATA} ${WRKDIR}/$i ${PREFIX}/share/doc/cu-prolog X.endfor X.endif X X.include END-of-cu-prolog/Makefile echo c - cu-prolog/files mkdir -p cu-prolog/files > /dev/null 2>&1 echo x - cu-prolog/files/md5 sed 's/^X//' >cu-prolog/files/md5 << 'END-of-cu-prolog/files/md5' XMD5 (cupsrc.tar.gz) = 62b23ee48045d09579ab42ef62876d58 XMD5 (cupdoc.tar.gz) = 954f59489bb70bda5140118f1c5425d5 END-of-cu-prolog/files/md5 echo c - cu-prolog/pkg mkdir -p cu-prolog/pkg > /dev/null 2>&1 echo x - cu-prolog/pkg/COMMENT sed 's/^X//' >cu-prolog/pkg/COMMENT << 'END-of-cu-prolog/pkg/COMMENT' Xcu-Prolog is an experimental constraint logic programming language. END-of-cu-prolog/pkg/COMMENT echo x - cu-prolog/pkg/DESCR sed 's/^X//' >cu-prolog/pkg/DESCR << 'END-of-cu-prolog/pkg/DESCR' X cu-Prolog is an experimental constraint logic programming language. XUnlike most conventional CLP systems, cu-Prolog allows user-defined Xpredicates as constraints and is suitable for implementing a natural Xlanguage processing system based on the unification-based Xgrammar. As an application of cu-Prolog, we developed Xa JPSG (Japanese Phrase Structure Grammar) parser Xwith the JPSG Working Group (the chairman is Prof. GUNJI, Takao of XOsaka University) at ICOT. X Xcu-Prolog is also the complete implementation of the constraint Xunification and its name (cu) comes from the technique. END-of-cu-prolog/pkg/DESCR echo x - cu-prolog/pkg/PLIST sed 's/^X//' >cu-prolog/pkg/PLIST << 'END-of-cu-prolog/pkg/PLIST' Xbin/cuprolog Xshare/doc/cu-prolog/CHANGES Xshare/doc/cu-prolog/COPYRIGHT Xshare/doc/cu-prolog/COPYRIGHT.j Xshare/doc/cu-prolog/INSTALL Xshare/doc/cu-prolog/INSTALL.j Xshare/doc/cu-prolog/README Xshare/doc/cu-prolog/README.j Xshare/doc/cu-prolog/cu3eman.dvi Xshare/doc/cu-prolog/cu3man.dvi Xshare/doc/cu-prolog/newpred_e.doc Xshare/doc/cu-prolog/newpred_j.doc X@dirrm share/doc/cu-prolog Xshare/examples/cu-prolog/README Xshare/examples/cu-prolog/bagof.p Xshare/examples/cu-prolog/eisele.p Xshare/examples/cu-prolog/hpsg.p Xshare/examples/cu-prolog/jpsg.p Xshare/examples/cu-prolog/kasper.p Xshare/examples/cu-prolog/marcus.p Xshare/examples/cu-prolog/memap.p X@dirrm share/examples/cu-prolog END-of-cu-prolog/pkg/PLIST echo c - cu-prolog/patches mkdir -p cu-prolog/patches > /dev/null 2>&1 echo x - cu-prolog/patches/patch-aa sed 's/^X//' >cu-prolog/patches/patch-aa << 'END-of-cu-prolog/patches/patch-aa' X--- makefile.old Wed Jul 7 02:03:58 1999 X+++ makefile Wed Jul 7 02:04:19 1999 X@@ -6,11 +6,11 @@ X refute.o unify.o defsysp.o syspred1.o\ X syspred2.o trans.o tr_sub.o tr_split.o X #CFLAGS = -g X-CFLAGS = -pg -g # for debug X+CFLAGS?= -pg -g # for debug X #CFLAGS = -O2 # for optimization X #CFLAGS = -O4 X #CC = gcc X-CC = cc X+CC?= cc X FLAGS = -lm X X cup: $(OBJECTS) END-of-cu-prolog/patches/patch-aa echo x - cu-prolog/patches/patch-ab sed 's/^X//' >cu-prolog/patches/patch-ab << 'END-of-cu-prolog/patches/patch-ab' X--- include.h.orig Fri Jan 27 16:38:48 1995 X+++ include.h Wed Jul 7 02:25:14 1999 X@@ -28,7 +28,11 @@ X * else #define CPUTIME 0 X */ X X+#ifdef __FreeBSD__ X+#define CPUTIME 60 X+#else X #define SUN4 1 X+#endif X #define KANJI 1 /* 1: allow EUC Kanji for str functions */ X X /* Tee print macro */ X@@ -135,8 +139,13 @@ X #define head_of_list(Term) (((struct clause *)Term)->c_form) X #define tail_of_list(Term) ((struct term *)((struct clause *)Term)->c_link) X X+#ifdef __FreeBSD__ X+#define is_readable(FP) (FP->_flags & __SRD) X+#define is_writable(FP) (FP->_flags & __SWR) X+#else X #define is_readable(FP) (FP->_flag & _IOREAD) X #define is_writable(FP) (FP->_flag & _IOWRT) X+#endif X X #define is_functor(Term) ((Term)->type.ident > CONST_LIST_TYPE) X #define isconst_functor(Term) ((Term)->t_arity <= 0) END-of-cu-prolog/patches/patch-ab echo x - cu-prolog/patches/patch-ac sed 's/^X//' >cu-prolog/patches/patch-ac << 'END-of-cu-prolog/patches/patch-ac' X--- defsysp.c.old Wed Jul 7 02:21:11 1999 X+++ defsysp.c Wed Jul 7 02:21:32 1999 X@@ -932,9 +932,9 @@ X t1 = t2 = Nnum_val(0.0,TEMPORAL); X #else X times(&TIMES); X- t1 = Nnum_val(((float)(TIMES.tms_stime+TIMES.tms_utime-OLD_TIME))/CPUTIME.0, X+ t1 = Nnum_val(((float)(TIMES.tms_stime+TIMES.tms_utime-OLD_TIME))/(float)CPUTIME, X TEMPORAL); X- t2 = Nnum_val(((float)CONSTRAINT_HANDLING_TIME)/CPUTIME.0,TEMPORAL); X+ t2 = Nnum_val(((float)CONSTRAINT_HANDLING_TIME)/(float)CPUTIME,TEMPORAL); X #endif X #endif X upush(&(p1->p_body)); upush(&(p1->p_env)); END-of-cu-prolog/patches/patch-ac echo x - cu-prolog/patches/patch-ad sed 's/^X//' >cu-prolog/patches/patch-ad << 'END-of-cu-prolog/patches/patch-ad' X--- mainsub.c.old Wed Jul 7 02:22:15 1999 X+++ mainsub.c Wed Jul 7 02:22:30 1999 X@@ -1238,8 +1238,8 @@ X times(&TIMES); /* get time */ X ttemp = TIMES.tms_stime + TIMES.tms_utime; X tprint2 ("CPU time = %.3lf sec (Constraints Handling = %.3lf sec)\n", X- (ttemp - TIMESAVE) / CPUTIME.0, X- (CONSTRAINT_HANDLING_TIME / CPUTIME.0)); X+ (ttemp - TIMESAVE) / (float)CPUTIME, X+ (CONSTRAINT_HANDLING_TIME / (float)CPUTIME)); X } X X void settimer() { /* set clock */ END-of-cu-prolog/patches/patch-ad echo x - cu-prolog/patches/patch-ae sed 's/^X//' >cu-prolog/patches/patch-ae << 'END-of-cu-prolog/patches/patch-ae' X--- main.c.old Wed Jul 7 02:26:00 1999 X+++ main.c Wed Jul 7 02:27:38 1999 X@@ -303,13 +303,16 @@ X X void heap_realloc() /* reallocate system/user heaps */ X { X+#if SUN4 == 1 X cfree((char *)sheap); SHEAP_SIZE=SHEAP_SIZE*1.2; system_heap_alloc(); X-/* free(heap); HEAP_SIZE *= 1.2; X+#else X+ free(heap); HEAP_SIZE *= 1.2; X free(cheap); CHEAP_SIZE *= 1.2; X free(eheap); ESP_SIZE *= 1.2; X free(ustack); USTACK_SIZE *= 1.2; X free(nheap); NAME_SIZE *= 1.2; X- heap_alloc(); */ X+ heap_alloc(); X+#endif /* SUN4 */ X init_status(); X } X END-of-cu-prolog/patches/patch-ae exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message