app-benchmarks/wrk: Fix luajit deps
[gentoo.git] / app-benchmarks / iozone / iozone-3.488.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Filesystem benchmarking program"
9 HOMEPAGE="http://www.iozone.org/"
10 SRC_URI="http://www.iozone.org/src/current/${PN}${PV/./_}.tar"
11
12 LICENSE="freedist"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
15
16 S="${WORKDIR}/${PN}${PV/./_}"
17
18 PATCHES=( "${FILESDIR}"/${PN}-3.488-gcc10-fno-common.patch )
19
20 src_prepare() {
21         default
22
23         # Options FIX
24         sed -e '/CC     =.*/d' \
25                 -e '/CFLAGS     =.*/d' \
26                 -e 's:-O[23]:$(CFLAGS):g' \
27                 -e 's:-Dlinux:$(LDFLAGS) -Dlinux:g' \
28                 -i src/current/makefile || die
29 }
30
31 src_configure() {
32         tc-export CC
33
34         case ${ARCH} in
35                 x86|alpha)  PLATFORM="linux";;
36                 arm)        PLATFORM="linux-arm";;
37                 ppc)        PLATFORM="linux-powerpc";;
38                 ppc64)      PLATFORM="linux-powerpc64";;
39                 amd64)      PLATFORM="linux-AMD64";;
40                 ia64)       PLATFORM="linux-ia64";;
41                 s390)       PLATFORM="linux-S390";;
42                 *)          PLATFORM="linux-${ARCH}";;
43         esac
44 }
45
46 src_compile() {
47         emake -C src/current ${PLATFORM}
48 }
49
50 src_test() {
51         cd "${T}" || die
52         "${S}"/src/current/iozone testfile || die "self test failed"
53 }
54
55 src_install() {
56         dosbin src/current/{iozone,fileop}
57
58         # decompress pre-compressed file to make QA check happy
59         gunzip docs/Iozone_ps.gz || die
60
61         dodoc docs/I* docs/Run_rules.doc src/current/Changes.txt
62         doman docs/iozone.1
63         cd src/current || die
64         dodoc Generate_Graphs Gnuplot.txt gengnuplot.sh gnu3d.dem
65 }