pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat libnbcompat-20080922:
details: https://anonhg.NetBSD.org/pkgsrc/rev/dec3bdc75f6e
branches: trunk
changeset: 547981:dec3bdc75f6e
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Oct 06 12:36:19 2008 +0000
description:
libnbcompat-20080922:
- DESTDIR support
- Add check for inttypes.h and sys/socket.h
- Provide compatibility fallback for netdb.h and the RFC2553 API
(getaddrinfo), supoprting IPv4 only. Code from OpenSSH.
- Use normal autoconf checks for fixed size bit types. Stop using the
older BSD types (u_intXX_t) in libnbcompat.
- Add implementation of shquote (from NetBSD).
- Fix a buglet in the getenv/setenv/unsetenv detection.
- Fix a buglet in the mkdtemp/mkstemp detection.
diffstat:
pkgtools/libnbcompat/Makefile | 10 +-
pkgtools/libnbcompat/PLIST | 4 +-
pkgtools/libnbcompat/files/Makefile.in | 33 +-
pkgtools/libnbcompat/files/bits.c | 196 -
pkgtools/libnbcompat/files/configure | 3140 ++++++++++------------
pkgtools/libnbcompat/files/configure.ac | 60 +-
pkgtools/libnbcompat/files/getaddrinfo.c | 235 +
pkgtools/libnbcompat/files/md5c.c | 6 +-
pkgtools/libnbcompat/files/mdXhl.c | 4 +-
pkgtools/libnbcompat/files/nbcompat.h | 3 +-
pkgtools/libnbcompat/files/nbcompat/config.h.in | 116 +-
pkgtools/libnbcompat/files/nbcompat/fts.h | 4 +-
pkgtools/libnbcompat/files/nbcompat/md5.h | 18 +-
pkgtools/libnbcompat/files/nbcompat/netdb.h | 187 +
pkgtools/libnbcompat/files/nbcompat/rmd160.h | 12 +-
pkgtools/libnbcompat/files/nbcompat/sha1.h | 20 +-
pkgtools/libnbcompat/files/nbcompat/sha2.h | 18 +-
pkgtools/libnbcompat/files/nbcompat/stdlib.h | 6 +-
pkgtools/libnbcompat/files/private/regex2.h | 12 +-
pkgtools/libnbcompat/files/rmd160.c | 34 +-
pkgtools/libnbcompat/files/rmd160hl.c | 6 +-
pkgtools/libnbcompat/files/sha1.c | 22 +-
pkgtools/libnbcompat/files/sha1hl.c | 6 +-
pkgtools/libnbcompat/files/shquote.c | 181 +
pkgtools/libnbcompat/files/vis.c | 8 +-
25 files changed, 2266 insertions(+), 2075 deletions(-)
diffs (truncated from 4958 to 300 lines):
diff -r 67ec77306091 -r dec3bdc75f6e pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile Mon Oct 06 11:22:09 2008 +0000
+++ b/pkgtools/libnbcompat/Makefile Mon Oct 06 12:36:19 2008 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.63 2008/09/08 20:20:22 joerg Exp $
+# $NetBSD: Makefile,v 1.64 2008/10/06 12:36:19 joerg Exp $
#
# NOTE: If you update this package, it is *mandatory* that you update
# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
# list of tested and supported platforms.
#
-DISTNAME= libnbcompat-20080908
+DISTNAME= libnbcompat-20080922
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
@@ -14,12 +14,10 @@
HOMEPAGE= http://www.NetBSD.org/
COMMENT= Portable NetBSD compatibility library
-NO_PKGTOOLS_REQD_CHECK= yes
-NO_CHECKSUM= yes
-NO_MTREE= yes
+PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
-MAKE_ENV+= BINMODE=${BINMODE}
+MAKE_ENV+= LIBMODE=${LIBMODE}
do-extract:
@${CP} -R ${FILESDIR} ${WRKSRC}
diff -r 67ec77306091 -r dec3bdc75f6e pkgtools/libnbcompat/PLIST
--- a/pkgtools/libnbcompat/PLIST Mon Oct 06 11:22:09 2008 +0000
+++ b/pkgtools/libnbcompat/PLIST Mon Oct 06 12:36:19 2008 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.14 2007/05/07 16:38:47 joerg Exp $
+@comment $NetBSD: PLIST,v 1.15 2008/10/06 12:36:19 joerg Exp $
include/nbcompat.h
include/nbcompat/assert.h
include/nbcompat/cdefs.h
@@ -14,7 +14,7 @@
include/nbcompat/limits.h
include/nbcompat/md5.h
include/nbcompat/nbconfig.h
-include/nbcompat/nbtypes.h
+include/nbcompat/netdb.h
include/nbcompat/param.h
include/nbcompat/paths.h
include/nbcompat/poll.h
diff -r 67ec77306091 -r dec3bdc75f6e pkgtools/libnbcompat/files/Makefile.in
--- a/pkgtools/libnbcompat/files/Makefile.in Mon Oct 06 11:22:09 2008 +0000
+++ b/pkgtools/libnbcompat/files/Makefile.in Mon Oct 06 12:36:19 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.33 2007/05/07 16:38:47 joerg Exp $
+# $NetBSD: Makefile.in,v 1.34 2008/10/06 12:36:19 joerg Exp $
#
srcdir= @srcdir@
@@ -12,7 +12,7 @@
CPPFLAGS= @CPPFLAGS@
DEFS= @DEFS@
INSTALL= @INSTALL@
-BINMODE?= 555
+LIBMODE?= 644
LDFLAGS= @LDFLAGS@
AWK= @AWK@
@@ -36,7 +36,7 @@
nbcompat/limits.h \
nbcompat/md5.h \
nbcompat/nbconfig.h \
- nbcompat/nbtypes.h \
+ nbcompat/netdb.h \
nbcompat/param.h \
nbcompat/paths.h \
nbcompat/poll.h \
@@ -64,9 +64,9 @@
LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
COMPILE= $(CC) $(CPPFLAGS) $(CFLAGS)
-all: nbcompat/nbtypes.h nbcompat/nbconfig.h $(LIB)
+all: nbcompat/nbconfig.h $(LIB)
-.c.o: nbcompat/nbtypes.h
+.c.o:
$(COMPILE) $(DEFS) -c $<
$(LIB): $(OBJS)
@@ -76,26 +76,19 @@
nbcompat/nbconfig.h: nbcompat/config.h nbcompat.awk
$(AWK) -f nbcompat.awk nbcompat/config.h > $@
-nbcompat/nbtypes.h: bits
- ./bits $@
-
-bits: bits.c
- $(COMPILE) $(DEFS) -c bits.c
- $(LINK) bits.o
-
install:
- $(INSTALL) -m 755 -d $(prefix)/lib
- $(INSTALL) -m $(BINMODE) ${LIB} $(prefix)/lib
- $(RANLIB) $(prefix)/lib/$(LIB)
- $(INSTALL) -m 755 -d $(prefix)/include
- $(INSTALL) -m 755 -d $(prefix)/include/nbcompat
+ $(INSTALL) -m 755 -d ${DESTDIR}$(prefix)/lib
+ $(INSTALL) -m $(LIBMODE) ${LIB} ${DESTDIR}$(prefix)/lib
+ $(RANLIB) ${DESTDIR}$(prefix)/lib/$(LIB)
+ $(INSTALL) -m 755 -d ${DESTDIR}$(prefix)/include
+ $(INSTALL) -m 755 -d ${DESTDIR}$(prefix)/include/nbcompat
@for file in $(INCS); do \
- echo "$(INSTALL) -m 444 $$file $(prefix)/include/$$file"; \
- $(INSTALL) -m 444 $$file $(prefix)/include/$$file; \
+ echo "$(INSTALL) -m 444 $$file ${DESTDIR}$(prefix)/include/$$file"; \
+ $(INSTALL) -m 444 $$file ${DESTDIR}$(prefix)/include/$$file; \
done
clean:
- rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.h
+ rm -f *.a *.o bits nbcompat/nbcompat.h
distclean: clean
rm -f Makefile config.log config.status configure.lineno
diff -r 67ec77306091 -r dec3bdc75f6e pkgtools/libnbcompat/files/bits.c
--- a/pkgtools/libnbcompat/files/bits.c Mon Oct 06 11:22:09 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/* $NetBSD: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $ */
-
-/*
- * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "nbcompat/config.h"
-#if 0
-__RCSID("$NetBSD: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $");
-#endif
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define BITSIZE(TYPE) \
-{ \
- int b = 0; TYPE x = 1, zero = 0; char *pre = "u"; \
- char tmp[128], tmp2[128]; \
- while(x){ x <<= 1; b++; if(x < zero) pre=""; } \
- if(b >= len){ \
- int tabs; \
- sprintf(tmp, "%sint%d_t" , pre, len); \
- sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
- fprintf(f, "#undef %s\n", tmp); \
- tabs = 5 - strlen(tmp2) / 8; \
- fprintf(f, "%s", tmp2); \
- while(tabs-- > 0) fprintf(f, "\t"); \
- fprintf(f, "/* %2d bits */\n", b); \
- return; \
- } \
-}
-
-/*
- * work around rpl_malloc from nbcompat_config.h, since we don't need the
- * replacement malloc() here
- */
-#if ! HAVE_MALLOC
-#undef malloc
-void *malloc();
-#endif
-
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
-static void
-try_signed(FILE *f, int len) __attribute__ ((unused));
-
-static void
-try_unsigned(FILE *f, int len) __attribute__ ((unused));
-
-static int
-print_bt(FILE *f, int flag) __attribute__ ((unused));
-
-static void
-try_signed(FILE *f, int len)
-{
- BITSIZE(signed char);
- BITSIZE(short);
- BITSIZE(int);
- BITSIZE(long);
-#if HAVE_LONG_LONG
- BITSIZE(long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-static void
-try_unsigned(FILE *f, int len)
-{
- BITSIZE(unsigned char);
- BITSIZE(unsigned short);
- BITSIZE(unsigned int);
- BITSIZE(unsigned long);
-#if HAVE_LONG_LONG
- BITSIZE(unsigned long long);
-#endif
- fprintf(f, "/* There is no %d bit type */\n", len);
-}
-
-int main(int argc, char **argv)
-{
- FILE *f;
- char *fn, *hb;
-
- if(argc < 2){
- fn = "bits.h";
- hb = "__BITS_H__";
- f = stdout;
- } else {
- char *p;
- fn = argv[1];
- hb = malloc(strlen(fn) + 5);
- sprintf(hb, "__%s__", fn);
- for(p = hb; *p; p++){
- if(!isalnum((unsigned char)*p))
- *p = '_';
- }
- f = fopen(argv[1], "w");
- }
- fprintf(f, "/* %s -- this file was generated by\n", fn);
- fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "",
- "$Id: bits.c,v 1.7 2007/09/04 09:47:38 obache Exp $");
- fprintf(f, "#ifndef %s\n", hb);
- fprintf(f, "#define %s\n", hb);
- fprintf(f, "\n");
-#if HAVE_SYS_TYPES_H
- fprintf(f, "#include <sys/types.h>\n");
-#endif
-#if HAVE_INTTYPES_H
- fprintf(f, "#include <inttypes.h>\n");
-#endif
-#if HAVE_SYS_BITYPES_H
- fprintf(f, "#include <sys/bitypes.h>\n");
-#endif
-#if HAVE_BIND_BITYPES_H
- fprintf(f, "#include <bind/bitypes.h>\n");
-#endif
-#if HAVE_NETINET_IN6_MACHTYPES_H
- fprintf(f, "#include <netinet/in6_machtypes.h>\n");
-#endif
- fprintf(f, "\n");
-
-#ifndef HAVE_INT8_T
- try_signed (f, 8);
-#endif /* HAVE_INT8_T */
-#ifndef HAVE_INT16_T
- try_signed (f, 16);
-#endif /* HAVE_INT16_T */
-#ifndef HAVE_INT32_T
- try_signed (f, 32);
-#endif /* HAVE_INT32_T */
-#ifndef HAVE_INT64_T
- try_signed (f, 64);
-#endif /* HAVE_INT64_T */
-
-#ifndef HAVE_UINT8_T
- try_unsigned (f, 8);
-#endif /* HAVE_UINT8_T */
-#ifndef HAVE_UINT16_T
- try_unsigned (f, 16);
-#endif /* HAVE_UINT16_T */
Home |
Main Index |
Thread Index |
Old Index