aboutsummaryrefslogtreecommitdiff
path: root/lang/p2c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1994-10-04 04:10:06 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1994-10-04 04:10:06 +0000
commit5974ef3b6bc029ceafc04b1c447f7e51545aa66e (patch)
tree6c958684019de6ee11153f25c4609d088aaa958d /lang/p2c
parenta3d5727d8870055594abd31f502499b466ffd29e (diff)
downloadports-5974ef3b6bc029ceafc04b1c447f7e51545aa66e.tar.gz
ports-5974ef3b6bc029ceafc04b1c447f7e51545aa66e.zip
Notes
Diffstat (limited to 'lang/p2c')
-rw-r--r--lang/p2c/Makefile12
-rw-r--r--lang/p2c/pkg-comment1
-rw-r--r--lang/p2c/pkg-descr21
-rw-r--r--lang/p2c/pkg-plist16
-rw-r--r--lang/p2c/scripts/configure21
5 files changed, 71 insertions, 0 deletions
diff --git a/lang/p2c/Makefile b/lang/p2c/Makefile
new file mode 100644
index 000000000000..329565bb433c
--- /dev/null
+++ b/lang/p2c/Makefile
@@ -0,0 +1,12 @@
+DISTNAME= p2c-1.21alpha-07.Dec.93
+DISTFILES= p2c-1.21alpha2.tar.gz
+MASTER_SITES= ftp://src.doc.ic.ac.uk/gnu/hurd/
+
+pre-install:
+ @mkdir -p /usr/local/lib
+ @mkdir -p /usr/local/man/man1
+ @mkdir -p /usr/local/include/p2c
+ @cp ${WRKSRC}/src/p2cc.man /usr/local/man/man1/p2cc.1
+
+.include <bsd.port.mk>
+
diff --git a/lang/p2c/pkg-comment b/lang/p2c/pkg-comment
new file mode 100644
index 000000000000..aeb3c53ca218
--- /dev/null
+++ b/lang/p2c/pkg-comment
@@ -0,0 +1 @@
+p2c - Pascal to C translator, version 1.21alpha-07.Dec.93
diff --git a/lang/p2c/pkg-descr b/lang/p2c/pkg-descr
new file mode 100644
index 000000000000..17a91b234b78
--- /dev/null
+++ b/lang/p2c/pkg-descr
@@ -0,0 +1,21 @@
+P2c is a tool for translating Pascal programs into C. The input
+consists of a set of source files in any of the following Pascal
+dialects: HP Pascal, Turbo/UCSD Pascal, DEC VAX Pascal, Oregon
+Software Pascal/2, Macintosh Programmer's Workshop Pascal,
+Sun/Berkeley Pascal, Texas Instruments Pascal, Apollo Domain Pascal.
+Modula-2 syntax is also supported. Output is a set of .c and .h files
+that comprise an equivalent program in any of several dialects of
+C. Output code may be kept machine- and dialectindependent, or it may
+be targeted to a specific machine and compiler. Most reasonable Pascal
+programs are converted into fully functional C which will compile and
+run with no further modifications, although p2c sometimes chooses to
+generate readable code at the expense of absolute generality. P2c
+endeavors to insert notes and warning messages into the output code to
+point out areas which may require human intervention. Output code is
+arranged to be readable and efficient, and to make use of C idioms
+wherever possible. The main goal of the translation is to produce C
+files which are pleasant and "natural" enough to be acceptable as the
+new source files for a program. In a pinch, p2c will also serve as an
+ad hoc Pascal compiler. The p2cc script makes it easy to use p2c as a
+compiler.
+
diff --git a/lang/p2c/pkg-plist b/lang/p2c/pkg-plist
new file mode 100644
index 000000000000..ea9796f35e06
--- /dev/null
+++ b/lang/p2c/pkg-plist
@@ -0,0 +1,16 @@
+@cd /usr/local
+@owner bin
+@mode 755
+bin/p2c
+bin/p2cc
+@mode 644
+lib/libp2c.a
+man/man1/p2c.1
+man/man1/p2cc.1
+include/p2c/p2c.h
+lib/p2c/p2crc
+lib/p2c/loc.p2crc
+lib/p2c/system.imp
+lib/p2c/system.m2
+lib/p2c/turbo.imp
+lib/p2c/string.pas
diff --git a/lang/p2c/scripts/configure b/lang/p2c/scripts/configure
new file mode 100644
index 000000000000..5ff74d5135f5
--- /dev/null
+++ b/lang/p2c/scripts/configure
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ $# != 3 ]; then exit 1; fi
+
+cat >>$3/Makefile <<END || exit 1;
+all:
+ cd src; make OPT=-O
+END
+
+mv $3/src/p2cc.perl $3/src/p2cc.perl.orig || exit 1;
+sed -e 1s/--.*// < $3/src/p2cc.perl.orig > $3/src/p2cc.perl || exit 1;
+
+cat >>$3/src/Makefile <<END || exit 1;
+HOMEDIR=/usr/local/lib/p2c
+INCDIR=/usr/local/include/p2c
+BINDIR=/usr/local/bin
+LIBDIR=/usr/local/lib
+MANDIR=/usr/local/man/man1
+END
+
+exit 0;