Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/fio/
Date: Mon, 07 Jun 2021 04:18:32
Message-Id: 1623039026.a6144c069440d2b9675f73f48415e0982550f8e5.prometheanfire@gentoo
1 commit: a6144c069440d2b9675f73f48415e0982550f8e5
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 7 04:10:26 2021 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 7 04:10:26 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6144c06
7
8 sys-block/fio: 3.27 bump with py39
9
10 Closes: https://bugs.gentoo.org/794583
11 Package-Manager: Portage-3.0.18, Repoman-3.0.2
12 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
13
14 sys-block/fio/Manifest | 1 +
15 sys-block/fio/fio-3.27.ebuild | 154 ++++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 155 insertions(+)
17
18 diff --git a/sys-block/fio/Manifest b/sys-block/fio/Manifest
19 index 0b703dc303d..1faed5903ac 100644
20 --- a/sys-block/fio/Manifest
21 +++ b/sys-block/fio/Manifest
22 @@ -1 +1,2 @@
23 DIST fio-3.20.tar.bz2 912040 BLAKE2B 44f8c20a390a6382aadc07881c1e7c65cca932099a1b3992e848669cf2a52b410fde67f9ae576efcd0d8e88ceec04174b6bc077d4b3f9b615b59be9f24f62bed SHA512 4e073754c95cb8d6416a80f48ca61003f34d664717f67a3f29b554e9205f8fe3553595ba6f8a8e9cb3463022d5c83be961f5b5a1ebcd2a9f4da9406a9986c1fb
24 +DIST fio-3.27.tar.bz2 960330 BLAKE2B 7e7e01a5c1d6af13a6f87139e7738646cbc8f45ebc370d0c45b9efe1f93778613d374daafc6df459f988f27f2be54ff636235e1e5a92a4a6ecf9a60ed573d170 SHA512 9c5f2ab0c9ac24ab78dbc74fb6c5acd60f8189fdc618f4280992141b6c0abe1c235c373fee18ad0c803e7fb25d480f45aec56dc3be2e0d26d181b3418b179f99
25
26 diff --git a/sys-block/fio/fio-3.27.ebuild b/sys-block/fio/fio-3.27.ebuild
27 new file mode 100644
28 index 00000000000..2fe78c1da6c
29 --- /dev/null
30 +++ b/sys-block/fio/fio-3.27.ebuild
31 @@ -0,0 +1,154 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7,8,9} )
38 +
39 +inherit python-r1 toolchain-funcs
40 +
41 +MY_PV="${PV/_rc/-rc}"
42 +MY_P="${PN}-${MY_PV}"
43 +
44 +DESCRIPTION="Jens Axboe's Flexible IO tester"
45 +HOMEPAGE="https://brick.kernel.dk/snaps/"
46 +SRC_URI="https://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
51 +IUSE="aio curl glusterfs gnuplot gtk io-uring numa python rbd rdma static tcmalloc test zbc zlib"
52 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
53 + gnuplot? ( python )
54 + io-uring? ( aio )"
55 +RESTRICT="!test? ( test )"
56 +
57 +BDEPEND="virtual/pkgconfig"
58 +
59 +# GTK+:2 does not offer static libaries.
60 +LIB_DEPEND="aio? ( dev-libs/libaio[static-libs(+)] )
61 + curl? (
62 + net-misc/curl:=[static-libs(+)]
63 + dev-libs/openssl:0=[static-libs(+)]
64 + )
65 + glusterfs? ( sys-cluster/glusterfs[static-libs(+)] )
66 + gtk? ( dev-libs/glib:2[static-libs(+)] )
67 + io-uring? ( sys-libs/liburing:=[static-libs(+)] )
68 + numa? ( sys-process/numactl[static-libs(+)] )
69 + rbd? ( sys-cluster/ceph[static-libs(+)] )
70 + rdma? (
71 + sys-fabric/libibverbs[static-libs(+)]
72 + sys-fabric/librdmacm[static-libs(+)]
73 + )
74 + tcmalloc? ( dev-util/google-perftools:=[static-libs(+)] )
75 + zbc? ( >=sys-block/libzbc-5 )
76 + zlib? ( sys-libs/zlib[static-libs(+)] )"
77 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
78 + gtk? ( x11-libs/gtk+:2 )"
79 +DEPEND="${RDEPEND}
80 + static? ( ${LIB_DEPEND} )
81 + test? ( dev-util/cunit )"
82 +RDEPEND+="
83 + python? (
84 + ${PYTHON_DEPS}
85 + $(python_gen_any_dep 'dev-python/pandas[${PYTHON_USEDEP}]')
86 + )
87 + gnuplot? ( sci-visualization/gnuplot )"
88 +
89 +S="${WORKDIR}/${MY_P}"
90 +
91 +PATCHES=(
92 + "${FILESDIR}"/fio-2.2.13-libmtd.patch
93 +)
94 +
95 +python_check_deps() {
96 + has_version "dev-python/pandas[${PYTHON_USEDEP}]"
97 +}
98 +
99 +src_prepare() {
100 + default
101 +
102 + sed -i '/^DEBUGFLAGS/s: -D_FORTIFY_SOURCE=2::g' Makefile || die
103 +
104 + # Many checks don't have configure flags.
105 + sed -i \
106 + -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
107 + -e '/if compile_prog "" "-lzbc" "libzbc" *; *then/ '"s::if $(usex zbc true false) ; then:" \
108 + -e '/if compile_prog "" "-lz" "zlib" *; *then/ '"s::if $(usex zlib true false) ; then:" \
109 + -e '/if compile_prog "" "-laio" "libaio" *; *then/'"s::if $(usex aio true false) ; then:" \
110 + -e '/if compile_prog "" "-lcunit" "CUnit" *; *then/'"s::if $(usex test true false) ; then:" \
111 + configure || die
112 +}
113 +
114 +src_configure() {
115 + chmod g-w "${T}"
116 + # not a real configure script
117 + # TODO: cuda
118 + # TODO: libnbd - not packaged in Gentoo
119 + # TODO: pmem - not packaged in Gentoo
120 + set -- \
121 + ./configure \
122 + --disable-optimizations \
123 + --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
124 + --cc="$(tc-getCC)" \
125 + --disable-pmem \
126 + $(usex curl '' '--disable-http') \
127 + $(usex glusterfs '' '--disable-gfapi') \
128 + $(usex gtk '--enable-gfio' '') \
129 + $(usex io-uring '--enable-libaio-uring' '') \
130 + $(usex numa '' '--disable-numa') \
131 + $(usex rbd '' '--disable-rbd') \
132 + $(usex rdma '' '--disable-rdma') \
133 + $(usex static '--build-static' '') \
134 + $(usex tcmalloc '' '--disable-tcmalloc')
135 + echo "$@"
136 + "$@" || die 'configure failed'
137 +}
138 +
139 +src_compile() {
140 + emake V=1 OPTFLAGS=
141 +}
142 +
143 +src_install() {
144 + emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
145 +
146 + local python2_7_files=(
147 + "${ED}"/usr/bin/fiologparser_hist.py
148 + "${ED}"/usr/bin/fiologparser.py
149 + )
150 + local python_files=(
151 + "${python2_7_files[@]}"
152 + "${ED}"/usr/bin/fio_jsonplus_clat2csv
153 + )
154 + if use python ; then
155 + sed -i 's:python2.7:python:g' "${python2_7_files[@]}" || die
156 + python_replicate_script "${python2_7_files[@]}"
157 + else
158 + rm "${python_files[@]}" || die
159 + fi
160 +
161 + local gnuplot_python2_7_files=(
162 + "${ED}"/usr/bin/fio2gnuplot
163 + )
164 + local gnuplot_files=(
165 + "${gnuplot_python2_7_files[@]}"
166 + "${ED}"/usr/bin/fio_generate_plots
167 + "${ED}"/usr/share/man/man1/fio_generate_plots.1
168 + "${ED}"/usr/share/man/man1/fio2gnuplot.1
169 + "${ED}"/usr/share/fio/*.gpm
170 + )
171 + if use gnuplot ; then
172 + sed -i 's:python2.7:python:g' "${gnuplot_python2_7_files[@]}" || die
173 + python_replicate_script "${gnuplot_python2_7_files[@]}"
174 + else
175 + rm "${gnuplot_files[@]}" || die
176 + rmdir "${ED}"/usr/share/fio/ || die
177 + fi
178 +
179 + # This tool has security/parallel issues -- it hardcodes /tmp/template.fio.
180 + rm "${ED}"/usr/bin/genfio || die
181 +
182 + dodoc README REPORTING-BUGS HOWTO
183 + docinto examples
184 + dodoc examples/*
185 +}