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

11
databases/sdbm/DESCR Normal file
View File

@@ -0,0 +1,11 @@
The sources accompanying this notice -- sdbm -- constitute the first
public release (Dec. 1990) of a complete clone of the Berkeley UN*X ndbm
library. The sdbm library is meant to clone the proven functionality of
ndbm as closely as possible, including a few improvements. It is
practical, easy to understand, and compatible. The sdbm library is not
derived from any licensed, proprietary or copyrighted software.
The sdbm programming interface is totally compatible with ndbm and
includes a slight improvement in database initialization. It is also
expected to be binary-compatible under most UN*X versions that support the
ndbm library.

25
databases/sdbm/Makefile Normal file
View File

@@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.20 2012/10/02 21:25:52 asau Exp $
#
DISTNAME= sdbm
# this is the Dec. 1990 release with some race condition fixes from an
# unknown outside source:
PKGNAME= sdbm-90.12.1
PKGREVISION= 2
CATEGORIES= databases
MASTER_SITES= # ftp://tsx-11.mit.edu/pub/linux/sources/libs/
EXTRACT_SUFX= .tar.Z
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Substitute DBM, an implementation of the "real" ndbm library
WRKSRC= ${WRKDIR}
MAKE_FILE= makefile
MAKE_JOBS_SAFE= no
USE_LIBTOOL= yes
post-extract:
cd ${WRKDIR} && ${SH} sdbm.shar >/dev/null
.include "../../mk/bsd.pkg.mk"

8
databases/sdbm/PLIST Normal file
View File

@@ -0,0 +1,8 @@
@comment $NetBSD: PLIST,v 1.2 2008/08/12 13:11:30 agc Exp $
bin/dba
bin/dbd
bin/dbe
bin/dbu
include/sdbm.h
lib/libsdbm.la
man/man3/sdbm.3

View File

@@ -0,0 +1,12 @@
# $NetBSD: buildlink3.mk,v 1.6 2009/03/20 19:24:07 joerg Exp $
BUILDLINK_TREE+= sdbm
.if !defined(SDBM_BUILDLINK3_MK)
SDBM_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.sdbm+= sdbm>=90.12.1
BUILDLINK_PKGSRCDIR.sdbm?= ../../databases/sdbm
.endif # SDBM_BUILDLINK3_MK
BUILDLINK_TREE+= -sdbm

13
databases/sdbm/distinfo Normal file
View File

@@ -0,0 +1,13 @@
$NetBSD: distinfo,v 1.16 2013/04/14 01:26:03 dholland Exp $
SHA1 (sdbm.tar.Z) = ebeb769b308a00853b0119f32dda781829e1d712
RMD160 (sdbm.tar.Z) = 33a48f642ad81bb15a7ce4440dca605e97774afa
Size (sdbm.tar.Z) = 63557 bytes
SHA1 (patch-aa) = 9ebe008e7119939b5d47abdb1c15cc03e4548698
SHA1 (patch-ab) = 0d432aa2f4a8b33077aa045386da499b494bcd24
SHA1 (patch-ac) = dccfcb2b7a2f68188bb55bb514021cc091274678
SHA1 (patch-ad) = 7857dbfc168d12985a9fa0b5cefc39ac90bc4fba
SHA1 (patch-ae) = 69e4e40277ecae8e6023d72dbbd4a738583f46dd
SHA1 (patch-af) = fa25d68eacd6e0b555a29618960659573013ca76
SHA1 (patch-ah) = 90dba8033eba363f246fd785e8897724ab7eb718
SHA1 (patch-ai) = 30be3d05db35d02190e8749840921d23c55c24db

View File

