git: 1d7dd5ca999c - main - www/freenginx-devel: enable third-party passenger module

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Mon, 03 Nov 2025 01:15:44 UTC
The branch main has been updated by osa:

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

commit 1d7dd5ca999c09c319132a3dcfd131768ddf8cdf
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2025-11-03 01:12:39 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2025-11-03 01:15:39 +0000

    www/freenginx-devel: enable third-party passenger module
    
    Bump PORTREVISION.
    
    Sponsored by:   tipi.work
---
 www/freenginx-devel/Makefile                         |  2 +-
 www/freenginx-devel/Makefile.extmod                  |  3 ++-
 www/freenginx-devel/Makefile.ignore                  |  4 ----
 .../files/extra-patch-passenger-Configuration.c      | 20 ++++++++++++++++++++
 4 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/www/freenginx-devel/Makefile b/www/freenginx-devel/Makefile
index fb54161434b4..4d361d15eac4 100644
--- a/www/freenginx-devel/Makefile
+++ b/www/freenginx-devel/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	freenginx
 PORTVERSION=	${NGINX_VERSION}
 .include "version.mk"
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	www
 MASTER_SITES=	https://freenginx.org/download/ \
 		LOCAL/osa
diff --git a/www/freenginx-devel/Makefile.extmod b/www/freenginx-devel/Makefile.extmod
index c9ecb4fd7d4b..47f204238655 100644
--- a/www/freenginx-devel/Makefile.extmod
+++ b/www/freenginx-devel/Makefile.extmod
@@ -266,7 +266,8 @@ PASSENGER_DISTFILES=	passenger-${PASSENGER_NGINX_VER}.tar.gz:passenger
 PASSENGER_VARS=		WRKSRC_passenger=${WRKDIR}/passenger-${PASSENGER_NGINX_VER} \
 			DSO_EXTDIRS+=passenger-${PASSENGER_NGINX_VER}/src/nginx_module
 PASSENGER_EXTRA_PATCHES=${PATCHDIR}/extra-patch-passenger-build-nginx.rb \
-			${PATCHDIR}/extra-patch-passenger-disable-telemetry
+			${PATCHDIR}/extra-patch-passenger-disable-telemetry \
+			${PATCHDIR}/extra-patch-passenger-Configuration.c
 
 POSTGRES_USES=		pgsql
 POSTGRES_GH_TUPLE=	konstruxi:ngx_postgres:8aa7359:postgres
diff --git a/www/freenginx-devel/Makefile.ignore b/www/freenginx-devel/Makefile.ignore
index ebba4831a1e8..abb6eea2e14a 100644
--- a/www/freenginx-devel/Makefile.ignore
+++ b/www/freenginx-devel/Makefile.ignore
@@ -5,7 +5,3 @@ IGNORE=		upload module: patching is required
 .if ${PORT_OPTIONS:MLUASTREAM}
 IGNORE=		lua stream module: patching is required
 .endif
-
-.if ${PORT_OPTIONS:MPASSENGER}
-IGNORE=		passenger module: patching is required
-.endif
diff --git a/www/freenginx-devel/files/extra-patch-passenger-Configuration.c b/www/freenginx-devel/files/extra-patch-passenger-Configuration.c
new file mode 100644
index 000000000000..1c53ea086717
--- /dev/null
+++ b/www/freenginx-devel/files/extra-patch-passenger-Configuration.c
@@ -0,0 +1,20 @@
+--- ../passenger-6.0.27/src/nginx_module/Configuration.c.orig	2013-10-26 20:00:00.000000000 -0400
++++ ../passenger-6.0.27/src/nginx_module/Configuration.c	2025-11-02 20:09:05.651562000 -0500
+@@ -224,7 +224,7 @@
+ 
+     conf->upstream_config.send_lowat = NGX_CONF_UNSET_SIZE;
+     conf->upstream_config.buffer_size = NGX_CONF_UNSET_SIZE;
+-    #if NGINX_VERSION_NUM >= 1027000
++    #if NGINX_VERSION_NUM >= 1027000 && !defined freenginx
+         conf->upstream_config.limit_rate = NGX_CONF_UNSET_PTR;
+     #elif NGINX_VERSION_NUM >= 1007007
+         conf->upstream_config.limit_rate = NGX_CONF_UNSET_SIZE;
+@@ -467,7 +467,7 @@
+                               prev->upstream_config.buffer_size,
+                               16 * 1024);
+ 
+-    #if NGINX_VERSION_NUM >= 1027000
++    #if NGINX_VERSION_NUM >= 1027000 && !defined freenginx
+         ngx_conf_merge_ptr_value(conf->upstream_config.limit_rate,
+                                  prev->upstream_config.limit_rate, NULL);
+     #elif NGINX_VERSION_NUM >= 1007007