Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Apr 2021 18:44:16 GMT
From:      "Sergey A. Osokin" <osa@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f7dc9143c86d - main - benchmarks/wrk: add luajit and luajit-openresty flavors.
Message-ID:  <202104241844.13OIiGvh021442@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f7dc9143c86d53b6cb3b5b5bd5461ee8c3c2b60c

commit f7dc9143c86d53b6cb3b5b5bd5461ee8c3c2b60c
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2021-04-24 18:35:02 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2021-04-24 18:35:02 +0000

    benchmarks/wrk: add luajit and luajit-openresty flavors.
    
    Bump PORTREVISION.
---
 benchmarks/wrk/Makefile | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/benchmarks/wrk/Makefile b/benchmarks/wrk/Makefile
index 2a18a5fa616f..4ba96d4ee84b 100644
--- a/benchmarks/wrk/Makefile
+++ b/benchmarks/wrk/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	wrk
 PORTVERSION=	4.1.0
+PORTREVISION=	1
 CATEGORIES=	benchmarks www
 
 MAINTAINER=	osa@FreeBSD.org
@@ -9,15 +10,29 @@ COMMENT=	Modern HTTP benchmarking tool
 
 LICENSE=	APACHE20
 
-LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	wg
 
+FLAVORS=	luajit luajitor
+FLAVOR?=	${FLAVORS:[1]}
+
+luajit_PKGNAMESUFFIX=	-luajit
+luajitor_PKGNAMESUFFIX=	-luajit-openresty
+
+luajit_CONFLICTS_INSTALL=	${PORTNAME}-luajit-openresty
+luajitor_CONFLICTS_INSTALL=	${PORTNAME}-luajit
+
 USES=		gmake ssl
 USE_CSTD=	c99
 LLD_UNSAFE=	yes
+.if ${FLAVOR} == luajit
 CFLAGS+=	-I${LOCALBASE}/include/luajit-2.0
+LIB_DEPENDS=	libluajit-5.1.so:lang/luajit
+.else
+CFLAGS+=	-I${LOCALBASE}/include/luajit-2.1
+LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
+.endif
+
 MAKE_ENV+=	WITH_OPENSSL=${OPENSSLBASE} WITH_LUAJIT=${LOCALBASE} VER=${PORTVERSION}
 
 PLIST_FILES=	bin/wrk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104241844.13OIiGvh021442>