pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat Bump version to 20030823:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e8f728044759
branches:  trunk
changeset: 460594:e8f728044759
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Sep 01 15:31:14 2003 +0000

description:
Bump version to 20030823:

* Add mkdtemp, TAILQ_*, and statfs.

* Install a nbconfig.h file containing the discovered system information
  and include it directly in nbcompat.h.  Make all files use nbconfig.h
  instead of config.h.  Ensure that all installed headers don't include
  any local header files.  This makes libnbcompat more self-contained.

* Consistently use "#if HAVE_HEADER_H" instead of "#ifdef HAVE_HEADER_H"
  since sometimes people put -DHAVE_HEADER_H=0 on their command lines.

diffstat:

 pkgtools/libnbcompat/Makefile            |     4 +-
 pkgtools/libnbcompat/PLIST               |     3 +-
 pkgtools/libnbcompat/buildlink2.mk       |     7 +-
 pkgtools/libnbcompat/files/Makefile.in   |    95 +-
 pkgtools/libnbcompat/files/__fts13.c     |    16 +-
 pkgtools/libnbcompat/files/bits.c        |    22 +-
 pkgtools/libnbcompat/files/config.h.in   |   537 ---------------
 pkgtools/libnbcompat/files/configure     |  1058 +++++++++++++++--------------
 pkgtools/libnbcompat/files/configure.ac  |   116 +-
 pkgtools/libnbcompat/files/extern.h      |    20 +-
 pkgtools/libnbcompat/files/getopt.h      |    10 +-
 pkgtools/libnbcompat/files/getopt_long.c |    12 +-
 pkgtools/libnbcompat/files/md5c.c        |     6 +-
 pkgtools/libnbcompat/files/md5hl.c       |    14 +-
 pkgtools/libnbcompat/files/mkdtemp.c     |   121 +++
 pkgtools/libnbcompat/files/namespace.h   |     8 +-
 pkgtools/libnbcompat/files/nbcompat.h    |    72 +-
 pkgtools/libnbcompat/files/nbconfig.h.in |   550 +++++++++++++++
 pkgtools/libnbcompat/files/pack_dev.c    |    12 +-
 pkgtools/libnbcompat/files/pwcache.c     |    14 +-
 pkgtools/libnbcompat/files/rmd160.c      |     8 +-
 pkgtools/libnbcompat/files/rmd160hl.c    |    14 +-
 pkgtools/libnbcompat/files/setenv.c      |    10 +-
 pkgtools/libnbcompat/files/setmode.c     |    10 +-
 pkgtools/libnbcompat/files/sha1.c        |     6 +-
 pkgtools/libnbcompat/files/sha1hl.c      |    14 +-
 pkgtools/libnbcompat/files/sha2.c        |     4 +-
 pkgtools/libnbcompat/files/sha2hl.c      |    12 +-
 pkgtools/libnbcompat/files/spec.c        |     6 +-
 pkgtools/libnbcompat/files/stat_flags.c  |    14 +-
 pkgtools/libnbcompat/files/statfs.c      |   185 +++++
 pkgtools/libnbcompat/files/strmode.c     |    12 +-
 pkgtools/libnbcompat/files/unvis.c       |     8 +-
 pkgtools/libnbcompat/files/util.h        |    14 +-
 pkgtools/libnbcompat/files/vis.c         |    12 +-
 35 files changed, 1726 insertions(+), 1300 deletions(-)

diffs (truncated from 4165 to 300 lines):

diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile     Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/Makefile     Mon Sep 01 15:31:14 2003 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2003/08/31 12:02:56 jlam Exp $
+# $NetBSD: Makefile,v 1.13 2003/09/01 15:31:14 jlam Exp $
 #
 
-DISTNAME=              libnbcompat-20030731
+DISTNAME=              libnbcompat-20030823
 CATEGORIES=            pkgtools
 MASTER_SITES=          # empty
 DISTFILES=             # empty
diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/PLIST
--- a/pkgtools/libnbcompat/PLIST        Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/PLIST        Mon Sep 01 15:31:14 2003 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2003/08/31 12:02:56 jlam Exp $
+@comment $NetBSD: PLIST,v 1.5 2003/09/01 15:31:14 jlam Exp $
 include/libnbcompat/extern.h
 include/libnbcompat/err.h
 include/libnbcompat/ftpglob.h
@@ -8,6 +8,7 @@
 include/libnbcompat/mtree.h
 include/libnbcompat/namespace.h
 include/libnbcompat/nbcompat.h
+include/libnbcompat/nbconfig.h
 include/libnbcompat/nbtypes.h
 include/libnbcompat/pack_dev.h
 include/libnbcompat/pwcache.h
diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/buildlink2.mk
--- a/pkgtools/libnbcompat/buildlink2.mk        Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/buildlink2.mk        Mon Sep 01 15:31:14 2003 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: buildlink2.mk,v 1.5 2003/08/31 20:22:09 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.6 2003/09/01 15:31:14 jlam Exp $
 
 .if !defined(LIBNBCOMPAT_BUILDLINK2_MK)
 LIBNBCOMPAT_BUILDLINK2_MK=     # defined
 
-BUILDLINK_DEPENDS.libnbcompat?=                libnbcompat>=20030331
+BUILDLINK_DEPENDS.libnbcompat?=                libnbcompat>=20030823
 BUILDLINK_PKGSRCDIR.libnbcompat?=      ../../pkgtools/libnbcompat
 BUILDLINK_DEPMETHOD.libnbcompat?=      build
 
@@ -14,6 +14,9 @@
 BUILDLINK_FILES.libnbcompat+=  include/libnbcompat/*
 BUILDLINK_FILES.libnbcompat+=  lib/libnbcompat.*
 
+BUILDLINK_CPPFLAGS.libnbcompat=        \
+       -I${BUILDLINK_PREFIX.libnbcompat}/include/libnbcompat
+
 BUILDLINK_TARGETS+=    libnbcompat-buildlink
 
 libnbcompat-buildlink: _BUILDLINK_USE
diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/files/Makefile.in
--- a/pkgtools/libnbcompat/files/Makefile.in    Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/files/Makefile.in    Mon Sep 01 15:31:14 2003 +0000
@@ -1,41 +1,65 @@
-# $NetBSD: Makefile.in,v 1.8 2003/07/31 22:40:27 jschauma Exp $
+# $NetBSD: Makefile.in,v 1.9 2003/09/01 15:31:15 jlam Exp $
 #
 
-srcdir = @srcdir@
-prefix = @prefix@
-VPATH  = @srcdir@
-SHELL  = /bin/sh
+srcdir=                @srcdir@
+prefix=        @prefix@
+VPATH=         @srcdir@
+SHELL=         /bin/sh
 
-CC     = @CC@
-CFLAGS = -I${srcdir} -I. @INCLUDES@ @CFLAGS@
-CPPFLAGS= @CPPFLAGS@
-DEFS   = @DEFS@
-INSTALL        = @INSTALL@
-LDFLAGS        = @LDFLAGS@
+CC=            @CC@
+CFLAGS=                -I${srcdir} -I. @INCLUDES@ @CFLAGS@
+CPPFLAGS=      @CPPFLAGS@
+DEFS=          @DEFS@
+INSTALL=       @INSTALL@
+LDFLAGS=       @LDFLAGS@
+
+AWK=           @AWK@
+AR=            @AR@
+RANLIB=                @RANLIB@
 
-AR     = @AR@
-RANLIB = @RANLIB@
+LIB=           libnbcompat.a
 
-LIB    = libnbcompat.a
+INCS=          extern.h err.h ftpglob.h fts.h getopt.h md5.h mtree.h \
+               namespace.h nbcompat.h nbtypes.h pack_dev.h pwcache.h \
+               rmd160.h sha1.h sha2.h stat_flags.h util.h vis.h
 
-OBJS   = @LIBOBJS@ \
-       md5c.o md5hl.o rmd160.o rmd160hl.o sha1.o sha1hl.o \
-       sha2.o sha2hl.o unvis.o vis.o setmode.o __fts13.o \
-       getid.o misc.o pack_dev.o spec.o setmode.o stat_flags.o \
-       pwcache.o getopt_long.o
+OBJS=          @LIBOBJS@ \
+               md5c.o md5hl.o rmd160.o rmd160hl.o sha1.o sha1hl.o \
+               sha2.o sha2hl.o unvis.o vis.o setmode.o __fts13.o \
+               getid.o misc.o pack_dev.o spec.o setmode.o stat_flags.o \
+               pwcache.o getopt_long.o
 
-LINK=   = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
-COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
+LINK=          $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+COMPILE=       $(CC) $(CPPFLAGS) $(CFLAGS)
 
-all: nbtypes.h ${LIB}
+.PHONY: all install clean distclean
+
+all: nbtypes.h nbconfig.hi ${LIB}
 
 .c.o: nbtypes.h
-       $(COMPILE) $(DEFS) -c $< -o $@
+       $(COMPILE) $(DEFS) -c $<
 
 ${LIB}: ${OBJS}
        ${AR} cr $@ ${OBJS}
        ${RANLIB} $@
 
+nbconfig.hi: nbconfig.h
+       ${AWK} '                                                        \
+               BEGIN { process = 1 }                                   \
+               /NBCOMPAT template section follows\./ { process = 0 }   \
+               /^\#[   ]*define[       ]+PACKAGE_.*/ { next }          \
+               /^\#[   ]*define[       ]+/ {                           \
+                       if (process == 1) {                             \
+                               guard = gensub("[       ]+.*", "", "1", gensub("^\#[    ]*define[       ]+", "", "1")); \
+                               print "\#ifndef " guard;                \
+                               print $$0;                              \
+                               print "\#endif";                        \
+                               next;                                   \
+                       }                                               \
+               }                                                       \
+               { print }                                               \
+       ' nbconfig.h > $@
+
 nbtypes.h: bits
        ./bits nbtypes.h
 
