[gentoo-commits] repo/gentoo:master commit in: app-crypt/dieharder/, app-crypt/dieharder/files/

2019-02-23 Thread Alon Bar-Lev
commit: e0851dfe8e3bc56f435fc0a71fdf562794df903d
Author: Alon Bar-Lev  gentoo  org>
AuthorDate: Sat Feb 23 22:20:39 2019 +
Commit: Alon Bar-Lev  gentoo  org>
CommitDate: Sat Feb 23 22:21:28 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0851dfe

app-crypt/dieharder: resolve undefined symbols

Closes: https://bugs.gentoo.org/show_bug.cgi?id=678300
Thanks: Ben Kohler
Signed-off-by: Alon Bar-Lev  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 ...3.31.1-r2.ebuild => dieharder-3.31.1-r3.ebuild} |   2 +-
 .../dieharder/files/dieharder-3.31.1-build.patch   | 158 +
 2 files changed, 159 insertions(+), 1 deletion(-)

diff --git a/app-crypt/dieharder/dieharder-3.31.1-r2.ebuild 
b/app-crypt/dieharder/dieharder-3.31.1-r3.ebuild
similarity index 97%
rename from app-crypt/dieharder/dieharder-3.31.1-r2.ebuild
rename to app-crypt/dieharder/dieharder-3.31.1-r3.ebuild
index 5a949f9d035..8fd1209bd49 100644
--- a/app-crypt/dieharder/dieharder-3.31.1-r2.ebuild
+++ b/app-crypt/dieharder/dieharder-3.31.1-r3.ebuild
@@ -11,7 +11,7 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
 IUSE="doc"
-RESTRICT="test"
+RESTRICT="test" # Way too long
 
 RDEPEND="sci-libs/gsl"
 DEPEND="${RDEPEND}

diff --git a/app-crypt/dieharder/files/dieharder-3.31.1-build.patch 
b/app-crypt/dieharder/files/dieharder-3.31.1-build.patch
index 4cbd5021c77..50e2119030c 100644
--- a/app-crypt/dieharder/files/dieharder-3.31.1-build.patch
+++ b/app-crypt/dieharder/files/dieharder-3.31.1-build.patch
@@ -25,3 +25,161 @@ index 2138ebf..f6d471b 100644
  #include 
  #include 
  #include 
+From aee56b67080a5a8732c12216ef4415f315f35e4a Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev 
+Date: Sun, 24 Feb 2019 00:04:55 +0200
+Subject: [PATCH 1/2] rgb_operm: convert to noop as implementation missing
+
+---
+ include/dieharder/rgb_operm.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/dieharder/rgb_operm.h b/include/dieharder/rgb_operm.h
+index c48fa37..f33fc1f 100644
+--- a/include/dieharder/rgb_operm.h
 b/include/dieharder/rgb_operm.h
