summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2016-03-02 15:49:25 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2016-03-02 15:49:25 +0100
commit7291ad522ab29193a30a2ec1e92cbc0349a8c792 (patch)
tree85124f7b144e3ddaec0f386096b26d6c6967b78c /dev-lua
parentdev-lua/luasec: bump to 0.5.1 for libressl (diff)
downloadgentoo-7291ad522ab29193a30a2ec1e92cbc0349a8c792.tar.gz
gentoo-7291ad522ab29193a30a2ec1e92cbc0349a8c792.tar.bz2
gentoo-7291ad522ab29193a30a2ec1e92cbc0349a8c792.zip
dev-lua/luasec: add patch for compression
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/luasec/files/luasec-0.5.1-compdefine.patch36
-rw-r--r--dev-lua/luasec/luasec-0.5.1.ebuild3
2 files changed, 38 insertions, 1 deletions
diff --git a/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch b/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch
new file mode 100644
index 000000000000..951b6fb11dbf
--- /dev/null
+++ b/dev-lua/luasec/files/luasec-0.5.1-compdefine.patch
@@ -0,0 +1,36 @@
+diff -ru luasec-0.5.1/src/ssl.c luasec-0.5.1-fixed/src/ssl.c
+--- luasec-0.5.1/src/ssl.c 2015-11-20 22:39:32.000000000 +0100
++++ luasec-0.5.1-fixed/src/ssl.c 2016-03-02 15:48:09.439005988 +0100
+@@ -395,24 +395,30 @@
+ }
+ 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;
+ }
+
+Only in luasec-0.5.1-fixed/src: ssl.c.orig
diff --git a/dev-lua/luasec/luasec-0.5.1.ebuild b/dev-lua/luasec/luasec-0.5.1.ebuild
index d456bb528350..29e04a7f3c16 100644
--- a/dev-lua/luasec/luasec-0.5.1.ebuild
+++ b/dev-lua/luasec/luasec-0.5.1.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit multilib toolchain-funcs
+inherit multilib toolchain-funcs eutils
DESCRIPTION="Lua binding for OpenSSL library to provide TLS/SSL communication"
HOMEPAGE="https://github.com/brunoos/luasec http://www.inf.puc-rio.br/~brunoos/luasec/"
@@ -29,6 +29,7 @@ src_prepare() {
-e "s#^LUACPATH.*#LUACPATH=$(pkg-config --variable INSTALL_CMOD lua)#" Makefile || die
sed -i -e "s/-O2//" src/Makefile || die
lua src/options.lua -g /usr/include/openssl/ssl.h > src/options.h || die
+ epatch "${FILESDIR}/${PN}-0.5.1-compdefine.patch"
}
src_compile() {