@@ -46,28 +70,15 @@
        ${INSTALL} -m 555 ${LIB} ${prefix}/lib
        ${RANLIB} ${prefix}/lib/${LIB}
        ${INSTALL} -m 755 -d ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 extern.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 err.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 ftpglob.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 fts.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 getopt.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 md5.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 mtree.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 namespace.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 nbcompat.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 nbtypes.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 pack_dev.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 pwcache.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 rmd160.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 sha1.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 sha2.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 stat_flags.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 util.h ${prefix}/include/libnbcompat
-       ${INSTALL} -m 444 vis.h ${prefix}/include/libnbcompat
+       @for file in ${INCS}; do \
+               echo "${INSTALL} -m 444 $$file ${prefix}/include/libnbcompat/$$file"; \
+               ${INSTALL} -m 444 $$file ${prefix}/include/libnbcompat/$$file; \
+       done
+       ${INSTALL} -m 444 nbconfig.hi ${prefix}/include/libnbcompat/nbconfig.h
 
 clean:
        rm -f *.a *.o bits nbtypes.h
 
 distclean: clean
-       rm -f Makefile config.h config.log config.status configure.lineno
+       rm -f Makefile config.log config.status configure.lineno nbconfig.h
 
diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/files/__fts13.c
--- a/pkgtools/libnbcompat/files/__fts13.c      Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/files/__fts13.c      Mon Sep 01 15:31:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: __fts13.c,v 1.2 2003/08/27 12:25:40 jmmv Exp $ */
+/*     $NetBSD: __fts13.c,v 1.3 2003/09/01 15:31:15 jlam Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -29,7 +29,9 @@
  * SUCH DAMAGE.
  */
 
