pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/sdbm Move from BSD Makefile to libtool
details: https://anonhg.NetBSD.org/pkgsrc/rev/4f11ad8801c1
branches: trunk
changeset: 545765:4f11ad8801c1
user: agc <agc%pkgsrc.org@localhost>
date: Tue Aug 12 13:11:30 2008 +0000
description:
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:
databases/sdbm/Makefile | 15 ++----
databases/sdbm/PLIST | 13 ++---
databases/sdbm/distinfo | 13 +++--
databases/sdbm/patches/patch-ab | 86 +++++++++++++++++++++++++++++++++++-----
databases/sdbm/patches/patch-ac | 13 ++++-
databases/sdbm/patches/patch-ad | 14 ++++--
databases/sdbm/patches/patch-af | 85 ++++++++++++++++++++++++++++++++++++++--
databases/sdbm/patches/patch-ag | 8 ---
databases/sdbm/patches/patch-ai | 11 +++++
9 files changed, 202 insertions(+), 56 deletions(-)
diffs (truncated from 368 to 300 lines):
diff -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/Makefile
--- a/databases/sdbm/Makefile Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/Makefile Tue Aug 12 13:11:30 2008 +0000
@@ -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@localhost
-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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/PLIST
--- a/databases/sdbm/PLIST Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/PLIST Tue Aug 12 13:11:30 2008 +0000
@@ -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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/distinfo
--- a/databases/sdbm/distinfo Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/distinfo Tue Aug 12 13:11:30 2008 +0000
@@ -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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/patches/patch-ab
--- a/databases/sdbm/patches/patch-ab Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/patches/patch-ab Tue Aug 12 13:11:30 2008 +0000
@@ -1,14 +1,76 @@
-$NetBSD: patch-ab,v 1.1 1999/06/30 09:46:45 agc Exp $
-
-Use a BSD-style Makefile
+$NetBSD: patch-ab,v 1.2 2008/08/12 13:11:30 agc Exp $
---- /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}
+
-+.include <bsd.lib.mk>
+ 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
++
++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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/patches/patch-ac
--- a/databases/sdbm/patches/patch-ac Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/patches/patch-ac Tue Aug 12 13:11:30 2008 +0000
@@ -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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/patches/patch-ad
--- a/databases/sdbm/patches/patch-ad Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/patches/patch-ad Tue Aug 12 13:11:30 2008 +0000
@@ -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 -r 50b1a69740ca -r 4f11ad8801c1 databases/sdbm/patches/patch-af
--- a/databases/sdbm/patches/patch-af Tue Aug 12 10:41:57 2008 +0000
+++ b/databases/sdbm/patches/patch-af Tue Aug 12 13:11:30 2008 +0000
@@ -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 @@
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) &&
Home |
Main Index |
Thread Index |
Old Index