commit:     119c5c1c6a5fdfe496c53d15286d71662a8e1340
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  3 05:33:07 2024 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Mon Jun  3 05:54:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=119c5c1c

dev-ruby/patron: backport fix for warning

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 .../patron/files/patron-0.13.3-fix-warning.patch   | 24 ++++++++++++
 dev-ruby/patron/patron-0.13.3-r3.ebuild            | 45 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)

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 <[email protected]>
+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
+}

Reply via email to