git: d800a3eee01c - main - net-mgmt/fastnetmon: Use USES=luajit (defaults to luajit-devel)

From: Adam Weinberger <adamw_at_FreeBSD.org>
Date: Sat, 15 Oct 2022 21:58:52 UTC
The branch main has been updated by adamw:

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

commit d800a3eee01c47efda0ec90dba8475e9c8bc021f
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2022-10-15 21:58:37 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-10-15 21:58:46 +0000

    net-mgmt/fastnetmon: Use USES=luajit (defaults to luajit-devel)
---
 net-mgmt/fastnetmon/Makefile | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/net-mgmt/fastnetmon/Makefile b/net-mgmt/fastnetmon/Makefile
index e557db61e2be..095fc9c0c5a3 100644
--- a/net-mgmt/fastnetmon/Makefile
+++ b/net-mgmt/fastnetmon/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	fastnetmon
 PORTVERSION=	1.1.4
 DISTVERSIONPREFIX=	v
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	net-mgmt security
 
 MAINTAINER=	farrokhi@FreeBSD.org
@@ -20,7 +20,7 @@ LIB_DEPENDS=	libboost_regex.so:devel/boost-libs \
 		libjson-c.so:devel/json-c \
 		libbson-1.0.so:devel/libbson
 
-USES=	cmake compiler:c++11-lang
+USES=	cmake compiler:c++11-lang luajit
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	pavel-odintsov
@@ -44,14 +44,13 @@ CMAKE_INSTALL_PREFIX=	${PREFIX}
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} == amd64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc
-LIB_DEPENDS+=	libluajit-5.1.so:lang/luajit
-.elif ${ARCH:Mpowerpc64*}
+.if ${ARCH} != amd64 && ${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != i386 && ${ARCH} != powerpc && empty(ARCH:Mpowerpc64*)
+CMAKE_ARGS+=	-DENABLE_LUA_SUPPORT:BOOL=OFF
+.else
+.  if ${LUAJIT_VER} == luajit-devel || ${LUAJIT_VER} == luajit-openresty
 EXTRA_PATCHES=	${FILESDIR}/extra-patch-src_fast__library.h \
 		${FILESDIR}/extra-patch-src_netflow__plugin_netflow__collector.cpp
-LIB_DEPENDS+=	libluajit-5.1.so:lang/luajit-openresty
-.else
-CMAKE_ARGS+=	-DENABLE_LUA_SUPPORT:BOOL=OFF
+.  endif
 .endif
 
 post-patch: