Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/
Date: Mon, 04 Mar 2019 01:36:05
Message-Id: 1551661159.c205ade8f65d0a3ef8a015655fe9001f068988bd.whissi@gentoo
1 commit: c205ade8f65d0a3ef8a015655fe9001f068988bd
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Mon Feb 25 10:51:06 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 4 00:59:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c205ade8
7
8 dev-db/redis: bump to 4.0.13
9
10 Package-Manager: Portage-2.3.60, Repoman-2.3.12
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/11155
13 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
14
15 dev-db/redis/Manifest | 1 +
16 dev-db/redis/redis-4.0.13.ebuild | 141 +++++++++++++++++++++++++++++++++++++++
17 2 files changed, 142 insertions(+)
18
19 diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
20 index 9f1e4a430b6..1b06f135e3e 100644
21 --- a/dev-db/redis/Manifest
22 +++ b/dev-db/redis/Manifest
23 @@ -1,5 +1,6 @@
24 DIST redis-4.0.10.tar.gz 1738465 BLAKE2B 572cbb3d2d5d7209f81ebd53ee68f40b404d0e4623bd1864845bf1f47135d4e097a6974d346ffd845d848c39ace6d3fb9f1a347e0c9d16d06d22aed7a8b3ae7b SHA512 0978dabaf637e61889d492fd3629acd58ca8fb0c0088cdd7036ffd1a7ed3f018c107039d4c96bd61d0b7d35757df2366d051f57d77ffb5642aca0e5651b30603
25 DIST redis-4.0.11.tar.gz 1739656 BLAKE2B d94f380ad1600e58942cc5b27b512984396cdbb06ea6e947c7d7ce5b8ecdb8a2a56c6356af2caa82a96887a610716c9575b78eb2f46da89efb940febc1c30f22 SHA512 f0054af9ca2143731a397b2b21285387707b7f40d9326ba15225feb1a2ff470fab5194308342f63bbe1081f84c7e9ef19543c5a8e3eae49e17bfc515c64201f0
26 DIST redis-4.0.12.tar.gz 1740544 BLAKE2B 620dba8b81fc76a46880c3a4a7ee9d9835e7b19e6d321598a717892f6f03fa805db79847442744a2af8f77ae403b6e1df02299da9a0835f6092a74e3804dde48 SHA512 d19020f7ebed9ad5d04c6e1cb7e2a49dd1e226fe17d86e860df11bcb798c61c09f6f9fc3572a7ee32232ac34ec5eb1d6189f8139b5991bd87297c5243c3b54d2
27 +DIST redis-4.0.13.tar.gz 1740715 BLAKE2B 73d129906b2a2ceb91d1144f8c8aeb970221f7ef4d1d0f0bac0aada6976ba6b2b4fdbe7cca29e350e8258986ee2607526896fcfb90536596a5fd556c6186faa6 SHA512 c220420bf6cb2781a3fb9e002188b1663743c89c262fd5aff02e585c969b56e7691fe1073e7427e6d38cf7b5a096f86b83af84cfa6b01a5bdf56048789e0bb70
28 DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4
29 DIST redis-5.0.3.tar.gz 1959445 BLAKE2B d1c3247d77aa3b1076d0e1a0dcce74dcfb14a0ad3776603ef8154d7868f9f3efcf2138cb08581eee1974e9d76658d07456d6e9795391321b1f1f8bca7f9d40f5 SHA512 5915b14502438bf7c3f56e38640dda54b095bd87501aefa6e386c9cef48e8d1e625e980643d128d91b8cab26dd51d5d99ca66fa638dc04e5ba315fe43f11f58b
30
31 diff --git a/dev-db/redis/redis-4.0.13.ebuild b/dev-db/redis/redis-4.0.13.ebuild
32 new file mode 100644
33 index 00000000000..a1d588da3ae
34 --- /dev/null
35 +++ b/dev-db/redis/redis-4.0.13.ebuild
36 @@ -0,0 +1,141 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +inherit autotools eutils flag-o-matic systemd toolchain-funcs user
43 +
44 +DESCRIPTION="A persistent caching system, key-value and data structures database"
45 +HOMEPAGE="https://redis.io"
46 +SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
47 +
48 +LICENSE="BSD"
49 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
50 +IUSE="+jemalloc tcmalloc luajit test"
51 +SLOT="0"
52 +
53 +# Redis does NOT build with Lua 5.2 or newer at this time.
54 +# This should link correctly with both unslotted & slotted Lua, without
55 +# changes.
56 +RDEPEND="
57 + luajit? ( dev-lang/luajit:2 )
58 + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
59 + tcmalloc? ( dev-util/google-perftools )
60 + jemalloc? ( >=dev-libs/jemalloc-3.2 )"
61 +
62 +DEPEND="
63 + ${RDEPEND}
64 + virtual/pkgconfig
65 + >=sys-devel/autoconf-2.63
66 + test? ( dev-lang/tcl:0= )"
67 +
68 +REQUIRED_USE="?? ( tcmalloc jemalloc )"
69 +
70 +S="${WORKDIR}/${PN}-${PV/_/-}"
71 +
72 +pkg_setup() {
73 + enewgroup redis 75
74 + enewuser redis 75 -1 /var/lib/redis redis
75 +}
76 +
77 +src_prepare() {
78 + eapply \
79 + "${FILESDIR}"/${PN}-3.2.3-config.patch \
80 + "${FILESDIR}"/${PN}-4.0.1-shared.patch \
81 + "${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
82 + "${FILESDIR}"/${PN}-sentinel-4.0.6-config.patch
83 + eapply_user
84 +
85 + # Copy lua modules into build dir
86 + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
87 + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
88 + # Append cflag for lua_cjson
89 + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
90 + append-cflags "-DENABLE_CJSON_GLOBAL"
91 +
92 + # now we will rewrite present Makefiles
93 + local makefiles="" MKF
94 + for MKF in $(find -name 'Makefile' | cut -b 3-); do
95 + mv "${MKF}" "${MKF}.in"
96 + sed -i -e 's:$(CC):@CC@:g' \
97 + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
98 + -e 's: $(DEBUG)::g' \
99 + -e 's:$(OBJARCH)::g' \
100 + -e 's:ARCH:TARCH:g' \
101 + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
102 + "${MKF}.in" \
103 + || die "Sed failed for ${MKF}"
104 + makefiles+=" ${MKF}"
105 + done
106 + # autodetection of compiler and settings; generates the modified Makefiles
107 + cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
108 +
109 + # Use the correct pkgconfig name for Lua
110 + has_version 'dev-lang/lua:5.1' \
111 + && LUAPKGCONFIG=lua5.1 \
112 + || LUAPKGCONFIG=lua
113 + sed -i \
114 + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
115 + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
116 + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
117 + configure.ac || die "Sed failed for configure.ac"
118 + eautoreconf
119 +}
120 +
121 +src_configure() {
122 + econf \
123 + $(use_with luajit)
124 +
125 + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
126 + # also, don't define ANSI/c99 for lua twice
127 + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
128 +}
129 +
130 +src_compile() {
131 + tc-export CC AR RANLIB
132 +
133 + local myconf=""
134 +
135 + if use tcmalloc; then
136 + myconf="${myconf} USE_TCMALLOC=yes"
137 + elif use jemalloc; then
138 + myconf="${myconf} JEMALLOC_SHARED=yes"
139 + else
140 + myconf="${myconf} MALLOC=yes"
141 + fi
142 +
143 + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
144 +}
145 +
146 +src_install() {
147 + insinto /etc/
148 + doins redis.conf sentinel.conf
149 + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
150 + fperms 0644 /etc/{redis,sentinel}.conf
151 +
152 + newconfd "${FILESDIR}/redis.confd-r1" redis
153 + newinitd "${FILESDIR}/redis.initd-5" redis
154 +
155 + systemd_newunit "${FILESDIR}/redis.service-2" redis.service
156 + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
157 +
158 + newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
159 + newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
160 +
161 + insinto /etc/logrotate.d/
162 + newins "${FILESDIR}/${PN}.logrotate" ${PN}
163 +
164 + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
165 +
166 + dobin src/redis-cli
167 + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
168 + fperms 0750 /usr/sbin/redis-benchmark
169 + dosym redis-server /usr/sbin/redis-sentinel
170 +
171 + if use prefix; then
172 + diropts -m0750
173 + else
174 + diropts -m0750 -o redis -g redis
175 + fi
176 + keepdir /var/{log,lib}/redis
177 +}