1 |
commit: 70d60f04695247fbedac8677933caa26cf7de96b |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 22 14:15:37 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 22 14:17:19 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70d60f04 |
7 |
|
8 |
app-benchmarks/sysbench: migrate to lua-single eclass |
9 |
|
10 |
Closes: https://bugs.gentoo.org/752522 |
11 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
.../sysbench/sysbench-1.0.20-r100.ebuild | 83 ++++++++++++++++++++++ |
15 |
profiles/package.mask | 1 + |
16 |
2 files changed, 84 insertions(+) |
17 |
|
18 |
diff --git a/app-benchmarks/sysbench/sysbench-1.0.20-r100.ebuild b/app-benchmarks/sysbench/sysbench-1.0.20-r100.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..7926abfdf9a |
21 |
--- /dev/null |
22 |
+++ b/app-benchmarks/sysbench/sysbench-1.0.20-r100.ebuild |
23 |
@@ -0,0 +1,83 @@ |
24 |
+# Copyright 1999-2020 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+LUA_COMPAT=( luajit ) |
30 |
+PYTHON_COMPAT=( python3_{6..9} ) |
31 |
+ |
32 |
+inherit autotools lua-single python-single-r1 |
33 |
+ |
34 |
+DESCRIPTION="A scriptable multi-threaded benchmark tool based on LuaJIT" |
35 |
+HOMEPAGE="https://github.com/akopytov/sysbench" |
36 |
+SRC_URI="https://github.com/akopytov/sysbench/archive/${PV}.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-2+" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+IUSE="+aio attachsql drizzle +largefile mysql postgres test" |
42 |
+REQUIRED_USE=" |
43 |
+ ${LUA_REQUIRED_USE} |
44 |
+ ${PYTHON_REQUIRED_USE} |
45 |
+" |
46 |
+RESTRICT="!test? ( test )" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ aio? ( dev-libs/libaio ) |
50 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
51 |
+ postgres? ( dev-db/postgresql:= ) |
52 |
+ test? ( ${PYTHON_DEPS} ) |
53 |
+ ${LUA_DEPS} |
54 |
+" |
55 |
+DEPEND=" |
56 |
+ dev-libs/concurrencykit |
57 |
+ dev-libs/libxslt |
58 |
+ test? ( |
59 |
+ $(python_gen_cond_dep ' |
60 |
+ dev-util/cram[${PYTHON_USEDEP}] |
61 |
+ ') |
62 |
+ ) |
63 |
+ ${RDEPEND} |
64 |
+" |
65 |
+BDEPEND=" |
66 |
+ sys-devel/libtool |
67 |
+ virtual/pkgconfig |
68 |
+" |
69 |
+ |
70 |
+pkg_setup() { |
71 |
+ lua-single_pkg_setup |
72 |
+ use test && python-single-r1_pkg_setup |
73 |
+} |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ default |
77 |
+ |
78 |
+ rm -r third_party/{concurrency_kit/ck,cram,luajit/luajit} || die |
79 |
+ |
80 |
+ eautoreconf |
81 |
+} |
82 |
+ |
83 |
+src_configure() { |
84 |
+ # Current versions of 'dev-db/oracle-instantclient' aren't supported. |
85 |
+ # See: https://github.com/akopytov/sysbench/issues/390. |
86 |
+ local myeconfargs=( |
87 |
+ --disable-rpath |
88 |
+ $(use_enable aio) |
89 |
+ $(use_enable largefile) |
90 |
+ $(use_with attachsql) |
91 |
+ $(use_with drizzle) |
92 |
+ $(use_with mysql) |
93 |
+ $(use_with postgres pgsql) |
94 |
+ --with-system-ck |
95 |
+ --with-system-luajit |
96 |
+ --without-oracle |
97 |
+ LUAJIT_CFLAGS="$(lua_get_CFLAGS)" |
98 |
+ LUAJIT_LIBS="$(lua_get_LIBS)" |
99 |
+ ) |
100 |
+ |
101 |
+ econf "${myeconfargs[@]}" |
102 |
+} |
103 |
+ |
104 |
+src_test() { |
105 |
+ emake check test |
106 |
+} |
107 |
|
108 |
diff --git a/profiles/package.mask b/profiles/package.mask |
109 |
index 15a5aa14ba4..6dc26c50c30 100644 |
110 |
--- a/profiles/package.mask |
111 |
+++ b/profiles/package.mask |
112 |
@@ -485,6 +485,7 @@ dev-lua/luacrypto |
113 |
# All these ebuilds require slotted Lua, which is still masked. |
114 |
# Ulrich Müller <ulm@g.o> (2020-11-06) |
115 |
# Added sci-visualization/gnuplot. |
116 |
+>=app-benchmarks/sysbench-1.0.20-r100 |
117 |
>=app-benchmarks/wrk-4.1.0-r100 |
118 |
>=app-misc/worker-3.8.3-r100 |
119 |
=dev-libs/efl-1.25.1-r10 |