From 0b3192eed561dbeb2a52d52f325d7a473f2e6f63 Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 16 Sep 2012 03:21:47 +0000 Subject: Deploy a gross hack to make this buildable on -current and maybe -6. XXX: This should be reverted and done a different way, or maybe not at all; XXX: this package should probably be reviewed for soundness. --- security/bitstir/distinfo | 4 +++- security/bitstir/patches/patch-Makefile | 21 +++++++++++++++++++++ security/bitstir/patches/patch-bitstir_c | 20 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 security/bitstir/patches/patch-Makefile create mode 100644 security/bitstir/patches/patch-bitstir_c (limited to 'security/bitstir') diff --git a/security/bitstir/distinfo b/security/bitstir/distinfo index 774037a035d..81902a00c8d 100644 --- a/security/bitstir/distinfo +++ b/security/bitstir/distinfo @@ -1,5 +1,7 @@ -$NetBSD: distinfo,v 1.3 2006/11/09 11:08:01 rillig Exp $ +$NetBSD: distinfo,v 1.4 2012/09/16 03:21:47 dholland Exp $ SHA1 (bitstir-0.2.tar.gz) = 867fc2b28805a71ca2f1e3e3337b3c906951e121 RMD160 (bitstir-0.2.tar.gz) = a34412882c2685acd4b6613fbfe8a6c9fa9ebcf1 Size (bitstir-0.2.tar.gz) = 6423 bytes +SHA1 (patch-Makefile) = 4f7eea72ed245c3c67eb48de0c6724622a3c564b +SHA1 (patch-bitstir_c) = 4af243a87acd713161797386f8a3b39f259e5037 diff --git a/security/bitstir/patches/patch-Makefile b/security/bitstir/patches/patch-Makefile new file mode 100644 index 00000000000..676596cbbdc --- /dev/null +++ b/security/bitstir/patches/patch-Makefile @@ -0,0 +1,21 @@ +$NetBSD: patch-Makefile,v 1.1 2012/09/16 03:21:47 dholland Exp $ + +Deploy a gross hack to make RND_POOLBITS available on recent NetBSD. + +--- Makefile~ 2003-08-27 20:58:51.000000000 +0000 ++++ Makefile +@@ -14,9 +14,13 @@ all: bits-avail bitstir + bits-avail: bits-avail.c + $(CC) $(CFLAGS) -DFIND=$(FIND) -o bits-avail bits-avail.c + +-bitstir: bitstir.c ++bitstir: bitstir.c hack.h + $(CC) $(CFLAGS) -DFIND=$(FIND) -o bitstir bitstir.c + ++hack.h: ++ grep RND_POOLWORDS /usr/include/sys/rnd.h | grep define > hack.h ++ grep RND_POOLBITS /usr/include/sys/rnd.h | grep define >> hack.h ++ + install: .PHONY + install -c -o root -g wheel bitstir $(INSTALLDIR) + install -c -o root -g wheel bits-avail $(INSTALLDIR) diff --git a/security/bitstir/patches/patch-bitstir_c b/security/bitstir/patches/patch-bitstir_c new file mode 100644 index 00000000000..3952aba47c3 --- /dev/null +++ b/security/bitstir/patches/patch-bitstir_c @@ -0,0 +1,20 @@ +$NetBSD: patch-bitstir_c,v 1.1 2012/09/16 03:21:47 dholland Exp $ + +Deploy a gross hack to make RND_POOLBITS available on recent NetBSD. + +--- bitstir.c~ 2003-08-27 20:58:51.000000000 +0000 ++++ bitstir.c +@@ -41,6 +41,13 @@ + #include + #include + ++/* Ugh. Use this only if required and only if appropriate. */ ++#ifdef __NetBSD__ ++#ifndef RND_POOLBITS ++#include "hack.h" ++#endif ++#endif ++ + const char gRequiredOS[] = "NetBSD"; + const char gRandomDevice[] = "/dev/random"; + const long gMaxEntropy = RND_POOLBITS; -- cgit v1.2.3