From 37cf2a8dbadd546a550aac7c8079c3f77427cb63 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 13 Apr 2023 05:42:42 +0100 Subject: gentoo auto-resync : 13:04:2023 - 05:42:42 --- dev-ruby/domain_name/Manifest | 2 + .../domain_name/domain_name-0.5.20190701-r2.ebuild | 50 ++++++++ .../files/domain_name-0.5.20190701-drop-unf.patch | 126 +++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 dev-ruby/domain_name/domain_name-0.5.20190701-r2.ebuild create mode 100644 dev-ruby/domain_name/files/domain_name-0.5.20190701-drop-unf.patch (limited to 'dev-ruby/domain_name') diff --git a/dev-ruby/domain_name/Manifest b/dev-ruby/domain_name/Manifest index a3b40a98353e..b10868017ef3 100644 --- a/dev-ruby/domain_name/Manifest +++ b/dev-ruby/domain_name/Manifest @@ -1,3 +1,5 @@ +AUX domain_name-0.5.20190701-drop-unf.patch 4407 BLAKE2B 909ae1d292cdbd8f9e418887599db4a7d1718c95aa6ca213e261ac9e8d6b39b5feac6b0ec6e8d03f4267ee7e96db7fc434799f384e797bb791ed0608a24624bb SHA512 a7a71b637e1c568ced768d48ea48cdd53ef18c1d9e86900f06461cd8f4cb741caf54e51c3212a92382b38cef188c2a859fc61c037052f4abd054990bd72ffa28 DIST domain_name-0.5.20190701.gem 131072 BLAKE2B 86ee60824d9480e71535312fb72c192f3d88326c72539b833132872ff15298842f09bac612e9c3d8b87a3ef6a60459b14e777105613fd76da79757d6a30abcbc SHA512 445f0e8a377bb700f8a3b926970f4351d28759e237947d6c755afff52726141c6b821b43b2a761d4d0d6237969304ef749404a5f383f69710b04803410dc70aa EBUILD domain_name-0.5.20190701-r1.ebuild 1103 BLAKE2B aec07a80672719a46d70517c40bbd6c43ca1d013ae2cc67b69f741c4edbc1f692d53bd168eca9a924816e9548c644e05cf929992af8ef795cb0fe754b2d0c791 SHA512 5850cc740a63290dafec9509603e278652568440b03d91bc54391eec8e30b966c2f385909667d8e7424e7f672e266f1117916833046d9ad56024b52ca9a745ad +EBUILD domain_name-0.5.20190701-r2.ebuild 1191 BLAKE2B f12502ca6ee25c922cb8024f9788f2fb2d2b099cc650590a634ad6186eb0a9d89ff37961312fdfb3b04acf2dd024d4f5ad13ae5c712ed74a2bd413a62ea64a8b SHA512 17e060842c574d81096bc14deba9376191416693af64c61a740012f9a8c943d196c15a15ea2db24eea3a30bd7eb1ae5228b04125094f5b984dc49d3da98e1213 MISC metadata.xml 347 BLAKE2B 3317da08cd7700ed10004bff1dbf71a979dfe0894bb39c67af80d0b83d5fe19fd0f8be96d855adfad6ee39e331c8d6600872dc9be3ce526d05065a1446b7f7ef SHA512 bb716928ee6cfc1b3e1c6e5d06b1271a728085b1556430014d47d0129881c6740c64f0c3f76835dc672d53eec1cfe6866d8400b32ce6879f610be00b76bfe534 diff --git a/dev-ruby/domain_name/domain_name-0.5.20190701-r2.ebuild b/dev-ruby/domain_name/domain_name-0.5.20190701-r2.ebuild new file mode 100644 index 000000000000..507e95cdd339 --- /dev/null +++ b/dev-ruby/domain_name/domain_name-0.5.20190701-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby27 ruby30 ruby31 ruby32" + +RUBY_FAKEGEM_RECIPE_TEST="none" +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="Domain Name manipulation library for Ruby" +HOMEPAGE="https://github.com/knu/ruby-domain_name" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris" +IUSE="test" + +ruby_add_bdepend " + test? ( + >=dev-ruby/test-unit-2.5.5 + dev-ruby/shoulda + )" + +PATCHES=( + # Pending upstream and conceptually acked, unf is obsolete + # with > ruby22. + "${FILESDIR}"/${PN}-0.5.20190701-drop-unf.patch +) + +all_ruby_prepare() { + sed -i -e '/bundler/,/end/ d' test/helper.rb || die + rm Gemfile* || die + + # Remove development dependencies + sed -i -e '/dependency.*\(shoulda\|bundler\|jeweler\|rdoc\)/d' \ + ${RUBY_FAKEGEM_GEMSPEC} || die + + # Avoid dependency on git. + sed -i -e 's/`git ls-files`/""/' ${RUBY_FAKEGEM_GEMSPEC} || die +} + +each_ruby_test() { + ruby-ng_testrb-2 -Ilib:test test/test_*.rb +} diff --git a/dev-ruby/domain_name/files/domain_name-0.5.20190701-drop-unf.patch b/dev-ruby/domain_name/files/domain_name-0.5.20190701-drop-unf.patch new file mode 100644 index 000000000000..d9b6c4df65a5 --- /dev/null +++ b/dev-ruby/domain_name/files/domain_name-0.5.20190701-drop-unf.patch @@ -0,0 +1,126 @@ +https://github.com/knu/ruby-domain_name/pull/11 +(see also https://github.com/knu/ruby-domain_name/pull/22) + +From 28db4ddb42adb827fc54935a6308bae03d7e8e6c Mon Sep 17 00:00:00 2001 +From: tayler1 +Date: Sat, 4 Feb 2017 18:20:07 +0300 +Subject: [PATCH 1/3] Removed unf dependency for ruby > 2.2 + +--- a/domain_name.gemspec ++++ b/domain_name.gemspec +@@ -28,7 +28,7 @@ Suffix List. + "README.md" + ] + +- gem.add_runtime_dependency("unf", ["< 1.0.0", ">= 0.0.5"]) ++ gem.add_runtime_dependency("unf", ["< 1.0.0", ">= 0.0.5"]) if RUBY_VERSION < "2.2" + gem.add_development_dependency("test-unit", "~> 2.5.5") + gem.add_development_dependency("bundler", [">= 1.2.0"]) + gem.add_development_dependency("rake", [">= 0.9.2.2", *("< 11" if RUBY_VERSION < "1.9")]) +--- a/lib/domain_name.rb ++++ b/lib/domain_name.rb +@@ -8,7 +8,7 @@ + require 'domain_name/version' + require 'domain_name/punycode' + require 'domain_name/etld_data' +-require 'unf' ++require 'unf' if RUBY_VERSION < '2.2' + require 'ipaddr' + + # Represents a domain name ready for extracting its registered domain +@@ -286,7 +286,11 @@ class << self + # Normalizes a _domain_ using the Punycode algorithm as necessary. + # The result will be a downcased, ASCII-only string. + def normalize(domain) +- DomainName::Punycode.encode_hostname(domain.chomp(DOT).to_nfc).downcase ++ if RUBY_VERSION >= '2.2' ++ DomainName::Punycode.encode_hostname(domain.chomp(DOT).unicode_normalize).downcase ++ else ++ DomainName::Punycode.encode_hostname(domain.chomp(DOT).to_nfc).downcase ++ end + end + end + end +--- a/test/test_domain_name-punycode.rb ++++ b/test/test_domain_name-punycode.rb +@@ -91,7 +91,12 @@ class TestDomainName < Test::Unit::TestCase + '-> $1.00 <--'] + ].each { |title, cps, punycode| + assert_equal punycode, DomainName::Punycode.encode(cps.pack('U*')), title +- assert_equal cps.pack('U*').to_nfc, DomainName::Punycode.decode(punycode), title ++ cps_norm = if RUBY_VERSION >= '2.2' ++ cps.pack('U*').unicode_normalize ++ else ++ cps.pack('U*').to_nfc ++ end ++ assert_equal cps_norm, DomainName::Punycode.decode(punycode), title + } + end + end + +From 9d2912428799cd860d96c24d51292f2b03e857e2 Mon Sep 17 00:00:00 2001 +From: tayler1 +Date: Mon, 6 Feb 2017 01:46:03 +0300 +Subject: [PATCH 2/3] fix + +--- a/lib/domain_name.rb ++++ b/lib/domain_name.rb +@@ -8,8 +8,12 @@ + require 'domain_name/version' + require 'domain_name/punycode' + require 'domain_name/etld_data' +-require 'unf' if RUBY_VERSION < '2.2' + require 'ipaddr' ++if RUBY_VERSION < '2.2' ++ require 'unf' ++else ++ require 'unicode_normalize/normalize' ++end + + # Represents a domain name ready for extracting its registered domain + # and TLD. +@@ -285,11 +289,15 @@ def inspect + class << self + # Normalizes a _domain_ using the Punycode algorithm as necessary. + # The result will be a downcased, ASCII-only string. +- def normalize(domain) +- if RUBY_VERSION >= '2.2' +- DomainName::Punycode.encode_hostname(domain.chomp(DOT).unicode_normalize).downcase +- else +- DomainName::Punycode.encode_hostname(domain.chomp(DOT).to_nfc).downcase ++ if RUBY_VERSION >= '2.2' ++ def normalize(domain) ++ domain.chomp!(DOT) ++ DomainName::Punycode.encode_hostname(domain.unicode_normalize).downcase ++ end ++ else ++ def normalize(domain) ++ domain.chomp!(DOT) ++ DomainName::Punycode.encode_hostname(domain.to_nfc).downcase + end + end + end + +From 6d76a14ba3b7c42d4fd3f4fab30c0099ffc51c2b Mon Sep 17 00:00:00 2001 +From: tayler1 +Date: Mon, 6 Feb 2017 02:35:55 +0300 +Subject: [PATCH 3/3] Fix frozen string + +--- a/lib/domain_name.rb ++++ b/lib/domain_name.rb +@@ -291,13 +291,11 @@ class << self + # The result will be a downcased, ASCII-only string. + if RUBY_VERSION >= '2.2' + def normalize(domain) +- domain.chomp!(DOT) +- DomainName::Punycode.encode_hostname(domain.unicode_normalize).downcase ++ DomainName::Punycode.encode_hostname(domain.chomp(DOT).unicode_normalize).downcase + end + else + def normalize(domain) +- domain.chomp!(DOT) +- DomainName::Punycode.encode_hostname(domain.to_nfc).downcase ++ DomainName::Punycode.encode_hostname(domain.chomp(DOT).to_nfc).downcase + end + end + end -- cgit v1.2.3