diff options
author | agc <agc@pkgsrc.org> | 2008-08-12 13:11:30 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2008-08-12 13:11:30 +0000 |
commit | ec971c16f6611a01ba920fdb6a9bf042dae9a542 (patch) | |
tree | 6b70f4e64ba8ab1d5e1a425e56d9675c70e437c5 /databases | |
parent | 6fd57fa65e9042d8288d2688198ea5e3c97c3a99 (diff) | |
download | pkgsrc-ec971c16f6611a01ba920fdb6a9bf042dae9a542.tar.gz |
Move from BSD Makefile to libtool
Use DESTDIR
Use PKG_MANDIR
Install the programs with this package as well as the library
Make this build on Mac OS X - there was a problem with case sensitivity
Use modern regexp calls
Get rid of lint
Bump PKGREVISION
Diffstat (limited to 'databases')
-rw-r--r-- | databases/sdbm/Makefile | 15 | ||||
-rw-r--r-- | databases/sdbm/PLIST | 13 | ||||
-rw-r--r-- | databases/sdbm/distinfo | 13 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-ab | 86 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-ac | 13 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-ad | 14 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-af | 85 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-ag | 8 | ||||
-rw-r--r-- | databases/sdbm/patches/patch-ai | 11 |
9 files changed, 202 insertions, 56 deletions
diff --git a/databases/sdbm/Makefile b/databases/sdbm/Makefile index 8f98854f99c..2105302526d 100644 --- a/databases/sdbm/Makefile +++ b/databases/sdbm/Makefile @@ -1,27 +1,24 @@ -# $NetBSD: Makefile,v 1.14 2007/03/24 19:21:20 joerg Exp $ +# $NetBSD: Makefile,v 1.15 2008/08/12 13:11:30 agc 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= 1 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 +COMMENT= Substitute DBM, an implementation of the "real" ndbm library WRKSRC= ${WRKDIR} -MAKE_ENV+= LIBDIR=${PREFIX}/lib NOLINT=1 \ - LIBOWN=${LIBOWN:Q} LIBGRP=${LIBGRP:Q} -INSTALLATION_DIRS= include lib ${PKGMANDIR}/man3 + +USE_LIBTOOL= yes +PKG_DESTDIR_SUPPORT= user-destdir post-extract: @cd ${WRKDIR} && ${SH} sdbm.shar >/dev/null -post-install: - ${INSTALL_DATA} ${WRKSRC}/sdbm.h ${PREFIX}/include - ${INSTALL_MAN} ${WRKSRC}/sdbm.3 ${PREFIX}/${PKGMANDIR}/man3 - .include "../../mk/bsd.pkg.mk" diff --git a/databases/sdbm/PLIST b/databases/sdbm/PLIST index f65fc6299c7..1de37367e69 100644 --- a/databases/sdbm/PLIST +++ b/databases/sdbm/PLIST @@ -1,9 +1,8 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:12:51 zuntum Exp $ +@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.a -lib/libsdbm_p.a -lib/libsdbm_pic.a -lib/libsdbm.so -lib/libsdbm.so.1 -lib/libsdbm.so.1.0 +lib/libsdbm.la man/man3/sdbm.3 diff --git a/databases/sdbm/distinfo b/databases/sdbm/distinfo index 1c7745ac5c9..b20b715785c 100644 --- a/databases/sdbm/distinfo +++ b/databases/sdbm/distinfo @@ -1,12 +1,13 @@ -$NetBSD: distinfo,v 1.5 2005/12/05 20:50:01 rillig Exp $ +$NetBSD: distinfo,v 1.6 2008/08/12 13:11:30 agc Exp $ SHA1 (sdbm.tar.Z) = ebeb769b308a00853b0119f32dda781829e1d712 RMD160 (sdbm.tar.Z) = 33a48f642ad81bb15a7ce4440dca605e97774afa Size (sdbm.tar.Z) = 63557 bytes SHA1 (patch-aa) = cbac91086cf9b149b62d63f7f3b3435786ac6090 -SHA1 (patch-ab) = 76594d681bc8733e75703123312bd8c82afed333 -SHA1 (patch-ac) = 9b1265bceada93f6a4cb4c4ed2b01e4a6b75c96c -SHA1 (patch-ad) = bfc801d5b42902fd75d66d3b775d2a52d7c93921 +SHA1 (patch-ab) = 24634881531f6e1fed96211104cb225e178031f4 +SHA1 (patch-ac) = 6455fcb75d5d11173dd5063919e3336989e1e821 +SHA1 (patch-ad) = 4b27a77c661ed21ca0da350e5a2d98b58714e797 SHA1 (patch-ae) = 06b68bd3c023bb691b5a493efb88ce8641ce2f0e -SHA1 (patch-af) = b89690ae54d02b1e395d0937e8d790538eb2751a -SHA1 (patch-ag) = 4c48496719db6c609f794f17fa3c11ea589968ea +SHA1 (patch-af) = d990ecba1b79c04130c4d24666ea2b3da4b1d91c +SHA1 (patch-ah) = 63019f2175766d73ef213297e54597e6fd5fba13 +SHA1 (patch-ai) = 2fd5408efe990534d474bd2bb59b8776f0f808df diff --git a/databases/sdbm/patches/patch-ab b/databases/sdbm/patches/patch-ab index 91088742169..5e22f251867 100644 --- a/databases/sdbm/patches/patch-ab +++ b/databases/sdbm/patches/patch-ab @@ -1,14 +1,76 @@ -$NetBSD: patch-ab,v 1.1 1999/06/30 09:46:45 agc Exp $ +$NetBSD: patch-ab,v 1.2 2008/08/12 13:11:30 agc Exp $ -Use a BSD-style Makefile - ---- /dev/null Wed Jun 30 10:39:41 1999 -+++ Makefile Wed Jun 30 10:39:42 1999 -@@ -0,0 +1,7 @@ -+LIB= sdbm -+OBJS= sdbm.o pair.o hash.o -+CPPFLAGS+= -DSDBM -DDUFF -+SHLIB_MAJOR=1 -+SHLIB_MINOR=0 +--- 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 ${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 ${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 ${CC} dbd.o util.o ${LIBS:.a=.la} -o dbd ++dbe: dbe.o ${LIBS} ++ ${LIBTOOL} --mode=link ${CC} dbe.o ${LIBS:.a=.la} -o dbe ++ ++$(LIBS): $(OBJS) ++ ${LIBTOOL} --mode=link 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 ${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 + -+.include <bsd.lib.mk> ++install: $(LIBS) ++ mkdir ${DESTDIR}$(BINDIR) ++ mkdir ${DESTDIR}$(LIBDIR) ++ mkdir ${DESTDIR}$(INCDIR) ++ mkdir ${DESTDIR}$(MANDIR)/man3 ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${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 diff --git a/databases/sdbm/patches/patch-ac b/databases/sdbm/patches/patch-ac index ec164d8e561..8dfb027e648 100644 --- a/databases/sdbm/patches/patch-ac +++ b/databases/sdbm/patches/patch-ac @@ -1,13 +1,18 @@ -$NetBSD: patch-ac,v 1.1 2000/09/26 03:47:10 hubertf Exp $ +$NetBSD: patch-ac,v 1.2 2008/08/12 13:11:30 agc Exp $ --- tune.h.orig Mon Sep 25 23:22:26 2000 +++ tune.h -@@ -10,7 +10,7 @@ +@@ -6,11 +6,10 @@ + + #define BYTESIZ 8 + +-#ifdef SVID #include <unistd.h> - #endif +-#endif ++#include <string.h> -#ifdef BSD42 -+#if defined(BSD42) && !defined(__NetBSD__) ++#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) diff --git a/databases/sdbm/patches/patch-ad b/databases/sdbm/patches/patch-ad index e1834f1bfe6..ef03eba9d9d 100644 --- a/databases/sdbm/patches/patch-ad +++ b/databases/sdbm/patches/patch-ad @@ -1,20 +1,24 @@ -$NetBSD: patch-ad,v 1.1 2000/09/26 03:47:10 hubertf Exp $ +$NetBSD: patch-ad,v 1.2 2008/08/12 13:11:30 agc Exp $ --- util.c.orig Mon Sep 25 23:25:31 2000 +++ util.c -@@ -1,4 +1,7 @@ +@@ -1,4 +1,11 @@ ++#include <sys/types.h> ++#include <sys/param.h> ++ #include <stdio.h> -+#ifdef __NetBSD__ ++#include <stdlib.h> ++#if defined(BSD) && BSD >= 199506 +#include <errno.h> +#endif #ifdef SDBM #include "sdbm.h" #else -@@ -10,8 +13,10 @@ +@@ -10,8 +17,10 @@ register char *s1; register char *s2; { -+#ifndef __NetBSD__ ++#if !(defined(BSD) && BSD >= 199506) extern int errno, sys_nerr; extern char *sys_errlist[]; +#endif diff --git a/databases/sdbm/patches/patch-af b/databases/sdbm/patches/patch-af index b533be6dcf3..be192060094 100644 --- a/databases/sdbm/patches/patch-af +++ b/databases/sdbm/patches/patch-af @@ -1,23 +1,27 @@ -$NetBSD: patch-af,v 1.1 2000/09/26 03:47:11 hubertf Exp $ +$NetBSD: patch-af,v 1.2 2008/08/12 13:11:30 agc Exp $ --- dbe.c.orig Mon Sep 25 23:28:28 2000 +++ dbe.c -@@ -1,4 +1,6 @@ +@@ -1,4 +1,10 @@ ++#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 <ndbm.h> -@@ -51,6 +53,7 @@ +@@ -51,6 +57,7 @@ #define index strchr #endif -+#ifndef __NetBSD__ ++#if !(defined(BSD) && BSD >= 199506) char getopt(argc, argv, optstring) int argc; -@@ -128,6 +131,7 @@ +@@ -128,23 +135,26 @@ } return c; } @@ -25,3 +29,74 @@ $NetBSD: patch-af,v 1.1 2000/09/26 03:47:11 hubertf Exp $ 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 @@ + *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 @@ + 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 @@ + 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 @@ + 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 @@ + } + key = dbm_nextkey(db); + } ++ regfree(&r); + break; + + case FETCH: diff --git a/databases/sdbm/patches/patch-ag b/databases/sdbm/patches/patch-ag deleted file mode 100644 index 10477b8b9cc..00000000000 --- a/databases/sdbm/patches/patch-ag +++ /dev/null @@ -1,8 +0,0 @@ -$NetBSD: patch-ag,v 1.1 2000/10/01 11:45:42 rh Exp $ - ---- /dev/null Sun Oct 1 13:42:37 2000 -+++ shlib_version -@@ -0,0 +1,3 @@ -+#!/bin/sh -+major=1 -+minor=0 diff --git a/databases/sdbm/patches/patch-ai b/databases/sdbm/patches/patch-ai new file mode 100644 index 00000000000..6dee4fa53b5 --- /dev/null +++ b/databases/sdbm/patches/patch-ai @@ -0,0 +1,11 @@ +--- dbd.c 2008/08/12 12:19:22 1.1 ++++ dbd.c 2008/08/12 12:19:53 +@@ -3,6 +3,8 @@ + */ + + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <sys/file.h> + #include "sdbm.h" + |