aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2005-01-08 22:10:44 +0000
committerStefan Eßer <se@FreeBSD.org>2005-01-08 22:10:44 +0000
commit9a369a50d0657fe3491a4a2fe7261c6e12fbda3c (patch)
treec2b1bd17c207d9ee68a3ca714bc1d287a0f030c9 /benchmarks
parente39774dfa9b08bdd6c411e5cdd2ff53e4bfa1348 (diff)
downloadports-9a369a50d0657fe3491a4a2fe7261c6e12fbda3c.tar.gz
ports-9a369a50d0657fe3491a4a2fe7261c6e12fbda3c.zip
Notes
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/unixbench/Makefile60
-rw-r--r--benchmarks/unixbench/distinfo4
-rw-r--r--benchmarks/unixbench/files/patch-Makefile25
-rw-r--r--benchmarks/unixbench/files/patch-Run61
-rw-r--r--benchmarks/unixbench/files/patch-aa96
-rw-r--r--benchmarks/unixbench/files/patch-ab129
-rw-r--r--benchmarks/unixbench/files/patch-ac15
-rw-r--r--benchmarks/unixbench/files/patch-ad17
-rw-r--r--benchmarks/unixbench/files/patch-ae10
-rw-r--r--benchmarks/unixbench/files/patch-pgms:cleanup.sh13
-rw-r--r--benchmarks/unixbench/files/patch-pgms:multi.sh10
-rw-r--r--benchmarks/unixbench/files/patch-pgms:tst.sh11
-rw-r--r--benchmarks/unixbench/files/patch-src:dhry_1.c (renamed from benchmarks/unixbench/files/patch-af)14
-rw-r--r--benchmarks/unixbench/files/unixbench.in10
-rw-r--r--benchmarks/unixbench/pkg-descr25
-rw-r--r--benchmarks/unixbench/pkg-message5
-rw-r--r--benchmarks/unixbench/pkg-plist91
17 files changed, 229 insertions, 367 deletions
diff --git a/benchmarks/unixbench/Makefile b/benchmarks/unixbench/Makefile
index d711f418d74d..05d45733b525 100644
--- a/benchmarks/unixbench/Makefile
+++ b/benchmarks/unixbench/Makefile
@@ -5,34 +5,46 @@
# $FreeBSD$
#
-PORTNAME= bytebench
-PORTVERSION= 3.1
+PORTNAME= unixbench
+PORTVERSION= 4.1.0
CATEGORIES= benchmarks
-MASTER_SITES= ftp://ftp.inria.fr/archives/system/benchmark/
-EXTRACT_SUFX= .tar.Z
+MASTER_SITES= http://www.tux.org/pub/tux/benchmarks/System/unixbench/
+EXTRACT_SUFX= .tgz
MAINTAINER= se@FreeBSD.org
-COMMENT= The BYTE magazine benchmark suite
+COMMENT= The BYTE magazine's Public Domain benchmark for UNIX
+
+SUB_FILES= unixbench
do-install:
- -${MKDIR} $(PREFIX)/lib/bytebench
- for f in Makefile README Run doc pgms results testdir; \
- do ${CP} -R $(WRKSRC)/$$f $(PREFIX)/lib/bytebench; done
- ${ECHO_CMD} "#!/bin/sh" > $(PREFIX)/bin/bytebench
- ${ECHO_CMD} "TMPDIR=\$${TMPDIR-/var/tmp}" >> $(PREFIX)/bin/bytebench
- ${ECHO_CMD} "RESULTDIR=/tmp" >> $(PREFIX)/bin/bytebench
- ${ECHO_CMD} "export TMPDIR RESULTDIR" >> $(PREFIX)/bin/bytebench
- ${ECHO_CMD} "cd $(PREFIX)/lib/bytebench" >> $(PREFIX)/bin/bytebench
- ${ECHO_CMD} "exec ./Run \"\$$@\"" >> $(PREFIX)/bin/bytebench
- ${CHMOD} 755 $(PREFIX)/bin/bytebench
- ${CHMOD} 644 $(PREFIX)/lib/bytebench/Makefile
- ${CHMOD} 644 $(PREFIX)/lib/bytebench/README
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/Run
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/doc
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/pgms
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/pgms/*
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/results
- ${CHMOD} 755 $(PREFIX)/lib/bytebench/testdir
- @${RM} -f ${PREFIX}/lib/bytebench/pgms/*.orig
+ ${INSTALL_SCRIPT} ${WRKDIR}/unixbench ${PREFIX}/bin/
+ -${MKDIR} ${PREFIX}/lib/unixbench
+ for f in Run ; do \
+ ${INSTALL_SCRIPT} ${WRKSRC}/$${f} ${PREFIX}/lib/unixbench/ ; \
+ done
+ for f in Makefile README ; do \
+ ${INSTALL_DATA} ${WRKSRC}/$${f} ${PREFIX}/lib/unixbench/ ; \
+ done
+ -${MKDIR} ${PREFIX}/lib/unixbench/pgms
+ for f in ${WRKSRC}/pgms/* ; do \
+ case $$f in \
+ *.awk|*.sh|*perlbench) \
+ ${INSTALL_SCRIPT} $${f} ${PREFIX}/lib/unixbench/pgms/ ;; \
+ *.logo|*.base) \
+ ${INSTALL_SCRIPT} $${f} ${PREFIX}/lib/unixbench/pgms/ ;; \
+ *.orig|*.rej|*~) \
+ ;;\
+ *) \
+ ${INSTALL_PROGRAM} $${f} ${PREFIX}/lib/unixbench/pgms/ ;; \
+ esac ; \
+ done
+ -${MKDIR} ${PREFIX}/lib/unixbench/results
+# for f in ${WRKSRC}/results/* ; do \
+# ${INSTALL_DATA} $${f} ${PREFIX}/lib/unixbench/results/ ; \
+# done
+ -${MKDIR} ${PREFIX}/lib/unixbench/testdir
+ for f in ${WRKSRC}/testdir/* ; do \
+ ${INSTALL_DATA} $${f} ${PREFIX}/lib/unixbench/testdir/ ; \
+ done
.include <bsd.port.mk>
diff --git a/benchmarks/unixbench/distinfo b/benchmarks/unixbench/distinfo
index aa43b7a5bcdd..8fab90c94777 100644
--- a/benchmarks/unixbench/distinfo
+++ b/benchmarks/unixbench/distinfo
@@ -1,2 +1,2 @@
-MD5 (bytebench-3.1.tar.Z) = 93c718fee38d27c050edcb3a50530b2e
-SIZE (bytebench-3.1.tar.Z) = 76377
+MD5 (unixbench-4.1.0.tgz) = 3561ae1f067f9dfb9707c062f536acac
+SIZE (unixbench-4.1.0.tgz) = 63075
diff --git a/benchmarks/unixbench/files/patch-Makefile b/benchmarks/unixbench/files/patch-Makefile
new file mode 100644
index 000000000000..3194d354c184
--- /dev/null
+++ b/benchmarks/unixbench/files/patch-Makefile
@@ -0,0 +1,25 @@
+--- Makefile.orig Sun Dec 19 01:29:33 2004
++++ Makefile Sun Dec 19 01:32:06 2004
+@@ -30,8 +30,9 @@
+ ##############################################################################
+ ID="@(#)Makefile:3.9 -- 5/15/91 19:30:15";
+ SHELL = /bin/sh
+-#HZ = ???? #(read from environment)
+-CFLAGS = -DTIME
++HZ = 128
++CFLAGS ?= -O -finline-functions -funrool-loops -fomit-frame-pointer
++CFLAGS+=-DTIME
+ CC=gcc
+
+ ## For Linux 486/Pentium, GCC 2.7.x and 2.8.x
+@@ -60,8 +61,8 @@
+ PROGDIR = ./pgms
+ SRCDIR = ./src
+ TESTDIR = ./testdir
+-RESULTDIR = ./results
+-TMPDIR = ./tmp
++#RESULTDIR = ./results
++#TMPDIR = /var/tmp
+ # other directories
+ INCLDIR = /usr/include
+ LIBDIR = /lib
diff --git a/benchmarks/unixbench/files/patch-Run b/benchmarks/unixbench/files/patch-Run
new file mode 100644
index 000000000000..dba938a1ed84
--- /dev/null
+++ b/benchmarks/unixbench/files/patch-Run
@@ -0,0 +1,61 @@
+--- Run.orig Sun Dec 19 01:34:20 2004
++++ Run Sun Dec 19 01:39:54 2004
+@@ -88,11 +88,11 @@
+ fi
+
+ # check that the required files are in the proper places
+-if make check; then
+- :
+-else
+- make all
+-fi
++#if make check; then
++# :
++#else
++# make all
++#fi
+
+
+ # establish full paths to directories
+@@ -114,7 +114,7 @@
+ SCRPDIR=`pwd`
+ cd $_WD
+
+-TMPDIR=${HOMEDIR}/tmp
++TMPDIR=${TMPDIR-${HOMEDIR}/tmp}
+ cd $TMPDIR
+ TMPDIR=`pwd`
+ cd $_WD
+@@ -367,10 +367,11 @@
+ C)
+ logmsg="C Compiler Throughput"
+ prog="looper ${looper-60} ${CC} cctest.c"
++ prog="looper ${looper-60} ${CC} cctest.c -o ${TMPDIR}/a.out"
+ stdout=/dev/null
+ repeat="$shortloop"
+ cleanopt="-m $TMPTIMES"
+- rm -f ${TESTDIR}/cctest.o ${TESTDIR}/a.out
++ rm -f ${TESTDIR}/cctest.o ${TMPDIR}/a.out
+ ;;
+
+ arithoh)
+@@ -385,8 +386,8 @@
+
+ dc)
+ logmsg="Dc: sqrt(2) to 99 decimal places"
+- prog="looper ${looper-30} dc"
+- stdin=dc.dat
++ prog="looper ${looper-30} \"dc < ${TESTDIR}/dc.dat\""
++ stdin=
+ stdout=/dev/null
+ cleanopt="-m $TMPTIMES"
+ ;;
+@@ -508,7 +509,7 @@
+ ########### some specific cleanup routines ##############
+ case $bench in
+ C)
+- rm -f ${TESTDIR}/cctest.o ${TESTDIR}/a.out
++ rm -f ${TESTDIR}/cctest.o ${TMPDIR}/a.out
+ ;;
+
+ fstime | fsbuffer | fsdisk)
diff --git a/benchmarks/unixbench/files/patch-aa b/benchmarks/unixbench/files/patch-aa
deleted file mode 100644
index 011f1cc85f71..000000000000
--- a/benchmarks/unixbench/files/patch-aa
+++ /dev/null
@@ -1,96 +0,0 @@
---- Makefile.orig Wed Feb 5 02:08:43 1992
-+++ Makefile Fri Feb 4 21:15:26 2000
-@@ -24,18 +24,19 @@
- ##############################################################################
- ID="@(#)Makefile:3.9 -- 5/15/91 19:30:15";
- SHELL = /bin/sh
--#HZ = ???? #(read from environment)
--CFLAGS = -DTIME
--OPTON = -O #optimization on (give it your best shot)
-- # -- check your compiler man
--OPTOFF = -Od #optimization off -- check your compiler man
-+HZ = 128
-+CFLAGS ?= -O -finline-functions -funroll-loops -fomit-frame-pointer
-+CFLAGS+=-DTIME
-+ #optimization on (give it your best shot)
-+ # -- check your compiler man
-+OPTOFF = -O0 -static #optimization off -- check your compiler man
- # local directories
- PROGDIR = ./pgms
- SRCDIR = ./src
- DOCDIR = ./doc
- TESTDIR = ./testdir
--RESULTDIR = ./results
--TMPDIR = ./tmp
-+# RESULTDIR = ./results
-+# TMPDIR = /var/tmp
- # other directories
- INCLDIR = /usr/include
- LIBDIR = /lib
-@@ -128,45 +129,45 @@
-
- # Individual programs
- $(PROGDIR)/arithoh: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/arithoh ${CFLAGS} ${OPTON} -Darithoh $(SRCDIR)/arith.c
- $(PROGDIR)/register: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum=register $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/register ${CFLAGS} ${OPTON} -Ddatum=register $(SRCDIR)/arith.c
- $(PROGDIR)/short: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/short ${CFLAGS} ${OPTON} -Ddatum=short $(SRCDIR)/arith.c
- $(PROGDIR)/int: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/int ${CFLAGS} ${OPTON} -Ddatum=int $(SRCDIR)/arith.c
- $(PROGDIR)/long: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/long ${CFLAGS} ${OPTON} -Ddatum=long $(SRCDIR)/arith.c
- $(PROGDIR)/float: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/float ${CFLAGS} ${OPTON} -Ddatum=float $(SRCDIR)/arith.c
- $(PROGDIR)/double: $(SRCDIR)/arith.c
-- cc -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
-+ $(CC) -o $(PROGDIR)/double ${CFLAGS} ${OPTON} -Ddatum=double $(SRCDIR)/arith.c
- $(PROGDIR)/hanoi: $(SRCDIR)/hanoi.c
-- cc -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
-+ $(CC) -o $(PROGDIR)/hanoi ${CFLAGS} ${OPTON} $(SRCDIR)/hanoi.c
- $(PROGDIR)/fstime: $(SRCDIR)/fstime.c
-- cc -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} -Dawk=1 $(SRCDIR)/fstime.c
-+ $(CC) -o $(PROGDIR)/fstime ${CFLAGS} ${OPTON} -Dawk=1 $(SRCDIR)/fstime.c
- $(PROGDIR)/syscall: $(SRCDIR)/syscall.c
-- cc -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
-+ $(CC) -o $(PROGDIR)/syscall ${CFLAGS} ${OPTON} $(SRCDIR)/syscall.c
- $(PROGDIR)/context1: $(SRCDIR)/context1.c
-- cc -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
-+ $(CC) -o $(PROGDIR)/context1 ${CFLAGS} ${OPTON} $(SRCDIR)/context1.c
- $(PROGDIR)/pipe: $(SRCDIR)/pipe.c
-- cc -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
-+ $(CC) -o $(PROGDIR)/pipe ${CFLAGS} ${OPTON} $(SRCDIR)/pipe.c
- $(PROGDIR)/spawn: $(SRCDIR)/spawn.c
-- cc -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
-+ $(CC) -o $(PROGDIR)/spawn ${CFLAGS} ${OPTON} $(SRCDIR)/spawn.c
- $(PROGDIR)/execl: $(SRCDIR)/execl.c $(SRCDIR)/big.c
-- cc -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
-+ $(CC) -o $(PROGDIR)/execl ${CFLAGS} ${OPTON} $(SRCDIR)/execl.c
- $(PROGDIR)/dhry2: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
-- cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c
-- cd $(SRCDIR); cc -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c
-- cc -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
-+ cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_1.c
-+ cd $(SRCDIR); $(CC) -c ${CFLAGS} -DHZ=${HZ} ${OPTON} dhry_2.c
-+ $(CC) -o $(PROGDIR)/dhry2 ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
- cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
- $(PROGDIR)/dhry2reg: $(SRCDIR)/dhry_1.c $(SRCDIR)/dhry_2.c $(SRCDIR)/dhry.h
-- cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
-- cd $(SRCDIR); cc -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
-- cc -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
-+ cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_1.c
-+ cd $(SRCDIR); $(CC) -c ${CFLAGS} -DREG=register -DHZ=${HZ} ${OPTON} dhry_2.c
-+ $(CC) -o $(PROGDIR)/dhry2reg ${CFLAGS} ${OPTON} $(SRCDIR)/dhry_1.o $(SRCDIR)/dhry_2.o
- cd $(SRCDIR); rm -f dhry_1.o dhry_2.o
- $(PROGDIR)/looper: $(SRCDIR)/looper.c
-- cc -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
-+ $(CC) -o $(PROGDIR)/looper ${CFLAGS} ${OPTON} $(SRCDIR)/looper.c
-
- # Run the benchmarks and create the reports
- run:
diff --git a/benchmarks/unixbench/files/patch-ab b/benchmarks/unixbench/files/patch-ab
deleted file mode 100644
index 062decfb4f86..000000000000
--- a/benchmarks/unixbench/files/patch-ab
+++ /dev/null
@@ -1,129 +0,0 @@
-*** Run.orig Wed Feb 5 11:08:46 1992
---- Run Fri Dec 18 22:48:52 1998
-***************
-*** 41,45 ****
- # awk cat cc chmod comm cp date dc df echo ed expr
- # kill ls make mkdir rm sed test time touch tty umask who
-! # AND /bin/time
- # to generate result indexes, you will also need ...
- # join
---- 41,45 ----
- # awk cat cc chmod comm cp date dc df echo ed expr
- # kill ls make mkdir rm sed test time touch tty umask who
-! # AND /usr/bin/time
- # to generate result indexes, you will also need ...
- # join
-***************
-*** 51,55 ****
- then
- # determine flavor of UNIX from number of lines generated by /bin/tim
-! Fcount=`/bin/time date 2>&1 | wc -l | sed 's/ //g'`
- case "$Fcount"
- in
---- 51,55 ----
- then
- # determine flavor of UNIX from number of lines generated by /bin/tim
-! Fcount=`/usr/bin/time date 2>&1 | wc -l | sed 's/ //g'`
- case "$Fcount"
- in
-***************
-*** 68,75 ****
- export FLAVOR
- # check that the required files are in the proper places
-! if make check
-! then :
-! else make all
-! fi
- #
- #
---- 68,75 ----
- export FLAVOR
- # check that the required files are in the proper places
-! #if make check
-! # then :
-! # else make all
-! #fi
- #
- #
-***************
-*** 93,97 ****
- cd $PWD
-
-! TMPDIR=${HOMEDIR}/tmp
- cd $TMPDIR
- TMPDIR=`pwd`
---- 93,97 ----
- cd $PWD
-
-! TMPDIR=${TMPDIR-${HOMEDIR}/tmp}
- cd $TMPDIR
- TMPDIR=`pwd`
-***************
-*** 304,312 ****
- C)
- logmsg="C Compiler Test"
-! prog="looper ${looper-60} cc cctest.c"
- stdout=/dev/null
- repeat="$shortloop"
- cleanopt="-m $TMPTIMES"
-! rm -f ${TESTDIR}/cctest.o ${TESTDIR}/a.out
- ;;
-
---- 304,312 ----
- C)
- logmsg="C Compiler Test"
-! prog="looper ${looper-60} cc cctest.c -o ${TMPDIR}/a.out"
- stdout=/dev/null
- repeat="$shortloop"
- cleanopt="-m $TMPTIMES"
-! rm -f ${TESTDIR}/cctest.o ${TMPDIR}/a.out
- ;;
-
-***************
-*** 324,329 ****
- dc)
- logmsg="Dc: sqrt(2) to 99 decimal places"
-! prog="looper ${looper-60} dc"
-! stdin=dc.dat
- stdout=/dev/null
- cleanopt="-m $TMPTIMES"
---- 324,329 ----
- dc)
- logmsg="Dc: sqrt(2) to 99 decimal places"
-! prog="looper ${looper-60} \"dc < ${TESTDIR}/dc.dat\""
-! stdin=
- stdout=/dev/null
- cleanopt="-m $TMPTIMES"
-***************
-*** 418,426 ****
- if test "$stdin" = ""
- then # without redirected stdin
-! /bin/time $prog $opt $bgstr 2>>$TMPTIMES >>$stdout
- else # with redirected stdin
-! /bin/time $prog $opt $bgstr <$stdin 2>>$TMPTIMES >>$stdout
- fi
-- /bin/time $benchcmd
- ###############################################
- cd $pwd # move back home
---- 418,425 ----
- if test "$stdin" = ""
- then # without redirected stdin
-! /usr/bin/time $prog $opt $bgstr 2>>$TMPTIMES >>$stdout
- else # with redirected stdin
-! /usr/bin/time $prog $opt $bgstr <$stdin 2>>$TMPTIMES >>$stdout
- fi
- ###############################################
- cd $pwd # move back home
-***************
-*** 451,455 ****
- in
- C)
-! rm -f ${TESTDIR}/cctest.o ${TESTDIR}/a.out
- ;;
-
---- 451,455 ----
- in
- C)
-! rm -f ${TESTDIR}/cctest.o ${TMPDIR}/a.out
- ;;
-
diff --git a/benchmarks/unixbench/files/patch-ac b/benchmarks/unixbench/files/patch-ac
deleted file mode 100644
index 7cab0456099b..000000000000
--- a/benchmarks/unixbench/files/patch-ac
+++ /dev/null
@@ -1,15 +0,0 @@
-*** pgms/tst.sh.orig Wed Feb 5 11:08:39 1992
---- pgms/tst.sh Fri Dec 18 23:10:07 1998
-***************
-*** 15,19 ****
- ###############################################################################
- ID="@(#)tst.sh:3.4 -- 5/15/91 19:30:24";
-! sort >sort.$$ <sort.src
- od sort.$$ | sort -n +1 > od.$$
- grep the sort.$$ | tee grep.$$ | wc > wc.$$
---- 15,19 ----
- ###############################################################################
- ID="@(#)tst.sh:3.4 -- 5/15/91 19:30:24";
-! sort >sort.$$ < ${TESTDIR}/sort.src
- od sort.$$ | sort -n +1 > od.$$
- grep the sort.$$ | tee grep.$$ | wc > wc.$$
diff --git a/benchmarks/unixbench/files/patch-ad b/benchmarks/unixbench/files/patch-ad
deleted file mode 100644
index 12de4faa1333..000000000000
--- a/benchmarks/unixbench/files/patch-ad
+++ /dev/null
@@ -1,17 +0,0 @@
-*** pgms/cleanup.sh.orig Wed Feb 5 11:08:37 1992
---- pgms/cleanup.sh Wed Jan 3 19:27:21 1996
-***************
-*** 87,92 ****
-
- -r) : reason for failure
-! echo $1
-! echo $1 >>$LOGFILE
- shift
- ;;
---- 87,92 ----
-
- -r) : reason for failure
-! echo -e $1
-! echo -e $1 >>$LOGFILE
- shift
- ;;
diff --git a/benchmarks/unixbench/files/patch-ae b/benchmarks/unixbench/files/patch-ae
deleted file mode 100644
index 40131bbafc83..000000000000
--- a/benchmarks/unixbench/files/patch-ae
+++ /dev/null
@@ -1,10 +0,0 @@
-*** pgms/multi.sh.orig Thu Jan 4 15:16:20 1996
---- pgms/multi.sh Thu Jan 4 15:17:26 1996
-***************
-*** 15,18 ****
---- 15,19 ----
- ###############################################################################
- ID="@(#)multi.sh:3.4 -- 5/15/91 19:30:24";
-+ cd $TMPDIR
- for i
- do
diff --git a/benchmarks/unixbench/files/patch-pgms:cleanup.sh b/benchmarks/unixbench/files/patch-pgms:cleanup.sh
new file mode 100644
index 000000000000..e464baafbe85
--- /dev/null
+++ b/benchmarks/unixbench/files/patch-pgms:cleanup.sh
@@ -0,0 +1,13 @@
+--- pgms/cleanup.sh.orig Sun Dec 19 01:42:45 2004
++++ pgms/cleanup.sh Sun Dec 19 01:43:00 2004
+@@ -107,8 +107,8 @@
+ ;;
+
+ -r) # reason for failure
+- echo $1
+- echo $1 >>$LOGFILE
++ echo -e $1
++ echo -e $1 >>$LOGFILE
+ shift
+ ;;
+
diff --git a/benchmarks/unixbench/files/patch-pgms:multi.sh b/benchmarks/unixbench/files/patch-pgms:multi.sh
new file mode 100644
index 000000000000..ef23e06402ce
--- /dev/null
+++ b/benchmarks/unixbench/files/patch-pgms:multi.sh
@@ -0,0 +1,10 @@
+--- pgms/multi.sh.orig Sun Dec 19 01:44:14 2004
++++ pgms/multi.sh Sun Dec 19 01:44:24 2004
+@@ -14,6 +14,7 @@
+ #
+ ###############################################################################
+ ID="@(#)multi.sh:3.4 -- 5/15/91 19:30:24";
++cd ${TMPDIR}
+ instance=1
+ while [ $instance -le $1 ]; do
+ /bin/sh $BINDIR/tst.sh &
diff --git a/benchmarks/unixbench/files/patch-pgms:tst.sh b/benchmarks/unixbench/files/patch-pgms:tst.sh
new file mode 100644
index 000000000000..f8bd42ec2d8e
--- /dev/null
+++ b/benchmarks/unixbench/files/patch-pgms:tst.sh
@@ -0,0 +1,11 @@
+--- pgms/tst.sh.orig Sun Dec 19 01:41:24 2004
++++ pgms/tst.sh Sun Dec 19 01:41:49 2004
+@@ -14,7 +14,7 @@
+ #
+ ###############################################################################
+ ID="@(#)tst.sh:3.4 -- 5/15/91 19:30:24";
+-sort >sort.$$ <sort.src
++sort >sort.$$ < ${TESTDIR}/sort.src
+ od sort.$$ | sort -n +1 > od.$$
+ grep the sort.$$ | tee grep.$$ | wc > wc.$$
+ rm sort.$$ grep.$$ od.$$ wc.$$
diff --git a/benchmarks/unixbench/files/patch-af b/benchmarks/unixbench/files/patch-src:dhry_1.c
index 7ecc7b21e8dd..142f7a03240a 100644
--- a/benchmarks/unixbench/files/patch-af
+++ b/benchmarks/unixbench/files/patch-src:dhry_1.c
@@ -1,19 +1,19 @@
---- src/dhry_1.c.orig Thu Jan 27 21:23:37 2000
-+++ src/dhry_1.c Mon Mar 12 19:08:06 2001
-@@ -32,6 +32,7 @@
+--- src/dhry_1.c.orig Sun Dec 19 01:45:10 2004
++++ src/dhry_1.c Sun Dec 19 01:45:59 2004
+@@ -34,6 +34,7 @@
***************************************************************************/
char SCCSid[] = "@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21";
+#include <sys/types.h>
#include <stdio.h>
- #include "dhry.h"
- #include "timeit.c"
-@@ -78,7 +79,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+@@ -81,7 +82,7 @@
/* Measurements should last at least about 2 seconds */
#endif
#ifdef TIME
-extern long time();
-+extern time_t time();
++extern time_t time();
/* see library function "time" */
#define Too_Small_Time 2
/* Measurements should last at least 2 seconds */
diff --git a/benchmarks/unixbench/files/unixbench.in b/benchmarks/unixbench/files/unixbench.in
new file mode 100644
index 000000000000..850340a405cd
--- /dev/null
+++ b/benchmarks/unixbench/files/unixbench.in
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+TMPDIR=${TMPDIR-/var/tmp}
+RESULTDIR=${RESULTDIR-/tmp}
+
+export TMPDIR RESULTDIR
+
+cd %%PREFIX%%/lib/unixbench
+
+exec ./Run "$@"
diff --git a/benchmarks/unixbench/pkg-descr b/benchmarks/unixbench/pkg-descr
index 8693a1581db4..9c7434606172 100644
--- a/benchmarks/unixbench/pkg-descr
+++ b/benchmarks/unixbench/pkg-descr
@@ -1,24 +1,3 @@
-The BYTE benchmark suite tests several aspects of system performance.
+UnixBench v4.0 based on the BYTE UNIX Benchmarks v3.
-An article which describes the concepts and helps understand the results
-can be found in the doc directory (/usr/local/lib/bytebench/doc usually.)
-
-This benchmark is quite prominent among Linux users, and there is a patched
-version available from some web suite from where results are made available,
-too.
-Since they offer some results of non-Linux systems for comparison, they might
-be interested in FreeBSD reports, too ;-)
-
-Quoting from "README.submittal" of the Linux version of this benchmark suite:
-% Please e-mail test results along with platform info to:
-% results@silkroad.com
-%
-% Included CPU info, speed, RAM, and host adapter and bus
-% info as well as any special compilation flags.
-%
-% See TEMPLATE Below....
-% results will be included in the URL:
-% http://www.silkroad.com/bass/linux/bm.html
-% Thanks,
-%
-% Tim Bass (bass@silkroad.com)
+WWW: http://www.tux.org/pub/tux/benchmarks/System/unixbench/
diff --git a/benchmarks/unixbench/pkg-message b/benchmarks/unixbench/pkg-message
new file mode 100644
index 000000000000..db5791dda9b4
--- /dev/null
+++ b/benchmarks/unixbench/pkg-message
@@ -0,0 +1,5 @@
+------------------------------------------------------------------------
+If you want to run unixbench, please type the following command:
+
+ % unixbench
+------------------------------------------------------------------------
diff --git a/benchmarks/unixbench/pkg-plist b/benchmarks/unixbench/pkg-plist
index 32c956709dd4..fe9af387a04c 100644
--- a/benchmarks/unixbench/pkg-plist
+++ b/benchmarks/unixbench/pkg-plist
@@ -1,44 +1,47 @@
-bin/bytebench
-lib/bytebench/Run
-lib/bytebench/pgms/looper
-lib/bytebench/pgms/cleanup.sh
-lib/bytebench/pgms/fs.awk
-lib/bytebench/pgms/index.awk
-lib/bytebench/pgms/index.base
-lib/bytebench/pgms/index.sh
-lib/bytebench/pgms/loopm.awk
-lib/bytebench/pgms/loops.awk
-lib/bytebench/pgms/multi.sh
-lib/bytebench/pgms/report.awk
-lib/bytebench/pgms/report.sh
-lib/bytebench/pgms/tst.sh
-lib/bytebench/pgms/arithoh
-lib/bytebench/pgms/register
-lib/bytebench/pgms/short
-lib/bytebench/pgms/int
-lib/bytebench/pgms/long
-lib/bytebench/pgms/float
-lib/bytebench/pgms/double
-lib/bytebench/pgms/hanoi
-lib/bytebench/pgms/fstime
-lib/bytebench/pgms/syscall
-lib/bytebench/pgms/context1
-lib/bytebench/pgms/pipe
-lib/bytebench/pgms/spawn
-lib/bytebench/pgms/execl
-lib/bytebench/pgms/dhry2
-lib/bytebench/pgms/dhry2reg
-lib/bytebench/pgms/byte.logo
-lib/bytebench/Makefile
-lib/bytebench/README
-lib/bytebench/doc/bench3.doc
-lib/bytebench/doc/bench.doc
-lib/bytebench/results/reports.shar
-lib/bytebench/testdir/dc.dat
-lib/bytebench/testdir/cctest.c
-lib/bytebench/testdir/sort.src
-@dirrm lib/bytebench/doc
-@dirrm lib/bytebench/results
-@dirrm lib/bytebench/pgms
-@dirrm lib/bytebench/testdir
-@dirrm lib/bytebench
+bin/unixbench
+lib/unixbench/Makefile
+lib/unixbench/README
+lib/unixbench/Run
+lib/unixbench/pgms/arithoh
+lib/unixbench/pgms/cleanup.sh
+lib/unixbench/pgms/context1
+lib/unixbench/pgms/dhry2
+lib/unixbench/pgms/dhry2reg
+lib/unixbench/pgms/double
+lib/unixbench/pgms/execl
+lib/unixbench/pgms/float
+lib/unixbench/pgms/fs.awk
+lib/unixbench/pgms/fsbuffer
+lib/unixbench/pgms/fsdisk
+lib/unixbench/pgms/fstime
+lib/unixbench/pgms/hanoi
+lib/unixbench/pgms/index.awk
+lib/unixbench/pgms/index.base
+lib/unixbench/pgms/index.sh
+lib/unixbench/pgms/int
+lib/unixbench/pgms/long
+lib/unixbench/pgms/looper
+lib/unixbench/pgms/loopm.awk
+lib/unixbench/pgms/loops.awk
+lib/unixbench/pgms/lps.awk
+lib/unixbench/pgms/multi.sh
+lib/unixbench/pgms/mwips.awk
+lib/unixbench/pgms/perlbench
+lib/unixbench/pgms/pipe
+lib/unixbench/pgms/register
+lib/unixbench/pgms/report.awk
+lib/unixbench/pgms/report.sh
+lib/unixbench/pgms/select
+lib/unixbench/pgms/short
+lib/unixbench/pgms/spawn
+lib/unixbench/pgms/syscall
+lib/unixbench/pgms/tst.sh
+lib/unixbench/pgms/unixbench.logo
+lib/unixbench/pgms/whetstone-double
+lib/unixbench/testdir/cctest.c
+lib/unixbench/testdir/dc.dat
+lib/unixbench/testdir/sort.src
+@dirrm lib/unixbench/testdir
+@dirrm lib/unixbench/results
+@dirrm lib/unixbench/pgms
+@dirrm lib/unixbench