mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: ruby-chunky-png: Fix build with ruby@3.2.
* gnu/packages/ruby-xyz.scm (ruby-chunky-png)[source]: Record patch. * gnu/local.mk: Record patch. * gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch: Record patch. Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
01ad0cf43e
commit
4d1785dba3
3 changed files with 33 additions and 2 deletions
|
@ -2230,6 +2230,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/rottlog-direntry.patch \
|
%D%/packages/patches/rottlog-direntry.patch \
|
||||||
%D%/packages/patches/ruby-actionpack-remove-browser-tests.patch \
|
%D%/packages/patches/ruby-actionpack-remove-browser-tests.patch \
|
||||||
%D%/packages/patches/ruby-asciidoctor-pdf-support-prawn-svg-0_36.patch \
|
%D%/packages/patches/ruby-asciidoctor-pdf-support-prawn-svg-0_36.patch \
|
||||||
|
%D%/packages/patches/ruby-chunky-png-ruby-3-2-support.patch \
|
||||||
%D%/packages/patches/ruby-hiredis-use-system-hiredis.patch \
|
%D%/packages/patches/ruby-hiredis-use-system-hiredis.patch \
|
||||||
%D%/packages/patches/ruby-hydra-minimal-no-byebug.patch \
|
%D%/packages/patches/ruby-hydra-minimal-no-byebug.patch \
|
||||||
%D%/packages/patches/ruby-anystyle-data-immutable-install.patch \
|
%D%/packages/patches/ruby-anystyle-data-immutable-install.patch \
|
||||||
|
|
29
gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch
Normal file
29
gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
From 8e6f5934541833f15664398f90331f3724e40933 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||||
|
Date: Tue, 15 Nov 2022 23:22:20 +0900
|
||||||
|
Subject: [PATCH] ruby3_2 fix: check if object responds to regex_match op
|
||||||
|
|
||||||
|
Object#=~ is already deprecated since ruby2.6 and will be
|
||||||
|
removed from ruby3.2. As the result, Array no longer
|
||||||
|
respond to =~ from ruby3.2, for example.
|
||||||
|
|
||||||
|
Check if the target object really respond to =~ .
|
||||||
|
|
||||||
|
Closes #168
|
||||||
|
---
|
||||||
|
lib/chunky_png/vector.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/chunky_png/vector.rb b/lib/chunky_png/vector.rb
|
||||||
|
index 4ef965f..034104c 100644
|
||||||
|
--- a/lib/chunky_png/vector.rb
|
||||||
|
+++ b/lib/chunky_png/vector.rb
|
||||||
|
@@ -166,7 +166,7 @@ def dimension
|
||||||
|
# @return [Array<ChunkyPNG::Point>] The list of points interpreted from the input array.
|
||||||
|
def self.multiple_from_array(source)
|
||||||
|
return [] if source.empty?
|
||||||
|
- if source.first.is_a?(Numeric) || source.first =~ /^\d+$/
|
||||||
|
+ if source.first.is_a?(Numeric) || ( source.first.respond_to?(:=~) && source.first =~ /^\d+$/ )
|
||||||
|
raise ArgumentError, "The points array is expected to have an even number of items!" if source.length % 2 != 0
|
||||||
|
|
||||||
|
points = []
|
|
@ -1852,11 +1852,12 @@ to save time in the following ways:
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))))
|
(base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))
|
||||||
|
(patches
|
||||||
|
(search-patches "ruby-chunky-png-ruby-3-2-support.patch"))))
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:ruby ruby-3.1
|
|
||||||
#:test-target "spec"
|
#:test-target "spec"
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue