From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1062350-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4A783138334
	for <garchives@archives.gentoo.org>; Sat, 15 Dec 2018 07:06:37 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5BD57E0B42;
	Sat, 15 Dec 2018 07:06:36 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 16590E0B34
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Dec 2018 07:06:35 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 226C9335C39
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Dec 2018 07:06:33 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id F08C144B
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Dec 2018 07:06:30 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1544855953.b2a56b6758eabb3b1647c9a39afcd26a305a1c2b.robbat2@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-db/redis/Manifest dev-db/redis/redis-4.0.12.ebuild
X-VCS-Directories: dev-db/redis/
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: b2a56b6758eabb3b1647c9a39afcd26a305a1c2b
X-VCS-Branch: master
Date: Sat, 15 Dec 2018 07:06:30 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b81d3c8e-9501-4209-adae-9ab4f348885f
X-Archives-Hash: baab5f4c676d6e587460b9b45da7c629

commit:     b2a56b6758eabb3b1647c9a39afcd26a305a1c2b
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Fri Dec 14 11:53:33 2018 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Dec 15 06:39:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2a56b67

dev-db/redis: bump to 4.0.12

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
(cherry picked from commit d3b89cdc97bf83a15269ac2478c576e21f17f181)
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/10482

 dev-db/redis/Manifest            |   1 +
 dev-db/redis/redis-4.0.12.ebuild | 141 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 142 insertions(+)

diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
index af58c44c72f..14844ad7670 100644
--- a/dev-db/redis/Manifest
+++ b/dev-db/redis/Manifest
@@ -1,4 +1,5 @@
 DIST redis-4.0.10.tar.gz 1738465 BLAKE2B 572cbb3d2d5d7209f81ebd53ee68f40b404d0e4623bd1864845bf1f47135d4e097a6974d346ffd845d848c39ace6d3fb9f1a347e0c9d16d06d22aed7a8b3ae7b SHA512 0978dabaf637e61889d492fd3629acd58ca8fb0c0088cdd7036ffd1a7ed3f018c107039d4c96bd61d0b7d35757df2366d051f57d77ffb5642aca0e5651b30603
 DIST redis-4.0.11.tar.gz 1739656 BLAKE2B d94f380ad1600e58942cc5b27b512984396cdbb06ea6e947c7d7ce5b8ecdb8a2a56c6356af2caa82a96887a610716c9575b78eb2f46da89efb940febc1c30f22 SHA512 f0054af9ca2143731a397b2b21285387707b7f40d9326ba15225feb1a2ff470fab5194308342f63bbe1081f84c7e9ef19543c5a8e3eae49e17bfc515c64201f0
+DIST redis-4.0.12.tar.gz 1740544 BLAKE2B 620dba8b81fc76a46880c3a4a7ee9d9835e7b19e6d321598a717892f6f03fa805db79847442744a2af8f77ae403b6e1df02299da9a0835f6092a74e3804dde48 SHA512 d19020f7ebed9ad5d04c6e1cb7e2a49dd1e226fe17d86e860df11bcb798c61c09f6f9fc3572a7ee32232ac34ec5eb1d6189f8139b5991bd87297c5243c3b54d2
 DIST redis-4.0.2.tar.gz 1713990 BLAKE2B 307ab76b336f7520e14a23a1577c46e1b63cc5a5a5b6afb725cb87934fbcb62107085671fd1072d1142ce8e92f069e6b6064c9f4468335bc6997897c8f494471 SHA512 1458909c6fc16cff8ca5e6dddff23b988ee1e447f2d0bccf5941553b22bab6abb851732b3fe53dafb8a69d6c0939c3ce7e0686d51e03be720fb018c038d3b1b4
 DIST redis-5.0.1.tar.gz 1951542 BLAKE2B 6081acf2ed6af5a5790ad3164fa0008f934360c8b2b88794a60593dd954a0104b38b826f3de92add609b803c87c80266d1494c47e879c797525bb4a6f1a095fc SHA512 eb0f10903a8e87c0ca33597060b611a11c42576c64dd6d648b59cd9007d4ee6fe7c3762daf428c2d19ab05576a4b44dc3663fe1267c60acca58eeb2bba709e58

diff --git a/dev-db/redis/redis-4.0.12.ebuild b/dev-db/redis/redis-4.0.12.ebuild
new file mode 100644
index 00000000000..596754bc3a0
--- /dev/null
+++ b/dev-db/redis/redis-4.0.12.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Authors
+# 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="https://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="
+	${RDEPEND}
+	virtual/pkgconfig
+	>=sys-devel/autoconf-2.63
+	test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+S="${WORKDIR}/${PN}-${PV/_/-}"
+
+pkg_setup() {
+	enewgroup redis 75
+	enewuser redis 75 -1 /var/lib/redis redis
+}
+
+src_prepare() {
+	eapply \
+		"${FILESDIR}"/${PN}-3.2.3-config.patch \
+		"${FILESDIR}"/${PN}-4.0.1-shared.patch \
+		"${FILESDIR}"/${PN}-4.0.1-sharedlua.patch \
+		"${FILESDIR}"/${PN}-sentinel-4.0.6-config.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="" MKF
+	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 || die
+
+	# 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
+	# also, don't define ANSI/c99 for lua twice
+	sed -i -e "s:-std=c99::g" deps/linenoise/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
+
+	newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+	newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+	insinto /etc/logrotate.d/
+	newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+	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
+}