pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/ucspi-tools Provide a dprintf() implementation for...
details: https://anonhg.NetBSD.org/pkgsrc/rev/35f8f6cb10da
branches: trunk
changeset: 442633:35f8f6cb10da
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Fri Nov 27 11:34:16 2020 +0000
description:
Provide a dprintf() implementation for portability, and use it
unconditionally. Ride recent bump.
diffstat:
net/ucspi-tools/Makefile | 4 ++--
net/ucspi-tools/distinfo | 8 ++++++--
net/ucspi-tools/patches/patch-Makefile | 25 ++++++++++++++++++++++---
net/ucspi-tools/patches/patch-fdprintf.c | 21 +++++++++++++++++++++
net/ucspi-tools/patches/patch-fdprintf.h | 13 +++++++++++++
net/ucspi-tools/patches/patch-httpc.c | 14 ++++++++++++++
net/ucspi-tools/patches/patch-httppc.c | 14 ++++++++++++++
7 files changed, 92 insertions(+), 7 deletions(-)
diffs (158 lines):
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/Makefile
--- a/net/ucspi-tools/Makefile Fri Nov 27 10:41:36 2020 +0000
+++ b/net/ucspi-tools/Makefile Fri Nov 27 11:34:16 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2020/11/27 10:25:40 schmonz Exp $
+# $NetBSD: Makefile,v 1.3 2020/11/27 11:34:16 schmonz Exp $
DISTNAME= ucspi-tools-1.6
-PKGREVISION= 1
CATEGORIES= net security
MASTER_SITES= ${MASTER_SITE_GITHUB:=younix/}
GITHUB_PROJECT= ucspi
@@ -13,6 +12,7 @@
LICENSE= isc
USE_TOOLS+= gmake pkg-config
+MAKE_FILE= GNUmakefile
WRKSRC= ${WRKDIR}/ucspi-${GITHUB_TAG}
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/distinfo
--- a/net/ucspi-tools/distinfo Fri Nov 27 10:41:36 2020 +0000
+++ b/net/ucspi-tools/distinfo Fri Nov 27 11:34:16 2020 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.1 2020/11/26 15:52:58 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2020/11/27 11:34:16 schmonz Exp $
SHA1 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 9c090e9105e9211e89b033b11a804999c1de06c1
RMD160 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 634ff34878c201bb9d8d72dca5ff544c717beb83
SHA512 (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) =
f9d241dc63b2c8aa3f1b51a8c9f85c9408e6f888e1d02a7504c8654eb8fa2161842319683325c0a0f74c4ca0247584dd293aa07ffbcb1e4b81c02c63058c6dec
Size (ucspi-tools-1.6-1aa21e6bd85ec45a6bce9b570548b6f4a5b1a9ed.tar.gz) = 21718 bytes
-SHA1 (patch-Makefile) = 229b9bf944ce88432c63e202c7c5f5898dd13a72
+SHA1 (patch-Makefile) = fafc8e55a6f4a7fbe52ee027564b557c256777ec
+SHA1 (patch-fdprintf.c) = 66a4912bd6224ada3f63c0f10297bcecec74d950
+SHA1 (patch-fdprintf.h) = 68d57e66c0ce75bd0a9cdec9c5135474ff7b4cfe
+SHA1 (patch-httpc.c) = 72bb2f8e3f287bacd280e890f01c8c73fca7b24e
+SHA1 (patch-httppc.c) = 4c2c36a8b7ad4755aba2be2aaea0c9e4c045aa45
SHA1 (patch-tlsc.c) = 3ae01739e614b2b8008e7bc4d5b01130edec2ff9
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/patches/patch-Makefile
--- a/net/ucspi-tools/patches/patch-Makefile Fri Nov 27 10:41:36 2020 +0000
+++ b/net/ucspi-tools/patches/patch-Makefile Fri Nov 27 11:34:16 2020 +0000
@@ -1,12 +1,15 @@
-$NetBSD: patch-Makefile,v 1.1 2020/11/26 15:52:58 schmonz Exp $
+$NetBSD: patch-Makefile,v 1.2 2020/11/27 11:34:17 schmonz Exp $
-Make sure libressl headers get found.
+Make sure openssl headers get found.
+Not all systems have dprintf(); use ours for portability.
--- Makefile.orig 2016-09-21 22:05:29.000000000 +0000
+++ Makefile
-@@ -6,7 +6,8 @@ TARBALL := ${DISTNAME}.tar.gz
+@@ -5,8 +5,10 @@ TARBALL := ${DISTNAME}.tar.gz
+
DEFINES += -D_XOPEN_SOURCE=700
DEFINES += -D_BSD_SOURCE
++DEFINES += -Ddprintf=fdprintf
CFLAGS_SSL=`pkg-config --cflags libssl`
-LIBS_TLS ?= -ltls `pkg-config --libs libssl`
+CFLAGS += $(CFLAGS_SSL)
@@ -14,3 +17,19 @@
LIBS_SSL = `pkg-config --libs libssl openssl`
.PHONY: all test clean install
+@@ -25,11 +27,11 @@ socks: socks.o
+ httpc.o: http_parser.h
+ http_parser.o: http_parser.h
+
+-httpc: httpc.o http_parser.o
+- $(CC) -o $@ httpc.o http_parser.o
++httpc: httpc.o http_parser.o fdprintf.o
++ $(CC) -o $@ httpc.o http_parser.o fdprintf.o
+
+-httppc: httppc.o http_parser.o
+- $(CC) -o $@ httppc.o http_parser.o
++httppc: httppc.o http_parser.o fdprintf.o
++ $(CC) -o $@ httppc.o http_parser.o fdprintf.o
+
+ # SSL/TLS
+ tlsc: tlsc.o
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/patches/patch-fdprintf.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ucspi-tools/patches/patch-fdprintf.c Fri Nov 27 11:34:16 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-fdprintf.c,v 1.1 2020/11/27 11:34:17 schmonz Exp $
+
+Not all systems have dprintf().
+
+--- fdprintf.c.orig 2020-11-27 10:59:35.151164978 +0000
++++ fdprintf.c
+@@ -0,0 +1,14 @@
++#include <stdarg.h>
++#include <stdio.h>
++
++int fdprintf(int fd, const char *fmt, ...) {
++ va_list ap;
++ FILE *f = fdopen(fd, "w");
++ int rc;
++
++ va_start(ap, fmt);
++ rc = vfprintf(f, fmt, ap);
++ fclose(f);
++ va_end(ap);
++ return rc;
++}
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/patches/patch-fdprintf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ucspi-tools/patches/patch-fdprintf.h Fri Nov 27 11:34:16 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-fdprintf.h,v 1.1 2020/11/27 11:34:17 schmonz Exp $
+
+Not all systems have dprintf().
+
+--- fdprintf.h.orig 2020-11-27 11:04:59.176728537 +0000
++++ fdprintf.h
+@@ -0,0 +1,6 @@
++#ifndef FDPRINTF_H
++#define FDPRINTF_H
++
++int fdprintf(int, const char *, ...);
++
++#endif
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/patches/patch-httpc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ucspi-tools/patches/patch-httpc.c Fri Nov 27 11:34:16 2020 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-httpc.c,v 1.1 2020/11/27 11:34:17 schmonz Exp $
+
+Use our dprintf() for portability.
+
+--- httpc.c.orig 2016-09-21 22:05:29.000000000 +0000
++++ httpc.c
+@@ -24,6 +24,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
++#include "fdprintf.h"
+ #include "http_parser.h"
+
+ #define READ_FD 6
diff -r b80b05ca1f99 -r 35f8f6cb10da net/ucspi-tools/patches/patch-httppc.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/ucspi-tools/patches/patch-httppc.c Fri Nov 27 11:34:16 2020 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-httppc.c,v 1.1 2020/11/27 11:34:17 schmonz Exp $
+
+Use our dprintf() for portability.
+
+--- httppc.c.orig 2016-09-21 22:05:29.000000000 +0000
++++ httppc.c
+@@ -21,6 +21,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
++#include "fdprintf.h"
+ #include "http_parser.h"
+
+ #define READ_FD 6
Home |
Main Index |
Thread Index |
Old Index