1 |
commit: d9573dfe0717cec68a1e3f6454e8b9aa72ec9655 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 4 21:53:18 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 4 21:53:18 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9573dfe |
7 |
|
8 |
dev-db/redis: add 5.0.14 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/816282 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-db/redis/Manifest | 1 + |
14 |
dev-db/redis/redis-5.0.14.ebuild | 164 +++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 165 insertions(+) |
16 |
|
17 |
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest |
18 |
index 744bb01b58d..8391b1df637 100644 |
19 |
--- a/dev-db/redis/Manifest |
20 |
+++ b/dev-db/redis/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST redis-5.0.13.tar.gz 1995566 BLAKE2B 1020b26162d212f980fd07bfe1879120306c7e796cde7e48dfcc1c3aa555a0a25299c17ad65515cc54be3c354bff58cefe67bba5dfc26f6b24d56a46debfa267 SHA512 9784193a53b459a2e4937e8f0d18652a0677d29746e359e5f8ffddeea4cea305f10c8eeae9007e49c0ba9ebedb9b603aced61592ba3302e5b64be78020b3b4bf |
23 |
+DIST redis-5.0.14.tar.gz 2000179 BLAKE2B 77d3ed09a81450dbf806edd017785b82c50bb059aab44c82bc4ab784b7f03d5c58f9372b96c857831f84d278771dcf223f42ca05af790f0dc10ecdde211fd149 SHA512 513299ae8b967a659d54812fab4dfdfaf0081b20136a3d89b6a761e93548583c96436fedb84baa4d23385b42110ef615527efc3690b873f5bec7793403fe7eaf |
24 |
DIST redis-6.0.15.tar.gz 2282471 BLAKE2B b7f37a76d2a16e0f84f51a737e2c23ebc27750ece790cf800a0f70bfd481db01d82dc68511f80e5935dc73d70f02716a4f9005d4d177ecf3f2a0c5290ecd41ff SHA512 e7ba123798a11e1c68dd6d3ebb0586bed4f2bb33755871f1577f7e0229f826b468c2130c31bcc85a64ce7ff54e280df0a7c60e0882f3ed2a11d43e7819fe8b9e |
25 |
DIST redis-6.2.5.tar.gz 2465302 BLAKE2B 51cc672ab432bb87560151521289d04e8fefb8e4df820f58a9b742131a0f1960c0019dec42a601bad827ec2a172375b88b6cf32a19aef42964e18f5a7a911c40 SHA512 8c54451032cbb627ec2827251556cba2010e56544baca7ea117b5afd2c2add484acbedd3baf21bdb8fd10672602cf52294a4e26b135c1406d7a723c048275e3a |
26 |
|
27 |
diff --git a/dev-db/redis/redis-5.0.14.ebuild b/dev-db/redis/redis-5.0.14.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..36e7924b6b2 |
30 |
--- /dev/null |
31 |
+++ b/dev-db/redis/redis-5.0.14.ebuild |
32 |
@@ -0,0 +1,164 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit autotools flag-o-matic systemd toolchain-funcs tmpfiles |
39 |
+ |
40 |
+DESCRIPTION="A persistent caching system, key-value and data structures database" |
41 |
+HOMEPAGE="https://redis.io" |
42 |
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="BSD" |
45 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
46 |
+IUSE="+jemalloc tcmalloc luajit test" |
47 |
+RESTRICT="!test? ( test )" |
48 |
+SLOT="0" |
49 |
+ |
50 |
+# Redis does NOT build with Lua 5.2 or newer at this time. |
51 |
+COMMON_DEPEND=" |
52 |
+ luajit? ( dev-lang/luajit:2 ) |
53 |
+ !luajit? ( dev-lang/lua:5.1 ) |
54 |
+ tcmalloc? ( dev-util/google-perftools ) |
55 |
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= )" |
56 |
+ |
57 |
+RDEPEND=" |
58 |
+ ${COMMON_DEPEND} |
59 |
+ acct-group/redis |
60 |
+ acct-user/redis" |
61 |
+ |
62 |
+BDEPEND=" |
63 |
+ ${COMMON_DEPEND} |
64 |
+ virtual/pkgconfig" |
65 |
+ |
66 |
+# Tcl is only needed in the CHOST test env |
67 |
+DEPEND=" |
68 |
+ ${COMMON_DEPEND} |
69 |
+ test? ( dev-lang/tcl:0= )" |
70 |
+ |
71 |
+REQUIRED_USE="?? ( tcmalloc jemalloc )" |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/${PN}-3.2.3-config.patch |
75 |
+ "${FILESDIR}"/${PN}-5.0-shared.patch |
76 |
+ "${FILESDIR}"/${PN}-5.0-sharedlua.patch |
77 |
+ "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch |
78 |
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch |
79 |
+) |
80 |
+ |
81 |
+src_prepare() { |
82 |
+ default |
83 |
+ |
84 |
+ # don't call ar directly |
85 |
+ sed -e '/^STLIB_MAKE_CMD/s/ar/$(AR)/g' \ |
86 |
+ -i deps/hiredis/Makefile || die |
87 |
+ |
88 |
+ # Copy lua modules into build dir |
89 |
+ cp deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c src/ || die |
90 |
+ cp deps/lua/src/{fpconv,strbuf}.h src/ || die |
91 |
+ # Append cflag for lua_cjson |
92 |
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 |
93 |
+ append-cflags "-DENABLE_CJSON_GLOBAL" |
94 |
+ |
95 |
+ # now we will rewrite present Makefiles |
96 |
+ local makefiles="" MKF |
97 |
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do |
98 |
+ mv "${MKF}" "${MKF}.in" |
99 |
+ sed -i -e 's:$(CC):@CC@:g' \ |
100 |
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ |
101 |
+ -e 's: $(DEBUG)::g' \ |
102 |
+ -e 's:$(OBJARCH)::g' \ |
103 |
+ -e 's:ARCH:TARCH:g' \ |
104 |
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ |
105 |
+ "${MKF}.in" \ |
106 |
+ || die "Sed failed for ${MKF}" |
107 |
+ makefiles+=" ${MKF}" |
108 |
+ done |
109 |
+ # autodetection of compiler and settings; generates the modified Makefiles |
110 |
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die |
111 |
+ |
112 |
+ # Use the correct pkgconfig name for Lua |
113 |
+ if false && has_version 'dev-lang/lua:5.3'; then |
114 |
+ # Lua5.3 gives: |
115 |
+ #lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h" |
116 |
+ LUAPKGCONFIG=lua5.3 |
117 |
+ elif false && has_version 'dev-lang/lua:5.2'; then |
118 |
+ # Lua5.2 fails with: |
119 |
+ # scripting.c:(.text+0x1f9b): undefined reference to `lua_open' |
120 |
+ # Because lua_open because lua_newstate in 5.2 |
121 |
+ LUAPKGCONFIG=lua5.2 |
122 |
+ elif has_version 'dev-lang/lua:5.1'; then |
123 |
+ LUAPKGCONFIG=lua5.1 |
124 |
+ else |
125 |
+ LUAPKGCONFIG=lua |
126 |
+ fi |
127 |
+ # The upstream configure script handles luajit specially, and is not |
128 |
+ # effected by these changes. |
129 |
+ einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}" |
130 |
+ sed -i \ |
131 |
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ |
132 |
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ |
133 |
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ |
134 |
+ configure.ac || die "Sed failed for configure.ac" |
135 |
+ eautoreconf |
136 |
+} |
137 |
+ |
138 |
+src_configure() { |
139 |
+ econf $(use_with luajit) |
140 |
+ |
141 |
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 |
142 |
+ # also, don't define ANSI/c99 for lua twice |
143 |
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die |
144 |
+} |
145 |
+ |
146 |
+src_compile() { |
147 |
+ local myconf="" |
148 |
+ |
149 |
+ if use tcmalloc; then |
150 |
+ myconf="${myconf} USE_TCMALLOC=yes" |
151 |
+ elif use jemalloc; then |
152 |
+ myconf="${myconf} JEMALLOC_SHARED=yes" |
153 |
+ else |
154 |
+ myconf="${myconf} MALLOC=yes" |
155 |
+ fi |
156 |
+ |
157 |
+ tc-export AR CC RANLIB |
158 |
+ emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}" |
159 |
+} |
160 |
+ |
161 |
+src_install() { |
162 |
+ insinto /etc/ |
163 |
+ doins redis.conf sentinel.conf |
164 |
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf |
165 |
+ fperms 0644 /etc/{redis,sentinel}.conf |
166 |
+ |
167 |
+ newconfd "${FILESDIR}/redis.confd-r1" redis |
168 |
+ newinitd "${FILESDIR}/redis.initd-5" redis |
169 |
+ |
170 |
+ systemd_newunit "${FILESDIR}/redis.service-3" redis.service |
171 |
+ newtmpfiles "${FILESDIR}/redis.tmpfiles-2" redis.conf |
172 |
+ |
173 |
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel |
174 |
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel |
175 |
+ |
176 |
+ insinto /etc/logrotate.d/ |
177 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
178 |
+ |
179 |
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md |
180 |
+ |
181 |
+ dobin src/redis-cli |
182 |
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb |
183 |
+ fperms 0750 /usr/sbin/redis-benchmark |
184 |
+ dosym redis-server /usr/sbin/redis-sentinel |
185 |
+ |
186 |
+ if use prefix; then |
187 |
+ diropts -m0750 |
188 |
+ else |
189 |
+ diropts -m0750 -o redis -g redis |
190 |
+ fi |
191 |
+ keepdir /var/{log,lib}/redis |
192 |
+} |
193 |
+ |
194 |
+pkg_postinst() { |
195 |
+ tmpfiles_process redis.conf |
196 |
+} |