commit:     a22a24aa2e298539af47be6c91aeca43b0b69f3f
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 10 19:39:14 2018 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Tue Apr 10 20:20:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a22a24aa

dev-ruby/redis: add 4.0.1

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-ruby/redis/Manifest                            |  1 +
 .../files/redis-4.0.1-local-redis-server.patch     | 40 ++++++++++++++++++++++
 dev-ruby/redis/redis-4.0.1.ebuild                  | 39 +++++++++++++++++++++
 3 files changed, 80 insertions(+)

diff --git a/dev-ruby/redis/Manifest b/dev-ruby/redis/Manifest
index ef33242ad60..6cc25c079ef 100644
--- a/dev-ruby/redis/Manifest
+++ b/dev-ruby/redis/Manifest
@@ -1 +1,2 @@
 DIST redis-rb-3.3.5.tar.gz 88500 BLAKE2B 
a06e0e08dba211edb6393dd85f7957e56ad928bbd3be105ddeb6ad4f2cfa1d354289ad67f3c8c27d5fd9f8560167708a6937e2950ae12ee0d42d3321940d1e85
 SHA512 
b79f535b6dff26ae2b0213dd77d53b952fd877ef5193c8bf0f6e5cd0da1934d79711bf611b839ce8b97d7cf145e7e912d2956087501a2f841d42775dc0105a0c
+DIST redis-rb-4.0.1.tar.gz 87859 BLAKE2B 
c53f9a4ae96195eeab9f8fd0eae1ec8bcfeee7b717faf5b85c127ff90a88fbf9a0cfcef9d4c002ef7ee07f12a8e813bfd3e4d284a616d8637029d51a6c067f34
 SHA512 
c377512e0103a1aadb4aef3e64983fd4b20a26d67320ff0c500b7617c8b3bd5b4ba2240488a7d55be1301bb0b926398835f5c242ae97afe9141b3499da358eb9

diff --git a/dev-ruby/redis/files/redis-4.0.1-local-redis-server.patch 
b/dev-ruby/redis/files/redis-4.0.1-local-redis-server.patch
new file mode 100644
index 00000000000..3bd1b03f494
--- /dev/null
+++ b/dev-ruby/redis/files/redis-4.0.1-local-redis-server.patch
@@ -0,0 +1,40 @@
+--- a/makefile.~1~     2017-09-28 18:11:35.000000000 +0200
++++ b/makefile 2018-04-10 20:45:58.307407705 +0200
+@@ -3,7 +3,7 @@
+-TMP          := tmp
++TMP          := ${T}
+ BUILD_DIR    := ${TMP}/redis-${REDIS_BRANCH}
+ TARBALL      := ${TMP}/redis-${REDIS_BRANCH}.tar.gz
+-BINARY       := ${BUILD_DIR}/src/redis-server
++BINARY       := /usr/sbin/redis-server
+-PID_PATH     := ${BUILD_DIR}/redis.pid
++PID_PATH     := ${TMP}/redis.pid
+-SOCKET_PATH  := ${BUILD_DIR}/redis.sock
++SOCKET_PATH  := ${TMP}/redis.sock
+ PORT         := 6381
+@@ -11,7 +11,7 @@
+ test: ${TEST_FILES}
+       make start
+       env SOCKET_PATH=${SOCKET_PATH} \
+-              ruby -v $$(echo $? | tr ' ' '\n' | awk '{ print "-r./" $$0 }') 
-e ''
++              ${RUBY} -v $$(echo $? | tr ' ' '\n' | awk '{ print "-r./" $$0 
}') -e ''
+       make stop
+ 
+ ${TMP}:
+@@ -20,11 +20,11 @@
+ ${TARBALL}: ${TMP}
+       wget https://github.com/antirez/redis/archive/${REDIS_BRANCH}.tar.gz -O 
$@
+ 
+-${BINARY}: ${TARBALL} ${TMP}
+-      rm -rf ${BUILD_DIR}
+-      mkdir -p ${BUILD_DIR}
+-      tar xf ${TARBALL} -C ${TMP}
+-      cd ${BUILD_DIR} && make
++# ${BINARY}: ${TARBALL} ${TMP}
++#     rm -rf ${BUILD_DIR}
++#     mkdir -p ${BUILD_DIR}
++#     tar xf ${TARBALL} -C ${TMP}
++#     cd ${BUILD_DIR} && make
+ 
+ stop:
+       (test -f ${PID_PATH} && (kill $$(cat ${PID_PATH}) || true) && rm -f 
${PID_PATH}) || true

diff --git a/dev-ruby/redis/redis-4.0.1.ebuild 
b/dev-ruby/redis/redis-4.0.1.ebuild
new file mode 100644
index 00000000000..e74cfcf17fb
--- /dev/null
+++ b/dev-ruby/redis/redis-4.0.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+USE_RUBY="ruby22 ruby23 ruby24 ruby25"
+
+MY_P="redis-rb-${PV}"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+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"
+IUSE="doc test"
+
+DEPEND="test? ( >=dev-db/redis-3.2.0 )"
+
+RUBY_S="${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-local-redis-server.patch" )
+
+all_ruby_prepare() {
+       # call me impatient, but this way we don't need netcat
+       sed -i \
+               -e '/test_subscribe_past_a_timeout/,+18d' \
+               test/publish_subscribe_test.rb || die "sed failed"
+}
+
+each_ruby_test() {
+       RUBY=${RUBY} emake test
+}

Reply via email to