summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2024-06-03 07:33:07 +0200
committerHans de Graaff <graaff@gentoo.org>2024-06-03 07:54:58 +0200
commit119c5c1c6a5fdfe496c53d15286d71662a8e1340 (patch)
treebbb83aca6f83bb3e3157ac1d266c975d51ef3136 /dev-ruby/patron
parentsys-auth/fprintd: add 1.94.3 (diff)
downloadgentoo-119c5c1c6a5fdfe496c53d15286d71662a8e1340.tar.gz
gentoo-119c5c1c6a5fdfe496c53d15286d71662a8e1340.tar.bz2
gentoo-119c5c1c6a5fdfe496c53d15286d71662a8e1340.zip
dev-ruby/patron: backport fix for warning
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/patron')
-rw-r--r--dev-ruby/patron/files/patron-0.13.3-fix-warning.patch24
-rw-r--r--dev-ruby/patron/patron-0.13.3-r3.ebuild45
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-ruby/patron/files/patron-0.13.3-fix-warning.patch b/dev-ruby/patron/files/patron-0.13.3-fix-warning.patch
new file mode 100644
index 000000000000..ff33cdcc287a
--- /dev/null
+++ b/dev-ruby/patron/files/patron-0.13.3-fix-warning.patch
@@ -0,0 +1,24 @@
+From 2b84ba489fb28f474195d215be7cc6bed43c32bc Mon Sep 17 00:00:00 2001
+From: Olle Jonsson <olle.jonsson@gmail.com>
+Date: Thu, 2 Apr 2020 21:02:51 +0200
+Subject: [PATCH] Avoid warning `*' interpreted as argument prefix
+
+---
+ lib/patron/request.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/patron/request.rb b/lib/patron/request.rb
+index 9050ef2..3ac998a 100644
+--- a/lib/patron/request.rb
++++ b/lib/patron/request.rb
+@@ -34,8 +34,8 @@ def initialize
+ :low_speed_time, :low_speed_limit, :progress_callback
+ ]
+
+- attr_reader *READER_VARS
+- attr_writer *WRITER_VARS
++ attr_reader(*READER_VARS)
++ attr_writer(*WRITER_VARS)
+
+ # Set the type of authentication to use for this request.
+ #
diff --git a/dev-ruby/patron/patron-0.13.3-r3.ebuild b/dev-ruby/patron/patron-0.13.3-r3.ebuild
new file mode 100644
index 000000000000..d09e7a4912f3
--- /dev/null
+++ b/dev-ruby/patron/patron-0.13.3-r3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby31 ruby32 ruby33"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/patron/extconf.rb)
+RUBY_FAKEGEM_EXTENSION_DIR="lib/patron"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Patron is a Ruby HTTP client library based on libcurl"
+HOMEPAGE="https://github.com/toland/patron"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND+=" net-misc/curl"
+RDEPEND+=" net-misc/curl"
+
+PATCHES=( "${FILESDIR}/${P}-fix-warning.patch" )
+
+ruby_add_bdepend "test? ( dev-ruby/rack:2.2 www-servers/puma )"
+
+all_ruby_prepare() {
+ # Fix Rakefile
+ sed -i -e 's:rake/rdoctask:rdoc/task:' \
+ -e 's/README.txt/README.md/' \
+ -e '/bundler/I s:^:#:' \
+ -e '/extensiontask/ s:^:#:' \
+ -e '/ExtensionTask/,/^end/ s:^:#:' \
+ Rakefile || die
+
+ # Avoid specs with failures. We were not running any specs before.
+ rm spec/session_ssl_spec.rb spec/session_spec.rb spec/response_spec.rb || die
+
+ # Ensure a compatible rack version
+ sed -i -e '1igem "rack", "~> 2.2.0"' spec/spec_helper.rb || die
+}