Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/redis: redis-2.4.4.ebuild metadata.xml ChangeLog
Date: Wed, 30 Nov 2011 12:09:52
Message-Id: 20111130120936.587012004C@flycatcher.gentoo.org
1 djc 11/11/30 12:09:36
2
3 Modified: metadata.xml ChangeLog
4 Added: redis-2.4.4.ebuild
5 Log:
6 Version bump to 2.4.4 (bug 378085, thanks jbergstroem).
7
8 (Portage version: 2.1.10.39/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.6 dev-db/redis/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/metadata.xml?rev=1.6&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/metadata.xml?rev=1.6&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/metadata.xml?r1=1.5&r2=1.6
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/metadata.xml,v
20 retrieving revision 1.5
21 retrieving revision 1.6
22 diff -u -r1.5 -r1.6
23 --- metadata.xml 23 Sep 2011 22:08:05 -0000 1.5
24 +++ metadata.xml 30 Nov 2011 12:09:36 -0000 1.6
25 @@ -15,5 +15,8 @@
26 Use the <pkg>dev-util/google-perftools</pkg> libraries to
27 replace the malloc() implementation with a possibly faster one.
28 </flag>
29 + <flag name="jemalloc">
30 + Use <pkg>dev-libs/jemalloc</pkg> for allocations.
31 + </flag>
32 </use>
33 </pkgmetadata>
34
35
36
37 1.27 dev-db/redis/ChangeLog
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.27&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.27&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?r1=1.26&r2=1.27
42
43 Index: ChangeLog
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v
46 retrieving revision 1.26
47 retrieving revision 1.27
48 diff -u -r1.26 -r1.27
49 --- ChangeLog 26 Nov 2011 10:37:47 -0000 1.26
50 +++ ChangeLog 30 Nov 2011 12:09:36 -0000 1.27
51 @@ -1,6 +1,12 @@
52 # ChangeLog for dev-db/redis
53 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
54 -# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.26 2011/11/26 10:37:47 lu_zero Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.27 2011/11/30 12:09:36 djc Exp $
56 +
57 +*redis-2.4.4 (30 Nov 2011)
58 +
59 + 30 Nov 2011; Dirkjan Ochtman <djc@g.o> +redis-2.4.4.ebuild,
60 + +files/redis-2.4.4-tcmalloc.patch:
61 + Version bump to 2.4.4 (bug 378085, thanks jbergstroem).
62
63 *redis-2.4.3 (26 Nov 2011)
64
65
66
67
68 1.1 dev-db/redis/redis-2.4.4.ebuild
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/redis-2.4.4.ebuild?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/redis-2.4.4.ebuild?rev=1.1&content-type=text/plain
72
73 Index: redis-2.4.4.ebuild
74 ===================================================================
75 # Copyright 1999-2011 Gentoo Foundation
76 # Distributed under the terms of the GNU General Public License v2
77 # $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.4.4.ebuild,v 1.1 2011/11/30 12:09:36 djc Exp $
78
79 EAPI="4"
80
81 inherit autotools eutils flag-o-matic
82
83 DESCRIPTION="A persistent caching system, key-value and data structures database."
84 HOMEPAGE="http://redis.io/"
85 SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz"
86
87 LICENSE="BSD"
88 KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris"
89 IUSE="+jemalloc tcmalloc test"
90 SLOT="0"
91
92 RDEPEND=""
93 DEPEND=">=sys-devel/autoconf-2.63
94 tcmalloc? ( dev-util/google-perftools )
95 jemalloc? ( dev-libs/jemalloc )
96 test? ( dev-lang/tcl )
97 ${RDEPEND}"
98 REQUIRED_USE="tcmalloc? ( !jemalloc )
99 jemalloc? ( !tcmalloc )"
100
101 S="${WORKDIR}/${PN}-${PV/_/-}"
102
103 REDIS_PIDDIR=/var/run/redis/
104 REDIS_PIDFILE=${REDIS_PIDDIR}/redis.pid
105 REDIS_DATAPATH=/var/lib/redis
106 REDIS_LOGPATH=/var/log/redis
107 REDIS_LOGFILE=${REDIS_LOGPATH}/redis.log
108
109 pkg_setup() {
110 enewgroup redis 75
111 enewuser redis 75 -1 ${REDIS_DATAPATH} redis
112 # set tcmalloc-variable for the build as specified in
113 # https://github.com/antirez/redis/blob/2.2/README. If build system gets
114 # better integrated into autotools, replace with append-flags and
115 # append-ldflags in src_configure()
116 if use tcmalloc ; then
117 export EXTRA_EMAKE="${EXTRA_EMAKE} USE_TCMALLOC=yes"
118 elif use jemalloc ; then
119 export EXTRA_EMAKE="${EXTRA_EMAKE} JEMALLOC_SHARED=yes"
120 else
121 export EXTRA_EMAKE="${EXTRA_EMAKE} FORCE_LIBC_MALLOC=yes"
122 fi
123 }
124
125 src_prepare() {
126 epatch "${FILESDIR}/redis-2.4.3-shared.patch"
127 epatch "${FILESDIR}/${P}-tcmalloc.patch"
128 if use jemalloc ; then
129 sed -i -e "s/je_/j/" src/zmalloc.c
130 fi
131 # now we will rewrite present Makefiles
132 local makefiles=""
133 for MKF in $(find -name 'Makefile' | cut -b 3-); do
134 mv "${MKF}" "${MKF}.in"
135 sed -i -e 's:$(CC):@CC@:g' \
136 -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
137 -e 's: $(DEBUG)::g' \
138 -e 's:$(OBJARCH)::g' \
139 -e 's:ARCH:TARCH:g' \
140 -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
141 "${MKF}.in" \
142 || die "Sed failed for ${MKF}"
143 makefiles+=" ${MKF}"
144 done
145 # autodetection of compiler and settings; generates the modified Makefiles
146 cp "${FILESDIR}"/configure.ac-2.2 configure.ac
147 sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
148 configure.ac || die "Sed failed for configure.ac"
149 eautoconf
150 }
151
152 src_install() {
153 # configuration file rewrites
154 insinto /etc/
155 sed -r \
156 -e "/^pidfile\>/s,/var.*,${REDIS_PIDFILE}," \
157 -e '/^daemonize\>/s,no,yes,' \
158 -e '/^# bind/s,^# ,,' \
159 -e '/^# maxmemory\>/s,^# ,,' \
160 -e '/^maxmemory\>/s,<bytes>,67108864,' \
161 -e "/^dbfilename\>/s,dump.rdb,${REDIS_DATAPATH}/dump.rdb," \
162 -e "/^dir\>/s, .*, ${REDIS_DATAPATH}/," \
163 -e '/^loglevel\>/s:debug:notice:' \
164 -e "/^logfile\>/s:stdout:${REDIS_LOGFILE}:" \
165 <redis.conf \
166 >redis.conf.gentoo
167 newins redis.conf.gentoo redis.conf
168 use prefix || fowners redis:redis /etc/redis.conf
169 fperms 0644 /etc/redis.conf
170
171 newconfd "${FILESDIR}/redis.confd" redis
172 newinitd "${FILESDIR}/redis.initd" redis
173
174 dodoc 00-RELEASENOTES BUGS CONTRIBUTING README TODO
175
176 dobin src/redis-cli || die "redis-cli could not be found"
177 dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump \
178 || die "some redis executables could not be found"
179 fperms 0750 /usr/sbin/redis-benchmark
180
181 if use prefix; then
182 diropts -m0750
183 else
184 diropts -m0750 -o redis -g redis
185 fi
186 keepdir ${REDIS_DATAPATH} ${REDIS_LOGPATH} ${REDIS_PIDDIR}
187 }