diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2018-06-17 23:10:10 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2018-06-17 23:12:36 +0200 |
commit | 3e499a85adc09194818908fee15698924f54f7d3 (patch) | |
tree | 2464715d645fa03f085acafaed048f6dd8749b2c | |
parent | c552b81ac63dd4a200c381c2b62f1cfb3e8e91ba (diff) | |
download | gentoo-3e499a85adc09194818908fee15698924f54f7d3.tar.gz gentoo-3e499a85adc09194818908fee15698924f54f7d3.tar.xz |
dev-db/redis: bump to v3.2.12
Bug: https://bugs.gentoo.org/658066
Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r-- | dev-db/redis/Manifest | 1 | ||||
-rw-r--r-- | dev-db/redis/redis-3.2.12.ebuild | 131 |
2 files changed, 132 insertions, 0 deletions
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest index 7bf8281dc76..9b196838979 100644 --- a/dev-db/redis/Manifest +++ b/dev-db/redis/Manifest @@ -1,4 +1,5 @@ DIST redis-3.0.7.tar.gz 1375200 BLAKE2B 74088cb128e5d8e32427845b6bb267957b7df7ee091b1110260b26cc61649892bdb3ec79ae09fa4aca302c5708f26e3e05c6fb1e821ff468d982c274fa2792b4 SHA512 6c8f4c88d911e1433fd28efff2f6d62763e08be89814ebf4aa4e68e2c8bd605eba24ca3410548b2f480ae094437ce96c0bafa7a5762b3b405d5d850886297ba3 +DIST redis-3.2.12.tar.gz 1551468 BLAKE2B 85483de2588e4161521fe958225a53ab4357d0db83954c22f755d5d512e6e2126f9e7fdc1032353bd491353af3805c806b89546f886fe78fa5e5d2dc1446420b SHA512 eec64a17e331ac220ba425a495127b3873048dc2597a6508962469c0c99763deffcec97254915e2b1f3867eb556b917e8861baa9609c727d0abb254a90d87cdc DIST redis-3.2.5.tar.gz 1544040 BLAKE2B a67b46feacddcc7e4cafd91fb5d295a972f3a09db0a05b8a90bf8c89870f110c6c598ffe945475228caa37ccca7921f4981fe7002edc3689e833ecddc5c2032e SHA512 4ecf6277c8fdf4411223b9f5a5c8308829da9bd756b45de5217d469e9def8faad8c05b6348c06aef99eca9245d45abfd52df056c3c819723da66a2ca20c381dd DIST redis-3.2.8.tar.gz 1547237 BLAKE2B fb03e263ad7b135dff38e018d9b830c4992cf331efc7c23c10b087c47e597abedb52f259d4dd9a9ee1d661685157fc29a2022d74bc21d406bb10c9b7dfab8b7e SHA512 7334faf73af3644f7f9dcaddd322955d5df1e88a1640b509ae623f322615a20f6dc143eb57dd89ff3a278557df309ac4215c3fb458235682ce28e16c817068ba DIST redis-4.0.1.tar.gz 1711660 BLAKE2B 0b8881baa78908df4adcc1aabfa0ea9554900f8b54d204ffa054752ba4355da2b56408501ede81a69cc1f34ebbb9fc984335738ea9f343ddcd4e9fb9a0d64c8e SHA512 62dec537aebd12340b9642f5f8b07fd98757c9e648dcd539a0411f207db3495923c5a6a9941036c56b2d574ee38b46d08558668111e322345ef549f93fada26f diff --git a/dev-db/redis/redis-3.2.12.ebuild b/dev-db/redis/redis-3.2.12.ebuild new file mode 100644 index 00000000000..b5a7077ddff --- /dev/null +++ b/dev-db/redis/redis-3.2.12.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc luajit test" +SLOT="0" + +# Redis does NOT build with Lua 5.2 or newer at this time. +# This should link correctly with both unslotted & slotted Lua, without +# changes. +RDEPEND="luajit? ( dev-lang/luajit:2 ) + !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) ) + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.2.5-shared.patch \ + "${FILESDIR}"/${PN}-3.2.3-config.patch \ + "${FILESDIR}"/${PN}-3.2.3-sharedlua.patch + eapply_user + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # 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-3.2 configure.ac + + # Use the correct pkgconfig name for Lua + has_version 'dev-lang/lua:5.1' \ + && LUAPKGCONFIG=lua5.1 \ + || LUAPKGCONFIG=lua + sed -i \ + -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \ + -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \ + configure.ac || die "Sed failed for configure.ac" + eautoreconf +} + +src_configure() { + econf \ + $(use_with luajit) + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # geohash-int can't be built with -std=c99 either + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/geohash-int/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd-r1" redis + newinitd "${FILESDIR}/redis.initd-5" redis + + systemd_newunit "${FILESDIR}/redis.service-2" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb + fperms 0750 /usr/sbin/redis-benchmark + dosym redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} |