From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-benchmarks/tiobench/Manifest | 5 +++ .../files/tiobench-0.4.2-fix-perl-shebang.patch | 51 ++++++++++++++++++++++ .../tiobench/files/tiobench-0.4.2-gcc5.patch | 48 ++++++++++++++++++++ app-benchmarks/tiobench/metadata.xml | 12 +++++ app-benchmarks/tiobench/tiobench-0.4.2.ebuild | 44 +++++++++++++++++++ 5 files changed, 160 insertions(+) create mode 100644 app-benchmarks/tiobench/Manifest create mode 100644 app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch create mode 100644 app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch create mode 100644 app-benchmarks/tiobench/metadata.xml create mode 100644 app-benchmarks/tiobench/tiobench-0.4.2.ebuild (limited to 'app-benchmarks/tiobench') diff --git a/app-benchmarks/tiobench/Manifest b/app-benchmarks/tiobench/Manifest new file mode 100644 index 000000000000..58ac1d01a05b --- /dev/null +++ b/app-benchmarks/tiobench/Manifest @@ -0,0 +1,5 @@ +AUX tiobench-0.4.2-fix-perl-shebang.patch 1530 BLAKE2B c6800722dbd5edadd1ed37142d153639c73ddc2fdba50782ddf7dda1e658108a1826411b3e3ef3e49014d8e01237969bc50e0e59725536fccb3a7866699637ed SHA512 baba72c336006d3f2c69768720bb076b8f2750d72252cf19b74e4f5b9e0140e74de1edfc63da674f26d24d675f4e00201be61f98cd7fd164b1c13cfab49f3b38 +AUX tiobench-0.4.2-gcc5.patch 1309 BLAKE2B 7c432efee2225afe0f2e35688d19b735b7cff6f21605570b70be446d1e92d6feee477403a37d83351cacec56310a2e0bdc8dc08153b4dc0631b363419a3cf784 SHA512 f462c4eab88aa707a8383fec9e6e8c15f72237ef3d67f8481d2d6abef855f68b5a4281a7a1f1668b968df988e9ac283e4aabb2dfaf68b33cd3430a90e59f97a7 +DIST tiobench-0.4.2.tar.gz 32182 BLAKE2B f3c0f78daac0dc8c38de2049f8edfce7443fb43a6aacf31a0b5c12abf80ec0ae4c03b1bd25f954db261027c16dfb73fdffe970a730a853caf25763579c2e7170 SHA512 02e82d86ee889a366c1a00d4fb49f63d926e44ba6e2f297212479a5c13abe008b62c12d44483de7e971b5ebf875d5c07847f1d69dd11b2e87a050e27d8f9f09f +EBUILD tiobench-0.4.2.ebuild 891 BLAKE2B b0d207e71b29c5c5c44f38b1921f5a990c3ef47991172e48327bdf36f3d67937474de727b362c00dc2bf88b6b1ffff5dfd0bfd05fcde57deeb5168a53a9bb5e5 SHA512 2749131275caa448748c0a3e9a7741ad5b7aa6d39915f526c0863203a67074fc4cec8422ecbe3167836fa292d218119cb837585c66b6e6b876e084fcc5a9aa0d +MISC metadata.xml 382 BLAKE2B a8a9d1771e25d37b2d0d4b5264517e622baa324d2891c7f31a254d4a2d05b95c03761610525a979dc9d0e3488d96e64fbcbc651dc98f82fff18077fd49a33cc1 SHA512 ab6ce68c948d173a0241be91da8af3f3690510b521307efe0752f6ca9db17ef573f2980bc16fe904c26123cf2802035de97e58f39d1f60d19ed827d53d06fb34 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 new file mode 100644 index 000000000000..900472d80dd2 --- /dev/null +++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-fix-perl-shebang.patch @@ -0,0 +1,51 @@ +Fix perl shebangs, in order to be maximally compatible with Gentoo Prefix. +Rationale: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/ + +--- a/scripts/makeimages.pl ++++ b/scripts/makeimages.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/env perl + + # Author: James Manning + # This software may be used and distributed according to the terms of +@@ -8,6 +8,7 @@ + # Perl wrapper for calling tiobench.pl and displaying results + # graphically using gnuplot + ++use warnings; + use strict; + + my $args = join(" ",@ARGV); +--- a/scripts/tiosum.pl ++++ b/scripts/tiosum.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/env perl + # Author: Randy Hron + # This software may be used and distributed according to the terms of + # the GNU General Public License, http://www.gnu.org/copyleft/gpl.html +@@ -6,6 +6,7 @@ + # Summarize output of tiobench2.pl for multiple kernels/runs. + # Assumes logfiles created with: + # ./tiobench2.pl > tiobench-`uname -r` 2> tiobench-`uname -r`.err ++use warnings; + use strict; + $|++; + +--- a/tiobench.pl ++++ b/tiobench.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/env perl + + # Author: James Manning + # Author: Randy Hron +@@ -9,6 +9,7 @@ + # Perl wrapper for calling the tiotest executable multiple times + # with varying sets of parameters as instructed + ++use warnings; + use strict; + use Getopt::Long; + diff --git a/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch new file mode 100644 index 000000000000..e1bf89b87ec3 --- /dev/null +++ b/app-benchmarks/tiobench/files/tiobench-0.4.2-gcc5.patch @@ -0,0 +1,48 @@ +diff --git a/crc32.c b/crc32.c +index bae7384..a22fc5d 100644 +--- a/crc32.c ++++ b/crc32.c +@@ -72,10 +72,9 @@ static const unsigned long crctab[256] = { + 0xA2F33668, 0xBCB4666D, 0xB8757BDA, 0xB5365D03, 0xB1F740B4 + }; + +-inline +-unsigned long crc32( const void* buffer, +- unsigned long length, +- unsigned long crc) ++unsigned long crc32(const void* buffer, ++ unsigned long length, ++ unsigned long crc) + { + const unsigned char* cp = (const unsigned char*)buffer; + +diff --git a/crc32.h b/crc32.h +index 62b3433..cb9b96f 100644 +--- a/crc32.h ++++ b/crc32.h +@@ -18,9 +18,8 @@ + #ifndef CRC32_H + #define CRC32_H + +-inline +-unsigned long crc32( const void* const buffer, +- unsigned long length, +- unsigned long crc); ++unsigned long crc32(const void* const buffer, ++ unsigned long length, ++ unsigned long crc); + + #endif +diff --git a/tiotest.c b/tiotest.c +index c23ceb4..bb73fcb 100644 +--- a/tiotest.c ++++ b/tiotest.c +@@ -1392,7 +1392,7 @@ static int do_mmap_read_operation(void *loc, ThreadData *d) + + if(crc != d->bufferCrc) + { +- fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%x\n", d->myNumber, (unsigned int)loc); ++ fprintf(stderr, "Thread(%lu) mmap consistency check failed at 0x%p\n", d->myNumber, loc); + return -1; + } + } diff --git a/app-benchmarks/tiobench/metadata.xml b/app-benchmarks/tiobench/metadata.xml new file mode 100644 index 000000000000..c217c527e32b --- /dev/null +++ b/app-benchmarks/tiobench/metadata.xml @@ -0,0 +1,12 @@ + + + + + alicef@gentoo.org + Alice Ferrazzi + + + mkuoppal/tiobench + tiobench + + diff --git a/app-benchmarks/tiobench/tiobench-0.4.2.ebuild b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild new file mode 100644 index 000000000000..339da5860de9 --- /dev/null +++ b/app-benchmarks/tiobench/tiobench-0.4.2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Portable, robust, fully-threaded I/O benchmark program" +HOMEPAGE="https://github.com/mkuoppal/tiobench" +SRC_URI="https://github.com/mkuoppal/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" +IUSE="" + +RDEPEND="dev-lang/perl" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-gcc5.patch + "${FILESDIR}"/${P}-fix-perl-shebang.patch +) + +src_prepare() { + default + sed -i \ + -e "s:/usr/local/bin:${EPREFIX}/usr/sbin:" tiobench.pl \ + || die "sed tiobench.pl failed" +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + LINK="$(tc-getCC)" \ + DEFINES="-DLARGEFILES" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" +} + +src_install() { + dosbin tiotest tiobench.pl scripts/tiosum.pl + einstalldocs +} -- cgit v1.2.3