head	1.11;
access;
symbols
	pkgsrc-2026Q1:1.6.0.2
	pkgsrc-2026Q1-base:1.6
	pkgsrc-2025Q4:1.1.0.2
	pkgsrc-2025Q4-base:1.1;
locks; strict;
comment	@# @;


1.11
date	2026.05.10.11.59.32;	author osa;	state Exp;
branches;
next	1.10;
commitid	e7IUUj6TzPWVmgFG;

1.10
date	2026.05.10.11.52.41;	author osa;	state Exp;
branches;
next	1.9;
commitid	Sgqno7yKMSdAkgFG;

1.9
date	2026.04.23.14.05.59;	author osa;	state Exp;
branches;
next	1.8;
commitid	3FmBDOcrYjU7C5DG;

1.8
date	2026.04.14.14.47.27;	author osa;	state Exp;
branches;
next	1.7;
commitid	ha1qszwIZixX7WBG;

1.7
date	2026.04.14.14.31.10;	author osa;	state Exp;
branches;
next	1.6;
commitid	zZ3UYDtkyIEL2WBG;

1.6
date	2026.03.10.17.28.13;	author osa;	state Exp;
branches;
next	1.5;
commitid	zoLLVwa0UYDc9sxG;

1.5
date	2026.03.04.18.47.08;	author osa;	state Exp;
branches;
next	1.4;
commitid	hGmoJvRz7pTiMGwG;

1.4
date	2026.01.07.08.49.18;	author wiz;	state Exp;
branches;
next	1.3;
commitid	1wQ3ICD8eebefrpG;

1.3
date	2025.12.25.18.58.29;	author osa;	state Exp;
branches;
next	1.2;
commitid	dDHFQl6WsBcD3PnG;

1.2
date	2025.12.25.18.01.00;	author osa;	state Exp;
branches;
next	1.1;
commitid	Wh2USqQOmVMPJOnG;

1.1
date	2025.11.21.17.19.48;	author osa;	state Exp;
branches;
next	;
commitid	ioQlUaxIpWL8BrjG;


desc
@@


1.11
log
@www/freenginx-devel: update njs 0.9.7 -> 0.9.8

Bump PKGREVISION.

Sponsored by:	tipi.work

<ChangeLog>

nginx modules:

*) Bugfix: fixed loading of the built-in "crypto" module.
   The issue was introduced in 3185ce81 (0.9.7).

</ChangeLog>
@
text
@# $NetBSD: Makefile,v 1.10 2026/05/10 11:52:41 osa Exp $

DISTNAME=	freenginx-1.31.0
PKGNAME=	${DISTNAME:S/-/-devel-/1}
PKGREVISION=	1
CATEGORIES=	www
MASTER_SITES=	https://freenginx.org/download/
DISTFILES=	${DEFAULT_DISTFILES}

MAINTAINER=	osa@@NetBSD.org
HOMEPAGE=	https://freenginx.org/
COMMENT=	Lightweight HTTP server and mail proxy server
LICENSE=	2-clause-bsd

CONFLICTS=	freenginx-[0-9]* nginx-[0-9]* nginx-devel-[0-9]*

.include "../../mk/bsd.prefs.mk"

NGINX_USER?=		nginx
NGINX_GROUP?=		nginx
NGINX_DATADIR?=		${VARBASE}/db/nginx
NGINX_LOGDIR?=		${VARBASE}/log/nginx
NGINX_PIDDIR?=		${VARBASE}/run

BUILD_DEFS+=		NGINX_DATADIR NGINX_LOGDIR NGINX_PIDDIR VARBASE

PKG_USERS_VARS+=	NGINX_USER
PKG_GROUPS_VARS+=	NGINX_GROUP
PKG_GROUPS=		${NGINX_GROUP}
PKG_USERS=		${NGINX_USER}:${NGINX_GROUP}

PKG_GECOS.${NGINX_USER}=	NGINX server user
PKG_HOME.${NGINX_USER}=		${NGINX_DATADIR}
PKG_SHELL.${NGINX_USER}=	${NOLOGIN}

