Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
BYTE's UNIX benchmarking suite is small enough to port easily to any UNIX
system, yet diverse and flexible enough to be useful for a wide spectrum of
benchmarking requirements. Besides, they're in the public domain, so they
can be obtained for little, if any, cost. What better reason do you need to
use them?

View File

@@ -0,0 +1,61 @@
# $NetBSD: Makefile,v 1.25 2013/05/31 12:39:38 wiz Exp $
DISTNAME= unixbench-4.1.0
PKGNAME= ${DISTNAME:S/unix/byte/}
PKGREVISION= 5
CATEGORIES= benchmarks
MASTER_SITES= http://www.tux.org/pub/tux/benchmarks/System/unixbench/
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= BYTE Magazine's Public Domain benchmark for UNIX
PKG_INSTALLATION_TYPES= overwrite pkgviews
BENCHMARK_ENV+= BINDIR=${WRKSRC}/pgms
BENCHMARK_ENV+= SCRPDIR=${WRKSRC}/pgms
BENCHMARK_ENV+= RESULTDIR=${WRKSRC}/results
BENCHMARK_ENV+= BENCHDIR=${WRKSRC}/testdir
BENCHMARK_ENV+= TESTDIR=${WRKSRC}/tmp
OWN_DIRS= /var/bytebench
INSTALLATION_DIRS= bin
REPLACE_PERL+= pgms/perlbench
USE_TOOLS+= perl:run
MAKE_JOBS_SAFE= no
post-extract:
${RM} -f ${WRKSRC}/pgms/select
post-patch:
cd ${WRKSRC}; ${SED} -e "s|@PREFIX@|${PREFIX}|g" Run > run-byte
${CHMOD} +x ${WRKSRC}/run-byte
pre-install:
${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
do-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/libexec/bytebench
${INSTALL_SCRIPT} ${WRKSRC}/pgms/* ${DESTDIR}${PREFIX}/libexec/bytebench
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/bytebench
${INSTALL_DATA} ${WRKSRC}/testdir/* ${DESTDIR}${PREFIX}/share/bytebench
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/bytebench
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/bytebench
${INSTALL_SCRIPT} ${WRKSRC}/run-byte ${DESTDIR}${PREFIX}/bin
benchmark:
@if [ `${ID} -u` != 0 ]; then \
${ECHO} "This benchmark must be run as root!"; \
exit 1; \
fi
@( cd ${WRKSRC}; ${SETENV} ${BENCHMARK_ENV} ./run-byte \
| tee bytebench.out )
results:
@${MKDIR} /tmp/benches/`domainname`
-@${CP} ${WRKSRC}/bytebench.out /tmp/benches/`domainname`/bytebench.`uname`-`uname -m`-`uname -r`.`hostname`
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,41 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:33:11 joerg Exp $
bin/run-byte
libexec/bytebench/arithoh
libexec/bytebench/cleanup.sh
libexec/bytebench/context1
libexec/bytebench/dhry2
libexec/bytebench/dhry2reg
libexec/bytebench/double
libexec/bytebench/execl
libexec/bytebench/float
libexec/bytebench/fs.awk
libexec/bytebench/fsbuffer
libexec/bytebench/fsdisk
libexec/bytebench/fstime
libexec/bytebench/hanoi
libexec/bytebench/index.awk
libexec/bytebench/index.base
libexec/bytebench/index.sh
libexec/bytebench/int
libexec/bytebench/long
libexec/bytebench/looper
libexec/bytebench/loopm.awk
libexec/bytebench/loops.awk
libexec/bytebench/lps.awk
libexec/bytebench/multi.sh
libexec/bytebench/mwips.awk
libexec/bytebench/perlbench
libexec/bytebench/pipe
libexec/bytebench/register
libexec/bytebench/report.awk
libexec/bytebench/report.sh
libexec/bytebench/short
libexec/bytebench/spawn
libexec/bytebench/syscall
libexec/bytebench/tst.sh
libexec/bytebench/unixbench.logo
libexec/bytebench/whetstone-double
share/bytebench/cctest.c
share/bytebench/dc.dat
share/bytebench/sort.src
share/doc/bytebench/README

View File

@@ -0,0 +1,12 @@
$NetBSD: distinfo,v 1.11 2011/09/12 11:37:46 taca Exp $
SHA1 (unixbench-4.1.0.tgz) = 0a43d9cf08869c0f81bde4647be6bcf76c064248
RMD160 (unixbench-4.1.0.tgz) = 182e8a35574df0cd7984662bf99d47a7e24e7e03
Size (unixbench-4.1.0.tgz) = 63075 bytes
SHA1 (patch-aa) = e99170aaa9100486ef4e62387a0795dd4372f157
SHA1 (patch-ab) = 76c010c87925900f8d7046395bd9f42b885893f2
SHA1 (patch-ac) = ebfb09da84c96f8c6f48293c65a74dcf8a43cff5
SHA1 (patch-ad) = 3a1b788d9fa51fc168d59d8c87b1f476df2d5f41
SHA1 (patch-ae) = fbbce3deed7f0421034c1d57b66b1967ad8bddf1
SHA1 (patch-af) = 725a82ecb5f15ec47dda39d53a16027a0e4a7efd
SHA1 (patch-ag) = 27014f92b6e15756a0b6b5ae9fdeca9dd7d261cc

View File

@@ -0,0 +1,79 @@
$NetBSD: patch-aa,v 1.6 2002/01/09 11:24:37 jlam Exp $
--- Run.orig Wed Jul 28 15:04:47 1999
+++ Run
@@ -87,51 +87,50 @@
UNAME="uname -a"
fi
-# check that the required files are in the proper places
-if make check; then
- :
-else
- make all
-fi
-
-
# establish full paths to directories
_WD=`pwd`
-HOMEDIR=${HOMEDIR-.}
+HOMEDIR=@PREFIX@
cd $HOMEDIR
HOMEDIR=`pwd`
cd $_WD
-BINDIR=${BINDIR-${HOMEDIR}/pgms}
+BINDIR=${BINDIR-${HOMEDIR}/libexec/bytebench}
cd $BINDIR
BINDIR=`pwd`
cd $_WD
# let's extend the path to this directory
PATH="${PATH}:${BINDIR}"
-SCRPDIR=${SCRPDIR-${HOMEDIR}/pgms}
+SCRPDIR=${SCRPDIR-${HOMEDIR}/libexec/bytebench}
cd $SCRPDIR
SCRPDIR=`pwd`
cd $_WD
-TMPDIR=${HOMEDIR}/tmp
+TMPDIR=${TMPDIR-/tmp}
cd $TMPDIR
TMPDIR=`pwd`
cd $_WD
-RESULTDIR=${RESULTDIR-${HOMEDIR}/results}
+RESULTDIR=${RESULTDIR-/var/bytebench}
cd $RESULTDIR
RESULTDIR=`pwd`
cd $_WD
TIMEACCUM=${TIMEACCUM-${RESULTDIR}/times}
-TESTDIR=${TESTDIR-${HOMEDIR}/testdir}
+BENCHDIR=${BENCHDIR-${HOMEDIR}/share/bytebench}
+cd $BENCHDIR
+BENCHDIR=`pwd`
+cd $_WD
+
+TESTDIR=${TESTDIR-${TMPDIR}/bytebench}
+mkdir -p -m 0700 ${TESTDIR}
+cp ${BENCHDIR}/* ${TESTDIR}
cd $TESTDIR
TESTDIR=`pwd`
cd $_WD
-export BINDIR TMPDIR RESULTDIR PATH TESTDIR TIMEACCUM
+export BINDIR TMPDIR RESULTDIR PATH TESTDIR TIMEACCUM BENCHDIR
#
cat ${BINDIR}/unixbench.logo # display banner
rm -f ${TIMEACCUM} # clean out old time accumulation file
@@ -531,6 +530,8 @@
echo "=============================================================="
cat $REPORTLOG
fi
+
+rm -rf $TESTDIR
exit 0
########################### Amen ######################

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-ab,v 1.4 2011/09/12 11:37:46 taca Exp $
--- Makefile.orig 1999-07-28 22:05:02.000000000 +0000
+++ Makefile
@@ -31,8 +31,8 @@
ID="@(#)Makefile:3.9 -- 5/15/91 19:30:15";
SHELL = /bin/sh
#HZ = ???? #(read from environment)
-CFLAGS = -DTIME
-CC=gcc
+CFLAGS += -DTIME
+#CC=gcc
## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
#OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math \
@@ -46,6 +46,9 @@ CC=gcc
## For Solaris 2, or general-purpose GCC 2.7.x
OPTON = -O2 -fomit-frame-pointer -fforce-addr -fforce-mem -ffast-math -Wall
+## For Solaris 2, or general-purpose GCC 4.5
+OPTON = -O2 -fomit-frame-pointer -fforce-addr -ffast-math -Wall
+
## Very generic
#OPTON = -O
@@ -54,7 +57,7 @@ OPTON = -O2 -fomit-frame-pointer -fforce
#CFLAGS = -DTIME -std1 -verbose -w0
## generic gcc CFLAGS. -DTIME must be included
-CFLAGS = -DTIME -Wall -pedantic -ansi
+#CFLAGS = -DTIME -Wall -pedantic -ansi
# local directories
PROGDIR = ./pgms

View File

@@ -0,0 +1,51 @@
$NetBSD: patch-ac,v 1.3 2002/01/09 11:24:37 jlam Exp $
--- src/looper.c.orig Wed Jul 28 14:45:08 1999
+++ src/looper.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <sys/wait.h>
#include "timeit.c"
+#include <sys/param.h>
unsigned long iter;
char *cmd_argv[28];
@@ -88,12 +89,34 @@
exit(2);
}
else
+ {
/* master */
wait(&status);
- if (status != 0)
- {
- printf("Bad wait status: 0x%x\n", status);
- exit(2);
+#if (defined(NetBSD) && (NetBSD < 199810))
+ /* NetBSD 1.3H and lower have a bug in dc */
+ if (strcmp(cmd_argv[0],"dc") != 0)
+ {
+ if (WIFSIGNALED(status))
+ {
+ printf("signaled: %d\n",WTERMSIG(status));
+ exit(2);
+ }
+ if (WIFEXITED(status))
+ {
+ if (WEXITSTATUS(status) != 0)
+ {
+ printf("Exit code: %d\n",WEXITSTATUS(status));
+ exit(2);
+ }
+ }
+ } /* NetBSD 1.3H */
+#else
+ if (status != 0)
+ {
+ printf("Bad wait status: 0x%x\n", status);
+ exit(2);
+ }
+#endif
}
iter++;
}

