Add patch comments, add missing rcsid to patch-ai, fix some pkglint and a couple other minor glitches.diff -r1.18 -r1.19 pkgsrc/databases/sdbm/Makefile
(dholland)
@@ -1,26 +1,26 @@ | @@ -1,26 +1,26 @@ | |||
1 | # $NetBSD: Makefile,v 1.18 2012/01/04 15:09:38 dholland Exp $ | 1 | # $NetBSD: Makefile,v 1.19 2012/04/16 04:01:10 dholland Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= sdbm | 4 | DISTNAME= sdbm | |
5 | # this is the Dec. 1990 release with some race condition fixes from an | 5 | # this is the Dec. 1990 release with some race condition fixes from an | |
6 | # unknown outside source: | 6 | # unknown outside source: | |
7 | PKGNAME= sdbm-90.12.1 | 7 | PKGNAME= sdbm-90.12.1 | |
8 | PKGREVISION= 2 | 8 | PKGREVISION= 2 | |
9 | CATEGORIES= databases | 9 | CATEGORIES= databases | |
10 | MASTER_SITES= # ftp://tsx-11.mit.edu/pub/linux/sources/libs/ | 10 | MASTER_SITES= # ftp://tsx-11.mit.edu/pub/linux/sources/libs/ | |
11 | EXTRACT_SUFX= .tar.Z | 11 | EXTRACT_SUFX= .tar.Z | |
12 | 12 | |||
13 | MAINTAINER= pkgsrc-users@NetBSD.org | 13 | MAINTAINER= pkgsrc-users@NetBSD.org | |
14 | COMMENT= Substitute DBM, an implementation of the "real" ndbm library | 14 | COMMENT= Substitute DBM, an implementation of the "real" ndbm library | |
15 | 15 | |||
16 | WRKSRC= ${WRKDIR} | 16 | WRKSRC= ${WRKDIR} | |
17 | MAKE_FILE= makefile | 17 | MAKE_FILE= makefile | |
18 | MAKE_JOBS_SAFE= no | 18 | MAKE_JOBS_SAFE= no | |
19 | 19 | |||
20 | USE_LIBTOOL= yes | 20 | USE_LIBTOOL= yes | |
21 | PKG_DESTDIR_SUPPORT= user-destdir | 21 | PKG_DESTDIR_SUPPORT= user-destdir | |
22 | 22 | |||
23 | post-extract: | 23 | post-extract: | |
24 | @cd ${WRKDIR} && ${SH} sdbm.shar >/dev/null | 24 | cd ${WRKDIR} && ${SH} sdbm.shar >/dev/null | |
25 | 25 | |||
26 | .include "../../mk/bsd.pkg.mk" | 26 | .include "../../mk/bsd.pkg.mk" |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | $NetBSD: distinfo,v 1.11 2012/04/16 03:50:38 dholland Exp $ | 1 | $NetBSD: distinfo,v 1.12 2012/04/16 04:01:10 dholland Exp $ | |
2 | 2 | |||
3 | SHA1 (sdbm.tar.Z) = ebeb769b308a00853b0119f32dda781829e1d712 | 3 | SHA1 (sdbm.tar.Z) = ebeb769b308a00853b0119f32dda781829e1d712 | |
4 | RMD160 (sdbm.tar.Z) = 33a48f642ad81bb15a7ce4440dca605e97774afa | 4 | RMD160 (sdbm.tar.Z) = 33a48f642ad81bb15a7ce4440dca605e97774afa | |
5 | Size (sdbm.tar.Z) = 63557 bytes | 5 | Size (sdbm.tar.Z) = 63557 bytes | |
6 | SHA1 (patch-aa) = cbac91086cf9b149b62d63f7f3b3435786ac6090 | 6 | SHA1 (patch-aa) = 9ebe008e7119939b5d47abdb1c15cc03e4548698 | |
7 | SHA1 (patch-ab) = 9dd9ce20db82283c8692f91d337348e1e952403a | 7 | SHA1 (patch-ab) = 0d432aa2f4a8b33077aa045386da499b494bcd24 | |
8 | SHA1 (patch-ac) = 6455fcb75d5d11173dd5063919e3336989e1e821 | 8 | SHA1 (patch-ac) = dccfcb2b7a2f68188bb55bb514021cc091274678 | |
9 | SHA1 (patch-ad) = 7857dbfc168d12985a9fa0b5cefc39ac90bc4fba | 9 | SHA1 (patch-ad) = 7857dbfc168d12985a9fa0b5cefc39ac90bc4fba | |
10 | SHA1 (patch-ae) = 69e4e40277ecae8e6023d72dbbd4a738583f46dd | 10 | SHA1 (patch-ae) = 69e4e40277ecae8e6023d72dbbd4a738583f46dd | |
11 | SHA1 (patch-af) = d990ecba1b79c04130c4d24666ea2b3da4b1d91c | 11 | SHA1 (patch-af) = 2ff85561125381a10e1b2ee0dd18db04192bc738 | |
12 | SHA1 (patch-ah) = 63019f2175766d73ef213297e54597e6fd5fba13 | 12 | SHA1 (patch-ah) = 90dba8033eba363f246fd785e8897724ab7eb718 | |
13 | SHA1 (patch-ai) = 2fd5408efe990534d474bd2bb59b8776f0f808df | 13 | SHA1 (patch-ai) = fdaaa656ea9aff3b90edd2397d7dd1309f7040eb |
@@ -1,14 +1,19 @@ | @@ -1,14 +1,19 @@ | |||
1 | $NetBSD: patch-aa,v 1.5 2005/12/05 20:50:01 rillig Exp $ | 1 | $NetBSD: patch-aa,v 1.6 2012/04/16 04:01:10 dholland Exp $ | |
2 | ||||
3 | - Use standard headers. | |||
4 | - Don't declare own errno. | |||
5 | - Don't declare own malloc/free/lseek. | |||
6 | - Remove wrong cast calling malloc. | |||
2 | 7 | |||
3 | --- sdbm.c.orig 2004-04-27 19:10:43.000000000 -0500 | 8 | --- sdbm.c.orig 2004-04-27 19:10:43.000000000 -0500 | |
4 | +++ sdbm.c | 9 | +++ sdbm.c | |
5 | @@ -25,6 +25,10 @@ | 10 | @@ -25,6 +25,10 @@ | |
6 | #endif | 11 | #endif | |
7 | #include <errno.h> | 12 | #include <errno.h> | |
8 | #include <string.h> | 13 | #include <string.h> | |
9 | +#include <stdlib.h> | 14 | +#include <stdlib.h> | |
10 | + | 15 | + | |
11 | +/* To define SEEK_SET on Linux */ | 16 | +/* To define SEEK_SET on Linux */ | |
12 | +#include <stdio.h> | 17 | +#include <stdio.h> | |
13 | 18 | |||
14 | #ifdef __STDC__ | 19 | #ifdef __STDC__ | |
@@ -26,17 +31,17 @@ $NetBSD: patch-aa,v 1.5 2005/12/05 20:50 | @@ -26,17 +31,17 @@ $NetBSD: patch-aa,v 1.5 2005/12/05 20:50 | |||
26 | -extern char *malloc proto((unsigned int)); | 31 | -extern char *malloc proto((unsigned int)); | |
27 | -extern void free proto((void *)); | 32 | -extern void free proto((void *)); | |
28 | -extern long lseek(); | 33 | -extern long lseek(); | |
29 | - | 34 | - | |
30 | -/* | 35 | -/* | |
31 | * forward | 36 | * forward | |
32 | */ | 37 | */ | |
33 | static int getdbit proto((DBM *, long)); | 38 | static int getdbit proto((DBM *, long)); | |
34 | @@ -95,7 +88,7 @@ register int mode; | 39 | @@ -95,7 +88,7 @@ register int mode; | |
35 | */ | 40 | */ | |
36 | n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2; | 41 | n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2; | |
37 | 42 | |||
38 | - if ((dirname = malloc((unsigned) n)) == NULL) | 43 | - if ((dirname = malloc((unsigned) n)) == NULL) | |
39 | + if ((dirname = (char *) malloc(n)) == NULL) | 44 | + if ((dirname = malloc(n)) == NULL) | |
40 | return errno = ENOMEM, (DBM *) NULL; | 45 | return errno = ENOMEM, (DBM *) NULL; | |
41 | /* | 46 | /* | |
42 | * build the file names | 47 | * build the file names |
@@ -1,14 +1,18 @@ | @@ -1,14 +1,18 @@ | |||
1 | $NetBSD: patch-ab,v 1.3 2011/08/29 01:33:49 dholland Exp $ | 1 | $NetBSD: patch-ab,v 1.4 2012/04/16 04:01:10 dholland Exp $ | |
2 | ||||
3 | - Configure for pkgsrc. | |||
4 | - libtoolize, build as shared library. | |||
5 | - Provide working install target. | |||
2 | 6 | |||
3 | --- makefile 2008/08/12 12:14:05 1.1 | 7 | --- makefile 2008/08/12 12:14:05 1.1 | |
4 | +++ makefile 2008/08/12 11:24:23 | 8 | +++ makefile 2008/08/12 11:24:23 | |
5 | @@ -2,37 +2,42 @@ | 9 | @@ -2,37 +2,42 @@ | |
6 | # makefile for public domain ndbm-clone: sdbm | 10 | # makefile for public domain ndbm-clone: sdbm | |
7 | # DUFF: use duff's device (loop unroll) in parts of the code | 11 | # DUFF: use duff's device (loop unroll) in parts of the code | |
8 | # | 12 | # | |
9 | -CFLAGS = -O -DSDBM -DDUFF -DBSD42 | 13 | -CFLAGS = -O -DSDBM -DDUFF -DBSD42 | |
10 | +CFLAGS+= -DSDBM -DDUFF | 14 | +CFLAGS+= -DSDBM -DDUFF | |
11 | #LDFLAGS = -p | 15 | #LDFLAGS = -p | |
12 | 16 | |||
13 | +BINDIR=${PREFIX}/bin | 17 | +BINDIR=${PREFIX}/bin | |
14 | +INCDIR=${PREFIX}/include | 18 | +INCDIR=${PREFIX}/include | |
@@ -57,20 +61,20 @@ $NetBSD: patch-ab,v 1.3 2011/08/29 01:33 | @@ -57,20 +61,20 @@ $NetBSD: patch-ab,v 1.3 2011/08/29 01:33 | |||
57 | 61 | |||
58 | # | 62 | # | |
59 | # dbu using berkelezoid ndbm routines [if you have them] for testing | 63 | # dbu using berkelezoid ndbm routines [if you have them] for testing | |
60 | @@ -53,3 +58,16 @@ | 64 | @@ -53,3 +58,16 @@ | |
61 | 65 | |||
62 | readme: | 66 | readme: | |
63 | nroff -ms readme.ms | col -b >README | 67 | nroff -ms readme.ms | col -b >README | |
64 | + | 68 | + | |
65 | +install: $(LIBS) | 69 | +install: $(LIBS) | |
66 | + mkdir ${DESTDIR}$(BINDIR) | 70 | + mkdir ${DESTDIR}$(BINDIR) | |
67 | + mkdir ${DESTDIR}$(LIBDIR) | 71 | + mkdir ${DESTDIR}$(LIBDIR) | |
68 | + mkdir ${DESTDIR}$(INCDIR) | 72 | + mkdir ${DESTDIR}$(INCDIR) | |
69 | + mkdir ${DESTDIR}$(MANDIR)/man3 | 73 | + mkdir ${DESTDIR}$(MANDIR)/man3 | |
70 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${LIBS:.a=.la} ${DESTDIR}${PREFIX}/lib | 74 | + ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIBS:.a=.la} ${DESTDIR}${PREFIX}/lib | |
71 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbu ${DESTDIR}$(BINDIR) | 75 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbu ${DESTDIR}$(BINDIR) | |
72 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dba ${DESTDIR}$(BINDIR) | 76 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dba ${DESTDIR}$(BINDIR) | |
73 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbd ${DESTDIR}$(BINDIR) | 77 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbd ${DESTDIR}$(BINDIR) | |
74 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbe ${DESTDIR}$(BINDIR) | 78 | + ${LIBTOOL} --mode=install $(BSD_INSTALL_PROGRAM) dbe ${DESTDIR}$(BINDIR) | |
75 | + $(BSD_INSTALL_DATA) sdbm.h ${DESTDIR}$(INCDIR) | 79 | + $(BSD_INSTALL_DATA) sdbm.h ${DESTDIR}$(INCDIR) | |
76 | + $(BSD_INSTALL_DATA) sdbm.3 ${DESTDIR}$(MANDIR)/man3 | 80 | + $(BSD_INSTALL_DATA) sdbm.3 ${DESTDIR}$(MANDIR)/man3 |
@@ -1,14 +1,17 @@ | @@ -1,14 +1,17 @@ | |||
1 | $NetBSD: patch-ac,v 1.2 2008/08/12 13:11:30 agc Exp $ | 1 | $NetBSD: patch-ac,v 1.3 2012/04/16 04:01:10 dholland Exp $ | |
2 | ||||
3 | - Use standard headers. | |||
4 | - Don't provide own definitions of now-standard symbols. | |||
2 | 5 | |||
3 | --- tune.h.orig Mon Sep 25 23:22:26 2000 | 6 | --- tune.h.orig Mon Sep 25 23:22:26 2000 | |
4 | +++ tune.h | 7 | +++ tune.h | |
5 | @@ -6,11 +6,10 @@ | 8 | @@ -6,11 +6,10 @@ | |
6 | 9 | |||
7 | #define BYTESIZ 8 | 10 | #define BYTESIZ 8 | |
8 | 11 | |||
9 | -#ifdef SVID | 12 | -#ifdef SVID | |
10 | #include <unistd.h> | 13 | #include <unistd.h> | |
11 | -#endif | 14 | -#endif | |
12 | +#include <string.h> | 15 | +#include <string.h> | |
13 | 16 | |||
14 | -#ifdef BSD42 | 17 | -#ifdef BSD42 |
@@ -1,14 +1,20 @@ | @@ -1,14 +1,20 @@ | |||
1 | $NetBSD: patch-af,v 1.2 2008/08/12 13:11:30 agc Exp $ | 1 | $NetBSD: patch-af,v 1.3 2012/04/16 04:01:10 dholland Exp $ | |
2 | ||||
3 | - Use standard headers. | |||
4 | - Don't provide own getopt on BSD platforms. | |||
5 | - Use <ctype.h> functions correctly. | |||
6 | - Avoid signed bitwise operations. | |||
7 | - Use the modern regexp library interface. | |||
2 | 8 | |||
3 | --- dbe.c.orig Mon Sep 25 23:28:28 2000 | 9 | --- dbe.c.orig Mon Sep 25 23:28:28 2000 | |
4 | +++ dbe.c | 10 | +++ dbe.c | |
5 | @@ -1,4 +1,10 @@ | 11 | @@ -1,4 +1,10 @@ | |
6 | +#include <sys/types.h> | 12 | +#include <sys/types.h> | |
7 | +#include <sys/param.h> | 13 | +#include <sys/param.h> | |
8 | + | 14 | + | |
9 | +#include <regex.h> | 15 | +#include <regex.h> | |
10 | #include <stdio.h> | 16 | #include <stdio.h> | |
11 | +#include <stdlib.h> | 17 | +#include <stdlib.h> | |
12 | +#include <string.h> | 18 | +#include <string.h> | |
13 | #ifndef VMS | 19 | #ifndef VMS | |
14 | #include <sys/file.h> | 20 | #include <sys/file.h> |
@@ -1,14 +1,16 @@ | @@ -1,14 +1,16 @@ | |||
1 | $NetBSD: patch-ah,v 1.1 2008/08/12 13:13:34 agc Exp $ | 1 | $NetBSD: patch-ah,v 1.2 2012/04/16 04:01:10 dholland Exp $ | |
2 | ||||
3 | Use standard headers | |||
2 | 4 | |||
3 | --- dba.c 2008/08/12 11:32:24 1.1 | 5 | --- dba.c 2008/08/12 11:32:24 1.1 | |
4 | +++ dba.c 2008/08/12 11:32:58 | 6 | +++ dba.c 2008/08/12 11:32:58 | |
5 | @@ -2,7 +2,10 @@ | 7 | @@ -2,7 +2,10 @@ | |
6 | * dba dbm analysis/recovery | 8 | * dba dbm analysis/recovery | |
7 | */ | 9 | */ | |
8 | 10 | |||
9 | +#include <fcntl.h> | 11 | +#include <fcntl.h> | |
10 | #include <stdio.h> | 12 | #include <stdio.h> | |
11 | +#include <stdlib.h> | 13 | +#include <stdlib.h> | |
12 | +#include <string.h> | 14 | +#include <string.h> | |
13 | #include <sys/file.h> | 15 | #include <sys/file.h> | |
14 | #include "sdbm.h" | 16 | #include "sdbm.h" |
@@ -1,11 +1,15 @@ | @@ -1,11 +1,15 @@ | |||
1 | $NetBSD: patch-ai,v 1.2 2012/04/16 04:01:10 dholland Exp $ | |||
2 | ||||
3 | Use standard headers. | |||
4 | ||||
1 | --- dbd.c 2008/08/12 12:19:22 1.1 | 5 | --- dbd.c 2008/08/12 12:19:22 1.1 | |
2 | +++ dbd.c 2008/08/12 12:19:53 | 6 | +++ dbd.c 2008/08/12 12:19:53 | |
3 | @@ -3,6 +3,8 @@ | 7 | @@ -3,6 +3,8 @@ | |
4 | */ | 8 | */ | |
5 | 9 | |||
6 | #include <stdio.h> | 10 | #include <stdio.h> | |
7 | +#include <stdlib.h> | 11 | +#include <stdlib.h> | |
8 | +#include <string.h> | 12 | +#include <string.h> | |
9 | #include <sys/file.h> | 13 | #include <sys/file.h> | |
10 | #include "sdbm.h" | 14 | #include "sdbm.h" | |
11 | 15 |