summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2021-12-16 22:16:34 +0100
committerConrad Kostecki <conikost@gentoo.org>2021-12-16 23:25:07 +0100
commit973ebe21c38e04e50d101bbd8a38b0ba9e79564f (patch)
treec78398549cb4a655b53632146c397dcc82806b99 /app-benchmarks/wrk
parentmedia-libs/gmmlib: drop 21.2.1, 21.2.2, 21.3.1, 21.3.2 (diff)
downloadgentoo-973ebe21c38e04e50d101bbd8a38b0ba9e79564f.tar.gz
gentoo-973ebe21c38e04e50d101bbd8a38b0ba9e79564f.tar.bz2
gentoo-973ebe21c38e04e50d101bbd8a38b0ba9e79564f.zip
app-benchmarks/wrk: add 4.2.0
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-benchmarks/wrk')
-rw-r--r--app-benchmarks/wrk/Manifest1
-rw-r--r--app-benchmarks/wrk/files/wrk-4.2.0-makefile.patch54
-rw-r--r--app-benchmarks/wrk/wrk-4.2.0.ebuild49
3 files changed, 104 insertions, 0 deletions
diff --git a/app-benchmarks/wrk/Manifest b/app-benchmarks/wrk/Manifest
index 71e1020fd8db..d07beee0476a 100644
--- a/app-benchmarks/wrk/Manifest
+++ b/app-benchmarks/wrk/Manifest
@@ -1 +1,2 @@
DIST wrk-4.1.0.tar.gz 6478125 BLAKE2B d64c172819a32b874e5351ef1088a66af7eb76ae34421577f817f14797a5711665adb8074e90a80e511139a889d4c960dc91caa5855bbd67038229307ef93ed2 SHA512 2c8d05f8e40c3a6234bc1c2862157764532a39046860210fe512c260c2b940e1e3120b831d0721c936c7bca474574600cda1f4c949b53738199d98102e32cb1a
+DIST wrk-4.2.0.tar.gz 10973405 BLAKE2B e81698f70017cd7d55ee7adceb050ea48b2ed9d2ef9195e5b2743dafb637f78d54c8003d049c2965f90457f9b7a80620b86bc0b9bb1a259b88e5c66d6af8cc79 SHA512 c356b1314f37b558f39f30d9a9c6a2a9c2f646eaf7c0cb4262325850922528148f89ccbe7c33390c87e40f8fef6fffd704e3cfe75a89e4e9b178101043fa038d
diff --git a/app-benchmarks/wrk/files/wrk-4.2.0-makefile.patch b/app-benchmarks/wrk/files/wrk-4.2.0-makefile.patch
new file mode 100644
index 000000000000..b5a32ae9b5eb
--- /dev/null
+++ b/app-benchmarks/wrk/files/wrk-4.2.0-makefile.patch
@@ -0,0 +1,54 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,4 @@
+-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT
++CFLAGS += -std=c99 -Wall -D_REENTRANT
+ LIBS := -lm -lssl -lcrypto -lpthread
+
+ TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
+@@ -24,15 +24,13 @@
+
+ ODIR := obj
+ OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o $(ODIR)/version.o
+-LIBS := -lluajit-5.1 $(LIBS)
++LIBS := $(LUA_LIBS) $(LIBS)
+
+ DEPS :=
+ CFLAGS += -I$(ODIR)/include
+-LDFLAGS += -L$(ODIR)/lib
+
+ ifneq ($(WITH_LUAJIT),)
+- CFLAGS += -I$(WITH_LUAJIT)/include
+- LDFLAGS += -L$(WITH_LUAJIT)/lib
++ CFLAGS += $(WITH_LUAJIT)
+ else
+ CFLAGS += -I$(ODIR)/include/luajit-2.1
+ DEPS += $(ODIR)/lib/libluajit-5.1.a
+@@ -40,7 +38,6 @@
+
+ ifneq ($(WITH_OPENSSL),)
+ CFLAGS += -I$(WITH_OPENSSL)/include
+- LDFLAGS += -L$(WITH_OPENSSL)/lib
+ else
+ DEPS += $(ODIR)/lib/libssl.a
+ endif
+@@ -51,8 +48,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 +63,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/wrk-4.2.0.ebuild b/app-benchmarks/wrk/wrk-4.2.0.ebuild
new file mode 100644
index 000000000000..93042e4f6647
--- /dev/null
+++ b/app-benchmarks/wrk/wrk-4.2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( luajit )
+
+inherit lua-single 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"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="
+ dev-libs/openssl:0=
+ ${LUA_DEPS}
+"
+
+DEPEND="${RDEPEND}"
+
+DOCS=( "CHANGES" "NOTICE" "README.md" "SCRIPTING" )
+
+PATCHES=( "${FILESDIR}/${PN}-4.2.0-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
+}