Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-benchmarks/wrk/, app-benchmarks/wrk/files/
Date: Sun, 20 Jan 2019 22:56:43
Message-Id: 1548024990.3699f64fa928e498f86e3d6761ff2d20712042cd.monsieurp@gentoo
1 commit: 3699f64fa928e498f86e3d6761ff2d20712042cd
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Fri Nov 9 11:12:00 2018 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 20 22:56:30 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3699f64f
7
8 app-benchmarks/wrk: bump to EAPI 7.
9
10 I will also proxy maintain this package.
11
12 Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
13 Package-Manager: Portage-2.3.51, Repoman-2.3.11
14 Closes: https://github.com/gentoo/gentoo/pull/10374
15 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
16
17 .../wrk/files/wrk-4.1.0-r1-makefile.patch | 37 +++++++++++++++
18 app-benchmarks/wrk/metadata.xml | 23 ++++++---
19 app-benchmarks/wrk/wrk-4.1.0-r1.ebuild | 54 ++++++++++++++++++++++
20 3 files changed, 107 insertions(+), 7 deletions(-)
21
22 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
23 new file mode 100644
24 index 00000000000..6e7dd317b8f
25 --- /dev/null
26 +++ b/app-benchmarks/wrk/files/wrk-4.1.0-r1-makefile.patch
27 @@ -0,0 +1,37 @@
28 +--- a/Makefile 2018-01-21 07:00:58.000000000 +0100
29 ++++ b/Makefile 2018-11-09 11:58:57.000000000 +0100
30 +@@ -1,4 +1,4 @@
31 +-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT
32 ++CFLAGS += -std=c99 -Wall -D_REENTRANT
33 + LIBS := -lpthread -lm -lssl -lcrypto
34 +
35 + TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
36 +@@ -24,7 +24,7 @@
37 +
38 + ODIR := obj
39 + OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o $(ODIR)/version.o
40 +-LIBS := -lluajit-5.1 $(LIBS)
41 ++LIBS := $(shell pkg-config luajit --libs) $(LIBS)
42 +
43 + DEPS :=
44 + CFLAGS += -I$(ODIR)/include
45 +@@ -51,8 +51,7 @@
46 + $(RM) -rf $(BIN) obj/*
47 +
48 + $(BIN): $(OBJ)
49 +- @echo LINK $(BIN)
50 +- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
51 ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
52 +
53 + $(OBJ): config.h Makefile $(DEPS) | $(ODIR)
54 +
55 +@@ -67,8 +66,7 @@
56 + @echo 'const char *VERSION="$(VER)";' | $(CC) -xc -c -o $@ -
57 +
58 + $(ODIR)/%.o : %.c
59 +- @echo CC $<
60 +- @$(CC) $(CFLAGS) -c -o $@ $<
61 ++ $(CC) $(CFLAGS) -c -o $@ $<
62 +
63 + # Dependencies
64 +
65
66 diff --git a/app-benchmarks/wrk/metadata.xml b/app-benchmarks/wrk/metadata.xml
67 index d7936a9dcc5..60f2e98d3c9 100644
68 --- a/app-benchmarks/wrk/metadata.xml
69 +++ b/app-benchmarks/wrk/metadata.xml
70 @@ -1,15 +1,24 @@
71 <?xml version="1.0" encoding="UTF-8"?>
72 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
73 <pkgmetadata>
74 - <!--maintainer-needed-->
75 - <longdescription lang="en">
76 - wrk is a modern HTTP benchmarking tool capable of generating
77 - significant load when run on a single multi-core CPU. It combines a
78 - multithreaded design with scalable event notification systems such as
79 - epoll and kqueue. An optional LuaJIT script can perform HTTP request
80 - generation, response processing, and custom reporting.
81 + <maintainer type="person">
82 + <email>ck+gentoo@××××××××.de</email>
83 + <name>Conrad Kostecki</name>
84 + </maintainer>
85 + <maintainer type="project">
86 + <email>proxy-maint@g.o</email>
87 + <name>Proxy Maintainers</name>
88 + </maintainer>
89 + <longdescription>
90 + WRK is a modern HTTP benchmarking tool capable of generating
91 + significant load when run on a single multi-core CPU.
92 + It combines a multithreaded design with scalable event
93 + notification systems such as epoll and kqueue.
94 + An optional LuaJIT script can perform HTTP request generation,
95 + response processing, and custom reporting.
96 </longdescription>
97 <upstream>
98 + <bugs-to>https://www.github.com/wg/wrk/issues</bugs-to>
99 <remote-id type="github">wg/wrk</remote-id>
100 </upstream>
101 </pkgmetadata>
102
103 diff --git a/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild b/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild
104 new file mode 100644
105 index 00000000000..3a9e5c1ade6
106 --- /dev/null
107 +++ b/app-benchmarks/wrk/wrk-4.1.0-r1.ebuild
108 @@ -0,0 +1,54 @@
109 +# Copyright 1999-2018 Gentoo Authors
110 +# Distributed under the terms of the GNU General Public License v2
111 +
112 +EAPI=7
113 +
114 +inherit toolchain-funcs
115 +
116 +DESCRIPTION="A HTTP benchmarking tool"
117 +HOMEPAGE="https://www.github.com/wg/wrk"
118 +SRC_URI="https://www.github.com/wg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
119 +
120 +KEYWORDS="~amd64 ~x86"
121 +LICENSE="Apache-2.0 BSD MIT"
122 +SLOT="0"
123 +IUSE="libressl"
124 +
125 +RDEPEND="
126 + dev-lang/lua:0
127 + dev-lang/luajit:2
128 + libressl? ( dev-libs/libressl:0= )
129 + !libressl? ( dev-libs/openssl:0= )
130 +"
131 +
132 +DEPEND="${RDEPEND}"
133 +BDEPEND="virtual/pkgconfig"
134 +
135 +DOCS=(
136 + "CHANGES"
137 + "NOTICE"
138 + "README.md"
139 + "SCRIPTING"
140 +)
141 +
142 +PATCHES=( "${FILESDIR}/${P}-r1-makefile.patch" )
143 +
144 +src_compile() {
145 + myemakeargs=(
146 + CC="$(tc-getCC)"
147 + VER="${PV}"
148 + WITH_LUAJIT="/usr"
149 + WITH_OPENSSL="/usr"
150 + )
151 +
152 + emake "${myemakeargs[@]}"
153 +}
154 +
155 +src_install() {
156 + dobin wrk
157 +
158 + insinto /usr/share/wrk
159 + doins -r scripts
160 +
161 + einstalldocs
162 +}