forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Conrad Kostecki <[email protected]>
- Loading branch information
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |