Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-benchmarks/tiobench/files/, app-benchmarks/tiobench/
Date: Sat, 26 Nov 2016 12:40:16
Message-Id: 1480163995.d9a792586fe09e079b6765c67722950d3f1e2526.soap@gentoo
1 commit: d9a792586fe09e079b6765c67722950d3f1e2526
2 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 21 11:32:08 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 26 12:39:55 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9a79258
7
8 app-benchmarks/tiobench: 0.4.2 version bump, fix build w/ GCC-5
9
10 Gentoo-bug: 520986, 570842
11 * Also fix perl shebangs to be more portable
12
13 Package-Manager: portage-2.3.0
14 Closes: https://github.com/gentoo/gentoo/pull/2878
15
16 app-benchmarks/tiobench/Manifest | 1 +
17 .../files/tiobench-0.4.2-fix-perl-shebang.patch | 51 ++++++++++++++++++++++
18 .../tiobench/files/tiobench-0.4.2-gcc5.patch | 48 ++++++++++++++++++++
19 app-benchmarks/tiobench/metadata.xml | 2 +-
20 app-benchmarks/tiobench/tiobench-0.4.2.ebuild | 45 +++++++++++++++++++
21 5 files changed, 146 insertions(+), 1 deletion(-)
22
23 diff --git a/app-benchmarks/tiobench/Manifest b/app-benchmarks/tiobench/Manifest
24 index 841c625..00a5f82 100644
25 --- a/app-benchmarks/tiobench/Manifest
26 +++ b/app-benchmarks/tiobench/Manifest
27 @@ -1 +1,2 @@
28 DIST tiobench-0.3.3.tar.gz 28282 SHA256 8ad011059a35ac70cdb5e3d3999ceee44a8e8e9078926844b0685b7ea9db2bcc SHA512 e2752e32e9deaea611217629e99dc8fd738e63b4a21f49a0286f894bece3a258a3d223e0eb403ad5350dbb408738b9c5ba7300a85c8eea464266152965730328 WHIRLPOOL f6bb9b353cbbf007f6095caa5e893b3bac9af2f4cdb681be9b3f1abf6e07a5b4cd8dd0ceebfa96fd4a888fa28528a78ce00ff239c93cb96a11795168e4b2e81e
29 +DIST tiobench-0.4.2.tar.gz 32182 SHA256 d6166edd6892725d413566ffe348d58927726fa7fa000efb384f7bcccad2e0ba SHA512 02e82d86ee889a366c1a00d4fb49f63d926e44ba6e2f297212479a5c13abe008b62c12d44483de7e971b5ebf875d5c07847f1d69dd11b2e87a050e27d8f9f09f WHIRLPOOL 8b6e5601b3079943eb1c7adf2d2fb12d05f36eaba19552c76b042b37743b0ceda5e5fd105cd64db6c0b2c111e20f9c54424113a427ad7b790a01a714c2bc1f87
30
31 diff --git a/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch b/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch
32 new file mode 100644
33 index 00000000..900472d
34 --- /dev/null
35 +++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch
36 @@ -0,0 +1,51 @@
37 +Fix perl shebangs, in order to be maximally compatible with Gentoo Prefix.
38 +Rationale: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/
39 +
40 +--- a/scripts/makeimages.pl
41 ++++ b/scripts/makeimages.pl
42 +@@ -1,4 +1,4 @@
43 +-#!/usr/bin/perl -w
44 ++#!/usr/bin/env perl
45 +
46 + # Author: James Manning <jmm@××××××××.net>
47 + # This software may be used and distributed according to the terms of
48 +@@ -8,6 +8,7 @@
49 + # Perl wrapper for calling tiobench.pl and displaying results
50 + # graphically using gnuplot
51 +
52 ++use warnings;
53 + use strict;
54 +
55 + my $args = join(" ",@ARGV);
56 +--- a/scripts/tiosum.pl
57 ++++ b/scripts/tiosum.pl
58 +@@ -1,4 +1,4 @@
59 +-#!/usr/bin/perl -w
60 ++#!/usr/bin/env perl
61 + # Author: Randy Hron <rwhron (at) earthlink dot net>
62 + # This software may be used and distributed according to the terms of
63 + # the GNU General Public License, http://www.gnu.org/copyleft/gpl.html
64 +@@ -6,6 +6,7 @@
65 + # Summarize output of tiobench2.pl for multiple kernels/runs.
66 + # Assumes logfiles created with:
67 + # ./tiobench2.pl > tiobench-`uname -r` 2> tiobench-`uname -r`.err
68 ++use warnings;
69 + use strict;
70 + $|++;
71 +
72 +--- a/tiobench.pl
73 ++++ b/tiobench.pl
74 +@@ -1,4 +1,4 @@
75 +-#!/usr/bin/perl -w
76 ++#!/usr/bin/env perl
77 +
78 + # Author: James Manning <jmm at users.sf.net>
79 + # Author: Randy Hron <rwhron at earthlink dot net>
80 +@@ -9,6 +9,7 @@
81 + # Perl wrapper for calling the tiotest executable multiple times
82 + # with varying sets of parameters as instructed
83 +
84 ++use warnings;
85 + use strict;
86 + use Getopt::Long;
87 +
88
89 diff --git a/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch
90 new file mode 100644
91 index 00000000..e1bf89b
92 --- /dev/null
93 +++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch
94 @@ -0,0 +1,48 @@
95 +diff --git a/crc32.c b/crc32.c
96 +index bae7384..a22fc5d 100644
97 +--- a/crc32.c
98 ++++ b/crc32.c
99 +@@ -72,10 +72,9 @@ static const unsigned long crctab[256] = {
100 + 0xA2F33668, 0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4
101 + };
102 +
103 +-inline
104 +-unsigned long crc32( const void* buffer,
105 +- unsigned long length,
106 +- unsigned long crc)
107 ++unsigned long crc32(const void* buffer,
108 ++ unsigned long length,
109 ++ unsigned long crc)
110 + {
111 + const unsigned char* cp = (const unsigned char*)buffer;
112 +
113 +diff --git a/crc32.h b/crc32.h
114 +index 62b3433..cb9b96f 100644
115 +--- a/crc32.h
116 ++++ b/crc32.h
117 +@@ -18,9 +18,8 @@
118 + #ifndef CRC32_H
119 + #define CRC32_H
120 +
121 +-inline
122 +-unsigned long crc32( const void* const buffer,
123 +- unsigned long length,
124 +- unsigned long crc);
125 ++unsigned long crc32(const void* const buffer,
126 ++ unsigned long length,
127 ++ unsigned long crc);
128 +
129 + #endif
130 +diff --git a/tiotest.c b/tiotest.c
131 +index c23ceb4..bb73fcb 100644
132 +--- a/tiotest.c
133 ++++ b/tiotest.c
134 +@@ -1392,7 +1392,7 @@ static int do_mmap_read_operation(void *loc, ThreadData *d)
135 +
136 + if(crc != d->bufferCrc)
137 + {
138 +- fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%x\n", d->myNumber, (unsigned int)loc);
139 ++ fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%p\n", d->myNumber, loc);
140 + return -1;
141 + }
142 + }
143
144 diff --git a/app-benchmarks/tiobench/metadata.xml b/app-benchmarks/tiobench/metadata.xml
145 index 2057275..b7cbceb 100644
146 --- a/app-benchmarks/tiobench/metadata.xml
147 +++ b/app-benchmarks/tiobench/metadata.xml
148 @@ -6,6 +6,6 @@
149 <name>Alice Ferrazzi</name>
150 </maintainer>
151 <upstream>
152 - <remote-id type="sourceforge">tiobench</remote-id>
153 + <remote-id type="github">mkuoppal/tiobench</remote-id>
154 </upstream>
155 </pkgmetadata>
156
157 diff --git a/app-benchmarks/tiobench/tiobench-0.4.2.ebuild b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild
158 new file mode 100644
159 index 00000000..7d98056
160 --- /dev/null
161 +++ b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild
162 @@ -0,0 +1,45 @@
163 +# Copyright 1999-2016 Gentoo Foundation
164 +# Distributed under the terms of the GNU General Public License v2
165 +# $Id$
166 +
167 +EAPI=6
168 +
169 +inherit toolchain-funcs
170 +
171 +DESCRIPTION="Portable, robust, fully-threaded I/O benchmark program"
172 +HOMEPAGE="https://github.com/mkuoppal/tiobench"
173 +SRC_URI="https://github.com/mkuoppal/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
174 +
175 +LICENSE="GPL-2"
176 +SLOT="0"
177 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
178 +IUSE=""
179 +
180 +RDEPEND="dev-lang/perl"
181 +DEPEND="${RDEPEND}"
182 +
183 +PATCHES=(
184 + "${FILESDIR}"/${P}-gcc5.patch
185 + "${FILESDIR}"/${P}-fix-perl-shebang.patch
186 +)
187 +
188 +src_prepare() {
189 + default
190 + sed -i \
191 + -e "s:/usr/local/bin:${EPREFIX}/usr/sbin:" tiobench.pl \
192 + || die "sed tiobench.pl failed"
193 +}
194 +
195 +src_compile() {
196 + emake \
197 + CC="$(tc-getCC)" \
198 + LINK="$(tc-getCC)" \
199 + DEFINES="-DLARGEFILES" \
200 + CFLAGS="${CFLAGS}" \
201 + LDFLAGS="${LDFLAGS}"
202 +}
203 +
204 +src_install() {
205 + dosbin tiotest tiobench.pl scripts/tiosum.pl
206 + einstalldocs
207 +}