Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, profiles/
Date: Mon, 30 Jan 2017 00:07:44
Message-Id: 1485734857.00db2267f2e5e03d1caf5f810a95a3a567bdcfeb.robbat2@gentoo
1 commit: 00db2267f2e5e03d1caf5f810a95a3a567bdcfeb
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 30 00:02:04 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 30 00:07:37 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00db2267
7
8 dev-db/redis: bump for #607542.
9
10 Package-Manager: portage-2.3.2
11 Fixes: https://bugs.gentoo.org/show_bug.cgi?id=607542
12 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
13
14 dev-db/redis/Manifest | 1 +
15 dev-db/redis/redis-3.2.6-r1.ebuild | 123 ++++++++++++++++++++++++++++++++++++
16 dev-db/redis/redis-3.2.6.ebuild | 124 +++++++++++++++++++++++++++++++++++++
17 profiles/package.mask | 1 +
18 4 files changed, 249 insertions(+)
19
20 diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
21 index 2e1328b..0568d9a 100644
22 --- a/dev-db/redis/Manifest
23 +++ b/dev-db/redis/Manifest
24 @@ -3,3 +3,4 @@ DIST redis-2.8.23.tar.gz 1265194 SHA256 f3c79778f478a01237035b67edaaa19332e5624d
25 DIST redis-3.0.4.tar.gz 1364993 SHA256 a35e90ad581925134aa0fc92e969cc825f5cdee8e13c36a87d4d6995316112cf SHA512 7d8d681222892c759e7c3809203522a96a547457e0ff123cca296bac911395c7d8c1ded06331ae5cb487b87d0adcbaa02aa12c2dd724196a7b86111e236b023a WHIRLPOOL e12f7751e3e25068a25c02990d0e8416cedc152f66b5e9e1e47ae91f10a0d543b96ad456a4eb7fe16cb92ed46a0cc2fee65954207b354b9c211f425191a6c388
26 DIST redis-3.0.7.tar.gz 1375200 SHA256 b2a791c4ea3bb7268795c45c6321ea5abcc24457178373e6a6e3be6372737f23 SHA512 6c8f4c88d911e1433fd28efff2f6d62763e08be89814ebf4aa4e68e2c8bd605eba24ca3410548b2f480ae094437ce96c0bafa7a5762b3b405d5d850886297ba3 WHIRLPOOL 53c2c967b999bbcb5b45117bbad74b46457158ad94e8c43566311dd3d58c63c2d0cc2dac5dc9e8806821c2532ee4beded17e039da4ddeae958e5a0092429ee3a
27 DIST redis-3.2.5.tar.gz 1544040 SHA256 8509ceb1efd849d6b2346a72a8e926b5a4f6ed3cc7c3cd8d9f36b2e9ba085315 SHA512 4ecf6277c8fdf4411223b9f5a5c8308829da9bd756b45de5217d469e9def8faad8c05b6348c06aef99eca9245d45abfd52df056c3c819723da66a2ca20c381dd WHIRLPOOL db1eecac5e407734002d39cc16f708fcb1f506829df4dabda53bffc7012746a23ea2342cded4d90f39db72ba61eda349b80b4a3e4f1eba06dbaa6cad8c50264e
28 +DIST redis-3.2.6.tar.gz 1544806 SHA256 2e1831c5a315e400d72bda4beaa98c0cfbe3f4eb8b20c269371634390cf729fa SHA512 15f2e55a7cc56e7e652a3a8d344fceb6d0d33cf53caa81854e6b1977ec68f7e92ac06d0d66999bfc577f185eba19e0927a81014bdb5cd484eecb080b6a6e16bc WHIRLPOOL a3dd92e565cdfbc65bfccd452efde8fc4124ede1133ca74a30c69f68eb5021b5fb1bbc7dc30d3ea9993c42bc9c4ce2716564329bd5be142a5764a9ab807a9d14
29
30 diff --git a/dev-db/redis/redis-3.2.6-r1.ebuild b/dev-db/redis/redis-3.2.6-r1.ebuild
31 new file mode 100644
32 index 00000000..f61b7f1
33 --- /dev/null
34 +++ b/dev-db/redis/redis-3.2.6-r1.ebuild
35 @@ -0,0 +1,123 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +# $Id$
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="http://redis.io/"
46 +SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
47 +
48 +LICENSE="BSD"
49 +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
50 +IUSE="+jemalloc tcmalloc luajit test"
51 +SLOT="0"
52 +
53 +RDEPEND="luajit? ( dev-lang/luajit:2 )
54 + !luajit? ( dev-lang/lua:5.1 )
55 + tcmalloc? ( dev-util/google-perftools )
56 + jemalloc? ( >=dev-libs/jemalloc-3.2 )"
57 +DEPEND="virtual/pkgconfig
58 + >=sys-devel/autoconf-2.63
59 + test? ( dev-lang/tcl:0= )
60 + ${RDEPEND}"
61 +REQUIRED_USE="?? ( tcmalloc jemalloc )"
62 +
63 +S="${WORKDIR}/${PN}-${PV/_/-}"
64 +
65 +pkg_setup() {
66 + enewgroup redis 75
67 + enewuser redis 75 -1 /var/lib/redis redis
68 +}
69 +
70 +src_prepare() {
71 + epatch \
72 + "${FILESDIR}"/${PN}-3.2.5-shared.patch \
73 + "${FILESDIR}"/${PN}-3.2.3-config.patch \
74 + "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
75 + eapply_user
76 +
77 + # Copy lua modules into build dir
78 + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
79 + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
80 + # Append cflag for lua_cjson
81 + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
82 + append-cflags "-DENABLE_CJSON_GLOBAL"
83 +
84 + # now we will rewrite present Makefiles
85 + local makefiles=""
86 + for MKF in $(find -name 'Makefile' | cut -b 3-); do
87 + mv "${MKF}" "${MKF}.in"
88 + sed -i -e 's:$(CC):@CC@:g' \
89 + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
90 + -e 's: $(DEBUG)::g' \
91 + -e 's:$(OBJARCH)::g' \
92 + -e 's:ARCH:TARCH:g' \
93 + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
94 + "${MKF}.in" \
95 + || die "Sed failed for ${MKF}"
96 + makefiles+=" ${MKF}"
97 + done
98 + # autodetection of compiler and settings; generates the modified Makefiles
99 + cp "${FILESDIR}"/configure.ac-3.2 configure.ac
100 + sed -i \
101 + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
102 + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
103 + configure.ac || die "Sed failed for configure.ac"
104 + eautoreconf
105 +}
106 +
107 +src_configure() {
108 + econf \
109 + $(use_with luajit)
110 +
111 + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
112 + # geohash-int can't be built with -std=c99 either
113 + # also, don't define ANSI/c99 for lua twice
114 + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
115 +}
116 +
117 +src_compile() {
118 + tc-export CC AR RANLIB
119 +
120 + local myconf=""
121 +
122 + if use tcmalloc ; then
123 + myconf="${myconf} USE_TCMALLOC=yes"
124 + elif use jemalloc ; then
125 + myconf="${myconf} JEMALLOC_SHARED=yes"
126 + else
127 + myconf="${myconf} MALLOC=yes"
128 + fi
129 +
130 + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
131 +}
132 +
133 +src_install() {
134 + insinto /etc/
135 + doins redis.conf sentinel.conf
136 + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
137 + fperms 0644 /etc/{redis,sentinel}.conf
138 +
139 + newconfd "${FILESDIR}/redis.confd" redis
140 + newinitd "${FILESDIR}/redis.initd-4" redis
141 +
142 + systemd_newunit "${FILESDIR}/redis.service-2" redis.service
143 + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
144 +
145 + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
146 +
147 + dobin src/redis-cli
148 + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
149 + fperms 0750 /usr/sbin/redis-benchmark
150 + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
151 +
152 + if use prefix; then
153 + diropts -m0750
154 + else
155 + diropts -m0750 -o redis -g redis
156 + fi
157 + keepdir /var/{log,lib}/redis
158 +}
159
160 diff --git a/dev-db/redis/redis-3.2.6.ebuild b/dev-db/redis/redis-3.2.6.ebuild
161 new file mode 100644
162 index 00000000..efb504a
163 --- /dev/null
164 +++ b/dev-db/redis/redis-3.2.6.ebuild
165 @@ -0,0 +1,124 @@
166 +# Copyright 1999-2017 Gentoo Foundation
167 +# Distributed under the terms of the GNU General Public License v2
168 +# $Id$
169 +
170 +EAPI=6
171 +
172 +inherit autotools eutils flag-o-matic systemd toolchain-funcs user
173 +
174 +DESCRIPTION="A persistent caching system, key-value and data structures database"
175 +HOMEPAGE="http://redis.io/"
176 +SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
177 +
178 +LICENSE="BSD"
179 +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
180 +IUSE="+jemalloc tcmalloc luajit test"
181 +SLOT="0"
182 +
183 +RDEPEND="luajit? ( dev-lang/luajit:2 )
184 + !luajit? ( >=dev-lang/lua-5.1:* )
185 + tcmalloc? ( dev-util/google-perftools )
186 + jemalloc? ( >=dev-libs/jemalloc-3.2 )"
187 +DEPEND="virtual/pkgconfig
188 + >=sys-devel/autoconf-2.63
189 + test? ( dev-lang/tcl:0= )
190 + ${RDEPEND}"
191 +REQUIRED_USE="?? ( tcmalloc jemalloc )"
192 +
193 +S="${WORKDIR}/${PN}-${PV/_/-}"
194 +
195 +pkg_setup() {
196 + enewgroup redis 75
197 + enewuser redis 75 -1 /var/lib/redis redis
198 +}
199 +
200 +src_prepare() {
201 + epatch \
202 + "${FILESDIR}"/${PN}-3.2.5-shared.patch \
203 + "${FILESDIR}"/${PN}-3.2.3-config.patch \
204 + "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch
205 + eapply_user
206 +
207 + # Copy lua modules into build dir
208 + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die
209 + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die
210 + # Append cflag for lua_cjson
211 + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
212 + append-cflags "-DENABLE_CJSON_GLOBAL"
213 +
214 + # now we will rewrite present Makefiles
215 + local makefiles=""
216 + for MKF in $(find -name 'Makefile' | cut -b 3-); do
217 + mv "${MKF}" "${MKF}.in"
218 + sed -i -e 's:$(CC):@CC@:g' \
219 + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
220 + -e 's: $(DEBUG)::g' \
221 + -e 's:$(OBJARCH)::g' \
222 + -e 's:ARCH:TARCH:g' \
223 + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
224 + "${MKF}.in" \
225 + || die "Sed failed for ${MKF}"
226 + makefiles+=" ${MKF}"
227 + done
228 + # autodetection of compiler and settings; generates the modified Makefiles
229 + cp "${FILESDIR}"/configure.ac-3.2 configure.ac
230 + sed -i \
231 + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
232 + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
233 + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,lua,g" \
234 + configure.ac || die "Sed failed for configure.ac"
235 + eautoreconf
236 +}
237 +
238 +src_configure() {
239 + econf \
240 + $(use_with luajit)
241 +
242 + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
243 + # geohash-int can't be built with -std=c99 either
244 + # also, don't define ANSI/c99 for lua twice
245 + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die
246 +}
247 +
248 +src_compile() {
249 + tc-export CC AR RANLIB
250 +
251 + local myconf=""
252 +
253 + if use tcmalloc ; then
254 + myconf="${myconf} USE_TCMALLOC=yes"
255 + elif use jemalloc ; then
256 + myconf="${myconf} JEMALLOC_SHARED=yes"
257 + else
258 + myconf="${myconf} MALLOC=yes"
259 + fi
260 +
261 + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}"
262 +}
263 +
264 +src_install() {
265 + insinto /etc/
266 + doins redis.conf sentinel.conf
267 + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
268 + fperms 0644 /etc/{redis,sentinel}.conf
269 +
270 + newconfd "${FILESDIR}/redis.confd" redis
271 + newinitd "${FILESDIR}/redis.initd-4" redis
272 +
273 + systemd_newunit "${FILESDIR}/redis.service-2" redis.service
274 + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf
275 +
276 + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
277 +
278 + dobin src/redis-cli
279 + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
280 + fperms 0750 /usr/sbin/redis-benchmark
281 + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel
282 +
283 + if use prefix; then
284 + diropts -m0750
285 + else
286 + diropts -m0750 -o redis -g redis
287 + fi
288 + keepdir /var/{log,lib}/redis
289 +}
290
291 diff --git a/profiles/package.mask b/profiles/package.mask
292 index f36e499..dca3bc7 100644
293 --- a/profiles/package.mask
294 +++ b/profiles/package.mask
295 @@ -375,6 +375,7 @@ dev-lang/ruby:2.0
296 # Robin H. Johnson <robbat2@g.o> (18 Nov 2016)
297 # Depends on slotted lua
298 =dev-db/redis-3.2.5-r1
299 +=dev-db/redis-3.2.6-r1
300
301 # Ian Stakenvicius (17 Nov 2016)
302 # Does not honour LD_LIBRARY_PATH set in the environment, causing