diff --git a/package/dieharder/0001-Do-not-use-includedir-as-include-search-path-for-bui.patch b/package/dieharder/0001-Do-not-use-includedir-as-include-search-path-for-bui.patch deleted file mode 100644 index b475e5c470..0000000000 --- a/package/dieharder/0001-Do-not-use-includedir-as-include-search-path-for-bui.patch +++ /dev/null @@ -1,62 +0,0 @@ -From fbc9b7c3b83a99ac996c0a268487d1f800630328 Mon Sep 17 00:00:00 2001 -From: Julien Viard de Galbert -Date: Wed, 8 Feb 2017 21:26:58 +0100 -Subject: [PATCH] Do not use includedir as include search path for build - ---includedir is not used to specify where a program should -look for headers of libraries, but to tell where it should -install its own headers. - -Signed-off-by: Julien Viard de Galbert ---- - configure.ac | 6 +++--- - dieharder/Makefile.am | 2 +- - libdieharder/Makefile.am | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b336115..91f7c64 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -96,9 +96,9 @@ AC_TYPE_SIZE_T - AC_C_VOLATILE - AC_C_INLINE - --DIEHARDER_CFLAGS="-I$includedir" --dieharder_CFLAGS="-std=c99 -Wall -pedantic -I$includedir" --libdieharder_lo_CFLAGS="-Wall -pedantic -I$includedir" -+DIEHARDER_CFLAGS="" -+dieharder_CFLAGS="-std=c99 -Wall -pedantic" -+libdieharder_lo_CFLAGS="-Wall -pedantic" - DIEHARDER_LIBS="-L$libdir -ldieharder" - ACLOCAL_AMFLAGS="-I m4" - -diff --git a/dieharder/Makefile.am b/dieharder/Makefile.am -index e6fbff2..7bdac5c 100644 ---- a/dieharder/Makefile.am -+++ b/dieharder/Makefile.am -@@ -64,7 +64,7 @@ DEFINES = -DVERSION=$(VERSION) - # CC = gcc - - # Compile flags (use fairly standard -O3 as default) --AM_CPPFLAGS = -I ${top_srcdir}/include $(DEFINES) -I ${includedir} -+AM_CPPFLAGS = -I ${top_srcdir}/include $(DEFINES) - AM_CFLAGS = -O3 - - # Load flags (optional) -diff --git a/libdieharder/Makefile.am b/libdieharder/Makefile.am -index 5fd3396..0873f9c 100644 ---- a/libdieharder/Makefile.am -+++ b/libdieharder/Makefile.am -@@ -114,7 +114,7 @@ DEFINES = -DVERSION=$(VERSION) -DLITTLE_ENDIAN=$(LITTLE_ENDIAN) - # CC = gcc - - # Compile flags (use fairly standard -O3 as default) --AM_CPPFLAGS = $(DEFINES) -I ${top_srcdir}/include -I ${includedir} -+AM_CPPFLAGS = $(DEFINES) -I ${top_srcdir}/include - AM_CFLAGS = -O3 -Wall -pedantic -Wno-unused-variable - - #======================================================================== --- -2.1.4 - diff --git a/package/dieharder/0002-Fix-missing-type-intptr_t.patch b/package/dieharder/0002-Fix-missing-type-intptr_t.patch deleted file mode 100644 index 12ea5e7fa0..0000000000 --- a/package/dieharder/0002-Fix-missing-type-intptr_t.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6f550841943f19612af064b3d3a1db134078e03c Mon Sep 17 00:00:00 2001 -From: Julien Viard de Galbert -Date: Sat, 14 Jan 2017 14:18:10 +0100 -Subject: [PATCH] Fix missing type intptr_t - -With glibc-2.23 unistd.h need intptr_t when __USE_MISC is defined. - -Signed-off-by: Julien Viard de Galbert ---- - include/dieharder/libdieharder.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/dieharder/libdieharder.h b/include/dieharder/libdieharder.h -index 2138ebf..d98b758 100644 ---- a/include/dieharder/libdieharder.h -+++ b/include/dieharder/libdieharder.h -@@ -17,6 +17,7 @@ - - /* This turns on uint macro in c99 */ - #define __USE_MISC 1 -+#include - #include - #include - #include --- -2.1.4 - diff --git a/package/dieharder/0003-Add-_GNU_SOURCE-for-uint-and-M_PI-with-musl-libc.patch b/package/dieharder/0003-Add-_GNU_SOURCE-for-uint-and-M_PI-with-musl-libc.patch deleted file mode 100644 index d71cd57445..0000000000 --- a/package/dieharder/0003-Add-_GNU_SOURCE-for-uint-and-M_PI-with-musl-libc.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 526510a27ef47a16699dd34a2373ad9b6bb5e8f3 Mon Sep 17 00:00:00 2001 -From: Julien Viard de Galbert -Date: Sat, 14 Jan 2017 14:19:47 +0100 -Subject: [PATCH] Add _GNU_SOURCE for uint and M_PI with musl libc - -When building with musl libc _GNU_SOURCE need to be defined -to provide uint type and M_PI macro - -Signed-off-by: Julien Viard de Galbert ---- - include/dieharder/libdieharder.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/dieharder/libdieharder.h b/include/dieharder/libdieharder.h -index d98b758..c1a5023 100644 ---- a/include/dieharder/libdieharder.h -+++ b/include/dieharder/libdieharder.h -@@ -17,6 +17,7 @@ - - /* This turns on uint macro in c99 */ - #define __USE_MISC 1 -+#define _GNU_SOURCE 1 - #include - #include - #include --- -2.1.4 - diff --git a/package/dieharder/0004-Add-static-to-inline-functions.patch b/package/dieharder/0004-Add-static-to-inline-functions.patch deleted file mode 100644 index 64cde1d21d..0000000000 --- a/package/dieharder/0004-Add-static-to-inline-functions.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 9c71a211dcf20f53f747326f5bc3fee9fabe3f52 Mon Sep 17 00:00:00 2001 -From: Julien Viard de Galbert -Date: Tue, 27 Jun 2017 00:16:11 +0200 -Subject: [PATCH] Add static to inline functions - -This is needed to avoid a link error where the inline functions appear -missing at link time. -From c99 standard inline function should either be declared static or -have an extern instance in a c file for linking. -This fix is necessary to build with gcc 7; for some reason it was not -trigerred before. - -Signed-off-by: Julien Viard de Galbert ---- - libdieharder/dab_filltree.c | 4 ++-- - libdieharder/dab_filltree2.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libdieharder/dab_filltree.c b/libdieharder/dab_filltree.c -index 9cc5ce7..a377c3d 100644 ---- a/libdieharder/dab_filltree.c -+++ b/libdieharder/dab_filltree.c -@@ -34,7 +34,7 @@ static double targetData[] = { - 0.0, 0.0, 0.0, 0.0, 0.13333333, 0.20000000, 0.20634921, 0.17857143, 0.13007085, 0.08183633, 0.04338395, 0.01851828, 0.00617270, 0.00151193, 0.00023520, 0.00001680, 0.00000000, 0.00000000, 0.00000000, 0.00000000 - }; - --inline int insert(double x, double *array, unsigned int startVal); -+static inline int insert(double x, double *array, unsigned int startVal); - - int dab_filltree(Test **test,int irun) { - int size = (ntuple == 0) ? 32 : ntuple; -@@ -105,7 +105,7 @@ int dab_filltree(Test **test,int irun) { - } - - --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) { -diff --git a/libdieharder/dab_filltree2.c b/libdieharder/dab_filltree2.c -index 1e33af2..59cbd52 100644 ---- a/libdieharder/dab_filltree2.c -+++ b/libdieharder/dab_filltree2.c -@@ -92,7 +92,7 @@ static double targetData[128] = { // size=128, generated from 6e9 samples - 0.00000000000e+00,0.00000000000e+00,0.00000000000e+00,0.00000000000e+00, - }; - --inline int insertBit(uint x, uchar *array, uint *i, uint *d); -+static inline int insertBit(uint x, uchar *array, uint *i, uint *d); - - int dab_filltree2(Test **test, int irun) { - int size = (ntuple == 0) ? 128 : ntuple; -@@ -181,7 +181,7 @@ int dab_filltree2(Test **test, int irun) { - * The function returns >= 0 if the path went too deep; the - * returned value is the last position of the path. - */ --inline int insertBit(uint x, uchar *array, uint *i, uint *d) { -+static inline int insertBit(uint x, uchar *array, uint *i, uint *d) { - if (x != 0) { - *i += *d; - } else { --- -2.13.2 - diff --git a/package/dieharder/0005-Remove-defunct-rgb_operm.patch b/package/dieharder/0005-Remove-defunct-rgb_operm.patch deleted file mode 100644 index efc311dbaa..0000000000 --- a/package/dieharder/0005-Remove-defunct-rgb_operm.patch +++ /dev/null @@ -1,732 +0,0 @@ -From 40d377b86c856f5a4510a6f5cd56be004873ad77 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marcus=20M=C3=BCller?= -Date: Mon, 12 Oct 2020 21:30:12 +0200 -Subject: [PATCH] Remove defunct rgb_operm - -[Retrieved from: -https://github.com/eddelbuettel/dieharder/pull/2/commits/40d377b86c856f5a4510a6f5cd56be004873ad77] -Signed-off-by: Fabrice Fontaine ---- - include/Makefile.am | 1 - - include/dieharder/rgb_operm.h | 38 -- - include/dieharder/tests.h | 2 - - libdieharder/rgb_operm.c | 633 ---------------------------------- - 4 files changed, 674 deletions(-) - delete mode 100644 include/dieharder/rgb_operm.h - delete mode 100644 libdieharder/rgb_operm.c - -diff --git a/include/Makefile.am b/include/Makefile.am -index f80b4ff..e4659cd 100644 ---- a/include/Makefile.am -+++ b/include/Makefile.am -@@ -33,7 +33,6 @@ nobase_include_HEADERS = dieharder/copyright.h \ - dieharder/rgb_lagged_sums.h \ - dieharder/rgb_lmn.h \ - dieharder/rgb_minimum_distance.h \ -- dieharder/rgb_operm.h \ - dieharder/rgb_persist.h \ - dieharder/rgb_permutations.h \ - dieharder/rgb_timing.h \ -diff --git a/include/dieharder/rgb_operm.h b/include/dieharder/rgb_operm.h -deleted file mode 100644 -index c48fa37..0000000 ---- a/include/dieharder/rgb_operm.h -+++ /dev/null -@@ -1,38 +0,0 @@ --/* -- * rgb_operm test header. -- */ -- --/* -- * function prototype -- */ --int rgb_operm(Test **test,int irun); -- --static Dtest rgb_operm_dtest __attribute__((unused)) = { -- "RGB Overlapping Permuations Test", -- "rgb_operm", -- "\n\ --#========================================================================\n\ --# RGB Overlapping Permutations Test\n\ --# Forms both the exact (expected) covariance matrix for overlapping\n\ --# permutations of random integer and an empirical covariance matrix\n\ --# formed from a long string of samples. The difference is expected\n\ --# to have a chisq distribution and hence can be transformed into a\n\ --# sample p-value. Note that this is one possible functional replacement\n\ --# for the broken/defunct diehard operm5 test, but one that permits k (the\n\ --# number of numbers in the overlapping permutation window) to be varied\n\ --# from 2 to perhaps 8.\n\ --#\n", -- 100, /* Default psamples */ -- 100000, /* Default tsamples */ -- 1, /* We magically make all the bit tests return a single histogram */ -- rgb_operm, -- 0 --}; -- --/* -- * Global variables. -- * -- * rgb_operm_k is the size of the overlapping window that is slid along -- * a data stream of rands from x_i to x_{i+k} to compute c[][]. -- */ --unsigned int rgb_operm_k; -diff --git a/include/dieharder/tests.h b/include/dieharder/tests.h -index 1674aed..b50dbe3 100644 ---- a/include/dieharder/tests.h -+++ b/include/dieharder/tests.h -@@ -11,7 +11,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -80,7 +79,6 @@ - RGB_PERMUTATIONS, - RGB_LAGGED_SUMS, - RGB_LMN, -- RGB_OPERM, - DAB_BYTEDISTRIB, - DAB_DCT, - DAB_FILLTREE, -diff --git a/libdieharder/rgb_operm.c b/libdieharder/rgb_operm.c -deleted file mode 100644 -index 15f8e9a..0000000 ---- a/libdieharder/rgb_operm.c -+++ /dev/null -@@ -1,633 +0,0 @@ --/* -- * ======================================================================== -- * $Id: rgb_operm.c 252 2006-10-10 13:17:36Z rgb $ -- * -- * See copyright in copyright.h and the accompanying file COPYING -- * ======================================================================== -- */ -- --/* -- * ======================================================================== -- * This is the revised Overlapping Permutations test. It directly -- * simulates the covariance matrix of overlapping permutations. The way -- * this works below (tentatively) is: -- * -- * For a bit ntuple of length N, slide a window of length N to the -- * right one bit at a time. Compute the permutation index of the -- * original ntuple, the permutation index of the window ntuple, and -- * accumulate the covariance matrix of the two positions. This -- * can be directly and precisely computed as well. The simulated -- * result should be distributed according to the chisq distribution, -- * so we subtract the two and feed it into the chisq program as a -- * vector to compute p. -- * -- * This MAY NOT BE RIGHT. I'm working from both Marsaglia's limited -- * documentation (in a program that doesn't do ANYTHING like what the -- * documentation says it does) and from Nilpotent Markov Processes. -- * But I confess to not quite understand how to actually perform the -- * test in the latter -- it is very good at describing the construction -- * of the target matrix, not so good at describing how to transform -- * this into a chisq and p. -- * -- * FWIW, as I get something that actually works here, I'm going to -- * THOROUGHLY document it in the book that will accompany the test. -- *======================================================================== -- */ -- --#include --#define RGB_OPERM_KMAX 10 -- --/* -- * Some globals that will eventually go in the test include where they -- * arguably belong. -- */ --double fpipi(int pi1,int pi2,int nkp); --uint piperm(size_t *data,int len); --void make_cexact(); --void make_cexpt(); --int nperms,noperms; --double **cexact,**ceinv,**cexpt,**idty; --double *cvexact,*cvein,*cvexpt,*vidty; -- --int rgb_operm(Test **test,int irun) --{ -- -- int i,j,n,nb,iv,s; -- uint csamples; /* rgb_operm_k^2 is vector size of cov matrix */ -- uint *count,ctotal; /* counters */ -- uint size; -- double pvalue,ntuple_prob,pbin; /* probabilities */ -- Vtest *vtest; /* Chisq entry vector */ -- -- gsl_matrix_view CEXACT,CEINV,CEXPT,IDTY; -- -- /* -- * For a given n = ntuple size in bits, there are n! bit orderings -- */ -- MYDEBUG(D_RGB_OPERM){ -- printf("#==================================================================\n"); -- printf("# rgb_operm: Running rgb_operm verbosely for k = %d.\n",rgb_operm_k); -- printf("# rgb_operm: Use -v = %d to focus.\n",D_RGB_OPERM); -- printf("# rgb_operm: ======================================================\n"); -- } -- -- /* -- * Sanity check first -- */ -- if((rgb_operm_k < 0) || (rgb_operm_k > RGB_OPERM_KMAX)){ -- printf("\nError: rgb_operm_k must be a positive integer <= %u. Exiting.\n",RGB_OPERM_KMAX); -- exit(0); -- } -- -- nperms = gsl_sf_fact(rgb_operm_k); -- noperms = gsl_sf_fact(3*rgb_operm_k-2); -- csamples = rgb_operm_k*rgb_operm_k; -- gsl_permutation * p = gsl_permutation_alloc(nperms); -- -- /* -- * Allocate memory for value_max vector of Vtest structs and counts, -- * PER TEST. Note that we must free both of these when we are done -- * or leak. -- */ -- vtest = (Vtest *)malloc(csamples*sizeof(Vtest)); -- count = (uint *)malloc(csamples*sizeof(uint)); -- Vtest_create(vtest,csamples+1); -- -- /* -- * We have to allocate and free the cexact and cexpt matrices here -- * or they'll be forgotten when these routines return. -- */ -- MYDEBUG(D_RGB_OPERM){ -- printf("# rgb_operm: Creating and zeroing cexact[][] and cexpt[][].\n"); -- } -- cexact = (double **)malloc(nperms*sizeof(double*)); -- ceinv = (double **)malloc(nperms*sizeof(double*)); -- cexpt = (double **)malloc(nperms*sizeof(double*)); -- idty = (double **)malloc(nperms*sizeof(double*)); -- cvexact = (double *)malloc(nperms*nperms*sizeof(double)); -- cvein = (double *)malloc(nperms*nperms*sizeof(double)); -- cvexpt = (double *)malloc(nperms*nperms*sizeof(double)); -- vidty = (double *)malloc(nperms*nperms*sizeof(double)); -- for(i=0;idata[k]; -- -- /* Not cruft, but quiet... -- MYDEBUG(D_RGB_OPERM){ -- printf("#------------------------------------------------------------------\n"); -- printf("# Generating offset sample permutation pi's\n"); -- } -- */ -- for(k=0;k<2*rgb_operm_k - 1;k++){ -- gsl_sort_index((size_t *) ps,&testv[k],1,rgb_operm_k); -- pi[k] = piperm((size_t *) ps,rgb_operm_k); -- -- /* Not cruft, but quiet... -- MYDEBUG(D_RGB_OPERM){ -- printf("# %u: ",k); -- for(ip=k;ipdata[ip]); -- } -- printf(" = %u\n",pi[k]); -- } -- */ -- } -- -- /* -- * This is the business end of things. The covariance matrix is the -- * the sum of a central function of the permutation indices that yields -- * nperms-1/nperms on diagonal, -1/nperms off diagonal, for all the -- * possible permutations, for the FIRST permutation in a sample (fi) -- * times the sum of the same function over all the overlapping permutations -- * drawn from the same sample. Quite simple, really. -- */ -- for(i=0;idata[rgb_operm_k-j-1] = lookup[i]->data[j]; -- } -- } else { -- gsl_permutation_memcpy(lookup[i],lookup[i-1]); -- gsl_permutation_next(lookup[i]); -- for(j=0;jdata[rgb_operm_k-j-1] = lookup[i]->data[j]; -- } -- } -- } -- */ -- MYDEBUG(D_RGB_OPERM){ -- for(i=0;i ",i); -- gsl_permutation_fprintf(stdout,lookup[i]," %u"); -- printf("\n"); -- } -- } -- -- } -- -- for(i=0;idata,len*sizeof(uint))==0){ -- /* Not cruft, but off: -- MYDEBUG(D_RGB_OPERM){ -- printf("# piperm(): "); -- gsl_permutation_fprintf(stdout,lookup[i]," %u"); -- printf(" = %u\n",i); -- } -- */ -- return(i); -- } -- } -- printf("We'd better not get here...\n"); -- -- return(0); -- --} -- --double fpipi(int pi1,int pi2,int nkp) --{ -- -- int i; -- double fret; -- -- /* -- * compute the k-permutation index from iperm for the window -- * at data[offset] of length len. If it matches pind, return -- * the first quantity, otherwise return the second. -- */ -- if(pi1 == pi2){ -- -- fret = (double) (nkp - 1.0)/nkp; -- if(verbose < 0){ -- printf(" f(%d,%d) = %10.6f\n",pi1,pi2,fret); -- } -- return(fret); -- -- } else { -- -- fret = (double) (-1.0/nkp); -- if(verbose < 0){ -- printf(" f(%d,%d) = %10.6f\n",pi1,pi2,fret); -- } -- return(fret); -- -- } -- -- --} -- -- -- -- diff --git a/package/dieharder/dieharder.hash b/package/dieharder/dieharder.hash index 65b60e7aa7..3d285d03cc 100644 --- a/package/dieharder/dieharder.hash +++ b/package/dieharder/dieharder.hash @@ -1,3 +1,3 @@ # Locally computed: -sha256 6cff0ff8394c553549ac7433359ccfc955fb26794260314620dfa5e4cd4b727f dieharder-3.31.1.tgz +sha256 0fdd8a66a077e86652a47641589aa4667ae13d322a7214bb555ab37f082002dd dieharder-3.31.1.4.tar.gz sha256 c475bcd1afa6fc15a65174e31c599c0d23706a34e4b9f2fcb03a4dad5438d53f COPYING diff --git a/package/dieharder/dieharder.mk b/package/dieharder/dieharder.mk index cbf28922fd..6fe5b1f743 100644 --- a/package/dieharder/dieharder.mk +++ b/package/dieharder/dieharder.mk @@ -4,28 +4,14 @@ # ################################################################################ -DIEHARDER_VERSION = 3.31.1 -DIEHARDER_SITE = http://www.phy.duke.edu/~rgb/General/dieharder -DIEHARDER_SOURCE = dieharder-$(DIEHARDER_VERSION).tgz -DIEHARDER_STRIP_COMPONENTS = 2 +DIEHARDER_VERSION = 3.31.1.4 +DIEHARDER_SITE = $(call github,eddelbuettel,dieharder,$(DIEHARDER_VERSION)) DIEHARDER_LICENSE = GPL-2.0 with beverage clause DIEHARDER_LICENSE_FILES = COPYING DIEHARDER_DEPENDENCIES = gsl - -# The original configure does not use variables provided in the -# environment so _CONF_ENV does not work. (_CONF_OPTS does). -# -# Finally, we patch configure.ac and some Makefile.am so we need to -# autoreconf anyway +# configure retrieved from git is outdated DIEHARDER_AUTORECONF = YES -# The m4/*.m4 files are symlinks to /usr/share, which clearly doesn't -# work, and doing an autoreconf does not replace them. -define DIEHARDER_M4_CLEAN - rm -f $(@D)/m4/*.m4 -endef -DIEHARDER_POST_PATCH_HOOKS += DIEHARDER_M4_CLEAN - # fix endianness detection ifeq ($(BR2_ENDIAN),"BIG") DIEHARDER_CONF_ENV = ac_cv_c_endian=big @@ -36,9 +22,4 @@ endif # parallel build fail, disable it DIEHARDER_MAKE = $(MAKE1) -# Too many fixes needed to build with -fno-common which is default since gcc 10 -ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_10),y) -DIEHARDER_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fcommon" -endif - $(eval $(autotools-package))