USE_PKGLOCALEDIR=	yes
HAS_CONFIGURE=		yes
CONFIGURE_ARGS+=	--user=${NGINX_USER}
CONFIGURE_ARGS+=	--group=${NGINX_GROUP}
CONFIGURE_ARGS+=	--with-ld-opt=-L${PREFIX}/lib\ ${COMPILER_RPATH_FLAG}${PREFIX}/lib
CONFIGURE_ARGS+=	--prefix=${PREFIX}
CONFIGURE_ARGS+=	--sbin-path=${PREFIX}/sbin
CONFIGURE_ARGS+=	--conf-path=${PKG_SYSCONFDIR}/nginx.conf
CONFIGURE_ARGS+=	--pid-path=${NGINX_PIDDIR}/nginx.pid
CONFIGURE_ARGS+=	--lock-path=${NGINX_DATADIR}/nginx.lock
CONFIGURE_ARGS+=	--error-log-path=${NGINX_LOGDIR}/error.log
CONFIGURE_ARGS+=	--http-log-path=${NGINX_LOGDIR}/access.log
CONFIGURE_ARGS+=	--http-client-body-temp-path=${NGINX_DATADIR}/client_body_temp
CONFIGURE_ARGS+=	--http-proxy-temp-path=${NGINX_DATADIR}/proxy_temp
CONFIGURE_ARGS+=	--http-fastcgi-temp-path=${NGINX_DATADIR}/fstcgi_temp
CONFIGURE_ARGS+=	--http-scgi-temp-path=${NGINX_DATADIR}/scgi_temp
CONFIGURE_ARGS+=	--with-pcre

SUBST_CLASSES+=			fix-pcre2
SUBST_STAGE.fix-pcre2=		pre-configure
SUBST_FILES.fix-pcre2=		auto/lib/pcre/conf
SUBST_SED.fix-pcre2=		-e 's,/usr/pkg,${BUILDLINK_PREFIX.pcre2},g'
SUBST_NOOP_OK.fix-pcre2=	yes

PKG_SYSCONFSUBDIR=	nginx

.include "options.mk"

EGDIR=			${PREFIX}/share/examples/freenginx
EGFILES+=		fastcgi.conf fastcgi_params koi-utf koi-win \
			mime.types nginx.conf win-utf

.for file in ${EGFILES}
CONF_FILES+=	${EGDIR}/conf/${file} ${PKG_SYSCONFDIR}/${file}
.  if !empty(PKG_OPTIONS:Mnginx-naxsi)
CONF_FILES+=	${EGDIR}/conf/naxsi_core.rules ${PKG_SYSCONFDIR}/naxsi_core.rules
.  endif
.endfor

RCD_SCRIPTS=		nginx

INSTALLATION_DIRS+=	${PKGMANDIR}/man8 sbin share/examples/freenginx/conf \
			share/examples/freenginx/html
MAKE_DIRS+=		${NGINX_PIDDIR}
OWN_DIRS=		${NGINX_LOGDIR}
OWN_DIRS_PERMS+=	${NGINX_DATADIR} ${NGINX_USER} ${NGINX_GROUP} 0700

BUILD_TARGET=		build

