summaryrefslogtreecommitdiff
path: root/dev-ruby/chunky_png
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-16 11:00:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-16 11:00:10 +0100
commit3c490942d0d98701d1c0971e60911fa6bd3ecb76 (patch)
treec7e992463fec552ae6483d7b81848aa185d3559f /dev-ruby/chunky_png
parentc748acf4192a1e08c9feb2d5f0004937a4869639 (diff)
gentoo auto-resync : 16:09:2023 - 11:00:10
Diffstat (limited to 'dev-ruby/chunky_png')
-rw-r--r--dev-ruby/chunky_png/Manifest2
-rw-r--r--dev-ruby/chunky_png/chunky_png-1.4.0-r1.ebuild39
-rw-r--r--dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch29
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-ruby/chunky_png/Manifest b/dev-ruby/chunky_png/Manifest
index ca45edf4eb8b..fb30a0dcbf6b 100644
--- a/dev-ruby/chunky_png/Manifest
+++ b/dev-ruby/chunky_png/Manifest
@@ -1,3 +1,5 @@
+AUX chunky_png-1.4.0-ruby32.patch 1203 BLAKE2B b54878ce596a0315af3f29f55bfb6be0520345d61d379ce3714df9b70f317a488e37f27b52a3dffbf6991f57c0a7168a395e3359ca5fae3c936b574fa8afef20 SHA512 93f2792ed822de4987a3ea2f1add859ec0688ff040a76813b34718193e5e0a3503c02c677bf5be24f602b1c83c3018ee847e7743ebe712fa7b7766503c652051
DIST chunky_png-1.4.0.gem 363008 BLAKE2B 3fc484985565f223127c43eb1d55137ee9b58fc5ab6f25256dd54efddb817a5ecf78b39754a042fd09b83493cbdfdf02d0b90d150ab90b084f01c9a98aba5a8e SHA512 1276ba527723af973ca00535baab0dd3be8185cfaa77efb28c3b1ef1e949312710a616ca55711923875e54cb9c92b38de71062d2ba68b2314c7b9ce7a9b50b11
+EBUILD chunky_png-1.4.0-r1.ebuild 787 BLAKE2B 8928524f3ae797a8e1d86bca428bada7c9ba93cb76ff462f8140b9c7d8f901910eb5a3ad604e24c2a004d95cda75573c7084fda481fc96a70c2a4c3f8b3415b1 SHA512 ac9fc9063f8b0517f1d109e3d183b967850e3d71d07bcbe9f04628a26bb883a9bdebc314f79a50a384007f258cbc5b8d4e911dda90eb6eaa371a77f194db77df
EBUILD chunky_png-1.4.0.ebuild 839 BLAKE2B d40a0dbfac1a3ec868edb985923500d32b2f1f768e3901423b838cb5be43535d11b85a8e5167ae404d939b735657982c511e9c629ca65a428e718ccc3e42a949 SHA512 d13c4cb56954b733e2528894bc875c2ab698184553228d8b1208d7dae9ce17b528d174b460c5e862d3fd151103df422bee5f08de61d120ef24d7dc264080f41b
MISC metadata.xml 331 BLAKE2B 78030accec1b3b4a9c5eabf988e8390ff8b29bcee78991a2c791e066b580185a2ec982ca3197e655a280ac4c6b1766e99b969c9d5264e7e24b0a84d3f162c09c SHA512 1b0a215b86d61a9cec307f008b7e154fa09e15b159c3d289a8842dd9ad5c2ba7c33ad28e8e2bc183d0ace9dff4776b4eaffbf0a708cdfb2bbb712bc8d69ea915
diff --git a/dev-ruby/chunky_png/chunky_png-1.4.0-r1.ebuild b/dev-ruby/chunky_png/chunky_png-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..baab3a035f56
--- /dev/null
+++ b/dev-ruby/chunky_png/chunky_png-1.4.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby31 ruby32"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR=""
+
+RUBY_FAKEGEM_EXTRADOC="BENCHMARKING.rdoc CHANGELOG.rdoc README.md"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+RUBY_FAKEGEM_GEMSPEC="chunky_png.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Pure Ruby library that can read and write PNG images"
+HOMEPAGE="https://github.com/wvanbergen/chunky_png"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}/${P}-ruby32.patch"
+)
+
+all_ruby_prepare() {
+ sed -i -e '/[bB]undler/s:^:#:' {spec,benchmarks}/*.rb || die
+ rm Gemfile* || die
+
+ # Avoid git dependency
+ sed -i -e '/s.files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
+}
diff --git a/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch b/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch
new file mode 100644
index 000000000000..75d08c9fc88d
--- /dev/null
+++ b/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch
@@ -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 = []