summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorArthur W. Green <lynx@panix.com>2016-03-19 01:08:11 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-03-19 01:08:11 +0700
commit264d724592cfed3285b2544e65190d954fc4a78f (patch)
tree67d2a0e7f581fda1a42859116c950644aa70d861 /system
parent1bd0cbd0c5b54d155f3f03dd47e36377fbd7b93b (diff)
downloadslackbuilds-264d724592cfed3285b2544e65190d954fc4a78f.tar.gz
system/dieharder: Added (A random number generator testing suite).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/dieharder/README11
-rw-r--r--system/dieharder/dieharder.SlackBuild106
-rw-r--r--system/dieharder/dieharder.info10
-rw-r--r--system/dieharder/dieharder.patch79
-rw-r--r--system/dieharder/slack-desc19
5 files changed, 225 insertions, 0 deletions
diff --git a/system/dieharder/README b/system/dieharder/README
new file mode 100644
index 0000000000..a980e39cca
--- /dev/null
+++ b/system/dieharder/README
@@ -0,0 +1,11 @@
+Dieharder is a random number generator (RNG) testing suite, designed to make
+it easy to time and test RNGs implemented in both software and hardware. It
+makes extensive use of the GNU Scientific Library (GSL), and includes a
+battery of pseudorandom number generators (PRNG) and testing algorithms for
+research and cryptographic applications.
+
+The software saw its last release in 2011, and differences with newer versions
+of autoconf are starting to become apparent. Patches are applied mostly to
+overcome these differences, as well as one trivial fix to appease C99. The
+build installs the dieharder software as well as the libdieharder libraries
+that can be called from your program code.
diff --git a/system/dieharder/dieharder.SlackBuild b/system/dieharder/dieharder.SlackBuild
new file mode 100644
index 0000000000..f7cbb17e9e
--- /dev/null
+++ b/system/dieharder/dieharder.SlackBuild
@@ -0,0 +1,106 @@
+#!/bin/sh -e
+
+# SlackBuild for dieharder, 9 March 2016
+# Arthur W. Green <lynx@panix.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# dieharder itself remains a copyrighted work under the terms of the
+# GNU GPL v2 (with beverage provision). Please see the file COPYING
+# in the dieharder source distribution for more on this.
+
+PRGNAM=dieharder
+VERSION=${VERSION:-3.31.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -exec chmod -R u+w,go-w,a+rX-st {} \;
+
+# apply patches, mostly to appease crusty autoconf.
+patch -p1 < $CWD/$PRGNAM.patch
+
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-shared \
+ --disable-static \
+ --with-gnu-ld \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING NOTES AUTHORS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/dieharder/dieharder.info b/system/dieharder/dieharder.info
new file mode 100644
index 0000000000..8bfe7226f0
--- /dev/null
+++ b/system/dieharder/dieharder.info
@@ -0,0 +1,10 @@
+PRGNAM="dieharder"
+VERSION="3.31.1"
+HOMEPAGE="http://www.phy.duke.edu/~rgb/General/dieharder.php"
+DOWNLOAD="http://www.phy.duke.edu/~rgb/General/dieharder/dieharder-3.31.1.tgz"
+MD5SUM="b57404dfb812d4548caaf71a05be2d17"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Arthur W. Green"
+EMAIL="lynx@panix.com"
diff --git a/system/dieharder/dieharder.patch b/system/dieharder/dieharder.patch
new file mode 100644
index 0000000000..4815880de5
--- /dev/null
+++ b/system/dieharder/dieharder.patch
@@ -0,0 +1,79 @@
+--- dieharder-3.31.1/autogen.sh 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/autogen.sh 2016-03-09 17:24:24.292466514 -0700
+@@ -18,3 +18,3 @@
+ echo "Running autoreconf..."
+-autoreconf
++autoreconf --install --force
+
+--- dieharder-3.31.1/configure.ac 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/configure.ac 2016-03-09 17:32:23.309477977 -0700
+@@ -20,3 +20,3 @@
+ # AM_MAINTAINER_MODE
+-
++AM_PROG_AR
+ AC_DEFINE([RELEASED], [], [Description])
+@@ -60,2 +60,3 @@
+ AC_PROG_CC
++AC_PROG_CXX
+ AM_PROG_CC_C_O
+@@ -88,3 +89,3 @@
+ define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
+-AC_PROG_LIBTOOL
++LT_INIT
+
+@@ -94,2 +95,3 @@
+ AC_TYPE_SIZE_T
++AC_TYPE_OFF_T
+ # AC_C_CONST
+@@ -117,2 +119,5 @@
+ #==================================================================
++AC_CHECK_HEADERS([limits.h])
++AC_CHECK_HEADERS([stddef.h])
++AC_CHECK_HEADERS([sys/time.h])
+ AC_CHECK_HEADER([gsl/gsl_sf_gamma.h],,[AC_MSG_ERROR([Couldn't find GSL headers. Please install the gsl-devel package.])])
+
+--- dieharder-3.31.1/libdieharder/configure.ac 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/libdieharder/configure.ac 2016-03-09 17:24:24.292466514 -0700
+@@ -9,2 +9,3 @@
+ # Checks for programs.
++AC_LANG(C)
+ AC_PROG_CC
+@@ -19,2 +20,5 @@
+ AC_CHECK_HEADERS([string.h])
++AC_CHECK_FUNCS([strerror])
++AC_CHECK_HEADERS([float.h])
++AC_CHECK_HEADERS([stddef.h])
+
+@@ -22,3 +26,6 @@
+ AC_C_CONST
++AC_C_INLINE
+ AC_TYPE_SIZE_T
++AC_TYPE_OFF_T
++AC_TYPE_UINT32_T
+ AC_HEADER_TIME
+@@ -28,2 +35,3 @@
+ AC_FUNC_STAT
++AC_FUNC_ERROR_AT_LINE
+ AC_CHECK_FUNCS([bzero gettimeofday memset pow sqrt])
+
+--- dieharder-3.31.1/Makefile.am 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/Makefile.am 2016-03-09 17:24:24.291466526 -0700
+@@ -12,2 +12,3 @@
+
++ACLOCAL_AMFLAGS=-I m4
+ #========================================================================
+
+--- dieharder-3.31.1/manual/Makefile.am 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/manual/Makefile.am 2016-03-09 17:24:24.291466526 -0700
+@@ -6,3 +6,3 @@
+ SVNPATH = $(SVNTREE)/dieharder
+-SVNTIME = $(HOME/Src/Projects/dieharder/dieharder.svn.time)
++SVNTIME = $(HOME)/Src/Projects/dieharder/dieharder.svn.time
+
+--- dieharder-3.31.1/include/dieharder/libdieharder.h 2011-10-14 07:41:37.000000000 -0600
++++ dieharder-3.31.1/include/dieharder/libdieharder.h 2016-03-09 17:24:24.291466526 -0700
+@@ -21,2 +21,3 @@
+ #include <sys/stat.h>
++#include <stdint.h>
+ #include <unistd.h>
+
diff --git a/system/dieharder/slack-desc b/system/dieharder/slack-desc
new file mode 100644
index 0000000000..5e932dd348
--- /dev/null
+++ b/system/dieharder/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+dieharder: dieharder (A random number generator testing suite)
+dieharder:
+dieharder: Dieharder is a random number generator (RNG) testing suite,
+dieharder: designed to make it easy to time and test RNGs implemented in
+dieharder: both software and hardware. It makes extensive use of the GNU
+dieharder: Scientific Library (GSL), and includes a battery of pseudorandom
+dieharder: number generators (PRNG) and testing algorithms for research and
+dieharder: cryptographic applications.
+dieharder:
+dieharder: http://www.phy.duke.edu/~rgb/General/dieharder.php
+dieharder: