summaryrefslogtreecommitdiff
path: root/dev-db/redis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-25 23:06:25 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-25 23:06:25 +0000
commit441d1370330332b7d78f238d2f5e13f7aed5e4e0 (patch)
tree6a5171dd615dfeee62a45044144c66e864738fb0 /dev-db/redis
parentab3da91fb6c91a9df52fff8f991570f456fd3c7a (diff)
gentoo christmass resync : 25.12.2020
Diffstat (limited to 'dev-db/redis')
-rw-r--r--dev-db/redis/Manifest1
-rw-r--r--dev-db/redis/redis-6.0.9-r100.ebuild164
2 files changed, 165 insertions, 0 deletions
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
index c7b720f08e35..5ffc637bf3ff 100644
--- a/dev-db/redis/Manifest
+++ b/dev-db/redis/Manifest
@@ -19,5 +19,6 @@ DIST redis-5.0.9.tar.gz 1986574 BLAKE2B 7802d0556d11c9be8577b9bb3f4dbad8c2419b38
DIST redis-6.0.9.tar.gz 2261418 BLAKE2B 93e64e2c682320d11e468021fd13a2888dd6b15430c15eaaa9468242d9b4d8b60e29dfe656e677774dc88ed751471284d1adf94c723521085019b375785abe7a SHA512 ebae2b09637fdbdc71dd22b72ccea24e2c21beb81c6ff5c4bae8b341886a7d847ce868f52dc917079bab8aa250ff61c83efe8acbb8a1cbc5e285c7842b0aefa3
EBUILD redis-5.0.10.ebuild 4744 BLAKE2B 911a324ae75ab43090425efbb15fec52b2568e09944656450d13eb82d730466466b638adab70bf71378726d08da982a05d1a7b0bf0db7e8d7fc65606ded549de SHA512 270f9e9b8037799c2e59037c968796155d9c5dcbb29a69e72e1544cd310f0921a9e26101e37b6d4d6701b40ad6114bd1f931d36d8be2d96994ad861ce6cc39ac
EBUILD redis-5.0.9-r1.ebuild 4738 BLAKE2B ca5644ba5a17e2f982623cc242a9058dd04b682e850b88f6821168d80dded518b176d690087d0f8e4d9e021b01d4c37a3c08bc98a4080c954e028a87c697bb1d SHA512 174942f2f4de53a3dbca64f9100dea33e3570535b1fe0019257d651289fff82da42949403481bdfb5eca0eebf8ec32b8893a56a9cec59a2c5fc61c215293733c
+EBUILD redis-6.0.9-r100.ebuild 4579 BLAKE2B 769ce1f40bb58e1266e60285b32803af73b755a3d9c53d9d1f1d13d06176eadac767a2fa2f6ff1f7bc310f9e76911e9364ba5aafad76655407b2873b0104dfd8 SHA512 368c8b018cbc3e4aafee1441a00f62d658897b549814af59d00868c24267fe37b2f1d41012eb292c1e6a7eff1941a65f1d92453191b7f959de0fd75f5dfa5a7a
EBUILD redis-6.0.9.ebuild 4948 BLAKE2B 133202bf499aaa91fc22217fd70fd8ef97c76ca45c1d7bfb2211cf512559b030db697ec5c968257bf1a249cbb3913a5cc5b854749f39e84769ca0db2eb613ac8 SHA512 e5e540b806c82a0750985086fb184f977bcb34f894f7ed20e3bae004913123b03f89a05926b69e686c25f32cc9fe9ef1ad9b58c1db26f2bc30af3e65a3ccd9cd
MISC metadata.xml 356 BLAKE2B 19e27b12be84927b990fc2f481d8dd1f88f05b5e029fdd91c7ce9517e7fd378d6e1df1eb55052a04fefe781da09b371da1c28fd269c72f4222aa896897222bf7 SHA512 ab06f694c5b20072f40e85b3a8e05d2c333f3b29fc145733fde1e3f42ea78ac7c51550afc29e671ef9b4a163597ac9f44bc182344c18db52036595e5d65f7e22
diff --git a/dev-db/redis/redis-6.0.9-r100.ebuild b/dev-db/redis/redis-6.0.9-r100.ebuild
new file mode 100644
index 000000000000..c0491f7b5ccb
--- /dev/null
+++ b/dev-db/redis/redis-6.0.9-r100.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Redis does NOT build with Lua 5.2 or newer at this time:
+# - 5.3 and 5.4 give:
+# lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
+# - 5.2 fails with:
+# scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
+# because lua_open became lua_newstate in 5.2
+LUA_COMPAT=( lua5-1 luajit )
+
+inherit autotools flag-o-matic lua-single systemd toolchain-funcs
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="https://redis.io"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc test"
+RESTRICT="!test? ( test )"
+SLOT="0"
+
+COMMON_DEPEND="
+ ${LUA_DEPS}
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= )
+ tcmalloc? ( dev-util/google-perftools )
+"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ acct-group/redis
+ acct-user/redis
+"
+
+BDEPEND="
+ ${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+# Tcl is only needed in the CHOST test env
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( jemalloc tcmalloc )
+ ${LUA_REQUIRED_USE}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.3-config.patch
+ "${FILESDIR}"/${PN}-5.0-shared.patch
+ "${FILESDIR}"/${PN}-6.0.9-sharedlua.patch
+ "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
+)
+
+src_prepare() {
+ default
+
+ # unstable on jemalloc
+ > tests/unit/memefficiency.tcl || die
+
+ # Copy lua modules into build dir
+ cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
+ cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua.
+ # The upstream configure script handles luajit specially, and is not
+ # effected by these changes.
+ 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,${ELUA},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with lua_single_target_luajit luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ local myconf=""
+
+ if use jemalloc; then
+ myconf+="MALLOC=jemalloc"
+ elif use tcmalloc; then
+ myconf+="MALLOC=tcmalloc"
+ else
+ myconf+="MALLOC=libc"
+ fi
+
+ tc-export AR CC RANLIB
+ emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
+}
+
+src_test() {
+ # Known to fail with FEATURES=usersandbox
+ if has usersandbox ${FEATURES}; then
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
+ fi
+
+ emake check
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-3" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}