summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-10-08 16:21:58 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2017-10-08 16:24:04 -0700
commit8793ede2340493fd21a82a50df2b0f49bdba598a (patch)
tree007d4ec3384f06b657658ac9b17072334de2ebf6 /dev-db
parentdev-db/redis: bump to 4.0.2 (diff)
downloadgentoo-8793ede2340493fd21a82a50df2b0f49bdba598a.tar.gz
gentoo-8793ede2340493fd21a82a50df2b0f49bdba598a.tar.bz2
gentoo-8793ede2340493fd21a82a50df2b0f49bdba598a.zip
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@gentoo.org>
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/redis/redis-4.0.2.ebuild12
1 files 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 c79e00a9398c..1449a3567826 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
}