1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

Initial import of wamcc version 2.22.

A Prolog-to-C translator from Inria.

PR:		13745
Submitted by:	W. Gerald Hicks <wghicks@bellsouth.net>
This commit is contained in:
Steve Price 1999-11-01 03:46:48 +00:00
parent 40cf24c19b
commit 89ab207b94
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=22816
11 changed files with 355 additions and 0 deletions

20
lang/wamcc/Makefile Normal file
View File

@ -0,0 +1,20 @@
# New ports collection makefile for: wamcc
# Version required: 2.22
# Date created: 14 September 1999
# Whom: Jerry Hicks <wghicks@bellsouth.net>
#
# $FreeBSD$
#
DISTNAME= wamcc2.22
PKGNAME= wamcc-2.22
CATEGORIES= lang
MASTER_SITES= ftp://ftp.inria.fr/INRIA/Projects/loco/wamcc/
DISTFILES= wamcc2.22.tar.Z prg.tar.Z
MAINTAINER= wghicks@bellsouth.net
DIST_SUBDIR= wamcc
NO_WRKSUBDIR= yes
.include <bsd.port.mk>

2
lang/wamcc/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (wamcc/wamcc2.22.tar.Z) = dadc24bdee8a3167b4cffa32a936c00b
MD5 (wamcc/prg.tar.Z) = fc9bee37ab3449535a5fb83c601e2da1

68
lang/wamcc/files/patch-aa Normal file
View File

