diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-26 02:25:33 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-26 02:25:33 +0000 |
commit | e89c907e65f843664b11f7337c2bc50686e27761 (patch) | |
tree | 98da1542d2a22244199e7cbe1fee7ea70c27b74c /dev-db | |
parent | Version bump; removed rc1 (diff) | |
download | gentoo-2-e89c907e65f843664b11f7337c2bc50686e27761.tar.gz gentoo-2-e89c907e65f843664b11f7337c2bc50686e27761.tar.bz2 gentoo-2-e89c907e65f843664b11f7337c2bc50686e27761.zip |
Bug #321487: Version bump. Bug #352266: Prefix support. Bug #335366: Respect LDFLAGS.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/redis/ChangeLog | 11 | ||||
-rw-r--r-- | dev-db/redis/files/configure.ac-2.2 | 58 | ||||
-rw-r--r-- | dev-db/redis/metadata.xml | 6 | ||||
-rw-r--r-- | dev-db/redis/redis-1.2.6.ebuild | 5 | ||||
-rw-r--r-- | dev-db/redis/redis-2.2.0_rc4.ebuild | 109 |
5 files changed, 185 insertions, 4 deletions
diff --git a/dev-db/redis/ChangeLog b/dev-db/redis/ChangeLog index 784d7bb269fa..236599d957c6 100644 --- a/dev-db/redis/ChangeLog +++ b/dev-db/redis/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-db/redis -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.5 2010/05/17 21:32:23 lu_zero Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.6 2011/01/26 02:25:32 robbat2 Exp $ + +*redis-2.2.0_rc4 (26 Jan 2011) + + 26 Jan 2011; Robin H. Johnson <robbat2@gentoo.org> redis-1.2.6.ebuild, + +files/configure.ac-2.2, +redis-2.2.0_rc4.ebuild, metadata.xml: + Bug #321487: Version bump. Bug #352266: Prefix support. Bug #335366: Respect + LDFLAGS. *redis-1.2.6 (17 May 2010) diff --git a/dev-db/redis/files/configure.ac-2.2 b/dev-db/redis/files/configure.ac-2.2 new file mode 100644 index 000000000000..3ff6650407ca --- /dev/null +++ b/dev-db/redis/files/configure.ac-2.2 @@ -0,0 +1,58 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.63) +AC_INIT(redis, 2.0.0, antirez@gmail.com) +AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6" +if test x"$CFLAGS" = x""; then + AM_CFLAGS="$AM_CFLAGS -O2" +else + AM_CFLAGS="$AM_CFLAGS $CFLAGS" +fi + +# options +AC_MSG_CHECKING([whether to build with debug information]) +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [enable debug data generation (def=no)])], + [debugit="$enableval"], + [debugit=no]) +AC_MSG_RESULT([$debugit]) + +if test x"$debugit" = x"yes"; then + AC_DEFINE([DEBUG],[],[Debug Mode]) + AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb" +else + AC_DEFINE([NDEBUG],[],[No-debug Mode]) +fi +AC_SUBST([AM_CFLAGS]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_STRCOLL +AC_FUNC_STRTOD +AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml index 6b981d795cd4..e9761ff00215 100644 --- a/dev-db/redis/metadata.xml +++ b/dev-db/redis/metadata.xml @@ -8,4 +8,10 @@ <maintainer> <email>lu_zero@gentoo.org</email> </maintainer> + <use> + <flag name="tcmalloc"> + Use the <pkg>dev-util/google-perftools</pkg> libraries to + replace the malloc() implementation with a possibly faster one. + </flag> + </use> </pkgmetadata> diff --git a/dev-db/redis/redis-1.2.6.ebuild b/dev-db/redis/redis-1.2.6.ebuild index 9e3315431cd6..bbc0b904981b 100644 --- a/dev-db/redis/redis-1.2.6.ebuild +++ b/dev-db/redis/redis-1.2.6.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# 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-1.2.6.ebuild,v 1.1 2010/05/17 21:32:23 lu_zero Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.6.ebuild,v 1.2 2011/01/26 02:25:32 robbat2 Exp $ EAPI=2 @@ -41,6 +41,7 @@ src_prepare() { -e 's: $(DEBUG)::g' \ -e 's:ARCH:GCC_ARCH_FLAG:g' \ -e 's:PROF:GCC_PROF_FLAG:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ Makefile.in \ || die "sed failed!" diff --git a/dev-db/redis/redis-2.2.0_rc4.ebuild b/dev-db/redis/redis-2.2.0_rc4.ebuild new file mode 100644 index 000000000000..a7d71d905a86 --- /dev/null +++ b/dev-db/redis/redis-2.2.0_rc4.ebuild @@ -0,0 +1,109 @@ +# Copyright 2010-2011 W-Mark Kubacki, Mao Pu +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-2.2.0_rc4.ebuild,v 1.1 2011/01/26 02:25:32 robbat2 Exp $ + +EAPI="2" +WANT_AUTOCONF="latest" + +inherit autotools eutils flag-o-matic + +DESCRIPTION="A persistent caching system, key-value and data structures database." +HOMEPAGE="http://code.google.com/p/redis/" +SRC_URI="http://redis.googlecode.com/files/${PN}-${PV/_/-}.tar.gz" +RESTRICT="primaryuri" + +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~x86-macos" +IUSE="tcmalloc" +SLOT="0" + +RDEPEND="" +DEPEND=">=sys-devel/autoconf-2.63 + tcmalloc? ( dev-util/google-perftools ) + ${RDEPEND}" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 || die "problem adding 'redis' group" + enewuser redis 75 -1 /var/lib/redis redis || die "problem adding 'redis' user" + # 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() + use tcmalloc && export EXTRA_EMAKE="${EXTRA_EMAKE} USE_TCMALLOC=yes" +} + +src_prepare() { + cd "${S}" + # 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: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_configure() { + if ! ( use x86 || use amd64 ); then + replace-flags "-Os" "-O2" + filter-flags -fomit-frame-pointer "-march=*" "-mtune=*" "-mcpu=*" + fi + econf ${myconf} || die "econf" +} + + +src_install() { + # configuration file rewrites + insinto /etc/ + doins redis.conf || ewarn "mysteriously the configuration file is missing" + dosed "s:daemonize no:daemonize yes:g" /etc/redis.conf + dosed "s:# bind:bind:g" /etc/redis.conf + dosed "s:dbfilename :dbfilename /var/lib/redis/:g" /etc/redis.conf + dosed "s:dir ./:dir /var/lib/redis/:g" /etc/redis.conf + dosed "s:loglevel debug:loglevel notice:g" /etc/redis.conf + dosed "s:logfile stdout:logfile /var/log/redis/redis.log:g" /etc/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 Changelog CONTRIBUTING COPYING README TODO + dodoc design-documents/* + docinto html + dodoc doc/* + + dobin src/redis-cli \ + || die "the redis command line client 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 + dodir /var/lib/redis + dodir /var/log/redis +} + +pkg_postinst() { + einfo "New features of Redis you want to consider enabling in redis.conf:" + einfo " * unix sockets (using this is highly recommended)" + einfo " * logging to syslog" + einfo " * VM aka redis' own swap mechanism" +} |