From: Conrad Kostecki Date: Fri, 9 Nov 2018 11:12:00 +0000 (+0100) Subject: app-benchmarks/wrk: bump to EAPI 7. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3699f64fa928e498f86e3d6761ff2d20712042cd;p=gentoo.git app-benchmarks/wrk: bump to EAPI 7. I will also proxy maintain this package. Signed-off-by: Conrad Kostecki Package-Manager: Portage-2.3.51, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/10374 Signed-off-by: Patrice Clement --- diff --git a/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch b/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch new file mode 100644 index 000000000000..6e7dd317b8fb --- /dev/null +++ b/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch @@ -0,0 +1,37 @@ +--- a/Makefile 2018-01-21 07:00:58.000000000 +0100 ++++ b/Makefile 2018-11-09 11:58:57.000000000 +0100 +@@ -1,4 +1,4 @@ +-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT ++CFLAGS += -std=c99 -Wall -D_REENTRANT + LIBS := -lpthread -lm -lssl -lcrypto + + TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) +@@ -24,7 +24,7 @@ + + ODIR := obj + OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o $(ODIR)/version.o +-LIBS := -lluajit-5.1 $(LIBS) ++LIBS := $(shell pkg-config luajit --libs) $(LIBS) + + DEPS := + CFLAGS += -I$(ODIR)/include +@@ -51,8 +51,7 @@ + $(RM) -rf $(BIN) obj/* + + $(BIN): $(OBJ) +- @echo LINK $(BIN) +- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + $(OBJ): config.h Makefile $(DEPS) | $(ODIR) + +@@ -67,8 +66,7 @@ + @echo 'const char *VERSION="$(VER)";' | $(CC) -xc -c -o $@ - + + $(ODIR)/%.o : %.c +- @echo CC $< +- @$(CC) $(CFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS) -c -o $@ $< + + # Dependencies + diff --git a/app-benchmarks/wrk/metadata.xml b/app-benchmarks/wrk/metadata.xml index d7936a9dcc5b..60f2e98d3c9b 100644 --- a/app-benchmarks/wrk/metadata.xml +++ b/app-benchmarks/wrk/metadata.xml @@ -1,15 +1,24 @@ - - - wrk is a modern HTTP benchmarking tool capable of generating - significant load when run on a single multi-core CPU. It combines a - multithreaded design with scalable event notification systems such as - epoll and kqueue. An optional LuaJIT script can perform HTTP request - generation, response processing, and custom reporting. + + ck+gentoo@bl4ckb0x.de + Conrad Kostecki + + + proxy-maint@gentoo.org + Proxy Maintainers + + + WRK is a modern HTTP benchmarking tool capable of generating + significant load when run on a single multi-core CPU. + It combines a multithreaded design with scalable event + notification systems such as epoll and kqueue. + An optional LuaJIT script can perform HTTP request generation, + response processing, and custom reporting. + https://www.github.com/wg/wrk/issues wg/wrk diff --git a/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild b/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild new file mode 100644 index 000000000000..3a9e5c1ade6b --- /dev/null +++ b/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +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" + +RDEPEND=" + dev-lang/lua:0 + dev-lang/luajit:2 + libressl? ( dev-libs/libressl:0= ) + !libressl? ( dev-libs/openssl:0= ) +" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( + "CHANGES" + "NOTICE" + "README.md" + "SCRIPTING" +) + +PATCHES=( "${FILESDIR}/${P}-r1-makefile.patch" ) + +src_compile() { + myemakeargs=( + CC="$(tc-getCC)" + VER="${PV}" + WITH_LUAJIT="/usr" + WITH_OPENSSL="/usr" + ) + + emake "${myemakeargs[@]}" +} + +src_install() { + dobin wrk + + insinto /usr/share/wrk + doins -r scripts + + einstalldocs +}