View File

@@ -0,0 +1,65 @@
$NetBSD: patch-ad,v 1.1 2000/08/04 08:50:17 jlam Exp $
--- pgms/index.sh.orig Sat May 13 15:31:48 1995
+++ pgms/index.sh Fri Aug 4 02:33:42 2000
@@ -20,12 +20,50 @@
BASE=${BASE-pgms/index.base}
TARGET=${TARGET-results/log}
TEMP=/tmp/$$.dat
+
+HAVEPRINT=false ; export HAVEPRINT
+if expr "`type print`" : '^print is shell builtint$' >/dev/null 2>&1 ; then
+ HAVEPRINT=true
+fi
+HAVEPRINTF=false ; export HAVEPRINTF
+if expr "`type printf`" : '^printf is shell builtint$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+elif expr "`type printf`" : '.* is .*/printf$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+fi
+if $HAVEPRINT ; then
+ # use ``$echo'' if any of the other variables...
+ echo=print
+ nl='\n'
+ n=''
+ c='\c'
+elif $HAVEPRINTF ; then
+ # use ``$echo'' if any of the other variables...
+ echo=printf
+ nl='\n'
+ n=''
+ c='\c'
+else
+ echo=echo
+ (echo "hi there\c" ; echo " ") >echotmp
+ # Configure checks to make sure grep returns a status...
+ if grep c echotmp >/dev/null 2>&1 ; then
+ nl=''
+ n='-n'
+ c=''
+ else
+ nl='\n'
+ n=''
+ c='\c'
+ fi
+ rm -f echotmp
+fi
#
# BASELINE DATA
#
if [ $# -lt 1 ]
then
- echo "Data File for baseline: \c"
+ $echo $n "Data File for baseline: $c"
read BASE
else
BASE=$1
@@ -41,7 +79,7 @@
#
if [ $# -lt 2 ]
then
- echo "Source File for target machine results: \c"
+ $echo $n "Source File for target machine results: $c"
read TARGET
else
TARGET=$2

View File

@@ -0,0 +1,50 @@
$NetBSD: patch-ae,v 1.1 2000/08/04 08:50:17 jlam Exp $
--- pgms/report.sh.orig Sat May 13 15:31:52 1995
+++ pgms/report.sh Fri Aug 4 02:40:20 2000
@@ -18,11 +18,44 @@
##############################################################################
BINDIR=${BINDIR-pgms}
TARGET=${TARGET-results/log}
+HAVEPRINTF=false ; export HAVEPRINTF
+if expr "`type printf`" : '^printf is shell builtint$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+elif expr "`type printf`" : '.* is .*/printf$' >/dev/null 2>&1 ; then
+ HAVEPRINTF=true
+fi
+if $HAVEPRINT ; then
+ # use ``$echo'' if any of the other variables...
+ echo=print
+ nl='\n'
+ n=''
+ c='\c'
+elif $HAVEPRINTF ; then
+ # use ``$echo'' if any of the other variables...
+ echo=printf
+ nl='\n'
+ n=''
+ c='\c'
+else
+ echo=echo
+ (echo "hi there\c" ; echo " ") >echotmp
+ # Configure checks to make sure grep returns a status...
+ if grep c echotmp >/dev/null 2>&1 ; then
+ nl=''
+ n='-n'
+ c=''
+ else
+ nl='\n'
+ n=''
+ c='\c'
+ fi
+ rm -f echotmp
+fi
# RESULTS TARGET
#
if [ $# -lt 1 ]
then
- echo "Source File for target machine results: \c"
+ $echo $n "Source File for target machine results: $c"
read TARGET
else
TARGET=$1

View File

@@ -0,0 +1,46 @@
$NetBSD: patch-af,v 1.3 2005/10/13 03:31:06 ben Exp $
--- src/execl.c.orig 1999-07-28 14:46:58.000000000 -0700
+++ src/execl.c
@@ -22,6 +22,7 @@
*/
char SCCSid[] = "@(#) @(#)execl.c:3.3 -- 5/15/91 19:30:19";
+#include <limits.h>
#include <stdio.h>
#include <sys/types.h>
@@ -45,8 +46,9 @@ char *argv[];
char *ptr;
char *fullpath;
int duration;
- char count_str[6], start_str[12], path_str[81], *dur_str;
+ char count_str[6], start_str[12], path_str[PATH_MAX], *dur_str;
time_t start_time, this_time;
+ unsigned long ul_time;
#ifdef DEBUG
int count;
@@ -77,18 +79,19 @@ char *argv[];
duration = atoi(argv[2]);
dur_str = argv[2];
iter = (unsigned long)atoi(argv[3]); /* where are we now ? */
- sscanf(argv[4], "%lu", &start_time);
+ sscanf(argv[4], "%lu", &ul_time);
+ start_time = ul_time;
fullpath = argv[0];
}
sprintf(count_str, "%lu", ++iter); /* increment the execl counter */
- sprintf(start_str, "%lu", start_time);
+ sprintf(start_str, "%lu", (unsigned long) start_time);
time(&this_time);
if (this_time - start_time >= duration) { /* time has run out */
fprintf(stderr, "%lu loops\n", iter);
exit(0);
}
- execl(fullpath, fullpath, "0", dur_str, count_str, start_str, 0);
+ execl(fullpath, fullpath, "0", dur_str, count_str, start_str, NULL);
printf("Exec failed at iteration %lu\n", iter);
perror("Reason");
exit(1);

View File

@@ -0,0 +1,80 @@
$NetBSD: patch-ag,v 1.2 2005/11/07 15:46:26 joerg Exp $
--- src/fstime.c.orig 1999-07-28 21:47:02.000000000 +0000
+++ src/fstime.c
@@ -88,7 +88,7 @@ int g;
int i;
void stop_count();
void clean_up();
-int sigalarm = 0;
+static volatile sig_atomic_t sigalarm = 0;
/******************** MAIN ****************************/
@@ -149,13 +149,14 @@ int w_test(void)
unsigned long counted = 0L;
unsigned long tmp;
long f_blocks;
- extern int sigalarm;
+#ifndef __INTERIX
/* Sync and let it settle */
sync();
sleep(2);
sync();
sleep(1);
+#endif
signal(SIGALRM,stop_count);
sigalarm = 0; /* reset alarm flag */
@@ -176,6 +177,8 @@ int w_test(void)
lseek(f, 0L, 0); /* rewind */
}
+ fsync(f);
+
/* stop clock */
fprintf(stderr, "%d second sample\n", seconds);
write_score = counted/((long)seconds * COUNTPERK);
@@ -191,14 +194,14 @@ int r_test(void)
{
unsigned long counted = 0L;
unsigned long tmp;
- extern int sigalarm;
- extern int errno;
+#ifndef __INTERIX
/* Sync and let it settle */
sync();
sleep(2 + seconds/4);
sync();
sleep(1 + seconds/4);
+#endif
/* rewind */
errno = 0;
@@ -229,6 +232,8 @@ int r_test(void)
counted += COUNTPERBUF;
}
+ fsync(f);
+
/* stop clock */
fprintf(stderr, "%d second sample\n", seconds);
read_score = counted / ((long)seconds * COUNTPERK);
@@ -244,7 +249,6 @@ int c_test(void)
{
unsigned long counted = 0L;
unsigned long tmp;
- extern int sigalarm;
sync();
sleep(2 + seconds/4);
@@ -309,7 +313,6 @@ int c_test(void)
void stop_count(void)
{
- extern int sigalarm;
sigalarm = 1;
}