@@ -0,0 +1,47 @@
$NetBSD: patch-aa,v 1.6 2012/04/16 04:01:10 dholland Exp $
- Use standard headers.
- Don't declare own errno.
- Don't declare own malloc/free/lseek.
- Remove wrong cast calling malloc.
--- sdbm.c.orig 2004-04-27 19:10:43.000000000 -0500
+++ sdbm.c
@@ -25,6 +25,10 @@
#endif
#include <errno.h>
#include <string.h>
+#include <stdlib.h>
+
+/* To define SEEK_SET on Linux */
+#include <stdio.h>
#ifdef __STDC__
#include <stddef.h>
@@ -35,17 +39,6 @@
#endif
/*
- * externals
- */
-#ifndef sun
-extern int errno;
-#endif
-
-extern char *malloc proto((unsigned int));
-extern void free proto((void *));
-extern long lseek();
-
-/*
* forward
*/
static int getdbit proto((DBM *, long));
@@ -95,7 +88,7 @@ register int mode;
*/
n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
- if ((dirname = malloc((unsigned) n)) == NULL)
+ if ((dirname = malloc(n)) == NULL)
return errno = ENOMEM, (DBM *) NULL;
/*
* build the file names

View File

@@ -0,0 +1,80 @@
$NetBSD: patch-ab,v 1.4 2012/04/16 04:01:10 dholland Exp $
- Configure for pkgsrc.
- libtoolize, build as shared library.
- Provide working install target.
--- makefile 2008/08/12 12:14:05 1.1
+++ makefile 2008/08/12 11:24:23
@@ -2,37 +2,42 @@
# makefile for public domain ndbm-clone: sdbm
# DUFF: use duff's device (loop unroll) in parts of the code
#
-CFLAGS = -O -DSDBM -DDUFF -DBSD42
+CFLAGS+= -DSDBM -DDUFF
#LDFLAGS = -p
+BINDIR=${PREFIX}/bin
+INCDIR=${PREFIX}/include
+LIBDIR=${PREFIX}/lib
+MANDIR=${PREFIX}/${PKGMANDIR}
+
OBJS = sdbm.o pair.o hash.o
SRCS = sdbm.c pair.c hash.c dbu.c dba.c dbd.c util.c
HDRS = tune.h sdbm.h pair.h
MISC = README CHANGES COMPARE sdbm.3 dbe.c dbe.1 dbm.c dbm.h biblio \
readme.ms readme.ps
+LIBS = libsdbm.a
all: dbu dba dbd dbe
-dbu: dbu.o sdbm util.o
- cc $(LDFLAGS) -o dbu dbu.o util.o libsdbm.a
+dbu: dbu.o ${LIBS} util.o
+ ${LIBTOOL} --mode=link --tag=CC ${CC} dbu.o util.o ${LIBS:.a=.la} -o dbu
dba: dba.o util.o
- cc $(LDFLAGS) -o dba dba.o util.o
+ ${LIBTOOL} --mode=link --tag=CC ${CC} dba.o util.o ${LIBS:.a=.la} -o dba
dbd: dbd.o util.o
- cc $(LDFLAGS) -o dbd dbd.o util.o
-dbe: dbe.o sdbm
- cc $(LDFLAGS) -o dbe dbe.o libsdbm.a
-
-sdbm: $(OBJS)
- ar cr libsdbm.a $(OBJS)
- ranlib libsdbm.a
-### cp libsdbm.a /usr/lib/libsdbm.a
+ ${LIBTOOL} --mode=link --tag=CC ${CC} dbd.o util.o ${LIBS:.a=.la} -o dbd
+dbe: dbe.o ${LIBS}
+ ${LIBTOOL} --mode=link --tag=CC ${CC} dbe.o ${LIBS:.a=.la} -o dbe
+
+$(LIBS): $(OBJS)
+ ${LIBTOOL} --mode=link --tag=CC ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 1:0
dba.o: sdbm.h
dbu.o: sdbm.h
util.o:sdbm.h
$(OBJS): sdbm.h tune.h pair.h
+ ${LIBTOOL} --mode=compile --tag=CC ${CC} ${CFLAGS} -c $<
#
# dbu using berkelezoid ndbm routines [if you have them] for testing
@@ -53,3 +58,16 @@
readme:
nroff -ms readme.ms | col -b >README
+
+install: $(LIBS)
+ mkdir ${DESTDIR}$(BINDIR)
+ mkdir ${DESTDIR}$(LIBDIR)
+ mkdir ${DESTDIR}$(INCDIR)
+ mkdir ${DESTDIR}$(MANDIR)/man3
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIBS:.a=.la} ${DESTDIR}${PREFIX}/lib
+ ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbu ${DESTDIR}$(BINDIR)
+ ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dba ${DESTDIR}$(BINDIR)
+ ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbd ${DESTDIR}$(BINDIR)
+ ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbe ${DESTDIR}$(BINDIR)
+ $(BSD_INSTALL_DATA) sdbm.h ${DESTDIR}$(INCDIR)
+ $(BSD_INSTALL_DATA) sdbm.3 ${DESTDIR}$(MANDIR)/man3

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-ac,v 1.3 2012/04/16 04:01:10 dholland Exp $
- Use standard headers.
- Don't provide own definitions of now-standard symbols.
--- tune.h.orig Mon Sep 25 23:22:26 2000
+++ tune.h
@@ -6,11 +6,10 @@
#define BYTESIZ 8
-#ifdef SVID
#include <unistd.h>
-#endif
+#include <string.h>
-#ifdef BSD42
+#if 0
#define SEEK_SET L_SET
#define memset(s,c,n) bzero(s, n) /* only when c is zero */
#define memcpy(s1,s2,n) bcopy(s2, s1, n)

View File

@@ -0,0 +1,33 @@
$NetBSD: patch-ad,v 1.4 2012/04/16 03:50:38 dholland Exp $
- use standard headers
- don't declare own errno
--- util.c.orig 2012-04-16 03:53:49.000000000 +0000
+++ util.c
@@ -1,4 +1,7 @@
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
#ifdef SDBM
#include "sdbm.h"
#else
@@ -10,15 +13,13 @@ oops(s1, s2)
register char *s1;
register char *s2;
{
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
extern char *progname;
if (progname)
fprintf(stderr, "%s: ", progname);
fprintf(stderr, s1, s2);
- if (errno > 0 && errno < sys_nerr)
- fprintf(stderr, " (%s)", sys_errlist[errno]);
+ if (errno > 0)
+ fprintf(stderr, " (%s)", strerror(errno));
fprintf(stderr, "\n");
exit(1);
}

