summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vaněk <arkamar@atlas.cz>2022-09-27 11:30:55 +0200
committerSam James <sam@gentoo.org>2022-12-24 07:55:09 +0000
commit17e0ff94fe702e5c6d657bfe8b987673098c39cd (patch)
tree2b2b8e1e117b7e20e6c49e08321a8d265b215211
parentx11-wm/qtile: add 0.22.1, 9999 (diff)
downloadgentoo-17e0ff94fe702e5c6d657bfe8b987673098c39cd.tar.gz
gentoo-17e0ff94fe702e5c6d657bfe8b987673098c39cd.tar.bz2
gentoo-17e0ff94fe702e5c6d657bfe8b987673098c39cd.zip
dev-ruby/redis: add 4.8.0
- local redis server patch was adapted from previous version (4.7.1) - dropping ruby26, it is no longer in the tree - tests require >=dev-db/redis-7; they fail immediately with dev-db/redis-6.2.7 - it was necessary to tweak one sed because test file was moved to different directory. Bug: https://bugs.gentoo.org/873091 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/27494 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-ruby/redis/Manifest1
-rw-r--r--dev-ruby/redis/files/redis-4.8.0-local-redis-server.patch49
-rw-r--r--dev-ruby/redis/redis-4.8.0.ebuild50
3 files changed, 100 insertions, 0 deletions
diff --git a/dev-ruby/redis/Manifest b/dev-ruby/redis/Manifest
index 36f297fa7819..3cdf9cfc7b94 100644
--- a/dev-ruby/redis/Manifest
+++ b/dev-ruby/redis/Manifest
@@ -1 +1,2 @@
DIST redis-rb-4.7.1.tar.gz 142130 BLAKE2B 12c9bdafe32e80e2c8f515a437f44a3673381ee6257bf4eb95395e7229134e54706a1c7eefa880397e3b2a10cce6c70856b30108f1c941fc9ee6307989ba4be1 SHA512 33aba308a501593b9d442f346d5654a734a889a45ee581092684b9aba5eccfd4efb790c8dcbb73a83e626b8b2da07d2a4535d698fd2d2696efb217ac522ccd89
+DIST redis-rb-4.8.0.tar.gz 143136 BLAKE2B 6d70985d5e2a749b931e5bf1f74f04d1e748a9b65cc1b1e644d9ecfa633978bef9c6418308425b6996779ff65fbbb66cacbf464cdf6d00e2736b20089aa0889c SHA512 e9d454d0416091d0c5629b6ed826e70879ea2f93501bae7db19570bfbf4bdae2ed36b357390afcfca427531d997acc7f5ae004d55d0e87ddb67c909db2b181d5
diff --git a/dev-ruby/redis/files/redis-4.8.0-local-redis-server.patch b/dev-ruby/redis/files/redis-4.8.0-local-redis-server.patch
new file mode 100644
index 000000000000..faf382ac5aee
--- /dev/null
+++ b/dev-ruby/redis/files/redis-4.8.0-local-redis-server.patch
@@ -0,0 +1,49 @@
+Gentoo specific patch adapted from redis-4.7.1-local-redis-server.patch
+
+diff --git a/makefile b/makefile
+index df25e4b..57bc941 100644
+--- a/makefile
++++ b/makefile
+@@ -1,18 +1,17 @@
+ REDIS_BRANCH ?= 7.0
+ ROOT_DIR :=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
+-TMP := tmp
+ CONF := ${ROOT_DIR}/test/support/conf/redis-${REDIS_BRANCH}.conf
+ BUILD_DIR := ${TMP}/cache/redis-${REDIS_BRANCH}
+ TARBALL := ${TMP}/redis-${REDIS_BRANCH}.tar.gz
+-BINARY := ${BUILD_DIR}/src/redis-server
+-REDIS_CLIENT := ${BUILD_DIR}/src/redis-cli
++BINARY := /usr/sbin/redis-server
++REDIS_CLIENT := /usr/bin/redis-cli
+ REDIS_TRIB := ${BUILD_DIR}/src/redis-trib.rb
+-PID_PATH := ${BUILD_DIR}/redis.pid
++PID_PATH := ${TMP}/redis.pid
+ SOCKET_PATH := ${TMP}/redis.sock
+ PORT := 6381
+ SLAVE_PORT := 6382
+-SLAVE_PID_PATH := ${BUILD_DIR}/redis_slave.pid
+-SLAVE_SOCKET_PATH := ${BUILD_DIR}/redis_slave.sock
++SLAVE_PID_PATH := ${TMP}/redis_slave.pid
++SLAVE_SOCKET_PATH := ${TMP}/redis_slave.sock
+ HA_GROUP_NAME := master1
+ SENTINEL_PORTS := 6400 6401 6402
+ SENTINEL_PID_PATHS := $(addprefix ${TMP}/redis,$(addsuffix .pid,${SENTINEL_PORTS}))
+@@ -31,14 +30,8 @@ start_all: start start_slave start_sentinel wait_for_sentinel start_cluster crea
+
+ stop_all: stop_sentinel stop_slave stop stop_cluster
+
+-${TMP}:
+- @mkdir -p $@
+-
+-${BINARY}: ${TMP}
+- @bin/build ${REDIS_BRANCH} $<
+-
+ test:
+- @env REDIS_SOCKET_PATH=${SOCKET_PATH} bundle exec rake test
++ @env REDIS_SOCKET_PATH=${SOCKET_PATH} ${RUBY} -S rake test
+
+ stop:
+ @$(call kill-redis,${PID_PATH});\
+--
+2.35.1
+
diff --git a/dev-ruby/redis/redis-4.8.0.ebuild b/dev-ruby/redis/redis-4.8.0.ebuild
new file mode 100644
index 000000000000..b96872982fca
--- /dev/null
+++ b/dev-ruby/redis/redis-4.8.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30 ruby31"
+
+MY_P="redis-rb-${PV}"
+
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+RUBY_FAKEGEM_GEMSPEC="redis.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Ruby client library for Redis"
+HOMEPAGE="https://github.com/redis/redis-rb"
+SRC_URI="https://github.com/redis/redis-rb/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="4"
+KEYWORDS="~amd64 ~arm64"
+IUSE="doc test"
+
+DEPEND="test? ( >=dev-db/redis-7 )"
+
+RUBY_S="${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PN}-4.8.0-local-redis-server.patch" )
+
+ruby_add_bdepend "test? (
+ dev-ruby/minitest
+ dev-ruby/mocha
+)"
+
+all_ruby_prepare() {
+ sed -i -e 's/git ls-files --/echo/' ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ sed -i -e '/test_connection_timeout/askip "requires network"' test/redis/internals_test.rb || die
+
+ sed -i -e '/bundler/ s:^:#:' Rakefile || die
+}
+
+each_ruby_test() {
+ RUBY=${RUBY} TMP=${T} MT_NO_PLUGINS=true VERBOSE=true emake -j1 all
+ einfo "Wait 5 seconds for servers to stop"
+ sleep 5
+}