git: 1adab1451e78 - main - www/nginx-devel: add third-party stream-lua module

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Mon, 03 Jun 2024 19:17:21 UTC
The branch main has been updated by osa:

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

commit 1adab1451e783121b4709820c89793f59d9caaa8
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2024-06-03 19:15:37 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2024-06-03 19:17:16 +0000

    www/nginx-devel: add third-party stream-lua module
    
    Bump PORTREVISION.
    
    PR:     278951
---
 www/nginx-devel/Makefile                                    |  2 +-
 www/nginx-devel/Makefile.extmod                             | 13 +++++++++++--
 www/nginx-devel/Makefile.options.desc                       |  1 +
 www/nginx-devel/distinfo                                    |  4 +++-
 .../files/extra-patch-stream-lua-nginx-module_config        | 10 ++++++++++
 www/nginx-devel/pkg-plist                                   |  1 +
 6 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile
index 91b8236f4f70..cdc155fdca37 100644
--- a/www/nginx-devel/Makefile
+++ b/www/nginx-devel/Makefile
@@ -1,6 +1,6 @@
 PORTNAME?=	nginx
 PORTVERSION=	1.27.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	https://nginx.org/download/ \
 		LOCAL/osa
diff --git a/www/nginx-devel/Makefile.extmod b/www/nginx-devel/Makefile.extmod
index 9418819944c3..5ef8e27b7226 100644
--- a/www/nginx-devel/Makefile.extmod
+++ b/www/nginx-devel/Makefile.extmod
@@ -10,8 +10,8 @@ OPTIONS_GROUP_THIRDPARTYGRP=	AJP AWS_AUTH BROTLI CACHE_PURGE CT \
 	HTTP_JSON_STATUS HTTP_MOGILEFS HTTP_NOTICE HTTP_PUSH \
 	HTTP_PUSH_STREAM HTTP_REDIS HTTP_SLICE_AHEAD HTTP_SUBS_FILTER HTTP_TARANTOOL \
 	HTTP_UPLOAD HTTP_UPLOAD_PROGRESS HTTP_UPSTREAM_CHECK HTTP_UPSTREAM_FAIR \
-	HTTP_UPSTREAM_STICKY HTTP_VIDEO_THUMBEXTRACTOR HTTP_ZIP ICONV LET LINK LUA MEMC \
-	MODSECURITY3 NAXSI PASSENGER POSTGRES RDS_CSV RDS_JSON \
+	HTTP_UPSTREAM_STICKY HTTP_VIDEO_THUMBEXTRACTOR HTTP_ZIP ICONV LET LINK LUA \
+	LUASTREAM MEMC MODSECURITY3 NAXSI PASSENGER POSTGRES RDS_CSV RDS_JSON \
 	REDIS2 RTMP SET_MISC SFLOW SHIBBOLETH SLOWFS_CACHE SRCACHE STS \
 	VOD VTS XSS WEBSOCKIFY ZSTD
 
@@ -211,6 +211,15 @@ LUA_CONFIGURE_ENV=	LUAJIT_INC=${LOCALBASE}/include/luajit-2.1 \
 LUA_GH_TUPLE=		openresty:lua-nginx-module:v0.10.26:lua
 LUA_VARS=		DSO_EXTMODS+=lua
 
+LUASTREAM_IMPLIES=	DEVEL_KIT
+LUASTREAM_LIB_DEPENDS=	libluajit-5.1.so:lang/luajit-openresty
+LUASTREAM_RUN_DEPENDS=	lua-resty-core>0:www/lua-resty-core
+LUASTREAM_CONFIGURE_ENV=LUAJIT_INC=${LOCALBASE}/include/luajit-2.1 \
+			LUAJIT_LIB=${LOCALBASE}/lib
+LUASTREAM_GH_TUPLE=	openresty:stream-lua-nginx-module:bea8a0c:luastream
+LUASTREAM_VARS=		DSO_EXTMODS+=luastream
+LUASTREAM_EXTRA_PATCHES=${PATCHDIR}/extra-patch-stream-lua-nginx-module_config
+
 LINK_GH_TUPLE=		Taymindis:nginx-link-function:3.2.4:link
 LINK_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-nginx-link-function-config \
 			${PATCHDIR}/extra-patch-ngx_link_func_module.c
diff --git a/www/nginx-devel/Makefile.options.desc b/www/nginx-devel/Makefile.options.desc
index ca5f599c4242..f2b3924b69f8 100644
--- a/www/nginx-devel/Makefile.options.desc
+++ b/www/nginx-devel/Makefile.options.desc
@@ -78,6 +78,7 @@ IPV6_DESC=			Enable IPv6 support
 LET_DESC=			3rd party let module
 LINK_DESC=			3rd party link function module
 LUA_DESC=			3rd party lua module
