aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/Makefile1
-rw-r--r--www/angie-module-lua/Makefile45
-rw-r--r--www/angie-module-lua/files/patch-lua-config26
-rw-r--r--www/angie-module-lua/files/patch-stream-lua-config35
-rw-r--r--www/angie-module-lua/files/pkg-message.in18
-rw-r--r--www/angie-module-lua/pkg-descr3
-rw-r--r--www/angie-module-lua/pkg-plist6
-rw-r--r--www/angie/distinfo6
8 files changed, 139 insertions, 1 deletions
diff --git a/www/Makefile b/www/Makefile
index 3aa3842f777c..8447e307aa86 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -40,6 +40,7 @@
SUBDIR += angie-module-image-filter
SUBDIR += angie-module-jwt
SUBDIR += angie-module-keyval
+ SUBDIR += angie-module-lua
SUBDIR += angie-module-ndk
SUBDIR += angie-module-njs
SUBDIR += angie-module-perl
diff --git a/www/angie-module-lua/Makefile b/www/angie-module-lua/Makefile
new file mode 100644
index 000000000000..c7e2c2ac91c2
--- /dev/null
+++ b/www/angie-module-lua/Makefile
@@ -0,0 +1,45 @@
+PORTNAME= angie-module-lua
+GH_TUPLE= openresty:lua-nginx-module:v0.10.25:lua
+GH_TUPLE+= openresty:stream-lua-nginx-module:v0.0.13:lua_stream
+GH_TUPLE+= vision5:ngx_devel_kit:v0.3.2:ndk
+
+COMMENT= Angie Lua dynamic module
+
+LICENSE_FILE= ${WRKSRC_lua}/README.markdown
+
+LIB_DEPENDS= libpcre.so:devel/pcre
+
+CONFIGURE_ADD= --add-dynamic-module=${WRKSRC_lua} \
+ --add-dynamic-module=${WRKSRC_lua_stream} \
+ --add-dynamic-module=${WRKSRC_ndk}
+
+CONFIGURE_ENV= LUAJIT_INC=${LUAJIT_INCDIR} \
+ LUAJIT_LIB=${LOCALBASE}/lib
+
+RUN_DEPENDS= angie-module-ndk==${PKGVERSION}:www/angie-module-ndk \
+ lua-resty-core==0.1.27:www/lua-resty-core
+
+USES= luajit:luajit-openresty
+
+MASTERDIR= ${.CURDIR}/../../www/angie
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${MODDIR}
+
+.for i in ngx_http_lua_module ngx_stream_lua_module
+ ${INSTALL_LIB} ${WRKSRC}/objs/${i}.so ${STAGEDIR}${MODDIR}
+.endfor
+
+ ${INSTALL_MAN} ${WRKSRC_lua}/README.markdown \
+ ${STAGEDIR}${DOCSDIR}/README.lua-nginx-module.markdown
+ ${INSTALL_MAN} ${WRKSRC_lua_stream}/README.md \
+ ${STAGEDIR}${DOCSDIR}/README.stream-lua-nginx-module.md
+
+do-install-DEBUG-on:
+.for i in ngx_http_lua_module ngx_stream_lua_module
+ ${INSTALL} ${COPY} -m ${_SHAREMODE} ${WRKSRC_DEBUG}/objs/${i}.so \
+ ${STAGEDIR}${MODDIR}/${i}-debug.so
+.endfor
+
+.include "${MASTERDIR}/Makefile"
diff --git a/www/angie-module-lua/files/patch-lua-config b/www/angie-module-lua/files/patch-lua-config
new file mode 100644
index 000000000000..46b570724957
--- /dev/null
+++ b/www/angie-module-lua/files/patch-lua-config
@@ -0,0 +1,26 @@
+--- ../lua-nginx-module-0.10.25/config.orig
++++ ../lua-nginx-module-0.10.25/config
+@@ -45,9 +45,9 @@
+ NGX_TEST_LD_OPT="$ngx_lua_opt_L $NGX_TEST_LD_OPT"
+
+ if [ $NGX_RPATH = YES ]; then
+- ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ else
+- ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ fi
+
+ . auto/feature
+@@ -71,9 +71,9 @@
+ NGX_TEST_LD_OPT="$ngx_lua_opt_L $NGX_TEST_LD_OPT"
+
+ if [ $NGX_RPATH = YES ]; then
+- ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ else
+- ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ fi
+
+ . auto/feature
diff --git a/www/angie-module-lua/files/patch-stream-lua-config b/www/angie-module-lua/files/patch-stream-lua-config
new file mode 100644
index 000000000000..ef3c1ea1033c
--- /dev/null
+++ b/www/angie-module-lua/files/patch-stream-lua-config
@@ -0,0 +1,35 @@
+--- ../stream-lua-nginx-module-0.0.13/config.orig
++++ ../stream-lua-nginx-module-0.0.13/config
+@@ -45,9 +45,9 @@
+ NGX_TEST_LD_OPT="$ngx_lua_opt_L $NGX_TEST_LD_OPT"
+
+ if [ $NGX_RPATH = YES ]; then
+- ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ else
+- ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ fi
+
+ . auto/feature
+@@ -71,9 +71,9 @@
+ NGX_TEST_LD_OPT="$ngx_lua_opt_L $NGX_TEST_LD_OPT"
+
+ if [ $NGX_RPATH = YES ]; then
+- ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="-R$LUAJIT_LIB $ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ else
+- ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 $luajit_ld_opt"
++ ngx_feature_libs="$ngx_lua_opt_L -lluajit-5.1 -lpcre $luajit_ld_opt"
+ fi
+
+ . auto/feature
+@@ -436,7 +436,7 @@
+ . auto/feature
+
+ if [ $ngx_found = yes ]; then
+- CORE_LIBS="-Wl,--require-defined=pcre_version $CORE_LIBS"
++ :
+ fi
+ ;;
+ esac
diff --git a/www/angie-module-lua/files/pkg-message.in b/www/angie-module-lua/files/pkg-message.in
new file mode 100644
index 000000000000..24658aa47616
--- /dev/null
+++ b/www/angie-module-lua/files/pkg-message.in
@@ -0,0 +1,18 @@
+[
+{ type: install
+ message: <<EOM
+
+The Lua dynamic modules for Angie have been installed.
+To enable these modules, add the following to %%PREFIX%%/etc/angie/angie.conf
+and reload angie:
+
+ load_module modules/ndk_http_module.so;
+ load_module modules/ngx_http_lua_module.so;
+ load_module modules/ngx_stream_lua_module.so;
+
+Please refer to the modules documentation for further details:
+https://github.com/openresty/lua-nginx-module
+https://github.com/openresty/stream-lua-nginx-module
+EOM
+}
+]
diff --git a/www/angie-module-lua/pkg-descr b/www/angie-module-lua/pkg-descr
new file mode 100644
index 000000000000..1c1c46ab79b0
--- /dev/null
+++ b/www/angie-module-lua/pkg-descr
@@ -0,0 +1,3 @@
+Module embeds the power of Lua into Angie HTTP and STREAM servers.
+By leveraging Angie's subrequests, this module allows the integration of
+the powerful Lua threads (known as "coroutines") into the Angie event model.
diff --git a/www/angie-module-lua/pkg-plist b/www/angie-module-lua/pkg-plist
new file mode 100644
index 000000000000..d6a0931b0f34
--- /dev/null
+++ b/www/angie-module-lua/pkg-plist
@@ -0,0 +1,6 @@
+%%DOCSDIR%%/README.lua-nginx-module.markdown
+%%DOCSDIR%%/README.stream-lua-nginx-module.md
+%%MODDIR%%/ngx_http_lua_module.so
+%%MODDIR%%/ngx_stream_lua_module.so
+%%DEBUG%%%%MODDIR%%/ngx_http_lua_module-debug.so
+%%DEBUG%%%%MODDIR%%/ngx_stream_lua_module-debug.so
diff --git a/www/angie/distinfo b/www/angie/distinfo
index fe522d10fd8c..a8926febee43 100644
--- a/www/angie/distinfo
+++ b/www/angie/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1693428404
+TIMESTAMP = 1695159959
SHA256 (angie-1.2.0.tar.gz) = 82f23115c2e8ebf00d5429622ad96e8c7e785e87bc298b292246660cc61e2cff
SIZE (angie-1.2.0.tar.gz) = 1510159
SHA256 (kjdev-nginx-auth-jwt-0.2.1_GH0.tar.gz) = 23958d5f02012f56660cacc3c0355bafea10ceb77abb3f0e8da123edf1f7d8f1
@@ -25,6 +25,10 @@ SHA256 (max-lt-nginx-jwt-module-v3.2.2_GH0.tar.gz) = e6c2f4d82254fb64b01c24860bb
SIZE (max-lt-nginx-jwt-module-v3.2.2_GH0.tar.gz) = 15681
SHA256 (kjdev-nginx-keyval-0.1.0_GH0.tar.gz) = a239beffb3b3cb688f52bcaa105a13a27253a71e383c53a6597098fa99c5f82b
SIZE (kjdev-nginx-keyval-0.1.0_GH0.tar.gz) = 17486
+SHA256 (openresty-lua-nginx-module-v0.10.25_GH0.tar.gz) = bc764db42830aeaf74755754b900253c233ad57498debe7a441cee2c6f4b07c2
+SIZE (openresty-lua-nginx-module-v0.10.25_GH0.tar.gz) = 725616
+SHA256 (openresty-stream-lua-nginx-module-v0.0.13_GH0.tar.gz) = 01b715754a8248cc7228e0c8f97f7488ae429d90208de0481394e35d24cef32f
+SIZE (openresty-stream-lua-nginx-module-v0.0.13_GH0.tar.gz) = 376245
SHA256 (vision5-ngx_devel_kit-v0.3.2_GH0.tar.gz) = aa961eafb8317e0eb8da37eb6e2c9ff42267edd18b56947384e719b85188f58b
SIZE (vision5-ngx_devel_kit-v0.3.2_GH0.tar.gz) = 66551
SHA256 (nginx-njs-0.8.0_GH0.tar.gz) = b98033fff6aadcbb8e108b96e80c0d94c6e2103bcbe75846b5ae0b560696084b