New package: lua51-luasec-0.5.1
This commit is contained in:
parent
ec1a6f11d9
commit
c257186865
2 changed files with 61 additions and 0 deletions
36
srcpkgs/lua51-luasec/patches/libressl.patch
Normal file
36
srcpkgs/lua51-luasec/patches/libressl.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
diff --git src/ssl.c src/ssl.c
|
||||
index 2fa6ede..bd8a744 100644
|
||||
--- src/ssl.c
|
||||
+++ src/ssl.c
|
||||
@@ -395,24 +395,30 @@ static int meth_want(lua_State *L)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
-
|
||||
+
|
||||
/**
|
||||
* Return the compression method used.
|
||||
*/
|
||||
static int meth_compression(lua_State *L)
|
||||
{
|
||||
+#if !defined(OPENSSL_NO_COMP)
|
||||
const COMP_METHOD *comp;
|
||||
+#endif
|
||||
p_ssl ssl = (p_ssl)luaL_checkudata(L, 1, "SSL:Connection");
|
||||
if (ssl->state != LSEC_STATE_CONNECTED) {
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, "closed");
|
||||
return 2;
|
||||
}
|
||||
+#if !defined(OPENSSL_NO_COMP)
|
||||
comp = SSL_get_current_compression(ssl->ssl);
|
||||
if (comp)
|
||||
lua_pushstring(L, SSL_COMP_get_name(comp));
|
||||
else
|
||||
lua_pushnil(L);
|
||||
+#else
|
||||
+ lua_pushnil(L);
|
||||
+#endif
|
||||
return 1;
|
||||
}
|
||||
|
25
srcpkgs/lua51-luasec/template
Normal file
25
srcpkgs/lua51-luasec/template
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Template file for 'lua51-luasec'
|
||||
pkgname=lua51-luasec
|
||||
version=0.5.1
|
||||
revision=1
|
||||
wrksrc=${pkgname#*-}-${pkgname#*-}-${version}
|
||||
build_style=gnu-makefile
|
||||
makedepends="lua51-devel libressl-devel"
|
||||
depends="lua51"
|
||||
short_desc="Lua binding for OpenSSL library to provide TLS/SSL communication"
|
||||
maintainer="Duncaen <duncaen@voidlinux.eu>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/brunoos/luasec"
|
||||
distfiles="https://github.com/brunoos/luasec/archive/${pkgname#*-}-${version}.tar.gz"
|
||||
checksum=6d5c5f8e0521f3194668d9a839774e079e2fd5c45b15538dc7b8cacc56719406
|
||||
|
||||
replaces="luasec<=0.5.1_1"
|
||||
|
||||
do_build() {
|
||||
lua src/options.lua -g /usr/include/openssl/ssl.h > src/options.h
|
||||
make linux CC=$CC LD=$CC INC_PATH=-I${XBPS_CROSS_BASE}/usr/include LIB_PATH=-L${XBPS_CROSS_BASE}/usr/lib
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
}
|
Loading…
Reference in a new issue