@ -0,0 +1,68 @@
--- Makefile.orig Tue Mar 7 03:21:05 1995
+++ Makefile Sun Oct 31 13:03:29 1999
@@ -5,12 +5,16 @@
# /* Makefile */
# /*-----------------------------------------------------------------------*/
-# you can change the following paths
+PREFIX?= /usr/local
+INCPATH= $(PREFIX)/include/wamcc
+LIBPATH= $(PREFIX)/lib/wamcc
+BINPATH= $(PREFIX)/bin
+DOCPATH= $(PREFIX)/share/doc/wamcc
+EXAMPLEPATH= $(PREFIX)/share/examples/wamcc
+
+PROGRAMS= src/$(COMPILER) src/$(BMF) src/hex2pl src/pl2hex
+SCRIPTS= src/$(WCC)
-ROOTPATH= $(HOME)/$(COMPILER)
-INCPATH = $(ROOTPATH)/include
-LIBPATH = $(ROOTPATH)/lib
-BINPATH = $(ROOTPATH)/bin
# you can specify the name of the C compiler
@@ -25,24 +29,28 @@
EXECS = $(WCC) $(COMPILER) $(BMF) hex2pl pl2hex
-install:
- cd src; echo $(ROOTPATH);\
+all:
+ (cd src; \
make $(WCC) COMPILER=$(COMPILER) INCPATH=$(INCPATH) \
- LIBPATH=$(LIBPATH) CC=$(CC) WCC=$(WCC)
- cd Builtin; \
- make COMPILER=$(COMPILER) CC=$(CC) WCC=../src/$(WCC)
- cd src; \
+ LIBPATH=$(LIBPATH) CC=$(CC) WCC=$(WCC))
+ (cd Builtin; \
+ make COMPILER=$(COMPILER) CC=$(CC) WCC=../src/$(WCC))
+ (cd src; \
make COMPILER=$(COMPILER) INCPATH=$(INCPATH) \
- LIBPATH=$(LIBPATH) CC=$(CC) WCC=$(WCC)
- -mkdir -p $(INCPATH)
- -mkdir -p $(LIBPATH)
- -mkdir -p $(BINPATH)
- cp src/*.h $(INCPATH)
- rm $(INCPATH)/wamcc*.h
- cp src/*.a $(LIBPATH)
- ranlib $(LIBPATH)/*.a
- cp src/$(WCC) src/$(COMPILER) src/$(BMF) src/hex2pl src/pl2hex $(BINPATH)
+ LIBPATH=$(LIBPATH) CC=$(CC) WCC=$(WCC))
+install:
+ $(INSTALL) -d $(INCPATH)
+ $(INSTALL) -c -m 444 src/*.h $(INCPATH)
+ $(INSTALL) -d $(LIBPATH)
+ $(INSTALL) -c -m 444 src/*.a $(LIBPATH)
+ $(INSTALL) -d $(DOCPATH)
+ $(INSTALL) -c -m 444 doc/* $(DOCPATH)
+ $(INSTALL) -d $(EXAMPLEPATH)
+ $(INSTALL) -c -m 444 Examples/* $(EXAMPLEPATH)
+ $(INSTALL) -d $(BINPATH)
+ $(INSTALL) -c -m 555 $(SCRIPTS) $(BINPATH)
+ $(INSTALL) -c -s -m 555 $(PROGRAMS) $(BINPATH)
clean:
cd src; make clean

11
lang/wamcc/files/patch-ab Normal file
View File

@ -0,0 +1,11 @@
--- Builtin/Makefile.orig Fri Dec 23 18:10:02 1994
+++ Builtin/Makefile Tue Sep 14 04:17:29 1999
@@ -51,7 +51,7 @@
starter.c: build_starter Makefile
- build_starter $(BIPS) >starter.c
+ ./build_starter $(BIPS) >starter.c
build_starter: build_starter.c
$(CC) $(CFLAGS) $(LFLAGS) -o build_starter build_starter.c

51
lang/wamcc/files/patch-ac Normal file
View File

@ -0,0 +1,51 @@
--- src/Makefile.orig Wed Jan 29 11:37:54 1997
+++ src/Makefile Tue Sep 14 04:16:11 1999
@@ -49,22 +49,22 @@
machine.o: machine.h archi.h wam_engine.h machine.c
- $(WCC) $(CFLAGS) -c machine.c
+ ./$(WCC) $(CFLAGS) -c machine.c
wam_engine.o: machine.h archi.h wam_engine.h atom_pred.h wam_engine.c
- $(WCC) $(CFLAGS) -c wam_engine.c
+ ./$(WCC) $(CFLAGS) -c wam_engine.c
wam_engine_pp.o: machine.h archi.h wam_engine.h atom_pred.h wam_engine.c
- $(WCC) $(CFLAGS) -DWAM_PROFILE -c -o wam_engine_pp.o wam_engine.c
+ ./$(WCC) $(CFLAGS) -DWAM_PROFILE -c -o wam_engine_pp.o wam_engine.c
atom_pred.o: machine.h archi.h wam_engine.h atom_pred.h atom_pred.c
- $(WCC) $(CFLAGS) -c atom_pred.c
+ ./$(WCC) $(CFLAGS) -c atom_pred.c
debugger.o: machine.h archi.h wam_engine.h atom_pred.h debugger.c
- $(WCC) $(CFLAGS) -c debugger.c
+ ./$(WCC) $(CFLAGS) -c debugger.c
hash.o: machine.h hash.c
- $(WCC) $(CFLAGS) -c hash.c
+ ./$(WCC) $(CFLAGS) -c hash.c
@@ -79,7 +79,7 @@
$(WCC): configure archi.def
- configure
+ ./configure
chmod a+x $(WCC)
$(BMF): bmf.c
@@ -95,8 +95,8 @@
$(CC) $(CFLAGS) $(LFLAGS) -o pl2hex pl2hex.c
$(COMPILER):
- $(WCC) $(CFLAGS) -c wamcc*.c
- $(WCC) $(CFLAGS) $(LFLAGS) -s -o $(COMPILER) wamcc*.o -l$(COMPILER)
+ ./$(WCC) $(CFLAGS) -c wamcc*.c
+ ./$(WCC) $(CFLAGS) $(LFLAGS) -s -o $(COMPILER) wamcc*.o -l$(COMPILER)

36
lang/wamcc/files/patch-ad Normal file
View File

@ -0,0 +1,36 @@
--- src/debugger.c.orig Sun Dec 18 12:15:55 1994
+++ src/debugger.c Tue Sep 14 04:16:44 1999
@@ -278,7 +278,15 @@
#define Y_Storing_Invoc_Nb(e) (Y(e,3)) /* see call.pl */
+static void mygets(char *str, int size)
+{
+ char *p;
+ fgets(str,size,stdin);
+ p = index(str, '\n');
+ if(p)
+ *p = '\0';
+}
@@ -959,7 +967,7 @@
Lib1(printf," ? ");
*str='\0';
- Lib1(gets,str);
+ Lib2(mygets,str,sizeof(str) - 1);
if (*str=='\0')
Lib2(strcpy,str,"creep");
@@ -2047,7 +2055,7 @@
Lib1(printf,"\nNew value: ");
*str='\0';
- Lib1(gets,str);
+ Lib2(mygets,str,sizeof(str) - 1);
if (*str=='\0')
return;

14
lang/wamcc/files/patch-ae Normal file
View File

@ -0,0 +1,14 @@
--- src/machine.c.orig Sun Dec 18 12:15:59 1994
+++ src/machine.c Tue Sep 14 04:16:29 1999
@@ -52,7 +52,11 @@
#endif
+#if !defined(M_i386_freebsd) && !defined(M_alpha_freebsd)
+
extern char *sys_errlist[];
+
+#endif

48
lang/wamcc/files/patch-af Normal file
View File

@ -0,0 +1,48 @@
--- src/machine.h.orig Mon Oct 23 10:59:26 1995
+++ src/machine.h Tue Sep 14 04:13:45 1999
@@ -33,6 +33,16 @@
# define M_MACHINE "dec_alpha"
# define M_dec_alpha
+# elif defined(__FreeBSD__) && defined(i386)
+
+ #define M_MACHINE "i386_freebsd"
+ #define M_i386_freebsd
+
+# elif defined(__FreeBSD__) && defined(alpha)
+
+ #define M_MACHINE "alpha_freebsd"
+ #define M_alpha_freebsd
+
# elif defined(__linux__) && !defined(__ELF__)
# define M_MACHINE "pc_linux_a_out"
@@ -101,7 +111,8 @@
/*---------------------------------*/
#if defined(M_sony_news) || defined(M_dec_ultrix) || defined(M_dec_alpha) ||\
- defined(M_pc_linux_elf)
+ defined(M_pc_linux_elf) || defined(M_i386_freebsd) ||\
+ defined(M_alpha_freebsd)
# define M_Asm_Symbol1(name) #name
# define M_Asm_Symbol(name) M_Asm_Symbol1(name)
@@ -122,7 +133,8 @@
#if defined(M_sparc) || defined(M_dec_ultrix) || defined(M_sony_news) || \
- defined(M_NeXT_hppa) || defined(M_dec_alpha)
+ defined(M_NeXT_hppa) || defined(M_dec_alpha) || defined(M_i386_freebsd) ||\
+ defined(M_alpha_freebsd)
# define M_Save_Control_Info
# define M_Restore_Control_Info
@@ -145,7 +157,7 @@
#if defined(M_sparc) || defined(M_dec_ultrix) || defined(M_sony_news) || \
- defined(M_NeXT_hppa)
+ defined(M_NeXT_hppa) || defined(M_i386_freebsd) || defined(M_alpha_freebsd)
# define M_Direct_Goto(lab) {lab(); return;}
# define M_Indirect_Goto(p_lab) {(* ((void (*)()) p_lab))();return;}

1
lang/wamcc/pkg-comment Normal file
View File

@ -0,0 +1 @@
Prolog-to-C translator from Inria

18
lang/wamcc/pkg-descr Normal file
View File

@ -0,0 +1,18 @@
wamcc is a Prolog Compiler which translates Prolog to C via the WAM
(Warren Abstract Machine). wamcc has a syntax which conforms to the
proposed ISO standard.
wamcc offers the most usual built-in predicates, a top-level, a Prolog
debugger and a WAM debugger, dynamic and compiled code, modules,
global variables, global arrays...). wamcc is designed to be easily
extended (e.g. clp(FD) is a constraint logic language over Finite
Domains designed on wamcc).
wamcc tries tries to be conform to the (future) ISO standard Prolog.
The draft ISO standard for Prolog is available by anonymous ftp from
ai.uga.edu:/pub/prolog.standard/ [128.192.12.9]. An unofficial summary
of the draft ISO Prolog standard is available from the same location
as isoprolog.tex or isoprolog.ps.Z.
The directory /usr/local/share/doc/wamcc contains a user's manual as
a LaTeX file. Examples are installed in /usr/local/share/examples/wamcc.