+LUASTREAM_DESC=			3rd party lua stream module
 MAILGRP_DESC=			Modules that require MAIL module
 MAIL_DESC=			Enable IMAP4/POP3/SMTP proxy module
 MAIL_IMAP_DESC=			Enable IMAP4 proxy module
diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo
index 462bc038a43e..22d0efb12ace 100644
--- a/www/nginx-devel/distinfo
+++ b/www/nginx-devel/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1717435180
+TIMESTAMP = 1717437122
 SHA256 (nginx-1.27.0.tar.gz) = b7230e3cf87eaa2d4b0bc56aadc920a960c7873b9991a1b66ffcc08fc650129c
 SIZE (nginx-1.27.0.tar.gz) = 1244887
 SHA256 (nginx_mogilefs_module-1.0.4.tar.gz) = 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae
@@ -95,6 +95,8 @@ SHA256 (Taymindis-nginx-link-function-3.2.4_GH0.tar.gz) = 20c3679199ba7efe1598f0
 SIZE (Taymindis-nginx-link-function-3.2.4_GH0.tar.gz) = 139656
 SHA256 (openresty-lua-nginx-module-v0.10.26_GH0.tar.gz) = a75983287a2bdc5e964ace56a51b215dc2ec996639d4916cd393d6ebba94b565
 SIZE (openresty-lua-nginx-module-v0.10.26_GH0.tar.gz) = 745785
+SHA256 (openresty-stream-lua-nginx-module-bea8a0c_GH0.tar.gz) = 8f3b5894269336377a5e1b50eb42c5f07d4ead90087f8bed88a95074f0352f89
+SIZE (openresty-stream-lua-nginx-module-bea8a0c_GH0.tar.gz) = 383699
 SHA256 (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 8c2bdbe875e4f5225d0778bfb09a2668f9281d7de6218c7b462a7ba2cee06fe8
 SIZE (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 34654
 SHA256 (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 32a42256616cc674dca24c8654397390adff15b888b77eb74e0687f023c8751b
diff --git a/www/nginx-devel/files/extra-patch-stream-lua-nginx-module_config b/www/nginx-devel/files/extra-patch-stream-lua-nginx-module_config
new file mode 100644
index 000000000000..e1dc55bf0760
--- /dev/null
+++ b/www/nginx-devel/files/extra-patch-stream-lua-nginx-module_config
@@ -0,0 +1,10 @@
+--- ../stream-lua-nginx-module-bea8a0c/config.orig	2024-06-03 15:08:47.791681000 -0400
++++ ../stream-lua-nginx-module-bea8a0c/config	2024-06-03 15:08:58.714542000 -0400
+@@ -411,6 +411,6 @@
+ #NGX_DTRACE_PROVIDERS="$NGX_DTRACE_PROVIDERS $ngx_addon_dir/dtrace/ngx_lua_provider.d"
+ #NGX_TAPSET_SRCS="$NGX_TAPSET_SRCS $ngx_addon_dir/tapset/ngx_lua.stp"
+ 
+-CORE_INCS="$CORE_INCS $ngx_addon_dir/src/api"
++CORE_INCS="$CORE_INCS src/stream $ngx_addon_dir/src/api"
+ 
+ echo "/* DO NOT EDIT! This file was automatically generated by config */" > "$ngx_addon_dir/src/ngx_stream_lua_autoconf.h"
diff --git a/www/nginx-devel/pkg-plist b/www/nginx-devel/pkg-plist
index 867c3e97c265..c937ff729ef5 100644
--- a/www/nginx-devel/pkg-plist
+++ b/www/nginx-devel/pkg-plist
@@ -59,6 +59,7 @@
 %%DSO%%%%LET%%libexec/nginx/ngx_http_let_module.so
 %%DSO%%%%LINK%%libexec/nginx/ngx_http_link_func_module.so
 %%DSO%%%%LUA%%libexec/nginx/ngx_http_lua_module.so
+%%DSO%%%%LUASTREAM%%libexec/nginx/ngx_stream_lua_module.so
 %%DSO%%%%MAIL%%%%CT%%libexec/nginx/ngx_mail_ssl_ct_module.so
 %%DSO%%%%MAIL%%libexec/nginx/ngx_mail_module.so
 %%DSO%%%%MEMC%%libexec/nginx/ngx_http_memc_module.so