Gentoo Archives: gentoo-commits

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