Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

5
devel/cdecl/DESCR Normal file
View File

@@ -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.

27
devel/cdecl/Makefile Normal file
View File

@@ -0,0 +1,27 @@
# $NetBSD: Makefile,v 1.28 2012/10/31 11:16:44 asau Exp $
#
DISTNAME= cdecl-2.5
PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ftp://ftp.netsw.org/softeng/lang/c/tools/cdecl/ \
ftp://ftp-linux.cc.gatech.edu/pub/linux/devel/lang/c/
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Utility to explain and compose C and C++ declarations
BUILD_TARGET= cdecl
# missing rl_completion_matches
USE_GNU_READLINE= yes
USE_TOOLS+= lex yacc
INSTALL_MAKE_FLAGS= PREFIX=${DESTDIR}${PREFIX} \
MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
EGDIR= ${PREFIX}/share/examples/cdecl
INSTALLATION_DIRS= bin ${EGDIR} ${PKGMANDIR}/man1
post-install:
${INSTALL_DATA} ${WRKSRC}/testset* ${DESTDIR}${EGDIR}
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

7
devel/cdecl/PLIST Normal file
View File

@@ -0,0 +1,7 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:48:36 joerg Exp $
bin/c++decl
bin/cdecl
man/man1/c++decl.1
man/man1/cdecl.1
share/examples/cdecl/testset
share/examples/cdecl/testset++

7
devel/cdecl/distinfo Normal file
View File

@@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.11 2009/09/27 22:27:22 apb Exp $
SHA1 (cdecl-2.5.tar.gz) = b955a0b95b635090360b19de888cb29d5c005296
RMD160 (cdecl-2.5.tar.gz) = 351c36dcc7f18e4d143f2559460025d2de9a83c4
Size (cdecl-2.5.tar.gz) = 21435 bytes
SHA1 (patch-aa) = cf6f5821c1856104841c60075111f6eecb30da2e
SHA1 (patch-ab) = e8c9f70894ed5613234ed17b8c1c95c9b12afd7b

View File

