diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-11-30 12:09:36 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-11-30 12:09:36 +0000 |
commit | caa8b361849db0848e50841b3251ba12862f2d76 (patch) | |
tree | e7600f57e63efb0a0a6ab1e3a7bc33d2317d17eb /dev-db/redis | |
parent | Add Prefix keywords for bug #390017 (diff) | |
download | gentoo-2-caa8b361849db0848e50841b3251ba12862f2d76.tar.gz gentoo-2-caa8b361849db0848e50841b3251ba12862f2d76.tar.bz2 gentoo-2-caa8b361849db0848e50841b3251ba12862f2d76.zip |
Version bump to 2.4.4 (bug 378085, thanks jbergstroem).
(Portage version: 2.1.10.39/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/redis')
-rw-r--r-- | dev-db/redis/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/redis/files/redis-2.4.4-tcmalloc.patch | 21 | ||||
-rw-r--r-- | dev-db/redis/metadata.xml | 3 | ||||
-rw-r--r-- | dev-db/redis/redis-2.4.4.ebuild | 113 |
4 files changed, 144 insertions, 1 deletions
diff --git a/dev-db/redis/ChangeLog b/dev-db/redis/ChangeLog index 264dff29fd2e..eaa689d60b2d 100644 --- a/dev-db/redis/ChangeLog +++ b/dev-db/redis/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-db/redis # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.26 2011/11/26 10:37:47 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.27 2011/11/30 12:09:36 djc Exp $ + +*redis-2.4.4 (30 Nov 2011) + + 30 Nov 2011; Dirkjan Ochtman <djc@gentoo.org> +redis-2.4.4.ebuild, + +files/redis-2.4.4-tcmalloc.patch: + Version bump to 2.4.4 (bug 378085, thanks jbergstroem). *redis-2.4.3 (26 Nov 2011) diff --git a/dev-db/redis/files/redis-2.4.4-tcmalloc.patch b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch new file mode 100644 index 000000000000..964ce71d5f78 --- /dev/null +++ b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch @@ -0,0 +1,21 @@ +https://github.com/antirez/redis/pull/218 + +diff --git a/src/Makefile b/src/Makefile +index 72edcad..3e43990 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -35,12 +35,14 @@ else + endif + + ifeq ($(USE_TCMALLOC),yes) ++ USE_JEMALLOC=no + ALLOC_DEP= + ALLOC_LINK=-ltcmalloc + ALLOC_FLAGS=-DUSE_TCMALLOC + endif + + ifeq ($(USE_TCMALLOC_MINIMAL),yes) ++ USE_JEMALLOC=no + ALLOC_DEP= + ALLOC_LINK=-ltcmalloc_minimal + ALLOC_FLAGS=-DUSE_TCMALLOC
\ No newline at end of file diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml index 5e0ea5d24b93..af302f577b90 100644 --- a/dev-db/redis/metadata.xml +++ b/dev-db/redis/metadata.xml @@ -15,5 +15,8 @@ Use the <pkg>dev-util/google-perftools</pkg> libraries to replace the malloc() implementation with a possibly faster one. </flag> + <flag name="jemalloc"> + Use <pkg>dev-libs/jemalloc</pkg> for allocations. + </flag> </use> </pkgmetadata> diff --git a/dev-db/redis/redis-2.4.4.ebuild b/dev-db/redis/redis-2.4.4.ebuild new file mode 100644 index 000000000000..cd8976811ed7 --- /dev/null +++ b/dev-db/redis/redis-2.4.4.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.4.4.ebuild,v 1.1 2011/11/30 12:09:36 djc Exp $ + +EAPI="4" + +inherit autotools eutils flag-o-matic + +DESCRIPTION="A persistent caching system, key-value and data structures database." +HOMEPAGE="http://redis.io/" +SRC_URI="http://redis.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="" +DEPEND=">=sys-devel/autoconf-2.63 + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( dev-libs/jemalloc ) + test? ( dev-lang/tcl ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +REDIS_PIDDIR=/var/run/redis/ +REDIS_PIDFILE=${REDIS_PIDDIR}/redis.pid +REDIS_DATAPATH=/var/lib/redis +REDIS_LOGPATH=/var/log/redis +REDIS_LOGFILE=${REDIS_LOGPATH}/redis.log + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 ${REDIS_DATAPATH} redis + # set tcmalloc-variable for the build as specified in + # https://github.com/antirez/redis/blob/2.2/README. If build system gets + # better integrated into autotools, replace with append-flags and + # append-ldflags in src_configure() + if use tcmalloc ; then + export EXTRA_EMAKE="${EXTRA_EMAKE} USE_TCMALLOC=yes" + elif use jemalloc ; then + export EXTRA_EMAKE="${EXTRA_EMAKE} JEMALLOC_SHARED=yes" + else + export EXTRA_EMAKE="${EXTRA_EMAKE} FORCE_LIBC_MALLOC=yes" + fi +} + +src_prepare() { + epatch "${FILESDIR}/redis-2.4.3-shared.patch" + epatch "${FILESDIR}/${P}-tcmalloc.patch" + if use jemalloc ; then + sed -i -e "s/je_/j/" src/zmalloc.c + fi + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_install() { + # configuration file rewrites + insinto /etc/ + sed -r \ + -e "/^pidfile\>/s,/var.*,${REDIS_PIDFILE}," \ + -e '/^daemonize\>/s,no,yes,' \ + -e '/^# bind/s,^# ,,' \ + -e '/^# maxmemory\>/s,^# ,,' \ + -e '/^maxmemory\>/s,<bytes>,67108864,' \ + -e "/^dbfilename\>/s,dump.rdb,${REDIS_DATAPATH}/dump.rdb," \ + -e "/^dir\>/s, .*, ${REDIS_DATAPATH}/," \ + -e '/^loglevel\>/s:debug:notice:' \ + -e "/^logfile\>/s:stdout:${REDIS_LOGFILE}:" \ + <redis.conf \ + >redis.conf.gentoo + newins redis.conf.gentoo redis.conf + use prefix || fowners redis:redis /etc/redis.conf + fperms 0644 /etc/redis.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd" redis + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING README TODO + + dobin src/redis-cli || die "redis-cli could not be found" + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump \ + || die "some redis executables could not be found" + fperms 0750 /usr/sbin/redis-benchmark + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir ${REDIS_DATAPATH} ${REDIS_LOGPATH} ${REDIS_PIDDIR} +} |