+@@ -1,3 +1,4 @@
++#if 0
+ /*
+  * rgb_operm test header.
+  */
+@@ -36,3 +37,4 @@ static Dtest rgb_operm_dtest __attribute__((unused)) = {
+  * a data stream of rands from x_i to x_{i+k} to compute c[][].
+  */
+ unsigned int rgb_operm_k;
++#endif
+-- 
+2.19.2
+
+From b1140059cab9a5b2847dd312087d44d58fe61263 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev 
+Date: Sun, 24 Feb 2019 00:10:00 +0200
+Subject: [PATCH 2/2] dab_filltree2: inline cannot have prototype nor can it be
+ non static
+
+---
+ libdieharder/dab_filltree.c  | 37 ++-
+ libdieharder/dab_filltree2.c | 48 +---
+ 2 files changed, 41 insertions(+), 44 deletions(-)
+
+diff --git a/libdieharder/dab_filltree.c b/libdieharder/dab_filltree.c
+index 9cc5ce7..3ed6b00 100644
+--- a/libdieharder/dab_filltree.c
 b/libdieharder/dab_filltree.c
+@@ -34,7 +34,24 @@ static double targetData[] = {
+ 0.0, 0.0, 0.0, 0.0, 0.1333, 0.2000, 0.20634921, 0.17857143, 
0.13007085, 0.08183633, 0.04338395, 0.01851828, 0.00617270, 0.00151193, 
0.00023520, 0.1680, 0., 0., 0., 0.
+ };
+ 
+-inline int insert(double x, double *array, unsigned int startVal);
++static inline int insert(double x, double *array, unsigned int startVal) {
++ uint d = (startVal + 1) / 2;
++ uint i = startVal;
++ while (d > 0) {
++   if (array[i] == 0) {
++ array[i] = x;
++ return -1;
++   }
++   if (array[i] < x) {
++ i += d;
++   } else {
++ i -= d;
++   }
++   d /= 2;
++ }
++ return i;
++}
++
+ 
+ int dab_filltree(Test **test,int irun) {
+  int size = (ntuple == 0) ? 32 : ntuple;
+@@ -105,24 +122,6 @@ int dab_filltree(Test **test,int irun) {
+ }
+ 
+ 
+-inline int insert(double x, double *array, unsigned int startVal) {
+- uint d = (startVal + 1) / 2;
+- uint i = startVal;
+- while (d > 0) {
+-   if (array[i] == 0) {
+- array[i] = x;
+- return -1;
+-   }
+-   if (array[i] < x) {
+- i += d;
+-   } else {
+- i -= d;
+-   }
+-   d /= 2;
+- }
+- return i;
+-}
+-
+ #include
+ 
+ int main_filltree(int argc, char **argv) {
+diff --git a/libdieharder/dab_filltree2.c b/libdieharder/dab_filltree2.c
+index 1e33af2..7102d3c 100644
+--- a/libdieharder/dab_filltree2.c
 b/libdieharder/dab_filltree2.c
+@@ -92,7 +92,29 @@ static double targetData[128] = {  // size=128, generated 
from 6e9 samples
+ 0.000e+00,0.000e+00,0.000e+00,0.000e+00,
+ };
+ 
+-inline int insertBit(uint x, uchar *array, uint *i, uint *d);
++/*
++ * Insert a bit into the tree, represented by an array.
++ * A value of one is marked; zero is unmarked.
++ * The function returns -2 is still on the path.
++ * The function returns -1 if the path ends by marking a node.
++ * The function returns >= 0 if the path went too deep; the
++ * returned value is the last position 

[gentoo-commits] repo/gentoo:master commit in: app-crypt/dieharder/, app-crypt/dieharder/files/

2016-06-12 Thread Alon Bar-Lev
commit: 381aec5d1d34d123ece0aa4c1587f3054fe08b20
Author: Alon Bar-Lev  gentoo  org>
AuthorDate: Sun Jun 12 02:40:08 2016 +
Commit: Alon Bar-Lev  gentoo  org>
CommitDate: Sun Jun 12 03:22:05 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=381aec5d

app-crypt/dieharder: cleanup

Package-Manager: portage-2.2.28

 app-crypt/dieharder/Manifest   |  1 -
 app-crypt/dieharder/dieharder-2.28.1.ebuild| 38 --
 app-crypt/dieharder/dieharder-3.31.1.ebuild| 38 --
 .../dieharder/files/dieharder-2.28.1-qafixes.patch | 33 ---
 4 files changed, 110 deletions(-)

diff --git a/app-crypt/dieharder/Manifest b/app-crypt/dieharder/Manifest
index 6957e01..f4bd8ab 100644
--- a/app-crypt/dieharder/Manifest
+++ b/app-crypt/dieharder/Manifest
@@ -1,2 +1 @@
-DIST dieharder-2.28.1.tgz 766985 SHA256 
748ec4716e64de38807e126f10335e45136fa789056e9f647a6bf73698205286 SHA512 
35e210fd0fff9ecb3e68494058a9943e6684dd98d3a3ff70776b52a7de7fcbda28f10084f23f3872793da365ed8e16c0a91941266272e6e97575c9b146b17e14
 WHIRLPOOL 
8f17197f095831cc63601367ab73bac2ac19fda129ee321543883ee69477f9a253abaf3cc9a1e376bb531093bae56119dfd49f29deb29cad1ac411bccfa72a02
 DIST dieharder-3.31.1.tgz 1149780 SHA256 
6cff0ff8394c553549ac7433359ccfc955fb26794260314620dfa5e4cd4b727f SHA512 
e01ed4266b4fe5d5fadde3c92c30e430d0ca5f7fedd26b26ed2ab98b7602aa9c35bb5c8fd9314ef2f5235b5087645ab13e5e6550156e26643baa5aeb77088dc5
 WHIRLPOOL 
eb10fffbe839b2448b1955841dd4c3dee45f21ab89eb5107e82c3fef8706f7386ee6b6c21aa947c2cbe1f16075c7882975c9eff5fb17876799c15ccce9b5eca1

diff --git a/app-crypt/dieharder/dieharder-2.28.1.ebuild 
b/app-crypt/dieharder/dieharder-2.28.1.ebuild
deleted file mode 100644
index 943426c..000
--- a/app-crypt/dieharder/dieharder-2.28.1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=2
-
-WANT_AUTOCONF="2.5"
-inherit autotools eutils
-
-DESCRIPTION="An advanced suite for testing the randomness of RNG's"
-HOMEPAGE="http://www.phy.duke.edu/~rgb/General/dieharder.php;
-SRC_URI="http://www.phy.duke.edu/~rgb/General/${PN}/${P}.tgz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="sci-libs/gsl"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
-   epatch "${FILESDIR}"/${P}-qafixes.patch
-   eautoreconf
-}
-
-src_compile() {
-   emake all-recursive || die
-}
-
-src_install() {
-   emake DESTDIR="${D}" install || die
-   dodoc NEWS README* NOTES || die
-   docinto "dieharder"
-   dodoc dieharder/README dieharder/NOTES || die
-   docinto "libdieharder"
-   dodoc libdieharder/README libdieharder/NOTES || die
-}

diff --git a/app-crypt/dieharder/dieharder-3.31.1.ebuild 
b/app-crypt/dieharder/dieharder-3.31.1.ebuild
deleted file mode 100644
index 92d7ad4..000
--- a/app-crypt/dieharder/dieharder-3.31.1.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-DESCRIPTION="An advanced suite for testing the randomness of RNG's"
-HOMEPAGE="http://www.phy.duke.edu/~rgb/General/dieharder.php;
-SRC_URI="http://www.phy.duke.edu/~rgb/General/${PN}/${P}.tgz;
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc"
-
-RDEPEND="sci-libs/gsl"
-DEPEND="${RDEPEND}
-   doc? ( dev-tex/latex2html )"
-
-src_compile() {
-   emake all-recursive
-   use doc && emake -C manual
-}
-
-src_install() {
-   emake DESTDIR="${D}" install
-   dodoc AUTHORS README NOTES
-   docinto "dieharder"
-   dodoc dieharder/README dieharder/NOTES
-   docinto "libdieharder"
-   dodoc libdieharder/README libdieharder/NOTES
-
-   if use doc ; then
-   dodoc ChangeLog dieharder.html
-   docinto "manual"
-   dodoc manual/dieharder.pdf manual/dieharder.ps
-   fi
-}

diff --git a/app-crypt/dieharder/files/dieharder-2.28.1-qafixes.patch 
b/app-crypt/dieharder/files/dieharder-2.28.1-qafixes.patch
deleted file mode 100644
index 265d566..000
--- a/app-crypt/dieharder/files/dieharder-2.28.1-qafixes.patch
+++ /dev/null
@@ -1,33 +0,0 @@
 libdieharder/static_get_bits.c 2008-09-08 08:37:18.0 -0400
-+++ libdieharder/static_get_bits.c.new 2010-12-21 09:39:02.0 -0500
-@@ -44,7 +44,7 @@
-  }
-  if(nbits > 32){
-fprintf(stderr,"Warning!  dieharder cannot yet work with\b");
--   fprintf(stderr,"   %u > 32 bit chunks.  Exiting!\n\n");
-+   fprintf(stderr,"   %u > 32 bit chunks.  Exiting!\n\n", nbits);
-exit(0);
-  }
- 
 libdieharder/bits.c2008-09-08 08:37:18.0 -0400
-+++ libdieharder/bits.c.new2010-12-21 09:45:51.0 -0500
-@@ -944,7 +944,7 @@
- */
-MYDEBUG(D_BITS) {
-  printf("bu = %d bl = %d\n",bu,bl);
-- printf("  init %2d: |");
-+ printf("  init