View File

@@ -0,0 +1,22 @@
$NetBSD: patch-ae,v 1.3 2012/03/05 03:38:12 dholland Exp $
- Use standard includes instead of own declarations
--- dbu.c.orig 2011-11-14 01:43:27.000000000 +0000
+++ dbu.c
@@ -1,4 +1,7 @@
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
#include <sys/file.h>
#ifdef SDBM
#include "sdbm.h"
@@ -12,7 +15,6 @@
#endif
extern int getopt();
-extern char *strchr();
extern void oops();
char *progname;

View File

@@ -0,0 +1,111 @@
$NetBSD: patch-af,v 1.5 2013/04/14 01:26:03 dholland Exp $
- Use standard headers.
- Don't provide own getopt on BSD platforms, or on Solaris.
- Use <ctype.h> functions correctly.
- Avoid signed bitwise operations.
- Use the modern regexp library interface.
--- dbe.c.orig 2013-04-14 01:29:53.000000000 +0000
+++ dbe.c
@@ -1,6 +1,12 @@
+#include <sys/types.h>
+#include <sys/param.h>
+
+#include <regex.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifndef VMS
-#include <sys/file.h>
+#include <fcntl.h>
#include <ndbm.h>
#else
#include "file.h"
@@ -51,6 +57,7 @@ char *optarg; /* Global argumen
#define index strchr
#endif
+#if !(defined(BSD) && BSD >= 199506) && !defined(__sun)
char
getopt(argc, argv, optstring)
int argc;
@@ -128,23 +135,26 @@ char *optstring;
}
return c;
}
+#endif
void
print_datum(db)
datum db;
{
+ unsigned char *cp;
int i;
putchar('"');
for (i = 0; i < db.dsize; i++) {
- if (isprint(db.dptr[i]))
- putchar(db.dptr[i]);
+ cp = (unsigned char *)db.dptr;
+ if (isprint(cp[i]))
+ putchar(cp[i]);
else {
putchar('\\');
- putchar('0' + ((db.dptr[i] >> 6) & 0x07));
- putchar('0' + ((db.dptr[i] >> 3) & 0x07));
- putchar('0' + (db.dptr[i] & 0x07));
+ putchar('0' + ((cp[i] >> 6) & 0x07));
+ putchar('0' + ((cp[i] >> 3) & 0x07));
+ putchar('0' + (cp[i] & 0x07));
}
}
putchar('"');
@@ -171,7 +181,9 @@ char *s;
*p = '\f';
else if (*s == 't')
*p = '\t';
- else if (isdigit(*s) && isdigit(*(s + 1)) && isdigit(*(s + 2))) {
+ else if (isdigit((unsigned char)*s) &&
+ isdigit((unsigned char)*(s + 1)) &&
+ isdigit((unsigned char)*(s + 2))) {
i = (*s++ - '0') << 6;
i |= (*s++ - '0') << 3;
i |= *s - '0';
@@ -211,6 +223,8 @@ char **argv;
typedef enum {
YOW, FETCH, STORE, DELETE, SCAN, REGEXP
} commands;
+ regex_t r;
+ regmatch_t matchv[10];
char opt;
int flags;
int giveusage = 0;
@@ -333,7 +347,8 @@ char **argv;
fprintf(stderr, "Missing regular expression.\n");
goto db_exit;
}
- if (re_comp(comarg[1])) {
+ (void) memset(&r, 0x0, sizeof(r));
+ if (regcomp(&r, comarg[1], REG_EXTENDED) != 0) {
fprintf(stderr, "Invalid regular expression\n");
goto db_exit;
}
@@ -343,7 +358,7 @@ char **argv;
goto db_exit;
}
while (key.dptr != NULL) {
- if (re_exec(key2s(key))) {
+ if (regexec(&r, key2s(key), 10, matchv, 0) == 0) {
content = dbm_fetch(db, key);
if (dbm_error(db)) {
fprintf(stderr, "Error when fetching ");
@@ -362,6 +377,7 @@ char **argv;
}
key = dbm_nextkey(db);
}
+ regfree(&r);
break;
case FETCH:

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-ah,v 1.2 2012/04/16 04:01:10 dholland Exp $
Use standard headers
--- dba.c 2008/08/12 11:32:24 1.1
+++ dba.c 2008/08/12 11:32:58
@@ -2,7 +2,10 @@
* dba dbm analysis/recovery
*/
+#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/file.h>
#include "sdbm.h"

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-ai,v 1.4 2012/06/18 02:15:52 dholland Exp $
Use standard headers.
--- dbd.c.orig 2012-06-18 02:26:06.000000000 +0000
+++ dbd.c
@@ -3,7 +3,10 @@
*/
#include <stdio.h>
-#include <sys/file.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
#include "sdbm.h"
char *progname;