diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2021-03-16 18:35:06 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2021-03-16 18:35:06 +0100 |
commit | 87c0fe912549aca51008c05d6991c8f1616d4da3 (patch) | |
tree | 49cc911481ede8e7efbfc404ce1a40cb87fa9b40 /dev-lua/lgi | |
parent | dev-lua/lpeg: add lua5-4 support (diff) | |
download | gentoo-87c0fe912549aca51008c05d6991c8f1616d4da3.tar.gz gentoo-87c0fe912549aca51008c05d6991c8f1616d4da3.tar.bz2 gentoo-87c0fe912549aca51008c05d6991c8f1616d4da3.zip |
dev-lua/lgi: add lua5-4 support
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua/lgi')
-rw-r--r-- | dev-lua/lgi/files/lgi-0.9.2-lua54.patch | 29 | ||||
-rw-r--r-- | dev-lua/lgi/lgi-0.9.2-r100.ebuild | 4 |
2 files changed, 32 insertions, 1 deletions
diff --git a/dev-lua/lgi/files/lgi-0.9.2-lua54.patch b/dev-lua/lgi/files/lgi-0.9.2-lua54.patch new file mode 100644 index 000000000000..b1451a7566d7 --- /dev/null +++ b/dev-lua/lgi/files/lgi-0.9.2-lua54.patch @@ -0,0 +1,29 @@ +From 5cfd42c386d3adae6d211fbb4011179c3c141b04 Mon Sep 17 00:00:00 2001 +From: Uli Schlachter <psychon@znc.in> +Date: Sun, 2 Aug 2020 16:14:27 +0200 +Subject: [PATCH] Fix the build with Lua 5.4 + +Lua 5.4 changed the API to lua_resume(). This commit changes the code to +cope with that. + +Signed-off-by: Uli Schlachter <psychon@znc.in> +--- + lgi/callable.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lgi/callable.c b/lgi/callable.c +index e96d3af..3234b64 100644 +--- a/lgi/callable.c ++++ b/lgi/callable.c +@@ -1355,7 +1355,10 @@ closure_callback (ffi_cif *cif, void *ret, void **args, void *closure_arg) + } + else + { +-#if LUA_VERSION_NUM >= 502 ++#if LUA_VERSION_NUM >= 504 ++ int nresults; ++ res = lua_resume (L, NULL, npos, &nresults); ++#elif LUA_VERSION_NUM >= 502 + res = lua_resume (L, NULL, npos); + #else + res = lua_resume (L, npos); diff --git a/dev-lua/lgi/lgi-0.9.2-r100.ebuild b/dev-lua/lgi/lgi-0.9.2-r100.ebuild index 285de59e5aff..79f00bb47318 100644 --- a/dev-lua/lgi/lgi-0.9.2-r100.ebuild +++ b/dev-lua/lgi/lgi-0.9.2-r100.ebuild @@ -4,7 +4,7 @@ EAPI=7 VIRTUALX_REQUIRED="manual" -LUA_COMPAT=( lua5-{1..3} luajit ) +LUA_COMPAT=( lua5-{1..4} luajit ) inherit lua eutils toolchain-funcs flag-o-matic virtualx @@ -31,6 +31,8 @@ DEPEND="${RDEPEND} ${VIRTUALX_DEPEND} )" +PATCHES=( "${FILESDIR}/${P}-lua54.patch" ) + lua_src_prepare() { pushd "${BUILD_DIR}" || die # The Makefile & several source files use the LUA version as part of the |