summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorgson <gson@pkgsrc.org>2007-09-13 10:07:36 +0000
committergson <gson@pkgsrc.org>2007-09-13 10:07:36 +0000
commita14fbf5c76438442ec7efb1bd97fcb0b751a67ac (patch)
treea92aa173cff5cec6d53fbf57df2316eaf3440ca5 /math
parent7c238f45883a40c4fb43942a30dc6d8664c78c3c (diff)
downloadpkgsrc-a14fbf5c76438442ec7efb1bd97fcb0b751a67ac.tar.gz
Initial import of dieharder-2.24.4 into pkgsrc.
DieHarder is a test suite for random number generators. It includes a reimplementation in C of the well-known Diehard test suite as well as additional tests.
Diffstat (limited to 'math')
-rw-r--r--math/dieharder/DESCR3
-rw-r--r--math/dieharder/Makefile23
-rw-r--r--math/dieharder/PLIST40
-rw-r--r--math/dieharder/distinfo8
-rw-r--r--math/dieharder/patches/patch-aa23
-rw-r--r--math/dieharder/patches/patch-ac60
-rw-r--r--math/dieharder/patches/patch-ad88
7 files changed, 245 insertions, 0 deletions
diff --git a/math/dieharder/DESCR b/math/dieharder/DESCR
new file mode 100644
index 00000000000..b68bc1a54cf
--- /dev/null
+++ b/math/dieharder/DESCR
@@ -0,0 +1,3 @@
+DieHarder is a test suite for random number generators. It includes a
+reimplementation in C of the well-known Diehard test suite as well as
+additional tests.
diff --git a/math/dieharder/Makefile b/math/dieharder/Makefile
new file mode 100644
index 00000000000..5897dad08dc
--- /dev/null
+++ b/math/dieharder/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+#
+
+DISTNAME= dieharder-2.24.4
+CATEGORIES= math
+MASTER_SITES= http://www.phy.duke.edu/~rgb/General/dieharder/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= gson@NetBSD.org
+HOMEPAGE= http://www.phy.duke.edu/~rgb/General/dieharder.php
+COMMENT= Random number generator test suite
+
+AUTOMAKE_REQD= 1.9.6
+USE_TOOLS+= automake gmake
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+MANCOMPRESSED= yes
+
+pre-configure:
+ cd ${WRKSRC}; ${SH} ./autogen.sh
+
+.include "../../math/gsl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/dieharder/PLIST b/math/dieharder/PLIST
new file mode 100644
index 00000000000..6400fd4558e
--- /dev/null
+++ b/math/dieharder/PLIST
@@ -0,0 +1,40 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+bin/dieharder
+include/dieharder/Dtest.h
+include/dieharder/Vtest.h
+include/dieharder/Xtest.h
+include/dieharder/copyright.h
+include/dieharder/diehard_2dsphere.h
+include/dieharder/diehard_3dsphere.h
+include/dieharder/diehard_birthdays.h
+include/dieharder/diehard_bitstream.h
+include/dieharder/diehard_count_1s_byte.h
+include/dieharder/diehard_count_1s_stream.h
+include/dieharder/diehard_craps.h
+include/dieharder/diehard_dna.h
+include/dieharder/diehard_operm5.h
+include/dieharder/diehard_opso.h
+include/dieharder/diehard_oqso.h
+include/dieharder/diehard_parking_lot.h
+include/dieharder/diehard_rank_32x32.h
+include/dieharder/diehard_rank_6x8.h
+include/dieharder/diehard_runs.h
+include/dieharder/diehard_squeeze.h
+include/dieharder/diehard_sums.h
+include/dieharder/libdieharder.h
+include/dieharder/marsaglia_tsang_gcd.h
+include/dieharder/marsaglia_tsang_gorilla.h
+include/dieharder/parse.h
+include/dieharder/rgb_bitdist.h
+include/dieharder/rgb_lmn.h
+include/dieharder/rgb_persist.h
+include/dieharder/rgb_timing.h
+include/dieharder/std_test.h
+include/dieharder/sts_monobit.h
+include/dieharder/sts_runs.h
+include/dieharder/tests.h
+include/dieharder/verbose.h
+lib/libdieharder.la
+man/man1/dieharder.1
+man/man3/libdieharder.3
+@dirrm include/dieharder
diff --git a/math/dieharder/distinfo b/math/dieharder/distinfo
new file mode 100644
index 00000000000..53065933139
--- /dev/null
+++ b/math/dieharder/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+
+SHA1 (dieharder-2.24.4.tgz) = 09db7de25b024afad242a0aeb38d303c26226c93
+RMD160 (dieharder-2.24.4.tgz) = 005e318ae277f331884e183876c2a62095943a50
+Size (dieharder-2.24.4.tgz) = 796175 bytes
+SHA1 (patch-aa) = a710122b5053d5553115e9d2bcecebfc9e2c2486
+SHA1 (patch-ac) = 509814ff4770ee6780fb03e963dd496a3d75d062
+SHA1 (patch-ad) = 37f8d4cc8a150239d3399a545fb15f0f328c3454
diff --git a/math/dieharder/patches/patch-aa b/math/dieharder/patches/patch-aa
new file mode 100644
index 00000000000..faa19a40f9d
--- /dev/null
+++ b/math/dieharder/patches/patch-aa
@@ -0,0 +1,23 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+
+--- dieharder/gnu_r_rngs.c.orig 2007-05-22 03:34:27.000000000 +0300
++++ dieharder/gnu_r_rngs.c
+@@ -58,7 +58,17 @@ typedef unsigned long int Int32;
+
+ typedef void * (*DL_FUNC)();
+
+-void error(const char *txt, ...);
++void error(const char *fmt, ...) {
++ va_list args;
++ va_start(args, fmt);
++ fflush(stdout);
++ fprintf(stderr, "error: ");
++ vfprintf(stderr, fmt, args);
++ va_end(args);
++ fprintf(stderr, "\n");
++ exit(1);
++}
++
+ char *_(char *txt) { return(txt); };
+
+ /* UINT_MAX from limits.h */
diff --git a/math/dieharder/patches/patch-ac b/math/dieharder/patches/patch-ac
new file mode 100644
index 00000000000..b64d90ab516
--- /dev/null
+++ b/math/dieharder/patches/patch-ac
@@ -0,0 +1,60 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+
+--- dieharder/Makefile.am.orig 2007-05-22 03:34:27.000000000 +0300
++++ dieharder/Makefile.am
+@@ -46,7 +46,6 @@ SRCINCLUDES = $(shell ls *.h 2>&1 | sed
+ # see how to force a consistent build when working on the UI
+ # and library at the same time. Maybe with particular make targets...
+ LIBINCLUDES = $(shell ls ../include/dieharder/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
+-PROGLIB_SONAME = $(LIBDIR)/libdieharder.so.$(VERSION)
+
+ SOURCES = $(LIBSOURCES) $(SRCSOURCES)
+ INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
+@@ -63,11 +62,8 @@ CC = gcc
+ # Compile flags (use fairly standard -O3 as default)
+ CFLAGS = -O3 -I ../include $(DEFINES)
+
+-# Linker flags.
+-LDFLAGS =
+-
+ # Libraries
+-LIBS = -L ../libdieharder -ldieharder -lgsl -lgslcblas -lm
++LIBS = ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm
+
+ #========================================================================
+ # List of variants one can make. all is the default. We always
+@@ -76,18 +72,8 @@ LIBS = -L ../libdieharder -ldieharder -l
+ #========================================================================
+ all: $(PROGRAM)
+
+-$(PROGRAM): $(OBJECTS) $(PROGLIB_SONAME)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
+-
+-#========================================================================
+-# This is cautiously permitted. REALLY, though, we need a conditional
+-# that punts with a warning if we try this during an rpm build and
+-# the library is not found -- the right solution then is to install
+-# the library first!
+-#========================================================================
+-$(PROGLIB_SONAME):
+- - (cd ../libdieharder ;\
+- $(MAKE))
++$(PROGRAM): $(OBJECTS) ../libdieharder/libdieharder.la
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
+
+ #========================================================================
+ # The only safe place to do commits is in the toplevel directory
+@@ -123,10 +109,10 @@ clean :
+ install : $(PROGRAM)
+ (strip $(PROGRAM);\
+ install -d $(prefix)/bin; \
+- install -m 755 $(PROGRAM) $(prefix)/bin; \
+- install -d $(prefix)/share/man/man1; \
++ $(LIBTOOL) --mode=install install -m 755 $(PROGRAM) $(prefix)/bin; \
++ install -d $(mandir)/man1; \
+ gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
+- install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
++ install -m 644 $(PROGRAM).1.gz $(mandir)/man1)
+
+ #========================================================================
+ # We give all generic rules below. Currently we only need a rule for
diff --git a/math/dieharder/patches/patch-ad b/math/dieharder/patches/patch-ad
new file mode 100644
index 00000000000..40b527b4105
--- /dev/null
+++ b/math/dieharder/patches/patch-ad
@@ -0,0 +1,88 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
+
+--- libdieharder/Makefile.am.orig 2007-05-22 03:34:27.000000000 +0300
++++ libdieharder/Makefile.am
+@@ -38,10 +38,7 @@ RELEASE=0
+ # other stuff in the future) is built.
+ PROGMAN = libdieharder.3
+ # (FC "requires" no static library build)
+-# PROGLIB_A = libdieharder.a
+-PROGLIB_SO = libdieharder.so
+-PROGLIB_SONAME = libdieharder.so.$(VERSION_MAJOR)
+-PROGLIB_SO_VERSION = libdieharder.so.$(VERSION)
++PROGLIB_A = libdieharder.a
+
+ #========================================================================
+ # Define all sources. Note that we choose to depend on ALL the includes
+@@ -61,9 +58,6 @@ CC = gcc
+ # Compile flags (use fairly standard -O3 as default)
+ CFLAGS = -O3 $(DEFINES) -I ../include
+
+-# Linker flags
+-LDFLAGS = -g -fpic -shared -Wl,-soname,$(PROGLIB_SONAME)
+-
+ # Libraries
+ LIBS = -lgsl -lgslcblas -lm
+
+@@ -72,22 +66,11 @@ LIBS = -lgsl -lgslcblas -lm
+ # presume the simplest of dependencies and remake if includes change
+ # for example.
+ #========================================================================
+-all: $(INCTIME) $(PROGLIB_SO_VERSION) # $(PROGLIB_A)
+
+-# This has to ALWAYS run before a build.
+-$(INCTIME):
+- (install -d $(includedir)/dieharder; \
+- install -m 644 ../include/dieharder/*.h $(includedir)/dieharder;)
+-
+-# FC "requires" no static lib build/install
+-# $(PROGLIB_A): $(INCTIME) $(LIBOBJECTS) $(LIBINCLUDES)
+-# ar r $(PROGLIB_A) $(LIBOBJECTS)
+-# ranlib $(PROGLIB_A)
+-
+-$(PROGLIB_SO_VERSION): $(INCTIME) $(LIBOBJECTS) $(LIBINCLUDES)
+- gcc $(LDFLAGS) -o $(PROGLIB_SO_VERSION) $(LIBOBJECTS)
+- ldconfig -n .
+- ln -sf $(PROGLIB_SO_VERSION) $(PROGLIB_SO)
++all: $(PROGLIB_A)
++
++$(PROGLIB_A): $(LIBOBJECTS)
++ $(LIBTOOL) --mode=link gcc -o $(PROGLIB_A:.a=.la) $(LIBOBJECTS:.o=.lo) -rpath ${PREFIX}/lib -version-info 0:0
+
+ #========================================================================
+ # The only safe place to do commits is in the toplevel directory
+@@ -111,7 +94,7 @@ printout:
+ # A standard cleanup target
+ #========================================================================
+ clean:
+- rm -f core $(PROGLIB_SO)* $(LIBOBJECTS) $(PROGMAN).gz
++ rm -f core $(PROGLIB_A) $(LIBOBJECTS) $(PROGMAN).gz
+
+ #========================================================================
+ # This is critical. For the toplevel rpm build to succeed,
+@@ -120,15 +103,14 @@ clean:
+ # This target has to install precisely the files required by the
+ # specfile for the dieharder package, in precisely the right locations.
+ #========================================================================
+-install: $(PROGLIB_SO_VERSION) $(PROGLIB_A) $(PROGMAN)
++install: $(PROGLIB_A) $(PROGMAN)
+ (install -d $(libdir); \
+- install -m 755 $(PROGLIB_SO_VERSION) $(libdir)/$(PROGLIB_SO_VERSION); \
+- ln -sf $(libdir)/$(PROGLIB_SO_VERSION) $(libdir)/$(PROGLIB_SO); \
++ $(LIBTOOL) --mode=install install -m 755 $(PROGLIB_A:.a=.la) $(libdir); \
+ install -d $(includedir)/dieharder; \
+ install -m 644 ../include/dieharder/*.h $(includedir)/dieharder; \
+- install -d $(prefix)/share/man/man3; \
++ install -d $(mandir)/man3; \
+ gzip -c -9 $(PROGMAN) > $(PROGMAN).gz; \
+- install -m 644 $(DIR).3.gz $(prefix)/share/man/man3)
++ install -m 644 $(DIR).3.gz $(mandir)/man3)
+
+ # FC requires no static lib install
+ # install -m 755 $(PROGLIB_A) $(libdir)/$(PROGLIB_A); \
+@@ -138,4 +120,4 @@ install: $(PROGLIB_SO_VERSION) $(PROGLIB
+ # objects.
+ #========================================================================
+ %.o:%.c $(LIBINCLUDES) Makefile
+- $(CC) -fpic -c $(CFLAGS) $<
++ $(LIBTOOL) --mode=compile $(CC) -fpic -c $(CFLAGS) $<