summaryrefslogtreecommitdiff
blob: 0d5fbb0e91f7fa7c00431aaa9111e9d9158e45cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

LUA_COMPAT=( lua5-1 luajit )

inherit lua-single

DESCRIPTION="A HTTP benchmarking tool"
HOMEPAGE="https://www.github.com/wg/wrk"
SRC_URI="https://www.github.com/wg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

KEYWORDS="~amd64 ~x86"
LICENSE="Apache-2.0 BSD MIT"
SLOT="0"
IUSE="libressl"
REQUIRED_USE="${LUA_REQUIRED_USE}"

RDEPEND="
	libressl? ( dev-libs/libressl:0= )
	!libressl? ( dev-libs/openssl:0= )
	${LUA_DEPS}
"

DEPEND="${RDEPEND}"

DOCS=( "CHANGES" "NOTICE" "README.md" "SCRIPTING" )

PATCHES=( "${FILESDIR}/${P}-r100-makefile.patch" )

src_compile() {
	myemakeargs=(
		CC="$(tc-getCC)"
		LUA_LIBS="$(lua_get_LIBS)"
		VER="${PV}"
		WITH_LUAJIT="$(lua_get_CFLAGS)"
		WITH_OPENSSL="/usr"
	)

	emake "${myemakeargs[@]}"
}

src_install() {
	dobin wrk

	insinto /usr/share/wrk
	doins -r scripts

	einstalldocs
}