@@ -0,0 +1,191 @@
$NetBSD: patch-aa,v 1.10 2009/09/27 22:27:23 apb Exp $
--- cdecl.c.orig 1996-01-16 03:54:46.000000000 +0000
+++ cdecl.c
@@ -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,11 +73,12 @@ char cdeclsccsid[] = "@(#)cdecl.c 2.5 1/
# ifndef NOVARARGS
# include <varargs.h>
# endif /* ndef NOVARARGS */
+#if !(defined(__sun__) && defined(__svr4__)) && !(defined(BSD) && (BSD >= 199306)) && !defined(__INTERIX)
char *malloc();
void free(), exit(), perror();
+#endif
# ifdef BSD
# include <strings.h>
- extern int errno;
# define strrchr rindex
# define NOTMPFILE
# else
@@ -87,13 +90,12 @@ void free(), exit(), perror();
# endif /* NOVOID */
#endif /* __STDC__ || DOS */
+#include <errno.h>
+
#ifdef USE_READLINE
# include <readline/readline.h>
/* prototypes for functions related to readline() */
- char * getline();
- char ** attempt_completion(char *, int, int);
- char * keyword_completion(char *, int);
- char * command_completion(char *, int);
+char * command_completion(const char *, int);
#endif
/* maximum # of chars from progname to display in prompt */
@@ -124,7 +126,11 @@ char real_prompt[MAX_NAME+3];
#if __STDC__
char *ds(char *), *cat(char *, ...), *visible(int);
+#if !(defined(BSD) && BSD >= 199306) && \
+ !(defined(__sun__) && defined(__svr4__)) && \
+ !(defined(__linux__)) && !(defined(__INTERIX))
int getopt(int,char **,char *);
+#endif
int main(int, char **);
int yywrap(void);
int dostdin(void);
@@ -138,7 +144,7 @@ char real_prompt[MAX_NAME+3];
void docast(char*, char*, char*, char*);
void dodexplain(char*, char*, char*, char*);
void docexplain(char*, char*, char*, char*);
- void setprogname(char *);
+ void mysetprogname(char *);
int dotmpfile(int, char**), dofileargs(int, char**);
#else
char *ds(), *cat(), *visible();
@@ -148,7 +154,7 @@ char real_prompt[MAX_NAME+3];
void unsupp(), notsupported();
void yyerror();
void doset(), dodeclare(), docast(), dodexplain(), docexplain();
- void setprogname();
+ void mysetprogname();
int dotmpfile(), dofileargs();
#endif /* __STDC__ */
FILE *tmpfile();
@@ -241,7 +247,7 @@ struct
/* for unsupported combinations of types. */
void mbcheck()
{
- register int i, j, restrict;
+ register int i, j, xrestrict;
char *t1, *t2;
/* Loop through the types */
@@ -258,26 +264,26 @@ void mbcheck()
if (!(modbits & crosstypes[j].bit))
continue;
/* check the type of restriction */
- restrict = crosscheck[i][j];
- if (restrict == ALWAYS)
+ xrestrict = crosscheck[i][j];
+ if (xrestrict == ALWAYS)
continue;
t1 = crosstypes[i].name;
t2 = crosstypes[j].name;
- if (restrict == NEVER)
+ if (xrestrict == NEVER)
{
notsupported("", t1, t2);
}
- else if (restrict == RITCHIE)
+ else if (xrestrict == RITCHIE)
{
if (RitchieFlag)
notsupported(" (Ritchie Compiler)", t1, t2);
}
- else if (restrict == PREANSI)
+ else if (xrestrict == PREANSI)
{
if (PreANSIFlag || RitchieFlag)
notsupported(" (Pre-ANSI Compiler)", t1, t2);
}
- else if (restrict == ANSI)
+ else if (xrestrict == ANSI)
{
if (!RitchieFlag && !PreANSIFlag)
notsupported(" (ANSI Compiler)", t1, t2);
@@ -286,7 +292,7 @@ void mbcheck()
{
(void) fprintf (stderr,
"%s: Internal error in crosscheck[%d,%d]=%d!\n",
- progname, i, j, restrict);
+ progname, i, j, xrestrict);
exit(1); /* NOTREACHED */
}
}
@@ -375,7 +381,7 @@ char *options[] = {
static char *line_read = NULL;
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
-char * getline ()
+char * get_line ()
{
/* If the buffer has already been allocated, return the memory
to the free pool. */
@@ -399,12 +405,12 @@ char ** attempt_completion(char *text, i
{
char **matches = NULL;
- if (start == 0) matches = completion_matches(text, command_completion);
+ if (start == 0) matches = rl_completion_matches(text, command_completion);
return matches;
}
-char * command_completion(char *text, int flag)
+char * command_completion(const char *text, int flag)
{
static int index, len;
char *command;
@@ -421,7 +427,7 @@ char * command_completion(char *text, in
return NULL;
}
-char * keyword_completion(char *text, int flag)
+char * keyword_completion(const char *text, int flag)
{
static int index, len, set, into;
char *keyword, *option;
@@ -803,7 +809,7 @@ void prompt()
}
/* Save away the name of the program from argv[0] */
-void setprogname(argv0)
+void mysetprogname(argv0)
char *argv0;
{
#ifdef DOS
@@ -887,7 +893,7 @@ int dostdin()
if (!quiet) (void) printf("Type `help' or `?' for help\n");
ret = 0;
- while ((line = getline())) {
+ while ((line = get_line())) {
if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
free(line);
return ret;
@@ -1252,10 +1258,10 @@ char **argv;
#ifdef USE_READLINE
/* install completion handlers */
rl_attempted_completion_function = (CPPFunction *)attempt_completion;
- rl_completion_entry_function = (Function *)keyword_completion;
+ rl_completion_entry_function = keyword_completion;
#endif
- setprogname(argv[0]);
+ mysetprogname(argv[0]);
#ifdef DOS
if (strcmp(progname, "cppdecl") == 0)
#else

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-ab,v 1.5 2001/05/22 05:48:15 jlam Exp $
--- Makefile.orig Tue Jan 16 00:36:38 1996
+++ Makefile Tue May 22 01:33:10 2001
@@ -15,21 +15,21 @@
#
# add -DUSE_READLINE To compile in support for the GNU readline library.
-CFLAGS= -s -O2 -DUSE_READLINE
-CC= gcc
+CFLAGS+= -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= ${BSD_INSTALL_PROGRAM}
+INSTALL_DATA= ${BSD_INSTALL_MAN}
cdecl: c++decl
ln c++decl cdecl
c++decl: cdgram.c cdlex.c cdecl.c
- $(CC) $(CFLAGS) -o c++decl cdecl.c $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o c++decl cdecl.c $(LIBS)
rm -f cdecl
cdlex.c: cdlex.l