summaryrefslogtreecommitdiff
path: root/devel/cdecl
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1999-11-11 12:53:16 +0000
committeragc <agc@pkgsrc.org>1999-11-11 12:53:16 +0000
commit5b28220d73e0c6d0426c4b5022c19799b7efc828 (patch)
tree748d47b179cf213bd910e27935542ec8cb124515 /devel/cdecl
parent3f8dffe6a0102b3084411b027f6cdf37819f8e48 (diff)
downloadpkgsrc-5b28220d73e0c6d0426c4b5022c19799b7efc828.tar.gz
Import cdecl-2.5, a utility to explain and compose C and C++ declarations,
into the NetBSD packages collection. The master sites were taken from the FreeBSD port, nothing else.
Diffstat (limited to 'devel/cdecl')
-rw-r--r--devel/cdecl/Makefile21
-rw-r--r--devel/cdecl/files/md53
-rw-r--r--devel/cdecl/files/patch-sum4
-rw-r--r--devel/cdecl/patches/patch-aa49
-rw-r--r--devel/cdecl/patches/patch-ab39
-rw-r--r--devel/cdecl/pkg/COMMENT1
-rw-r--r--devel/cdecl/pkg/DESCR5
-rw-r--r--devel/cdecl/pkg/PLIST8
8 files changed, 130 insertions, 0 deletions
diff --git a/devel/cdecl/Makefile b/devel/cdecl/Makefile
new file mode 100644
index 00000000000..1ae952bef91
--- /dev/null
+++ b/devel/cdecl/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/11/11 12:53:16 agc Exp $
+#
+
+DISTNAME= cdecl-2.5
+CATEGORIES= devel
+MASTER_SITES= ftp://ftp.netsw.org/netsw/SoftEng/Lang/C/Tools/cdecl/ \
+ ftp://ftp.cc.gatech.edu/ac121/linux/devel/lang/c/ \
+ ftp://ftp.deva.net/pub/sources/programming/ \
+ ftp://ftp.bitcon.no//pub/linux/linuxberg/files/console/dev/ \
+ ftp://ftp.uakom.sk/pub/linux/devel/lang/c/
+
+MAINTAINER= packages@netbsd.org
+#HOMEPAGE=
+
+DEPENDS+= readline-4.0:../../devel/readline
+
+post-install:
+ @${MKDIR} ${PREFIX}/share/doc/cdecl
+ ${INSTALL_DATA} ${WRKSRC}/testset* ${PREFIX}/share/doc/cdecl
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/cdecl/files/md5 b/devel/cdecl/files/md5
new file mode 100644
index 00000000000..1b2fcd25ec4
--- /dev/null
+++ b/devel/cdecl/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/11/11 12:53:17 agc Exp $
+
+MD5 (cdecl-2.5.tar.gz) = 29895dab52e85b2474a59449e07b7996
diff --git a/devel/cdecl/files/patch-sum b/devel/cdecl/files/patch-sum
new file mode 100644
index 00000000000..12885204c43
--- /dev/null
+++ b/devel/cdecl/files/patch-sum
@@ -0,0 +1,4 @@
+$NetBSD: patch-sum,v 1.1.1.1 1999/11/11 12:53:17 agc Exp $
+
+MD5 (patch-aa) = 4351b57f3281be0a9e9292b571fe0a89
+MD5 (patch-ab) = 37098d58b58154b99330e85ab98c67fd
diff --git a/devel/cdecl/patches/patch-aa b/devel/cdecl/patches/patch-aa
new file mode 100644
index 00000000000..118bf88ed45
--- /dev/null
+++ b/devel/cdecl/patches/patch-aa
@@ -0,0 +1,49 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/11/11 12:53:17 agc Exp $
+
+Minor portability modifications for NetBSD and Solaris
+
+--- cdecl.c 1999/11/11 12:16:45 1.1
++++ cdecl.c 1999/11/11 12:25:39
+@@ -59,7 +59,9 @@
+ */
+
+ char cdeclsccsid[] = "@(#)cdecl.c 2.5 1/15/96";
+-
++
++#include <sys/param.h>
++
+ #include <stdio.h>
+ #include <ctype.h>
+ #if __STDC__ || defined(DOS)
+@@ -71,8 +73,10 @@
+ # ifndef NOVARARGS
+ # include <varargs.h>
+ # endif /* ndef NOVARARGS */
++#if !(defined(__sun__) && defined(__svr4__)) && !(defined(BSD) && (BSD >= 199306))
+ char *malloc();
+ void free(), exit(), perror();
++#endif
+ # ifdef BSD
+ # include <strings.h>
+ extern int errno;
+@@ -87,6 +91,10 @@
+ # endif /* NOVOID */
+ #endif /* __STDC__ || DOS */
+
++#if defined(__svr4__) && defined(__sun__)
++#include <errno.h>
++#endif
++
+ #ifdef USE_READLINE
+ # include <readline/readline.h>
+ /* prototypes for functions related to readline() */
+@@ -124,7 +132,9 @@
+
+ #if __STDC__
+ char *ds(char *), *cat(char *, ...), *visible(int);
++#if !(defined(BSD) && BSD >= 199306) && !(defined(__sun__) && defined(__svr4__))
+ int getopt(int,char **,char *);
++#endif
+ int main(int, char **);
+ int yywrap(void);
+ int dostdin(void);
diff --git a/devel/cdecl/patches/patch-ab b/devel/cdecl/patches/patch-ab
new file mode 100644
index 00000000000..dcd94100033
--- /dev/null
+++ b/devel/cdecl/patches/patch-ab
@@ -0,0 +1,39 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/11/11 12:53:17 agc Exp $
+
+Small portability mods.
+
+--- Makefile 1999/11/11 12:30:44 1.1
++++ Makefile 1999/11/11 12:32:11
+@@ -15,15 +15,17 @@
+ #
+ # add -DUSE_READLINE To compile in support for the GNU readline library.
+
+-CFLAGS= -s -O2 -DUSE_READLINE
+-CC= gcc
++CFLAGS+= -I${PREFIX}/include -DUSE_READLINE
++CC= gcc
+ LIBS= -lreadline -ltermcap
+ ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
+-BINDIR= /usr/bin
+-MANDIR= /usr/man/man1
+-CATDIR= /usr/man/cat1
+-INSTALL= install -c
+-INSTALL_DATA= install -c -m 644
++BINDIR= ${PREFIX}/bin
++MANDIR= ${PREFIX}/man/man1
++CATDIR= ${PREFIX}/man/cat1
++#INSTALL= install -c
++INSTALL_DATA= ${BSD_INSTALL_DATA}
++
++all: cdecl
+
+ cdecl: c++decl
+ ln c++decl cdecl
+@@ -44,6 +46,7 @@
+
+ install: cdecl
+ $(INSTALL) cdecl $(BINDIR)
++ rm -f ${BINDIR}/c++decl
+ ln $(BINDIR)/cdecl $(BINDIR)/c++decl
+ $(INSTALL_DATA) cdecl.1 $(MANDIR)
+ $(INSTALL_DATA) c++decl.1 $(MANDIR)
diff --git a/devel/cdecl/pkg/COMMENT b/devel/cdecl/pkg/COMMENT
new file mode 100644
index 00000000000..46c4e793dfb
--- /dev/null
+++ b/devel/cdecl/pkg/COMMENT
@@ -0,0 +1 @@
+utility to explain and compose C and C++ declarations
diff --git a/devel/cdecl/pkg/DESCR b/devel/cdecl/pkg/DESCR
new file mode 100644
index 00000000000..87bd4e1c3b5
--- /dev/null
+++ b/devel/cdecl/pkg/DESCR
@@ -0,0 +1,5 @@
+Cdecl is a program which will turn English-like phrases such as "declare
+foo as array 5 of pointer to function returning int" into C declarations
+such as "int (*foo[5])()". It can also translate the C into the pseudo-
+English. And it handles typecasts, too. Plus C++. And in this version
+it has command line editing and history with the GNU readline library.
diff --git a/devel/cdecl/pkg/PLIST b/devel/cdecl/pkg/PLIST
new file mode 100644
index 00000000000..b261a3aa590
--- /dev/null
+++ b/devel/cdecl/pkg/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/11/11 12:53:17 agc Exp $
+bin/cdecl
+bin/c++decl
+man/man1/cdecl.1
+man/man1/c++decl.1
+share/doc/cdecl/testset
+share/doc/cdecl/testset++
+@dirrm share/doc/cdecl