gentoo/www-nginx/ngx-xss/files/ngx-xss-0.06-add-dynamic-build-support.patch
Zurab Kvachadze 86a103a410
www-nginx/ngx-xss: new package, add 0.06
ngx-xss[1] is an NGINX module that adds support for "native cross-site
scripting".

[1]: https://github.com/openresty/xss-nginx-module

Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/37590
Signed-off-by: Sam James <sam@gentoo.org>
2025-07-05 08:27:03 +01:00

35 lines
1.2 KiB
Diff

From a45c0c645841795d124acd43ea8a5c8297754a6f Mon Sep 17 00:00:00 2001
From: Su Yang <soulteary@users.noreply.github.com>
Date: Mon, 14 Jun 2021 11:47:03 +0800
Subject: [PATCH 1/2] support dynamic build
---
config | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/config b/config
index 42ebe33..4ca7d3d 100644
--- a/config
+++ b/config
@@ -1,5 +1,20 @@
ngx_addon_name=ngx_http_xss_filter_module
+
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_xss_filter_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_xss_filter_module.c $ngx_addon_dir/src/ngx_http_xss_util.c"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_xss_filter_module.h $ngx_addon_dir/src/ngx_http_xss_util.h"
+if test -n "$ngx_module_link"; then
+ ngx_module_type=HTTP_AUX_FILTER
+ ngx_module_name=$ngx_addon_name
+ ngx_module_incs=
+ ngx_module_deps="$NGX_ADDON_DEPS"
+ ngx_module_srcs="$NGX_ADDON_SRCS"
+ ngx_module_libs=
+
+ . auto/module
+else
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS"
+ NGX_ADDON_DEPS="$NGX_ADDON_DEPS"
+fi