summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-10-12 19:18:51 +0000
committerJeroen Roovers <jer@gentoo.org>2010-10-12 19:18:51 +0000
commit7eef1d492b55bd1b9d19ddb24b71d2bc7e2aaffe (patch)
treea8dc134c084d8491bddd2faee7e4058d0d4fa187 /app-benchmarks
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-7eef1d492b55bd1b9d19ddb24b71d2bc7e2aaffe.tar.gz
gentoo-2-7eef1d492b55bd1b9d19ddb24b71d2bc7e2aaffe.tar.bz2
gentoo-2-7eef1d492b55bd1b9d19ddb24b71d2bc7e2aaffe.zip
Fix missing includes and defines. Respect CC (bug #243522), LDFLAGS.
(Portage version: 2.2_rc92/cvs/Linux i686)
Diffstat (limited to 'app-benchmarks')
-rw-r--r--app-benchmarks/piozone/ChangeLog10
-rw-r--r--app-benchmarks/piozone/files/piozone-1.0-r3-gentoo.diff63
-rw-r--r--app-benchmarks/piozone/piozone-1.0-r3.ebuild29
3 files changed, 100 insertions, 2 deletions
diff --git a/app-benchmarks/piozone/ChangeLog b/app-benchmarks/piozone/ChangeLog
index 256a746b8acc..07f7ae67f61b 100644
--- a/app-benchmarks/piozone/ChangeLog
+++ b/app-benchmarks/piozone/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-benchmarks/piozone
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/piozone/ChangeLog,v 1.12 2009/10/12 19:04:55 halcy0n Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/piozone/ChangeLog,v 1.13 2010/10/12 19:18:51 jer Exp $
+
+*piozone-1.0-r3 (12 Oct 2010)
+
+ 12 Oct 2010; Jeroen Roovers <jer@gentoo.org> +piozone-1.0-r3.ebuild,
+ +files/piozone-1.0-r3-gentoo.diff:
+ Fix missing includes and defines. Respect CC (bug #243522), LDFLAGS.
12 Oct 2009; Mark Loeser <halcy0n@gentoo.org> piozone-1.0-r2.ebuild:
QA fixes; unquoted variables
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/piozone-1.0-r3.ebuild b/app-benchmarks/piozone/piozone-1.0-r3.ebuild
new file mode 100644
index 000000000000..74db3e86a60e
--- /dev/null
+++ b/app-benchmarks/piozone/piozone-1.0-r3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/piozone/piozone-1.0-r3.ebuild,v 1.1 2010/10/12 19:18:51 jer Exp $
+
+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
+}