diff options
author | edwin <edwin@FreeBSD.org> | 2003-01-18 18:12:08 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2003-01-18 18:12:08 +0800 |
commit | 7dd0c74bb288f507c2ce9b7e84cc31d8aa86c021 (patch) | |
tree | f7d1685b1dc445d72c7b0161f8a290a67db1bf88 /lang | |
parent | c2d70c7c7e908b32c33443c1fb452090c064dcc9 (diff) | |
download | freebsd-ports-gnome-7dd0c74bb288f507c2ce9b7e84cc31d8aa86c021.tar.gz freebsd-ports-gnome-7dd0c74bb288f507c2ce9b7e84cc31d8aa86c021.tar.zst freebsd-ports-gnome-7dd0c74bb288f507c2ce9b7e84cc31d8aa86c021.zip |
New port: lang/cocor (Coco/R, a compiler generator)
Coco/R is a recursive decent compiler generator. This is
a FreeBSD port of the C/C++ version of Coco/R.
PR: ports/36251
Submitted by: Guy Antony Halse <guy@rucus.ru.ac.za>
Diffstat (limited to 'lang')
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/cocor/Makefile | 49 | ||||
-rw-r--r-- | lang/cocor/distinfo | 1 | ||||
-rw-r--r-- | lang/cocor/files/patch-cplus2::unix.mk | 30 | ||||
-rw-r--r-- | lang/cocor/files/patch-taste_cp::unix.mk | 23 | ||||
-rw-r--r-- | lang/cocor/files/patch-unix.mk | 11 | ||||
-rw-r--r-- | lang/cocor/pkg-comment | 1 | ||||
-rw-r--r-- | lang/cocor/pkg-descr | 14 | ||||
-rw-r--r-- | lang/cocor/pkg-plist | 167 |
9 files changed, 297 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index a9513757be29..302de28da21d 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -19,6 +19,7 @@ SUBDIR += clisp SUBDIR += cmucl SUBDIR += cmucl-extra + SUBDIR += cocor SUBDIR += compaq-cc SUBDIR += crossgo32-f77 SUBDIR += cu-prolog diff --git a/lang/cocor/Makefile b/lang/cocor/Makefile new file mode 100644 index 000000000000..f477012e5506 --- /dev/null +++ b/lang/cocor/Makefile @@ -0,0 +1,49 @@ +# New ports collection makefile for: cocor +# Date Created: 24 March 2002 +# Whom: Guy Antony Halse <guy@rucus.ru.za.za> +# +# $FreeBSD$ +# + +PORTNAME= cocor +PORTVERSION= 1.6 +CATEGORIES= lang +MASTER_SITES= ftp://cs.ru.ac.za/pub/coco/ +DISTNAME= cocorc16 +EXTRACT_SUFX= .tgz + +MAINTAINER= guy-ezmlm@rucus.ru.ac.za + +WRKSRC= ${WRKDIR} +ALL_TARGET= all1 +MAKE_ENV+= CRFRAMES=${WRKSRC}/frames +USE_GMAKE= yes +CFLAGS+= -I${WRKSRC}/cplus2 +PLIST_SUB+= FRAMES=${CRFRAMES} +CRFRAMES?= ${PREFIX}/lib/cocor + +MAN1= cocor.1 + +post-extract: + ${LN} -s ${WRKSRC}/unix.mk ${WRKSRC}/Makefile + +pre-patch: + uudecode -p ${WRKSRC}/dos2unix.uue > ${WRKSRC}/dos2unix.sh + ${CHMOD} +x ${WRKSRC}/dos2unix.sh + cd ${WRKSRC} && ./dos2unix.sh unix.mk && ${MAKE} -f unix.mk dos2unix + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cocor ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/docs/cocor.1 ${PREFIX}/man/man1 + ${MKDIR} -m 755 ${CRFRAMES} + ${CP} -r ${WRKSRC}/frames/* ${CRFRAMES} && \ + ${FIND} ${CRFRAMES} -type f -exec ${CHMOD} 644 {} \; && \ + ${FIND} ${CRFRAMES} -type d -exec ${CHMOD} 755 {} \; + ${MKDIR} -m 755 ${PREFIX}/share/cocor +.for i in samples cplus2 taste taste_cp docs + ${CP} -r ${WRKSRC}/${i} ${PREFIX}/share/cocor +.endfor + ${FIND} ${PREFIX}/share/cocor -type f -exec ${CHMOD} 644 {} \; && \ + ${FIND} ${PREFIX}/share/cocor -type d -exec ${CHMOD} 755 {} \; + +.include <bsd.port.mk> diff --git a/lang/cocor/distinfo b/lang/cocor/distinfo new file mode 100644 index 000000000000..cdd1afd08068 --- /dev/null +++ b/lang/cocor/distinfo @@ -0,0 +1 @@ +MD5 (cocorc16.tgz) = b0569a9a48f6242fab1d6f230e5c220b diff --git a/lang/cocor/files/patch-cplus2::unix.mk b/lang/cocor/files/patch-cplus2::unix.mk new file mode 100644 index 000000000000..f42e4c17a804 --- /dev/null +++ b/lang/cocor/files/patch-cplus2::unix.mk @@ -0,0 +1,30 @@ +--- cplus2/unix.mk.orig Sat Nov 20 22:27:41 1999 ++++ cplus2/unix.mk Sat Jan 18 01:55:19 2003 +@@ -11,16 +11,16 @@ + + #CC sets the name of the compiler to use (cc, gcc, etc) + #You will have to change this to suit your system +-#CC = g++ ++CC = ${CXX} + + AR = ar + CFLAGS = -g + DOS2UNIX = ../dos2unix.sh + +-%.o: %.cpp ++*.o: *.cpp + $(CC) -c $(CFLAGS) $< -o $@ + +-%.o: %.cxx ++*.o: *.cxx + $(CC) -c $(CFLAGS) $< -o $@ + + all: cr_lib.a +@@ -45,4 +45,7 @@ + clean: + \rm -f *.o + \rm -f *.a ++ ++ ++ + diff --git a/lang/cocor/files/patch-taste_cp::unix.mk b/lang/cocor/files/patch-taste_cp::unix.mk new file mode 100644 index 000000000000..b723ce5105ef --- /dev/null +++ b/lang/cocor/files/patch-taste_cp::unix.mk @@ -0,0 +1,23 @@ +--- taste_cp/unix.mk.orig Sat Jan 18 01:58:29 2003 ++++ taste_cp/unix.mk Sat Jan 18 01:59:37 2003 +@@ -8,17 +8,17 @@ + + #CC sets the name of the compiler to use (cc, gcc, etc) + #You will have to change this to suit your system +-#CC = g++ ++CC = ${CXX} + + CFLAGS = -g -I../cplus2 + COCOR = ../cocor + DOS2UNIX = ../dos2unix.sh + LIB = ../cplus2/cr_lib.a + +-%.o: %.cpp ++*.o: *.cpp + $(CC) -c $(CFLAGS) $< -o $@ + +-%.o: %.cxx ++*.o: *.cxx + $(CC) -c $(CFLAGS) $< -o $@ + + all: taste pretty xref diff --git a/lang/cocor/files/patch-unix.mk b/lang/cocor/files/patch-unix.mk new file mode 100644 index 000000000000..3e40a5a1bbc1 --- /dev/null +++ b/lang/cocor/files/patch-unix.mk @@ -0,0 +1,11 @@ +--- unix.mk.orig Sun Mar 24 14:37:17 2002 ++++ unix.mk Sun Mar 24 14:37:47 2002 +@@ -47,7 +47,7 @@ + all1: + set -e; \ + for i in $(SUBDIRS);\ +- do (cd $$i; $(MAKE) -f unix.mk)\ ++ do (echo "===> $$i"; cd $$i; $(MAKE) -f unix.mk)\ + done + + linux: ;$(MAKE) -f unix.mk CC=cc all1 diff --git a/lang/cocor/pkg-comment b/lang/cocor/pkg-comment new file mode 100644 index 000000000000..fee4fd82e4fd --- /dev/null +++ b/lang/cocor/pkg-comment @@ -0,0 +1 @@ +A compiler generator that combines the functionality of lex and yacc diff --git a/lang/cocor/pkg-descr b/lang/cocor/pkg-descr new file mode 100644 index 000000000000..0c1e7b940c29 --- /dev/null +++ b/lang/cocor/pkg-descr @@ -0,0 +1,14 @@ +Coco/R combines the functionality of the well-known UNIX tools lex and yacc, +to form an extremely easy to use compiler generator that generates recursive +descent parsers, their associated scanners, and (in some versions) a driver +program, from attributed grammars (written using EBNF syntax with attributes +and semantic actions) which conform to the restrictions imposed by LL(1) +parsing (rather than LALR parsing, as allowed by yacc). The user has to add +modules for symbol table handling, optimization, and code generation in +order to get a running compiler. Coco/R can also be used to construct other +syntax-based applications that have less of a "compiler" flavour. + +Coco/R is available in Oberon, Modula-2, Pascal, Delphi, C, Java and C# +versions. This port only builds the C/C++ version. + +WWW: http://cs.ru.ac.za/homes/cspt/cocor.htm diff --git a/lang/cocor/pkg-plist b/lang/cocor/pkg-plist new file mode 100644 index 000000000000..7cb11113dd52 --- /dev/null +++ b/lang/cocor/pkg-plist @@ -0,0 +1,167 @@ +bin/cocor + +lib/cocor/compiler.frm +lib/cocor/cplus2/compiler.frm +lib/cocor/cplus2/parser_c.frm +lib/cocor/cplus2/parser_h.frm +lib/cocor/cplus2/scan_c.frm +lib/cocor/cplus2/scan_h.frm +lib/cocor/parser_c.frm +lib/cocor/parser_h.frm +lib/cocor/scan_c.frm +lib/cocor/scan_h.frm + +share/cocor/cplus2/cr_abs.cpp +share/cocor/cplus2/cr_abs.hpp +share/cocor/cplus2/cr_abs.o +share/cocor/cplus2/cr_error.cpp +share/cocor/cplus2/cr_error.hpp +share/cocor/cplus2/cr_error.o +share/cocor/cplus2/cr_lib.a +share/cocor/cplus2/cr_parse.cpp +share/cocor/cplus2/cr_parse.hpp +share/cocor/cplus2/cr_parse.o +share/cocor/cplus2/cr_scan.cpp +share/cocor/cplus2/cr_scan.hpp +share/cocor/cplus2/cr_scan.o +share/cocor/cplus2/unix.mk +share/cocor/cplus2/unix.mk.orig +share/cocor/docs/coco.use +share/cocor/docs/cocol +share/cocor/docs/cocor.1 +share/cocor/samples/adacs.atg +share/cocor/samples/c.atg +share/cocor/samples/calc.atg +share/cocor/samples/calc.inp +share/cocor/samples/cdecl.inp +share/cocor/samples/cdecl1.atg +share/cocor/samples/cdecl2.atg +share/cocor/samples/cdecl3.atg +share/cocor/samples/clang.inp +share/cocor/samples/clang1.atg +share/cocor/samples/clang2.atg +share/cocor/samples/expr.atg +share/cocor/samples/expr.inp +share/cocor/samples/microada.atg +share/cocor/samples/mod2.atg +share/cocor/samples/oberon.atg +share/cocor/samples/pascal.atg +share/cocor/samples/pimmod2.atg +share/cocor/samples/umbriel1.atg +share/cocor/samples/umbriel2.atg +share/cocor/taste/crossref.c +share/cocor/taste/crossref.h +share/cocor/taste/crossref.o +share/cocor/taste/pretty +share/cocor/taste/pretty.atg +share/cocor/taste/pretty.c +share/cocor/taste/pretty.o +share/cocor/taste/prettyc.h +share/cocor/taste/prettye.h +share/cocor/taste/prettyp.c +share/cocor/taste/prettyp.h +share/cocor/taste/prettyp.o +share/cocor/taste/prettypr.c +share/cocor/taste/prettypr.h +share/cocor/taste/prettypr.o +share/cocor/taste/prettys.c +share/cocor/taste/prettys.h +share/cocor/taste/prettys.o +share/cocor/taste/taste +share/cocor/taste/taste.atg +share/cocor/taste/taste.c +share/cocor/taste/taste.frm +share/cocor/taste/taste.o +share/cocor/taste/tastec.h +share/cocor/taste/tastee.h +share/cocor/taste/tastep.c +share/cocor/taste/tastep.h +share/cocor/taste/tastep.o +share/cocor/taste/tastes.c +share/cocor/taste/tastes.h +share/cocor/taste/tastes.o +share/cocor/taste/tc.c +share/cocor/taste/tc.h +share/cocor/taste/tc.o +share/cocor/taste/test.tas +share/cocor/taste/tl.c +share/cocor/taste/tl.h +share/cocor/taste/tl.o +share/cocor/taste/unix.mk +share/cocor/taste/wrong.tas +share/cocor/taste/xref +share/cocor/taste/xref.atg +share/cocor/taste/xref.c +share/cocor/taste/xref.frm +share/cocor/taste/xref.o +share/cocor/taste/xrefc.h +share/cocor/taste/xrefe.h +share/cocor/taste/xrefp.c +share/cocor/taste/xrefp.h +share/cocor/taste/xrefp.o +share/cocor/taste/xrefs.c +share/cocor/taste/xrefs.h +share/cocor/taste/xrefs.o +share/cocor/taste_cp/crossref.cpp +share/cocor/taste_cp/crossref.hpp +share/cocor/taste_cp/crossref.o +share/cocor/taste_cp/pretty +share/cocor/taste_cp/pretty.atg +share/cocor/taste_cp/pretty.cpp +share/cocor/taste_cp/pretty.o +share/cocor/taste_cp/prettyc.hpp +share/cocor/taste_cp/prettye.hpp +share/cocor/taste_cp/prettyp.cpp +share/cocor/taste_cp/prettyp.hpp +share/cocor/taste_cp/prettyp.o +share/cocor/taste_cp/prettypr.cpp +share/cocor/taste_cp/prettypr.hpp +share/cocor/taste_cp/prettypr.o +share/cocor/taste_cp/prettys.cpp +share/cocor/taste_cp/prettys.hpp +share/cocor/taste_cp/prettys.o +share/cocor/taste_cp/taste +share/cocor/taste_cp/taste.atg +share/cocor/taste_cp/taste.cpp +share/cocor/taste_cp/taste.frm +share/cocor/taste_cp/taste.o +share/cocor/taste_cp/tastec.hpp +share/cocor/taste_cp/tastee.hpp +share/cocor/taste_cp/tastep.cpp +share/cocor/taste_cp/tastep.hpp +share/cocor/taste_cp/tastep.o +share/cocor/taste_cp/tastes.cpp +share/cocor/taste_cp/tastes.hpp +share/cocor/taste_cp/tastes.o +share/cocor/taste_cp/tc.cpp +share/cocor/taste_cp/tc.hpp +share/cocor/taste_cp/tc.o +share/cocor/taste_cp/test.tas +share/cocor/taste_cp/tl.cpp +share/cocor/taste_cp/tl.hpp +share/cocor/taste_cp/tl.o +share/cocor/taste_cp/unix.mk +share/cocor/taste_cp/unix.mk.orig +share/cocor/taste_cp/wrong.tas +share/cocor/taste_cp/xref +share/cocor/taste_cp/xref.atg +share/cocor/taste_cp/xref.cpp +share/cocor/taste_cp/xref.frm +share/cocor/taste_cp/xref.o +share/cocor/taste_cp/xrefc.hpp +share/cocor/taste_cp/xrefe.hpp +share/cocor/taste_cp/xrefp.cpp +share/cocor/taste_cp/xrefp.hpp +share/cocor/taste_cp/xrefp.o +share/cocor/taste_cp/xrefs.cpp +share/cocor/taste_cp/xrefs.hpp +share/cocor/taste_cp/xrefs.o + +@dirrm lib/cocor/cplus2 +@dirrm lib/cocor +@dirrm share/cocor/cplus2 +@dirrm share/cocor/samples +@dirrm share/cocor/taste +@dirrm share/cocor/taste_cp +@dirrm share/cocor/docs +@dirrm share/cocor |