-#include "config.h"
+#if HAVE_CONFIG_H
+#include "nbconfig.h"
+#endif
 
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
@@ -39,28 +41,28 @@
 #if 0
 static char sccsid[] = "@(#)fts.c      8.6 (Berkeley) 8/14/94";
 #else
-__RCSID("$NetBSD: __fts13.c,v 1.2 2003/08/27 12:25:40 jmmv Exp $");
+__RCSID("$NetBSD: __fts13.c,v 1.3 2003/09/01 15:31:15 jlam Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #include <sys/stat.h>
 
-#ifdef HAVE_ASSERT_H
+#if HAVE_ASSERT_H
 #include <assert.h>
 #endif
 
-#ifdef HAVE_DIRENT_H
+#if HAVE_DIRENT_H
 #include <dirent.h>
 #endif
 
 #include <errno.h>
 
-#ifdef HAVE_FCNTL_H
+#if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_LIMITS_H
+#if HAVE_LIMITS_H
 #include <limits.h>
 #endif
 
diff -r 678db907ea4b -r e8f728044759 pkgtools/libnbcompat/files/bits.c
--- a/pkgtools/libnbcompat/files/bits.c Mon Sep 01 14:53:47 2003 +0000
+++ b/pkgtools/libnbcompat/files/bits.c Mon Sep 01 15:31:14 2003 +0000
@@ -31,9 +31,9 @@
  * SUCH DAMAGE. 
  */
 
-#include "config.h"
+#include "nbconfig.h"
 #if 0
-__RCSID("$Id: bits.c,v 1.2 2003/04/27 16:42:29 grant Exp $");
+__RCSID("$Id: bits.c,v 1.3 2003/09/01 15:31:15 jlam Exp $");
 #endif
 #include <stdio.h>
 #include <string.h>
@@ -58,7 +58,7 @@
 }
 
 /*
- * work around rpl_malloc from config.h, since we don't need the
+ * work around rpl_malloc from nbcompat_config.h, since we don't need the
  * replacement malloc() here
  */
 #if ! HAVE_MALLOC
@@ -86,7 +86,7 @@
     BITSIZE(short);
     BITSIZE(int);
     BITSIZE(long);
-#ifdef HAVE_LONG_LONG
+#if HAVE_LONG_LONG
     BITSIZE(long long);
 #endif
     fprintf(f, "/* There is no %d bit type */\n", len);
@@ -99,7 +99,7 @@
     BITSIZE(unsigned short);
     BITSIZE(unsigned int);
     BITSIZE(unsigned long);
-#ifdef HAVE_LONG_LONG
+#if HAVE_LONG_LONG
     BITSIZE(unsigned long long);
 #endif
     fprintf(f, "/* There is no %d bit type */\n", len);
@@ -127,23 +127,23 @@
     }
     fprintf(f, "/* %s -- this file was generated by\n", fn);
     fprintf(f, "   %*s    %s */\n\n", (int)strlen(fn), "", 
-           "$Id: bits.c,v 1.2 2003/04/27 16:42:29 grant Exp $");
+           "$Id: bits.c,v 1.3 2003/09/01 15:31:15 jlam Exp $");
     fprintf(f, "#ifndef %s\n", hb);
     fprintf(f, "#define %s\n", hb);
     fprintf(f, "\n");
-#ifdef HAVE_SYS_TYPES_H
+#if HAVE_SYS_TYPES_H
     fprintf(f, "#include <sys/types.h>\n");
 #endif
-#ifdef HAVE_INTTYPES_H
+#if HAVE_INTTYPES_H
     fprintf(f, "#include <inttypes.h>\n");
 #endif
-#ifdef HAVE_SYS_BITYPES_H
+#if HAVE_SYS_BITYPES_H
     fprintf(f, "#include <sys/bitypes.h>\n");
 #endif
-#ifdef HAVE_BIND_BITYPES_H



Home | Main Index | Thread Index | Old Index