SUBST_CLASSES+=		paths
SUBST_STAGE.paths=	pre-configure
SUBST_FILES.paths=	conf/nginx.conf
SUBST_SED.paths=	-e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_LOGDIR%%,${NGINX_LOGDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_PIDDIR%%,${NGINX_PIDDIR},g'
SUBST_SED.paths+=	-e 's,%%NGINX_USER%%,${NGINX_USER},g'
SUBST_SED.paths+=	-e 's,%%NGINX_GROUP%%,${NGINX_GROUP},g'

MESSAGE_SUBST+=		NGINX_LOGDIR=${NGINX_LOGDIR}
MESSAGE_SUBST+=		NGINX_PIDDIR=${NGINX_PIDDIR}
MESSAGE_SUBST+=		NGINX_USER=${NGINX_USER}
MESSAGE_SUBST+=		NGINX_GROUP=${NGINX_GROUP}

.if ${OPSYS} == "Darwin"
SOEXT=		bundle
.else
SOEXT=		so
.endif
PLIST_SUBST+=	SOEXT=${SOEXT}

post-patch:
.if !empty(PKG_OPTIONS:Mnginx-brotli)
	cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-ngx_brotli_filter_config
.endif
.if !empty(PKG_OPTIONS:Mnginx-gssapi)
	${SED} -i.bak '4d;5d;6d' ${WRKDIR}/${GSSAPI_DISTNAME}/config
.endif
.if !empty(PKG_OPTIONS:Mnginx-naxsi)
	${SED} -i.bak '308,309s/MSIZE/NAXSI_MSIZE/g' \
		${WRKSRC}/..${NAXSI_SUBDIR}/libinjection/src/libinjection_sqli.c
.endif
.if !empty(PKG_OPTIONS:Mnginx-njs)
	cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-auto-quickjs
.endif
.if !empty(PKG_OPTIONS:Mnginx-upload)
	cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-ngx_http_upload_module.c
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/objs/nginx ${DESTDIR}${PREFIX}/sbin/nginx
.for file in ${EGFILES}
	${INSTALL_DATA} ${WRKSRC}/conf/${file} ${DESTDIR}${EGDIR}/conf/${file}
.endfor
	${INSTALL_DATA} ${WRKSRC}/html/50x.html ${DESTDIR}${EGDIR}/html/50x.html
	${INSTALL_DATA} ${WRKSRC}/html/index.html ${DESTDIR}${EGDIR}/html/index.html
	${INSTALL_MAN} ${WRKSRC}/objs/nginx.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
.if !empty(PKG_OPTIONS:Mnginx-naxsi)
	${INSTALL_DATA} ${WRKDIR}/naxsi_rules/naxsi_core.rules ${DESTDIR}${EGDIR}/conf
.endif
.if !empty(PKG_OPTIONS:Mnginx-perl)
	${INSTALL_LIB_DIR} ${DESTDIR}${PERL5_INSTALLVENDORARCH}/auto/nginx
	${INSTALL_LIB} ${WRKSRC}/objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.${SOEXT} \
		${DESTDIR}${PERL5_INSTALLVENDORARCH}/auto/nginx
	${INSTALL_DATA} ${WRKSRC}/objs/src/http/modules/perl/blib/lib/nginx.pm \
		${DESTDIR}${PERL5_INSTALLVENDORARCH}
.endif
.if !empty(PKG_OPTIONS:Mnginx-dso)
	${INSTALL_LIB_DIR} ${DESTDIR}${PREFIX}/libexec/freenginx
	(cd ${WRKSRC}/objs/ && ${FIND} . -name '*.so' -maxdepth 1 -type f \
		-exec ${INSTALL_PROGRAM} {} ${DESTDIR}${PREFIX}/libexec/freenginx \;)
.endif

.include "../../devel/pcre2/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@


1.10
log
@www/freenginx-devel: update from 1.30.0 to 1.31.0

Sponsored by:	tipi.work

<ChangeLog>

*) Change: now the "try_files" directive can be used with arguments
   starting with the request URI inside a location given by a regular
   expression, along with the "alias" directive.

*) Bugfix: the "try_files" directive might work incorrectly when used
   with the "alias" directive.

*) Bugfix: a segmentation fault might occur in a worker process if the
   "try_files" and "proxy_pass" directives were used together.

*) Bugfix: the "proxy_pass" directive without a URI part might use the
   original request URI after the URI was changed by the "try_files"
   directive.

*) Change: the logging level of the "invalid ccs message", "not on
   record boundary", "required compression algorithm missing", and some
   "record layer failure" SSL errors has been lowered from "crit" to
   "info".

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2026/04/23 14:05:59 osa Exp $
d5 1
@


1.9
log
@www/freenginx-devel: update njs: 0.9.6 -> 0.9.7

Bump PKGREVISION.

<ChangeLog>

nginx modules:

*) Feature: improved shared dict eviction strategy.

*) Feature: added ttl() method to shared dictionaries.

*) Bugfix: removed spurious "js vm init" notice log emitted during
   configuration parsing.

*) Bugfix: removed shared dict expiration from read-locked paths.

*) Bugfix: fixed double-free in shared dict update with eviction.

*) Bugfix: fixed per-entry TTL reset on shared dict incr() calls.

Core:

*) Feature: added Ed25519 and X25519 support for WebCrypto.

*) Feature: added wrapKey() and unwrapKey() support for WebCrypto.

*) Feature: added crypto.randomUUID().

