git: 640fbdfa0ca6 - main - www/nginx-module-memc: Add New Port

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Tue, 20 Oct 2026 17:43:46 UTC
The branch main has been updated by joneum:

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

commit 640fbdfa0ca6412aa3b66e342867553fa1419be5
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-20 17:40:58 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-20 17:43:28 +0000

    www/nginx-module-memc: Add New Port
    
    Sources of the memc module for the NGINX ports.  The module speaks the
    memcached protocol from a location, so a cache can be reached without a
    backend of its own.
    
    Sponsored by:   Netzkommune GmbH
---
 www/Makefile                               |  1 +
 www/nginx-module-memc/Makefile             | 44 ++++++++++++++++++++++++++++++
 www/nginx-module-memc/distinfo             |  3 ++
 www/nginx-module-memc/files/pkg-message.in | 14 ++++++++++
 www/nginx-module-memc/pkg-descr            |  7 +++++
 5 files changed, 69 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 58665549fe4b..913c2cd0d3a2 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -550,6 +550,7 @@
     SUBDIR += nginx-module-let
     SUBDIR += nginx-module-lua
     SUBDIR += nginx-module-lua-stream
+    SUBDIR += nginx-module-memc
     SUBDIR += nginx-module-modsecurity3
     SUBDIR += nginx-module-ndk
     SUBDIR += nginx-module-njs
diff --git a/www/nginx-module-memc/Makefile b/www/nginx-module-memc/Makefile
new file mode 100644
index 000000000000..62c0801e29c8
--- /dev/null
+++ b/www/nginx-module-memc/Makefile
@@ -0,0 +1,44 @@
+PORTNAME=	nginx-module-memc
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.20
+CATEGORIES=	www
+
+MAINTAINER=	joneum@FreeBSD.org
+COMMENT=	Sources of the memc module for the NGINX ports
+WWW=		https://github.com/openresty/memc-nginx-module
+
+LICENSE=	BSD2CLAUSE
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	openresty
+GH_PROJECT=	memc-nginx-module
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+SUB_FILES=	pkg-message
+
+_MODDIR=	share/nginx/modules/${PORTNAME}
+MODULESDIR=	${PREFIX}/${_MODDIR}
+
+_MODFILES=	src/ddebug.h \
+		src/ngx_http_memc_handler.c \
+		src/ngx_http_memc_handler.h \
+		src/ngx_http_memc_module.c \
+		src/ngx_http_memc_module.h \
+		src/ngx_http_memc_request.c \
+		src/ngx_http_memc_request.h \
+		src/ngx_http_memc_response.c \
+		src/ngx_http_memc_response.h \
+		src/ngx_http_memc_util.c \
+		src/ngx_http_memc_util.h
+
+PLIST_FILES=	${_MODDIR}/config \
+		${_MODFILES:S!^!${_MODDIR}/!}
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${MODULESDIR}/src
+	${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}${MODULESDIR}
+	${INSTALL_DATA} ${_MODFILES:S!^!${WRKSRC}/!} ${STAGEDIR}${MODULESDIR}/src
+
+.include <bsd.port.mk>
diff --git a/www/nginx-module-memc/distinfo b/www/nginx-module-memc/distinfo
new file mode 100644
index 000000000000..7fefcdafcdda
--- /dev/null
+++ b/www/nginx-module-memc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1792437047
+SHA256 (openresty-memc-nginx-module-v0.20_GH0.tar.gz) = a42dd56dd6e2144755a127bcd2a6cc1a488258dc5cdb751d6a3e5dd5b6989239
+SIZE (openresty-memc-nginx-module-v0.20_GH0.tar.gz) = 34736
diff --git a/www/nginx-module-memc/files/pkg-message.in b/www/nginx-module-memc/files/pkg-message.in
new file mode 100644
index 000000000000..7e578fdbe40b
--- /dev/null
+++ b/www/nginx-module-memc/files/pkg-message.in
@@ -0,0 +1,14 @@
+[
+{ type: install
+  message: <<EOM
+This package contains the sources of the memc module only.  It does not
+install a loadable module.
+
+The module itself is built by the nginx ports.  To use it, build www/nginx,
+www/nginx-devel or www/freenginx with the MEMC option enabled.
+Those ports pick the sources up from
+%%PREFIX%%/share/nginx/modules/nginx-module-memc
+and produce ngx_http_memc_module.so.
+EOM
+}
+]
diff --git a/www/nginx-module-memc/pkg-descr b/www/nginx-module-memc/pkg-descr
new file mode 100644
index 000000000000..ea22aafd103a
--- /dev/null
+++ b/www/nginx-module-memc/pkg-descr
@@ -0,0 +1,7 @@
+The memc module speaks the memcached protocol as an upstream, so a
+location can store, fetch and delete entries instead of only reading them
+like the built-in memcached module does.  The verb comes from a variable,
+which lets a plain nginx configuration act as a memcached client.
+
+This port only installs the module sources.  The module itself is built by
+the nginx ports when their MEMC option is enabled.