Gentoo Archives: gentoo-commits

From: Vikraman Choudhury <vikraman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-benchmarks/wrk/files/, app-benchmarks/wrk/
Date: Fri, 16 Feb 2018 06:59:57
Message-Id: 1518764344.fad10b987b46a7c062dc561430ca8f04a6ce0eba.vikraman@gentoo
1 commit: fad10b987b46a7c062dc561430ca8f04a6ce0eba
2 Author: Vikraman Choudhury <vikraman <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 16 03:19:02 2018 +0000
4 Commit: Vikraman Choudhury <vikraman <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 16 06:59:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fad10b98
7
8 app-benchmarks/wrk: Fix lua dep and patch Makefile
9
10 X-Gentoo-Bug: 646692
11 X-Gentoo-Bug-Url: https://bugs.gentoo.org/646692
12 Package-Manager: Portage-2.3.13, Repoman-2.3.3
13
14 app-benchmarks/wrk/files/wrk-4.1.0-makefile.patch | 31 +++++++++++++++++++++++
15 app-benchmarks/wrk/wrk-4.1.0.ebuild | 8 +++++-
16 2 files changed, 38 insertions(+), 1 deletion(-)
17
18 diff --git a/app-benchmarks/wrk/files/wrk-4.1.0-makefile.patch b/app-benchmarks/wrk/files/wrk-4.1.0-makefile.patch
19 new file mode 100644
20 index 00000000000..6f091accca5
21 --- /dev/null
22 +++ b/app-benchmarks/wrk/files/wrk-4.1.0-makefile.patch
23 @@ -0,0 +1,31 @@
24 +--- Makefile.orig 2018-01-21 01:00:58.000000000 -0500
25 ++++ Makefile 2018-02-15 22:03:01.565862308 -0500
26 +@@ -1,4 +1,4 @@
27 +-CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT
28 ++CFLAGS += -std=c99 -Wall -D_REENTRANT
29 + LIBS := -lpthread -lm -lssl -lcrypto
30 +
31 + TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
32 +@@ -30,20 +30,8 @@
33 + CFLAGS += -I$(ODIR)/include
34 + LDFLAGS += -L$(ODIR)/lib
35 +
36 +-ifneq ($(WITH_LUAJIT),)
37 +- CFLAGS += -I$(WITH_LUAJIT)/include
38 +- LDFLAGS += -L$(WITH_LUAJIT)/lib
39 +-else
40 +- CFLAGS += -I$(ODIR)/include/luajit-2.1
41 +- DEPS += $(ODIR)/lib/libluajit-5.1.a
42 +-endif
43 +-
44 +-ifneq ($(WITH_OPENSSL),)
45 +- CFLAGS += -I$(WITH_OPENSSL)/include
46 +- LDFLAGS += -L$(WITH_OPENSSL)/lib
47 +-else
48 +- DEPS += $(ODIR)/lib/libssl.a
49 +-endif
50 ++CFLAGS += $(shell pkg-config openssl luajit --cflags)
51 ++LDFLAGS += $(shell pkg-config openssl luajit --libs)
52 +
53 + all: $(BIN)
54 +
55
56 diff --git a/app-benchmarks/wrk/wrk-4.1.0.ebuild b/app-benchmarks/wrk/wrk-4.1.0.ebuild
57 index 8dc7bbdad50..397a84d2958 100644
58 --- a/app-benchmarks/wrk/wrk-4.1.0.ebuild
59 +++ b/app-benchmarks/wrk/wrk-4.1.0.ebuild
60 @@ -15,13 +15,19 @@ KEYWORDS="~x86 ~amd64"
61 IUSE="libressl"
62
63 DEPEND=">=dev-lang/luajit-2.0.2
64 + dev-lang/lua:0
65 !libressl? ( dev-libs/openssl:0= )
66 libressl? ( dev-libs/libressl:0= )"
67 RDEPEND="${DEPEND}"
68
69 +src_prepare() {
70 + rm -rf deps/ || die "failed to remove bundled dependencies"
71 + epatch "${FILESDIR}/${PN}-4.1.0-makefile.patch"
72 +}
73 +
74 src_compile() {
75 tc-export CC
76 - emake VER="${PV}" WITH_LUAJIT="${EPREFIX}"/usr WITH_OPENSSL="${EPREFIX}"/usr
77 + emake
78 }
79
80 src_install() {