commit:     8793ede2340493fd21a82a50df2b0f49bdba598a
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  8 23:21:58 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 23:24:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8793ede2

dev-db/redis: repeat Lua slotted+unslotted fixes.

Re-apply the fixes from 5d58e071d2fe843bea503d3cd95998e95247aa39 that
support both slotted & unslotted lua from a single ebuild.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 dev-db/redis/redis-4.0.2.ebuild | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dev-db/redis/redis-4.0.2.ebuild b/dev-db/redis/redis-4.0.2.ebuild
index c79e00a9398..1449a356782 100644
--- a/dev-db/redis/redis-4.0.2.ebuild
+++ b/dev-db/redis/redis-4.0.2.ebuild
@@ -14,8 +14,11 @@ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 
~amd64-linux ~x86-linux ~x86
 IUSE="+jemalloc tcmalloc luajit test"
 SLOT="0"
 
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
 RDEPEND="luajit? ( dev-lang/luajit:2 )
-       !luajit? ( >=dev-lang/lua-5.1:* )
+       !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
        tcmalloc? ( dev-util/google-perftools )
        jemalloc? ( >=dev-libs/jemalloc-3.2 )"
 DEPEND="virtual/pkgconfig
@@ -61,10 +64,15 @@ src_prepare() {
        done
        # autodetection of compiler and settings; generates the modified 
Makefiles
        cp "${FILESDIR}"/configure.ac-3.2 configure.ac
+
+       # Use the correct pkgconfig name for Lua
+       has_version 'dev-lang/lua:5.1' \
+               && LUAPKGCONFIG=lua5.1 \
+               || LUAPKGCONFIG=lua
        sed -i  \
                -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
                -e 
"s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
-               -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,lua,g" \
+               -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
                configure.ac || die "Sed failed for configure.ac"
        eautoreconf
 }

Reply via email to