From patchwork Thu Jun 5 01:13:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43020 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5B01427BC4B; Thu, 5 Jun 2025 02:15:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C407927BC49 for ; Thu, 5 Jun 2025 02:15:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uMzBT-0005s5-HW; Wed, 04 Jun 2025 21:14:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uMzBR-0005rf-2w for guix-patches@gnu.org; Wed, 04 Jun 2025 21:14:17 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uMzBQ-0002oH-Ho for guix-patches@gnu.org; Wed, 04 Jun 2025 21:14:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=CO9mxIZV+Ssn3U8Un5Z/SDq1Tr+kKRZkF7x8oHwVwaA=; b=shoeLPyGj96dHSZOsn6SRM0Jo4qV3va9s6q07dpZ9zSc4LrKQU4XaKR1Oo+qyZciMEZJ4PBVhLhTR2JE/zObwPIGjGIcLMIZtjgMSVz7aBQX9Zc8OoEj11JfPh+ccBgDApD/Nkye7JtxWY1haX0tAAH5LJTAyL3K5alKJUj+jQGn3J7YWuDEtuan9nafmfLLG/bKUxGNY5KckVeyY1a3fTbS+zlUg4boGL1Xfxh2BRe0QeuFIJavNpcKhX45ZfkHQ91y9m/CO/FtdGP3VXaL8YTXe+SP3/kU7+7tDQE2BX44Tvo6KQ3hl1oIgdf6C2mRQMK30I8RD73omMomOlD/aQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uMzBQ-00046B-BD for guix-patches@gnu.org; Wed, 04 Jun 2025 21:14:16 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78683] [PATCH v2 7/7] gnu: ruby-chunky-png: Fix build with ruby@3.2. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jun 2025 01:14:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78683 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78683@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 78683-submit@debbugs.gnu.org id=B78683.174908603315497 (code B ref 78683); Thu, 05 Jun 2025 01:14:16 +0000 Received: (at 78683) by debbugs.gnu.org; 5 Jun 2025 01:13:53 +0000 Received: from localhost ([127.0.0.1]:55547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uMzB2-00041p-Qx for submit@debbugs.gnu.org; Wed, 04 Jun 2025 21:13:53 -0400 Received: from 4.mo562.mail-out.ovh.net ([46.105.38.146]:33463) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uMzAw-00040Z-FO for 78683@debbugs.gnu.org; Wed, 04 Jun 2025 21:13:48 -0400 Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net [79.137.60.37]) by mo562.mail-out.ovh.net (Postfix) with ESMTPS id 4bCRKh6bJXz1V71; Thu, 5 Jun 2025 01:13:44 +0000 (UTC) Received: from director4.derp.mail-out.ovh.net (director4.derp.mail-out.ovh.net. [127.0.0.1]) by director4.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78683@debbugs.gnu.org>; Thu, 5 Jun 2025 01:13:44 +0000 (UTC) Received: from mta3.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.108.9.224]) by director4.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4bCRKh5lLcz1xm7; Thu, 5 Jun 2025 01:13:44 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.1]) by mta3.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 5EE383A411A; Thu, 5 Jun 2025 01:13:44 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-107S0018deb43ff-1163-436d-bfbc-7d37077c6ac6, C36B30237806C0C453F6C2DD88149D0D3A6160D3) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.92.117.144 Date: Thu, 5 Jun 2025 03:13:26 +0200 Message-ID: <20250605011335.4842-7-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250605011335.4842-1-ngraves@ngraves.fr> References: <20250605011335.4842-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 17242031175109173986 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvleefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepueeikeejfeelkeeihefhteevieektdfhkeejkeekteeihffgtdehleehkeehlefgnecuffhomhgrihhnpehfihhrshhtrdhishenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeekieekfeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeivdgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=CO9mxIZV+Ssn3U8Un5Z/SDq1Tr+kKRZkF7x8oHwVwaA=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1749086024; v=1; b=KdxXRTBljLR2ee4NV+cD4NP2iW+HroOjjF8/O7GqIhrUmlEdw05CyNA1EqdnoylAx75esHZr f9PivEVbM/2Sut1R6aJL9InjiTurJX4yG8M7Y23OAecodwNMopQ3Ks+Ksu5Y1zbMlVPRBX2JEQc KnuD/Dv9Qpt72C1AtCtCsIm+yOLxTjNVK0p9TDAjzrB+soXzMNy+/W3EC+fqo5bq0FGXC5y9Xv/ wntuTn0PdpsUJmm7ZhxOodiYq8RrVw/Gh9ihLfnHrrtCTOOkxbqPSx0JU/1XyXI5aM61wFStH7x KARAbGzlHbjcbZOdCxZRl1BgV1hBorK/keoSiVwMEqPxw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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. --- gnu/local.mk | 1 + .../ruby-chunky-png-ruby-3-2-support.patch | 29 +++++++++++++++++++ gnu/packages/ruby-xyz.scm | 5 ++-- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch diff --git a/gnu/local.mk b/gnu/local.mk index f6d5af3e93..36a9fefa1f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2214,6 +2214,7 @@ dist_patch_DATA = \ %D%/packages/patches/rottlog-direntry.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-chunky-png-ruby-3-2-support.patch \ %D%/packages/patches/ruby-hiredis-use-system-hiredis.patch \ %D%/packages/patches/ruby-hydra-minimal-no-byebug.patch \ %D%/packages/patches/ruby-anystyle-data-immutable-install.patch \ diff --git a/gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch b/gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch new file mode 100644 index 0000000000..75d08c9fc8 --- /dev/null +++ b/gnu/packages/patches/ruby-chunky-png-ruby-3-2-support.patch @@ -0,0 +1,29 @@ +From 8e6f5934541833f15664398f90331f3724e40933 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +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] 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 = [] diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm index db81f7ef4d..7697a55858 100644 --- a/gnu/packages/ruby-xyz.scm +++ b/gnu/packages/ruby-xyz.scm @@ -1852,11 +1852,12 @@ (define-public ruby-chunky-png (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901")))) + (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901")) + (patches + (search-patches "ruby-chunky-png-ruby-3-2-support.patch")))) (build-system ruby-build-system) (arguments (list - #:ruby ruby-3.1 #:test-target "spec" #:phases #~(modify-phases %standard-phases