summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2018-04-21 08:09:15 +0200
committerHans de Graaff <graaff@gentoo.org>2018-04-21 08:09:15 +0200
commit4cbccad2d34b3b98e10988240656f353d53b0153 (patch)
treee5bfcea3f63317dcdef08f1d5704e352acb1dfbb /dev-ruby/hiredis
parentdev-ruby/certificate_authority: cleanup (diff)
downloadgentoo-4cbccad2d34b3b98e10988240656f353d53b0153.tar.gz
gentoo-4cbccad2d34b3b98e10988240656f353d53b0153.tar.bz2
gentoo-4cbccad2d34b3b98e10988240656f353d53b0153.zip
dev-ruby/hiredis: initial import of 0.6.1
New test dependency for dev-ruby/activesupport:5.2 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-ruby/hiredis')
-rw-r--r--dev-ruby/hiredis/Manifest1
-rw-r--r--dev-ruby/hiredis/files/hiredis-0.6.1-unvendor-hiredis.patch20
-rw-r--r--dev-ruby/hiredis/hiredis-0.6.1.ebuild42
-rw-r--r--dev-ruby/hiredis/metadata.xml11
4 files changed, 74 insertions, 0 deletions
diff --git a/dev-ruby/hiredis/Manifest b/dev-ruby/hiredis/Manifest
new file mode 100644
index 000000000000..1c36e96a68d6
--- /dev/null
+++ b/dev-ruby/hiredis/Manifest
@@ -0,0 +1 @@
+DIST hiredis-rb-0.6.1.tar.gz 18843 BLAKE2B 56edb460d39018730f43aeb443b6a9d81e2573ebbb6c3149a18db836c8ef5fc8ceceaa768b1a7157280f3e2fd1ed117a76cc6d06c13e326fd45b8bd4efccb24a SHA512 23107d68501c244ec2669448aa919a612be182b559f28a715a4e3a91a894332105ae3a5c96652a691f01e49c88772a482f0da11b80bbb443fa0146bbf77cc722
diff --git a/dev-ruby/hiredis/files/hiredis-0.6.1-unvendor-hiredis.patch b/dev-ruby/hiredis/files/hiredis-0.6.1-unvendor-hiredis.patch
new file mode 100644
index 000000000000..e8fb1f9ffa62
--- /dev/null
+++ b/dev-ruby/hiredis/files/hiredis-0.6.1-unvendor-hiredis.patch
@@ -0,0 +1,20 @@
+--- a/ext/hiredis_ext/extconf.rb 2015-12-29 15:53:00.000000000 +0100
++++ b/ext/hiredis_ext/extconf.rb 2018-04-21 07:40:15.973747727 +0200
+@@ -27,15 +27,8 @@
+ end
+
+ if build_hiredis
+- # Make sure hiredis is built...
+- Dir.chdir(hiredis_dir) do
+- success = system("#{make_program} static")
+- raise "Building hiredis failed" if !success
+- end
+-
+- # Statically link to hiredis (mkmf can't do this for us)
+- $CFLAGS << " -I#{hiredis_dir}"
+- $LDFLAGS << " #{hiredis_dir}/libhiredis.a"
++ $CFLAGS << ' ' << `pkg-config hiredis --cflags-only-I`.chomp
++ $LDFLAGS << ' -lhiredis'
+
+ have_func("rb_thread_fd_select")
+ create_makefile('hiredis/ext/hiredis_ext')
diff --git a/dev-ruby/hiredis/hiredis-0.6.1.ebuild b/dev-ruby/hiredis/hiredis-0.6.1.ebuild
new file mode 100644
index 000000000000..629b022d9658
--- /dev/null
+++ b/dev-ruby/hiredis/hiredis-0.6.1.ebuild
@@ -0,0 +1,42 @@
+# 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="hiredis-rb-${PV}"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Wrapper for hiredis (protocol serialization/deserialization and blocking I/O)"
+HOMEPAGE="https://github.com/redis/hiredis-rb"
+SRC_URI="https://github.com/redis/hiredis-rb/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND+=" dev-libs/hiredis:="
+DEPEND+=" dev-libs/hiredis test? ( dev-ruby/test-unit:2 )"
+
+RUBY_S="${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-unvendor-hiredis.patch" )
+
+each_ruby_configure() {
+ CC=$(tc-getCC) ${RUBY} -Cext/hiredis_ext extconf.rb || die
+}
+
+each_ruby_compile() {
+ emake V=1 -Cext/hiredis_ext
+ cp ext/hiredis_ext/hiredis_ext.so lib/hiredis/ext/ || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:. -e 'Dir["test/*_test.rb"].each{|f| require f}' || die
+}
diff --git a/dev-ruby/hiredis/metadata.xml b/dev-ruby/hiredis/metadata.xml
new file mode 100644
index 000000000000..b87d27bfe864
--- /dev/null
+++ b/dev-ruby/hiredis/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">redis/hiredis-rb</remote-id>
+ </upstream>
+</pkgmetadata>