diff options
Diffstat (limited to 'dev-lua/luasocket')
| -rw-r--r-- | dev-lua/luasocket/Manifest | 1 | ||||
| -rw-r--r-- | dev-lua/luasocket/files/proxy-fix.patch | 31 | ||||
| -rw-r--r-- | dev-lua/luasocket/luasocket-3.0_rc1-r4.ebuild | 55 | ||||
| -rw-r--r-- | dev-lua/luasocket/metadata.xml | 9 |
4 files changed, 96 insertions, 0 deletions
diff --git a/dev-lua/luasocket/Manifest b/dev-lua/luasocket/Manifest new file mode 100644 index 000000000000..e050ea632440 --- /dev/null +++ b/dev-lua/luasocket/Manifest @@ -0,0 +1 @@ +DIST luasocket-3.0_rc1.tar.gz 328598 BLAKE2B 9cc382d909cfa018edec237ac901220cccb0cf0e3a775b9cd8083487ace42a94dfd280f9423097f677f37ee9f85afcfff844250cd49c0f813b7c50c3adc532c5 SHA512 f6efce259aaacaa11472911471f8a13b118fe009b8953a82c6aa18b9ec829cd1293180904e56935cb130d36d267e3f27c91db2d78e03f7488f3e100571ed0540 diff --git a/dev-lua/luasocket/files/proxy-fix.patch b/dev-lua/luasocket/files/proxy-fix.patch new file mode 100644 index 000000000000..302e63663ff7 --- /dev/null +++ b/dev-lua/luasocket/files/proxy-fix.patch @@ -0,0 +1,31 @@ +From 1f9ccb2b586c3a7e29db3c99a23ac1cee6907cf2 Mon Sep 17 00:00:00 2001 +From: Pierre Chapuis <catwell@archlinux.us> +Date: Fri, 5 Jul 2013 18:00:29 +0200 +Subject: [PATCH] http: look for PROXY in _M, not as a global + +--- + src/http.lua | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/http.lua b/src/http.lua +index 5f70a374..f83dcc55 100644 +--- a/src/http.lua ++++ b/src/http.lua +@@ -186,7 +186,7 @@ end + local function adjusturi(reqt) + local u = reqt + -- if there is a proxy, we need the full url. otherwise, just a part. +- if not reqt.proxy and not PROXY then ++ if not reqt.proxy and not _M.PROXY then + u = { + path = socket.try(reqt.path, "invalid path 'nil'"), + params = reqt.params, +@@ -198,7 +198,7 @@ local function adjusturi(reqt) + end + + local function adjustproxy(reqt) +- local proxy = reqt.proxy or PROXY ++ local proxy = reqt.proxy or _M.PROXY + if proxy then + proxy = url.parse(proxy) + return proxy.host, proxy.port or 3128 diff --git a/dev-lua/luasocket/luasocket-3.0_rc1-r4.ebuild b/dev-lua/luasocket/luasocket-3.0_rc1-r4.ebuild new file mode 100644 index 000000000000..445630ad79d5 --- /dev/null +++ b/dev-lua/luasocket/luasocket-3.0_rc1-r4.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib multilib-minimal flag-o-matic toolchain-funcs + +DESCRIPTION="Networking support library for the Lua language" +HOMEPAGE="http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/" +SRC_URI="https://github.com/diegonehab/${PN}/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 arm ~arm64 hppa ~mips ppc ppc64 sparc x86" +IUSE="debug" + +RDEPEND=">=dev-lang/lua-5.1.5-r2[deprecated,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${PN}-${PV/_/-} + +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/proxy-fix.patch +) + +src_prepare() { + default + multilib_copy_sources +} + +multilib_src_compile() { + emake \ + CC="$(tc-getCC) ${CFLAGS}" \ + LD="$(tc-getCC) ${LDFLAGS}"\ + $(usex debug DEBUG="DEBUG" "") +} + +multilib_src_install() { + local luav=$($(tc-getPKG_CONFIG) --variable V lua) + emake \ + DESTDIR="${D}" \ + LUAPREFIX_linux=/usr \ + LUAV=${luav} \ + CDIR_linux=$(get_libdir)/lua/${luav} \ + install-unix +} + +multilib_src_install_all() { + dodoc NEW README + docinto html + dodoc -r doc/. +} diff --git a/dev-lua/luasocket/metadata.xml b/dev-lua/luasocket/metadata.xml new file mode 100644 index 000000000000..d09e90b16b9f --- /dev/null +++ b/dev-lua/luasocket/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">diegonehab/luasocket</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> |
