commit:     aade4eec718e2d85152a668be8c12be841c166c0
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 04:13:48 2019 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 04:18:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aade4eec

dev-db/redis: early Lua-5.[23] support

This enables easier testing of Lua 5.2 & Lua 5.3 support in Redis.
It's blocked behind 'if false' at the moment, because it's clear the
upstream Redis doesn't entirely support it yet. Failure messages logged
in the ebuild.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 dev-db/redis/redis-5.0.3.ebuild | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/dev-db/redis/redis-5.0.3.ebuild b/dev-db/redis/redis-5.0.3.ebuild
index 2b13aad0139..c584f33c21f 100644
--- a/dev-db/redis/redis-5.0.3.ebuild
+++ b/dev-db/redis/redis-5.0.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -68,9 +68,23 @@ src_prepare() {
        cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
 
        # Use the correct pkgconfig name for Lua
-       has_version 'dev-lang/lua:5.1' \
-               && LUAPKGCONFIG=lua5.1 \
-               || LUAPKGCONFIG=lua
+       if false && has_version 'dev-lang/lua:5.3'; then
+               # Lua5.3 gives:
+               #lua_bit.c:83:2: error: #error "Unknown number type, check 
LUA_NUMBER_* in luaconf.h"
+               LUAPKGCONFIG=lua5.3
+       elif false && has_version 'dev-lang/lua:5.2'; then
+               # Lua5.2 fails with:
+               # scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
+               # Because lua_open because lua_newstate in 5.2
+               LUAPKGCONFIG=lua5.2
+       elif has_version 'dev-lang/lua:5.1'; then
+               LUAPKGCONFIG=lua5.1
+       else
+               LUAPKGCONFIG=lua
+       fi
+       # The upstream configure script handles luajit specially, and is not
+       # effected by these changes.
+       einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}"
        sed -i  \
                -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
                -e 
"s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \

Reply via email to