app-benchmarks/wrk: Fix luajit deps
[gentoo.git] / app-benchmarks / iozone / iozone-3.471.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 # TODO
7 #        ->   linux-arm            (32bit)   <-
8 #        ->   linux-AMD64          (64bit)   <-
9 #        ->   linux-ia64           (64bit)   <-
10 #        ->   linux-powerpc        (32bit)   <-
11 #        ->   linux-powerpc64      (64bit)   <-
12 #        ->   linux-S390           (32bit)   <-
13 #        ->   linux-S390X          (64bit)   <-
14 #
15 #        ->   freebsd              (32bit)   <-
16 #        ->   macosx               (32bit)   <-
17 #        ->   netbsd               (32bit)   <-
18 #        ->   openbsd              (32bit)   <-
19 #        ->   openbsd-threads      (32bit)   <-
20 #
21 # ~ia64 ~s390 alpha(?) x86-fbsd
22
23 inherit toolchain-funcs
24
25 DESCRIPTION="Filesystem benchmarking program"
26 HOMEPAGE="http://www.iozone.org/"
27 SRC_URI="http://www.iozone.org/src/current/${PN}${PV/./_}.tar"
28
29 LICENSE="freedist"
30 SLOT="0"
31 KEYWORDS="amd64 arm ~ia64 ppc ppc64 ~sparc x86"
32 IUSE=""
33
34 S=${WORKDIR}/${PN}${PV/./_}
35
36 src_prepare() {
37         default
38
39         # Options FIX
40         sed -i -e "s:CC =.*:CC  =$(tc-getCC):g" \
41                 -e "s:-O3:${CFLAGS}:g" src/current/makefile || die
42 }
43
44 src_configure() {
45         case ${ARCH} in
46                 x86|alpha)      PLATFORM="linux";;
47                 arm)            PLATFORM="linux-arm";;
48                 ppc)            PLATFORM="linux-powerpc";;
49                 ppc64)          PLATFORM="linux-powerpc64";;
50                 amd64)          PLATFORM="linux-AMD64";;
51                 ia64)           PLATFORM="linux-ia64";;
52                 s390)           PLATFORM="linux-S390";;
53                 x86-fbsd)       PLATFORM="freebsd";;
54                 *)                      PLATFORM="linux-${ARCH}";;
55         esac
56 }
57
58 src_compile() {
59         emake -C src/current ${PLATFORM}
60 }
61
62 src_test() {
63         cd "${T}" || die
64         "${S}"/src/current/iozone testfile || die "self test failed"
65 }
66
67 src_install() {
68         dosbin src/current/{iozone,fileop}
69
70         dodoc docs/I* docs/Run_rules.doc src/current/Changes.txt
71         doman docs/iozone.1
72         cd src/current || die
73         dodoc Generate_Graphs Gnuplot.txt gengnuplot.sh gnu3d.dem
74 }