Files
ports/sysutils/fluent-bit/Makefile
Mateusz Piotrowski fc0a0b37b1 sysutils/fluent-bit: Add option LUA_FILTER
From https://docs.fluentbit.io/manual/pipeline/filters/lua:

> The Lua filter allows you to modify the incoming records (even split
> one record into multiple records) using custom Lua scripts.

The option depends on luajit-devel, because at least version 2.1.0 is
required: https://github.com/fluent/fluent-bit/pull/7286/files.

Keep the option disabled for now. We may consider enabling it by default
in the future to match what upstream does:
https://docs.fluentbit.io/manual/installation/sources/build-and-install.

Also, add a small do-test target for the new option.

PR:		252296
Approved by:	portmgr (maintainer timeout)
Sponsored by:	trivago N.V.
Sponsored by:	Klara, Inc.
2024-08-23 01:27:12 +02:00

59 lines
1.5 KiB
Makefile

PORTNAME= fluent-bit
DISTVERSIONPREFIX= v
DISTVERSION= 3.1.6
CATEGORIES= sysutils
MAINTAINER= girgen@FreeBSD.org
COMMENT= Fast and lightweight data forwarder
WWW= https://fluentbit.io/
LICENSE= APACHE20
BROKEN_mips= fails to build: conflicting types for 'restrict'
BROKEN_mips64= fails to build: conflicting types for 'restrict'
LIB_DEPENDS= libyaml.so:textproc/libyaml
USES= bison cmake:noninja compiler:c11 gmake localbase:ldflags
USE_GITHUB= yes
GH_ACCOUNT= fluent
USE_RC_SUBR= ${PORTNAME}
CMAKE_ARGS= -DFLB_DEBUG=Off \
-DFLB_TRACE=Off
LDFLAGS+= -lexecinfo
OPTIONS_DEFINE= LUA_FILTER PGSQL SSL
OPTIONS_DEFAULT= SSL
LUA_FILTER_DESC= Support for modifying incoming records using Lua scripts
LUA_FILTER_USES= luajit:luajit-devel pkgconfig
LUA_FILTER_CMAKE_ON= -DFLB_FILTER_LUA=On \
-DFLB_LUAJIT=On \
-DFLB_PREFER_SYSTEM_LIB_LUAJIT=On
LUA_FILTER_CMAKE_OFF= -DFLB_LUAJIT=Off
PGSQL_USES= pgsql
PGSQL_CMAKE_ON= -DFLB_OUT_PGSQL=On
PGSQL_CMAKE_OFF= -DFLB_OUT_PGSQL=Off
SSL_USES= ssl
SSL_CMAKE_ON= -DFLB_TLS=On
SSL_CMAKE_OFF= -DFLB_TLS=Off
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1400079 || (${OSVERSION} >= 1302505 && \
${OSVERSION} < 1400000))
CFLAGS+= -Wno-error=int-conversion
.endif
post-install:
${MV} ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
${MV} ${STAGEDIR}${ETCDIR}/parsers.conf ${STAGEDIR}${ETCDIR}/parsers.conf.sample
do-test-LUA_FILTER-on:
${STAGEDIR}${PREFIX}/bin/fluent-bit --help 2>/dev/null | grep -w -q lua
.include <bsd.port.mk>