app-benchmarks/wrk: bump to EAPI 7.
authorConrad Kostecki <conrad@kostecki.com>
Fri, 9 Nov 2018 11:12:00 +0000 (12:12 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Sun, 20 Jan 2019 22:56:30 +0000 (23:56 +0100)
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>
app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch [new file with mode: 0644]
app-benchmarks/wrk/metadata.xml
app-benchmarks/wrk/wrk-4.1.0-r1.ebuild [new file with mode: 0644]

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 (file)
index 0000000..6e7dd31
--- /dev/null
@@ -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
index d7936a9dcc5bc0301093f01ebb483f10b202b23a..60f2e98d3c9b685d1d72dffe5c7dc1f1ae05ea38 100644 (file)
@@ -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 (file)
index 0000000..3a9e5c1
--- /dev/null
@@ -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
+}