*) Feature: allowed await expressions in tagged templates and as
   call arguments.

*) Improvement: switched to OpenSSL EVP for hashing in the built-in
   "crypto" module.

*) Bugfix: fixed call argument evaluation.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2026/04/14 14:47:27 osa Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.30.0
a4 1
PKGREVISION=	1
@


1.8
log
@www/freenginx-devel: update: 1.29.7 -> 1.30.0

Sponsored by:	tipi.work

<ChangeLog>

*) 1.30.x stable branch.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2026/04/14 14:31:10 osa Exp $
d5 1
@


1.7
log
@www/freenginx-devel: update from 1.29.6 to 1.29.7

Sponsored by:	tipi.work

<ChangeLog>

*) Feature: OpenSSL 4.0 compatibility.

*) Bugfix: a segmentation fault might occur in a worker process if the
   ngx_http_dav_module was used to handle COPY and MOVE methods in a
   location with the "alias" directive.

*) Bugfix: client host name was not escaped in requests to the
   authentication server and in the XCLIENT command if the "resolver"
   directive was used in the SMTP proxy.

*) Bugfix: in the mail proxy module.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2026/03/10 17:28:13 osa Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.29.7
@


1.6
log
@www/freenginx-devel: update from 1.29.5 to 1.29.6

Sponsored by:	tipi.work

<ChangeLog>

*) Bugfix: incorrect "upstream server temporarily disabled" messages
   might be logged when using variables in the "proxy_pass" directive.

*) Bugfix: retrying a request to the next gRPC upstream server might not
   work correctly.
   Thanks to David Carlier.

*) Bugfix: a segmentation fault might occur in a worker process if the
   ngx_http_xslt_filter_module was used.

*) Bugfix: a segmentation fault might occur in a worker process if the
   ngx_http_mp4_module was used.

*) Bugfix: in the ngx_http_uwsgi_module and ngx_http_scgi_module
   modules.

*) Bugfix: in memory allocation error handling.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2026/03/04 18:47:08 osa Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.29.6
@


1.5
log
@www/freenginx-devel: update from 1.29.4 to 1.29.5

Also, update third-party modules:
- ngx_http_redis
- njs
- spnego
- vts

to their recent versions.

Sponsored by:	tipi.work

<ChangeLog>

*) Feature: optimized SSL_sendfile() usage on FreeBSD.
   Thanks to Gleb Smirnoff.

*) Bugfix: upstream servers were not marked as failed after a response
   with status code 500, 502, 503, 504, or 429 if the code was listed in
   the "proxy_next_upstream" directive, but switching to the next server
   was not possible.

*) Bugfix: the "stale-if-error" cache control extension was not applied
   if a backend returned a response with status code 500, 502, 503, 504,
   or 429 and the code was listed in the "proxy_next_upstream"
   directive.

*) Bugfix: in handling of premature backend responses.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2026/01/07 08:49:18 wiz Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.29.5
@


1.4
log
@*: recursive bump for icu 78.1
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2025/12/25 18:58:29 osa Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.29.4
a4 1
PKGREVISION=	1
d116 3
@


1.3
log
@www/freenginx-devel: update CONFLICTS
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2025/12/25 18:01:00 osa Exp $
d5 1
@


1.2
log
@www/freenginx-devel: update from 1.29.3 to 1.29.4

Convert base geoip modules to dynamic.

Sponsored by:	tipi.work

<ChangeLog>

*) Feature: support for GeoIP2 databases in the MaxMind DB (MMDB) format
   in the ngx_http_geoip_module and ngx_stream_geoip_module modules; the
   "geoip_set" directive.

*) Bugfix: disk cache size might be calculated incorrectly on the XFS
   file system with the "largeio" mount option.

*) Bugfix: of minor potential bugs.

</ChangeLog>
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2025/11/21 17:19:48 osa Exp $
d14 1
a14 1
CONFLICTS=	nginx-[0-9]* nginx-devel-[0-9]*
@


1.1
log
@www/freenginx-devel: add new package

Please welcome freenginx, version 1.29.3!
This version of freenginx is the recent one from the development branch.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.162 2025/10/25 01:43:56 osa Exp $
d3 1
a3 1
DISTNAME=	freenginx-1.29.3
@

