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: ChangeLog redis-2.4.17-r1.ebuild
Date: Wed, 26 Dec 2012 11:01:54
Message-Id: 20121226110144.3E2C62171E@flycatcher.gentoo.org
1 djc 12/12/26 11:01:44
2
3 Modified: ChangeLog
4 Added: redis-2.4.17-r1.ebuild
5 Log:
6 Fix redis compilation against jemalloc-3.2.0 (bug 444796).
7
8 (Portage version: 2.1.11.27/cvs/Linux x86_64, signed Manifest commit with key 6B065BFB)
9
10 Revision Changes Path
11 1.53 dev-db/redis/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.53&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.53&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?r1=1.52&r2=1.53
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v
20 retrieving revision 1.52
21 retrieving revision 1.53
22 diff -u -r1.52 -r1.53
23 --- ChangeLog 8 Oct 2012 05:15:35 -0000 1.52
24 +++ ChangeLog 26 Dec 2012 11:01:44 -0000 1.53
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-db/redis
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.52 2012/10/08 05:15:35 robbat2 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.53 2012/12/26 11:01:44 djc Exp $
30 +
31 +*redis-2.4.17-r1 (26 Dec 2012)
32 +
33 + 26 Dec 2012; Dirkjan Ochtman <djc@g.o> +redis-2.4.17-r1.ebuild,
34 + +files/redis-2.4.17-shared.patch:
35 + Fix compilation against jemalloc-3.2.0 (bug 444796).
36
37 08 Oct 2012; Robin H. Johnson <robbat2@g.o> redis-2.4.17.ebuild:
38 Fix verbosity issue per bus #428722 and EMAKE_EXTRA bug #437344.
39
40
41
42 1.1 dev-db/redis/redis-2.4.17-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/redis-2.4.17-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/redis-2.4.17-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: redis-2.4.17-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.4.17-r1.ebuild,v 1.1 2012/12/26 11:01:44 djc Exp $
52
53 EAPI="4"
54
55 inherit autotools eutils flag-o-matic user
56
57 DESCRIPTION="A persistent caching system, key-value and data structures database."
58 HOMEPAGE="http://redis.io/"
59 SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz"
60
61 LICENSE="BSD"
62 KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris"
63 IUSE="+jemalloc tcmalloc test"
64 SLOT="0"
65
66 RDEPEND="tcmalloc? ( dev-util/google-perftools )
67 jemalloc? ( >=dev-libs/jemalloc-3.2 )"
68 DEPEND=">=sys-devel/autoconf-2.63
69 test? ( dev-lang/tcl )
70 ${RDEPEND}"
71 REQUIRED_USE="tcmalloc? ( !jemalloc )
72 jemalloc? ( !tcmalloc )"
73
74 S="${WORKDIR}/${PN}-${PV/_/-}"
75
76 REDIS_PIDDIR=/var/run/redis/
77 REDIS_PIDFILE=${REDIS_PIDDIR}/redis.pid
78 REDIS_DATAPATH=/var/lib/redis
79 REDIS_LOGPATH=/var/log/redis
80 REDIS_LOGFILE=${REDIS_LOGPATH}/redis.log
81
82 pkg_setup() {
83 enewgroup redis 75
84 enewuser redis 75 -1 ${REDIS_DATAPATH} redis
85 }
86
87 src_prepare() {
88 epatch "${FILESDIR}/${P}-shared.patch"
89 epatch "${FILESDIR}/redis-2.4.4-tcmalloc.patch"
90
91 # now we will rewrite present Makefiles
92 local makefiles=""
93 for MKF in $(find -name 'Makefile' | cut -b 3-); do
94 mv "${MKF}" "${MKF}.in"
95 sed -i -e 's:$(CC):@CC@:g' \
96 -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
97 -e 's: $(DEBUG)::g' \
98 -e 's:$(OBJARCH)::g' \
99 -e 's:ARCH:TARCH:g' \
100 -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
101 "${MKF}.in" \
102 || die "Sed failed for ${MKF}"
103 makefiles+=" ${MKF}"
104 done
105 # autodetection of compiler and settings; generates the modified Makefiles
106 cp "${FILESDIR}"/configure.ac-2.2 configure.ac
107 sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
108 configure.ac || die "Sed failed for configure.ac"
109 eautoconf
110 }
111
112 src_compile() {
113 local myconf=""
114
115 if use tcmalloc ; then
116 myconf="${myconf} USE_TCMALLOC=yes"
117 elif use jemalloc ; then
118 myconf="${myconf} JEMALLOC_SHARED=yes"
119 else
120 myconf="${myconf} FORCE_LIBC_MALLOC=yes"
121 fi
122
123 emake ${myconf}
124 }
125
126 src_install() {
127 # configuration file rewrites
128 insinto /etc/
129 sed -r \
130 -e "/^pidfile\>/s,/var.*,${REDIS_PIDFILE}," \
131 -e '/^daemonize\>/s,no,yes,' \
132 -e '/^# bind/s,^# ,,' \
133 -e '/^# maxmemory\>/s,^# ,,' \
134 -e '/^maxmemory\>/s,<bytes>,67108864,' \
135 -e "/^dbfilename\>/s,dump.rdb,${REDIS_DATAPATH}/dump.rdb," \
136 -e "/^dir\>/s, .*, ${REDIS_DATAPATH}/," \
137 -e '/^loglevel\>/s:(verbose|debug):notice:' \
138 -e "/^logfile\>/s:stdout:${REDIS_LOGFILE}:" \
139 <redis.conf \
140 >redis.conf.gentoo
141 newins redis.conf.gentoo redis.conf
142 use prefix || fowners redis:redis /etc/redis.conf
143 fperms 0644 /etc/redis.conf
144
145 newconfd "${FILESDIR}/redis.confd" redis
146 newinitd "${FILESDIR}/redis.initd" redis
147
148 nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING README
149
150 dobin src/redis-cli
151 dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump
152 fperms 0750 /usr/sbin/redis-benchmark
153
154 if use prefix; then
155 diropts -m0750
156 else
157 diropts -m0750 -o redis -g redis
158 fi
159 keepdir ${REDIS_DATAPATH} ${REDIS_LOGPATH}
160 }