86
lang/wamcc/pkg-plist Normal file
View File

@ -0,0 +1,86 @@
bin/bmf_wamcc
bin/hex2pl
bin/pl2hex
bin/w_gcc
bin/wamcc
include/wamcc/archi.h
include/wamcc/atom_pred.h
include/wamcc/bool.h
include/wamcc/builtin.h
include/wamcc/debugger.h
include/wamcc/hash.h
include/wamcc/machine.h
include/wamcc/wam_engine.h
include/wamcc/wam_interface.h
include/wamcc/wamcc.h
include/wamcc/wamcc0.h
include/wamcc/wamcc1.h
include/wamcc/wamcc2.h
include/wamcc/wamcc3.h
include/wamcc/wamcc4.h
include/wamcc/wamcc5.h
include/wamcc/wamcc6.h
include/wamcc/wamcc7.h
include/wamcc/wamcc8.h
lib/wamcc/libwamcc.a
lib/wamcc/libwamcc_pp.a
share/doc/wamcc/wamcc_manual.tex
share/examples/wamcc/README
share/examples/wamcc/boyer.mk
share/examples/wamcc/boyer.pl
share/examples/wamcc/boyer.usr
share/examples/wamcc/browse.mk
share/examples/wamcc/browse.pl
share/examples/wamcc/browse.usr
share/examples/wamcc/cal.mk
share/examples/wamcc/cal.pl
share/examples/wamcc/cal.usr
share/examples/wamcc/chat_parser.mk
share/examples/wamcc/chat_parser.pl
share/examples/wamcc/chat_parser.usr
share/examples/wamcc/crypt.mk
share/examples/wamcc/crypt.pl
share/examples/wamcc/crypt.usr
share/examples/wamcc/ham.mk
share/examples/wamcc/ham.pl
share/examples/wamcc/ham.usr
share/examples/wamcc/meta_qsort.mk
share/examples/wamcc/meta_qsort.pl
share/examples/wamcc/meta_qsort.usr
share/examples/wamcc/nand.mk
share/examples/wamcc/nand.pl
share/examples/wamcc/nand.usr
share/examples/wamcc/nrev.mk
share/examples/wamcc/nrev.pl
share/examples/wamcc/nrev.usr
share/examples/wamcc/poly_10.mk
share/examples/wamcc/poly_10.pl
share/examples/wamcc/poly_10.usr
share/examples/wamcc/queens.mk
share/examples/wamcc/queens.pl
share/examples/wamcc/queens.usr
share/examples/wamcc/queens8.mk
share/examples/wamcc/queens8.pl
share/examples/wamcc/queens8.usr
share/examples/wamcc/reducer.mk
share/examples/wamcc/reducer.pl
share/examples/wamcc/reducer.usr
share/examples/wamcc/sdda.mk
share/examples/wamcc/sdda.pl
share/examples/wamcc/sdda.usr
share/examples/wamcc/sendmore.mk
share/examples/wamcc/sendmore.pl
share/examples/wamcc/sendmore.usr
share/examples/wamcc/tak.mk
share/examples/wamcc/tak.pl
share/examples/wamcc/tak.usr
share/examples/wamcc/tak_gvar.mk
share/examples/wamcc/tak_gvar.pl
share/examples/wamcc/tak_gvar.usr
share/examples/wamcc/zebra.mk
share/examples/wamcc/zebra.pl
share/examples/wamcc/zebra.usr
@dirrm include/wamcc
@dirrm lib/wamcc
@dirrm share/doc/wamcc
@dirrm share/examples/wamcc