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