summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-benchmarks/piozone')
-rw-r--r--app-benchmarks/piozone/Manifest1
-rw-r--r--app-benchmarks/piozone/files/piozone-1.0-gentoo.diff49
-rw-r--r--app-benchmarks/piozone/files/piozone-1.0-r3-gentoo.diff63
-rw-r--r--app-benchmarks/piozone/metadata.xml5
-rw-r--r--app-benchmarks/piozone/piozone-1.0-r3.ebuild29
5 files changed, 147 insertions, 0 deletions
diff --git a/app-benchmarks/piozone/Manifest b/app-benchmarks/piozone/Manifest
new file mode 100644
index 000000000000..68e3aa0aa138
--- /dev/null
+++ b/app-benchmarks/piozone/Manifest
@@ -0,0 +1 @@
+DIST piozone-1.0.tar.gz 2228 SHA256 0b7f880b72b10664a24b712c22c90b4caab4f0cb1a8c99cba0d1a106fd63d15d SHA512 f61d3ad54716f626bf91e948a8843991bda97f2f0238e74acfa3f6d558ab6277293c6c0cf721a3806db5a1a1c5fb24dc3aee1293f1028155a726e637c39f0536 WHIRLPOOL 29947649d5490648db3cbf8fc5470f0739935b1fecc1cebdf1c7046ae254debf55010a382d0a3c732acc01715bded9be8543ff807a85b679c817c463b152448f
diff --git a/app-benchmarks/piozone/files/piozone-1.0-gentoo.diff b/app-benchmarks/piozone/files/piozone-1.0-gentoo.diff
new file mode 100644
index 000000000000..aa9a91d5ea35
--- /dev/null
+++ b/app-benchmarks/piozone/files/piozone-1.0-gentoo.diff
@@ -0,0 +1,49 @@
+diff -Naur piozone-1.0.orig/Makefile piozone-1.0/Makefile
+--- piozone-1.0.orig/Makefile 2003-07-10 18:54:51.000000000 -0300
++++ piozone-1.0/Makefile 2003-07-10 19:02:41.000000000 -0300
+@@ -19,3 +19,6 @@
+
+ dist: version distclean
+ (PACKNAME=`basename \`pwd\`` ; cd .. ; $(TAR) cf - $$PACKNAME | $(GZIP) -9 >$$PACKNAME.tar.gz)
++
++install:
++ install -D piozone /usr/bin/piozone
+diff -Naur piozone-1.0.orig/piozone.c piozone-1.0/piozone.c
+--- piozone-1.0.orig/piozone.c 2003-07-10 18:54:51.000000000 -0300
++++ piozone-1.0/piozone.c 2003-07-10 14:48:44.000000000 -0300
+@@ -20,7 +20,7 @@
+ #include <fcntl.h>
+ #include <time.h>
+ #include <signal.h>
+-
++#define uint64_t u_int64_t
+ #define KiB ((uint64_t) 1024)
+ #define MiB ((uint64_t) 1024*KiB)
+ #define GiB ((uint64_t) 1024*MiB)
+@@ -73,7 +73,7 @@
+ int count = 0;
+ int nr = 0;
+
+- llseek(fd, off, SEEK_SET);
++ lseek64(fd, off, SEEK_SET);
+ signal(SIGALRM, sigalrm_handler);
+ stopf = 0;
+ printf("Testing... ");
+@@ -121,7 +121,7 @@
+ printf("Testing... ");
+ alarm(ts);
+ while (!stopf &&
+- llseek(fd, off+((rand()&area)*MiB), SEEK_SET) != -1 &&
++ lseek64(fd, off+((rand()&area)*MiB), SEEK_SET) != -1 &&
+ (nr = read(fd, iobuf, len)) == len)
+ {
+ print_dial();
+@@ -159,7 +159,7 @@
+ off = 0;
+ del = 64*GiB;
+
+- while (del > 8*KiB && llseek(fd, off+del, SEEK_SET) != -1)
++ while (del > 8*KiB && lseek64(fd, off+del, SEEK_SET) != -1)
+ {
+ if (read(fd, buf, 8*KiB) < 0)
+ del >>= 1;
diff --git a/app-benchmarks/piozone/files/piozone-1.0-r3-gentoo.diff b/app-benchmarks/piozone/files/piozone-1.0-r3-gentoo.diff
new file mode 100644
index 000000000000..b902814fec79
--- /dev/null
+++ b/app-benchmarks/piozone/files/piozone-1.0-r3-gentoo.diff
@@ -0,0 +1,63 @@
+--- a/Makefile 2002-01-28 09:15:59.000000000 +0100
++++ b/Makefile 2010-10-12 21:07:53.000000000 +0200
+@@ -4,12 +4,12 @@
+ GZIP=gzip
+
+ #CC=cc -xarch=v9 -O
+-CC=cc -O
++#CC=cc -O
+
+ all: piozone
+
+ piozone: piozone.o version.o
+- $(CC) -o piozone piozone.o version.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o piozone piozone.o version.o
+
+ clean distclean:
+ -rm -f core *.o piozone *~ \#*
+@@ -19,3 +19,6 @@
+
+ dist: version distclean
+ (PACKNAME=`basename \`pwd\`` ; cd .. ; $(TAR) cf - $$PACKNAME | $(GZIP) -9 >$$PACKNAME.tar.gz)
++
++install:
++ install -D piozone /usr/bin/piozone
+--- a/piozone.c 2002-01-28 09:14:54.000000000 +0100
++++ b/piozone.c 2010-10-12 21:08:45.000000000 +0200
+@@ -20,7 +20,9 @@
+ #include <fcntl.h>
+ #include <time.h>
+ #include <signal.h>
++#include <stdlib.h> /* exit(), rand(), atoi() */
+
++#define uint64_t u_int64_t
+ #define KiB ((uint64_t) 1024)
+ #define MiB ((uint64_t) 1024*KiB)
+ #define GiB ((uint64_t) 1024*MiB)
+@@ -73,7 +75,7 @@
+ int count = 0;
+ int nr = 0;
+
+- llseek(fd, off, SEEK_SET);
++ lseek64(fd, off, SEEK_SET);
+ signal(SIGALRM, sigalrm_handler);
+ stopf = 0;
+ printf("Testing... ");
+@@ -121,7 +123,7 @@
+ printf("Testing... ");
+ alarm(ts);
+ while (!stopf &&
+- llseek(fd, off+((rand()&area)*MiB), SEEK_SET) != -1 &&
++ lseek64(fd, off+((rand()&area)*MiB), SEEK_SET) != -1 &&
+ (nr = read(fd, iobuf, len)) == len)
+ {
+ print_dial();
+@@ -159,7 +161,7 @@
+ off = 0;
+ del = 64*GiB;
+
+- while (del > 8*KiB && llseek(fd, off+del, SEEK_SET) != -1)
++ while (del > 8*KiB && lseek64(fd, off+del, SEEK_SET) != -1)
+ {
+ if (read(fd, buf, 8*KiB) < 0)
+ del >>= 1;
diff --git a/app-benchmarks/piozone/metadata.xml b/app-benchmarks/piozone/metadata.xml
new file mode 100644
index 000000000000..7e5a7f579109
--- /dev/null
+++ b/app-benchmarks/piozone/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>benchmarks</herd>
+</pkgmetadata>
diff --git a/app-benchmarks/piozone/piozone-1.0-r3.ebuild b/app-benchmarks/piozone/piozone-1.0-r3.ebuild
new file mode 100644
index 000000000000..f1d4e32c6211
--- /dev/null
+++ b/app-benchmarks/piozone/piozone-1.0-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A hard-disk benchmarking tool"
+HOMEPAGE="http://www.lysator.liu.se/~pen/piozone/"
+SRC_URI="ftp://ftp.lysator.liu.se/pub/unix/piozone/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}-gentoo.diff
+}
+
+src_compile() {
+ append-flags -D_LARGEFILE64_SOURCE
+ emake CC=$(tc-getCC) || die
+}
+
+src_install() {
+ dosbin piozone
+}