diff options
author | Conrad Kostecki <conrad@kostecki.com> | 2018-11-09 12:12:00 +0100 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2019-01-20 23:56:30 +0100 |
commit | 3699f64fa928e498f86e3d6761ff2d20712042cd (patch) | |
tree | 31fa5f956a516916f1a5689dac94f17afe686d96 /app-benchmarks/wrk | |
parent | dev-util/pkgcheck: don't run pplugincache for all py versions (diff) | |
download | gentoo-3699f64fa928e498f86e3d6761ff2d20712042cd.tar.gz gentoo-3699f64fa928e498f86e3d6761ff2d20712042cd.tar.bz2 gentoo-3699f64fa928e498f86e3d6761ff2d20712042cd.zip |
app-benchmarks/wrk: bump to EAPI 7.
I will also proxy maintain this package.
Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10374
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'app-benchmarks/wrk')
-rw-r--r-- | app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch | 37 | ||||
-rw-r--r-- | app-benchmarks/wrk/metadata.xml | 23 | ||||
-rw-r--r-- | app-benchmarks/wrk/wrk-4.1.0-r1.ebuild | 54 |
3 files changed, 107 insertions, 7 deletions
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 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!--maintainer-needed--> - <longdescription lang="en"> - 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. + <maintainer type="person"> + <email>ck+gentoo@bl4ckb0x.de</email> + <name>Conrad Kostecki</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + 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. </longdescription> <upstream> + <bugs-to>https://www.github.com/wg/wrk/issues</bugs-to> <remote-id type="github">wg/wrk</remote-id> </upstream> </pkgmetadata> 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 +} |