summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2022-02-21 15:42:45 +0100
committerMartin Matuska <mm@FreeBSD.org>2022-02-21 15:42:45 +0100
commite7b1d51aa27ee3aa85ba729b8bc927a36ae182cc (patch)
tree1f41f611950b5577f2447d1fd225e559e1ea6b3f
parentgames/dxx-rebirth: fix build on CURRENT (diff)
www/lua-resty-http: New port
Lua HTTP client cosocket driver for OpenResty / ngx_lua WWW: https://github.com/ledgetech/lua-resty-http
-rw-r--r--www/Makefile1
-rw-r--r--www/lua-resty-http/Makefile42
-rw-r--r--www/lua-resty-http/distinfo3
-rw-r--r--www/lua-resty-http/pkg-descr15
4 files changed, 61 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 7429efe29ab0..a3a07492dec1 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -320,6 +320,7 @@
SUBDIR += logtools
SUBDIR += ls-qpack
SUBDIR += lua-resty-core
+ SUBDIR += lua-resty-http
SUBDIR += lua-resty-lrucache
SUBDIR += luakit
SUBDIR += luakit-devel
diff --git a/www/lua-resty-http/Makefile b/www/lua-resty-http/Makefile
new file mode 100644
index 000000000000..e8d76a6516f0
--- /dev/null
+++ b/www/lua-resty-http/Makefile
@@ -0,0 +1,42 @@
+PORTNAME= lua-resty-http
+DISTVERSIONPREFIX=v
+DISTVERSION= 0.17.0-beta.1
+CATEGORIES= www
+
+MAINTAINER= mm@FreeBSD.org
+COMMENT= Lua HTTP client cosocket driver for OpenResty / ngx_lua
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= luajit-openresty>=2.1:lang/luajit-openresty
+
+USES= lua:module
+
+USE_GITHUB= yes
+GH_ACCOUNT= ledgetech
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+LUA_MODSHAREDIR=${LOCALBASE}/share/lua/5.1
+
+PLIST_FILES+= ${LUA_MODSHAREDIR}/resty/http.lua \
+ ${LUA_MODSHAREDIR}/resty/http_connect.lua \
+ ${LUA_MODSHAREDIR}/resty/http_headers.lua
+
+PORTDOCS= README.md
+
+DOCSDIR= ${PREFIX}/share/doc/lua${LUA_VER_STR}/${PORTNAME}
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
+ @(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${LUA_MODSHAREDIR} "-name *\.lua")
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/www/lua-resty-http/distinfo b/www/lua-resty-http/distinfo
new file mode 100644
index 000000000000..b48a65fa6518
--- /dev/null
+++ b/www/lua-resty-http/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1645454177
+SHA256 (ledgetech-lua-resty-http-v0.17.0-beta.1_GH0.tar.gz) = a02063591d746a9a6fdc0f650c33aa9c0840d03b8b5d2c836f8de49b9ee0f8a0
+SIZE (ledgetech-lua-resty-http-v0.17.0-beta.1_GH0.tar.gz) = 46351
diff --git a/www/lua-resty-http/pkg-descr b/www/lua-resty-http/pkg-descr
new file mode 100644
index 000000000000..ef132495832f
--- /dev/null
+++ b/www/lua-resty-http/pkg-descr
@@ -0,0 +1,15 @@
+Lua HTTP client cosocket driver for OpenResty / ngx_lua
+
+Features:
+- HTTP 1.0 and 1.1
+- SSL
+- Streaming interface to the response body, for predictable memory usage
+- Alternative simple interface for single-shot requests without a manual
+ connection step
+- Chunked and non-chunked transfer encodings
+- Connection keepalives
+- Request pipelining
+- Trailers
+- HTTP proxy connections
+
+WWW: https://github.com/ledgetech/lua-resty-http