void-packages/srcpkgs/wrk/template
Noel Cower 5f859e5141 wrk: update to 4.1.0.
This includes a patch to adjust zmalloc's prefix size so that the
memory following it is aligned correctly. This is to prevent a SIGBUS
on armv[5-7] systems when wrk increments its stats counters.
2018-11-23 14:36:36 -02:00

49 lines
1.3 KiB
Bash

# Template file for 'wrk'
pkgname=wrk
version=4.1.0
revision=1
build_style=gnu-makefile
make_build_args="VER=${version} WITH_OPENSSL=/usr WITH_LUAJIT=/usr"
hostmakedepends="LuaJIT"
makedepends="LuaJIT-devel libressl-devel"
short_desc="Modern HTTP benchmarking tool"
maintainer="Noel Cower <ncower@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/wg/wrk"
distfiles="https://github.com/wg/wrk/archive/${version}.tar.gz"
checksum=6fa1020494de8c337913fd139d7aa1acb9a020de6f7eb9190753aa4b1e74271e
patch_args="-Np1"
pre_build() {
case "$XBPS_TARGET_MACHINE" in
aarch64*)
broken="LuaJIT not supported on $XBPS_TARGET_MACHINE"
;;
mips*)
broken="__sync_fetch_and_add_8 and __sync_val_compare_and_swap_8 supported on $XBPS_TARGET_MACHINE"
;;
armv[5-7]*)
make obj
luajit -b -a arm src/wrk.lua obj/bytecode.o
;;
i686*)
make obj
luajit -b -a x86 src/wrk.lua obj/bytecode.o
;;
esac
# Borrow flags from Makefile
CFLAGS="-std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -I${XBPS_CROSS_BASE}/usr/include/luajit-2.0 ${CFLAGS}"
LDFLAGS="-Wl,-E ${LDFLAGS}"
}
do_install() {
vbin wrk
vdoc README.md
vdoc CHANGES
vdoc SCRIPTING
vlicense LICENSE
vlicense NOTICE
for f in scripts/*; do
vsconf "${f}"
done
}