From 3c490942d0d98701d1c0971e60911fa6bd3ecb76 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 16 Sep 2023 11:00:10 +0100 Subject: gentoo auto-resync : 16:09:2023 - 11:00:10 --- dev-ruby/mechanize/Manifest | 4 +- .../files/mechanize-2.9.1-libxml2-1.patch | 64 ++++++++++++++++++++++ .../files/mechanize-2.9.1-libxml2-2.patch | 34 ++++++++++++ dev-ruby/mechanize/mechanize-2.9.1.ebuild | 7 ++- 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-1.patch create mode 100644 dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-2.patch (limited to 'dev-ruby/mechanize') diff --git a/dev-ruby/mechanize/Manifest b/dev-ruby/mechanize/Manifest index 5c48cb20e4b6..852fc8afb1b7 100644 --- a/dev-ruby/mechanize/Manifest +++ b/dev-ruby/mechanize/Manifest @@ -1,3 +1,5 @@ +AUX mechanize-2.9.1-libxml2-1.patch 2182 BLAKE2B 1b087ba7e2eac784bf3e0396b78d0160282da51a26a03b230c60ecf9c61663e24c60bc33feba391f5ed88ee422a3eff6556a32a9307bf5c190b6d32344684d5e SHA512 af7f4d96a631650b8029f2a2cd6518e166accbaacf45671ecaeb20e8b403199072cc8b7fadb222d7b9dffccfb19857e54180da7216ec89cbeae49718c7013798 +AUX mechanize-2.9.1-libxml2-2.patch 1443 BLAKE2B b993c60071ab9a32555417c12263eaee87ed238125d552c9b8c5d679796701714b0beddf8b6e8d44c979354235e1d56ff9d88c8f4a1aae018806c110eb916c01 SHA512 8721e6628e643544af79feea00aa51f7b165986c3770411c622f650c1ce218a3e6c7194bac66021427de6fa38f3979986acdaa6fe83c7da1a0af4aafd2af1129 DIST mechanize-2.9.1.gem 143872 BLAKE2B 0e5d9f8e2f6eadf8de1f252518646b58117e1151be595edb5827a69b1bc83ce063690fe41ea3ec38a66565d44cb46141e4a0b34c878308c69dbc1249304d6f0a SHA512 6525cf8ea31c36fb20f5d83bebdb647942f24ddee979a832343ea964de11e31421e4f68943c1b15c9bb519b9b11cda9ab2a1c10ceca412e1854b5b20dda7ac78 -EBUILD mechanize-2.9.1.ebuild 1081 BLAKE2B ca7af86fa0d6376189a4ce3979469054077d6af8d458ba3fa94ae832e81f543dfbf861f6330e315f54b0451469ab1473c97e5d53ab4726268f909192bb3e6a9c SHA512 81520bbe8272dfbc16952455c1064abbe1f74f6008654c7f991c406a10a7f1faa258f10db8f2c4c704c031d9d301c4a8c3290bc1efaae2556be74ff25a608e5e +EBUILD mechanize-2.9.1.ebuild 1173 BLAKE2B 0c7a82a8a939b4dca6b847d6cfb7704e4892b9c813b9ea3b1b9bbc7cc41e45fedf04d67ae0c41cb1f4adac289ce338631f3cae09bbd453f547472af237c9845c SHA512 298529e8cf6b93052e7e586282e671119e38df0428cdc63e9344c9c3554432fdc34d60e8cc3a71bbd7b21ab4c0eb4aa69a511813b45ee1d9eb0ca38ff294c69b MISC metadata.xml 350 BLAKE2B 021ec7067e4b814b603126e68d4985450e443ad8953b45a8a5c3f28168edd0439456d96de71f8964f5002035eda5eca61d36b3aa527d4aac4c9f946f4a0bf8cc SHA512 b0971ce005597330094359747a6825c89e76f6d4c3ffce0a02f3b4c4f17be3fb9d2472ac12e3f9630b61016414bd8ead74dd3a955cb99365aaa6a54d27430ea0 diff --git a/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-1.patch b/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-1.patch new file mode 100644 index 000000000000..e2b72f2d8adf --- /dev/null +++ b/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-1.patch @@ -0,0 +1,64 @@ +From 762df0c71705d1c054aca4abd95a638774a47242 Mon Sep 17 00:00:00 2001 +From: Mike Dalessio +Date: Wed, 7 Jun 2023 10:30:37 -0400 +Subject: [PATCH] test: work around libxml2 encoding changes + +versions 2.11.0..2.11.4 do not recover from encoding errors. upcoming +release will change the encoding of the resulting doc as a result of +recovery changes in libxml2. + +See https://gitlab.gnome.org/GNOME/libxml2/-/issues/543 for more +context. +--- + test/test_mechanize_page_link.rb | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/test/test_mechanize_page_link.rb b/test/test_mechanize_page_link.rb +index 5e77dcc0..988328cc 100644 +--- a/test/test_mechanize_page_link.rb ++++ b/test/test_mechanize_page_link.rb +@@ -1,5 +1,7 @@ + # coding: utf-8 + ++puts "Nokogiri::VERSION_INFO: #{Nokogiri::VERSION_INFO}" ++ + require 'mechanize/test_case' + + class TestMechanizePageLink < Mechanize::TestCase +@@ -111,11 +113,15 @@ def test_encoding_charset_after_title + def test_encoding_charset_after_title_bad + skip_if_nkf_dependency + ++ # https://gitlab.gnome.org/GNOME/libxml2/-/issues/543 ++ skip if Nokogiri.uses_libxml?([">= 2.11.0", "<= 2.11.4"]) ++ expected_encoding = Nokogiri.uses_libxml?("< 2.11.0") ? 'UTF-8' : 'Shift_JIS' ++ + page = util_page UTF8 + + assert_equal false, page.encoding_error? + +- assert_equal 'UTF-8', page.encoding ++ assert_equal expected_encoding, page.encoding + end + + def test_encoding_charset_after_title_double_bad +@@ -131,6 +137,10 @@ def test_encoding_charset_after_title_double_bad + def test_encoding_charset_bad + skip_if_nkf_dependency + ++ # https://gitlab.gnome.org/GNOME/libxml2/-/issues/543 ++ skip if Nokogiri.uses_libxml?([">= 2.11.0", "<= 2.11.4"]) ++ expected_encoding = Nokogiri.uses_libxml?("< 2.11.0") ? 'UTF-8' : 'Shift_JIS' ++ + page = util_page "#{UTF8_TITLE}" + page.encodings.replace %w[ + UTF-8 +@@ -139,7 +149,7 @@ def test_encoding_charset_bad + + assert_equal false, page.encoding_error? + +- assert_equal 'UTF-8', page.encoding ++ assert_equal expected_encoding, page.encoding + end + + def test_encoding_meta_charset diff --git a/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-2.patch b/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-2.patch new file mode 100644 index 000000000000..3fcd8a270b16 --- /dev/null +++ b/dev-ruby/mechanize/files/mechanize-2.9.1-libxml2-2.patch @@ -0,0 +1,34 @@ +From 0ba09f46be6f1ce4adb94baca9867ed769f6535a Mon Sep 17 00:00:00 2001 +From: Mike Dalessio +Date: Fri, 11 Aug 2023 09:29:06 -0400 +Subject: [PATCH] test: work around libxml2 encoding changes + +Related to 762df0c7, we're seeing the upstream fixes did not ship in +v2.11.5 so let's change the version test to assume it won't land until +v2.12.0. +--- + test/test_mechanize_page_link.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/test_mechanize_page_link.rb b/test/test_mechanize_page_link.rb +index 988328cc..04294420 100644 +--- a/test/test_mechanize_page_link.rb ++++ b/test/test_mechanize_page_link.rb +@@ -114,7 +114,7 @@ def test_encoding_charset_after_title_bad + skip_if_nkf_dependency + + # https://gitlab.gnome.org/GNOME/libxml2/-/issues/543 +- skip if Nokogiri.uses_libxml?([">= 2.11.0", "<= 2.11.4"]) ++ skip if Nokogiri.uses_libxml?([">= 2.11.0", "< 2.12.0"]) + expected_encoding = Nokogiri.uses_libxml?("< 2.11.0") ? 'UTF-8' : 'Shift_JIS' + + page = util_page UTF8 +@@ -138,7 +138,7 @@ def test_encoding_charset_bad + skip_if_nkf_dependency + + # https://gitlab.gnome.org/GNOME/libxml2/-/issues/543 +- skip if Nokogiri.uses_libxml?([">= 2.11.0", "<= 2.11.4"]) ++ skip if Nokogiri.uses_libxml?([">= 2.11.0", "< 2.12.0"]) + expected_encoding = Nokogiri.uses_libxml?("< 2.11.0") ? 'UTF-8' : 'Shift_JIS' + + page = util_page "#{UTF8_TITLE}" diff --git a/dev-ruby/mechanize/mechanize-2.9.1.ebuild b/dev-ruby/mechanize/mechanize-2.9.1.ebuild index 0a58835b24b7..2c486d5111b9 100644 --- a/dev-ruby/mechanize/mechanize-2.9.1.ebuild +++ b/dev-ruby/mechanize/mechanize-2.9.1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -USE_RUBY="ruby30 ruby31" +USE_RUBY="ruby30 ruby31 ruby32" RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md EXAMPLES.rdoc GUIDE.rdoc README.md" @@ -17,6 +17,11 @@ SLOT="0" KEYWORDS="amd64 ~ppc64 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="" +PATCHES=( + "${FILESDIR}/${P}-libxml2-1.patch" + "${FILESDIR}/${P}-libxml2-2.patch" +) + ruby_add_bdepend ">=dev-ruby/hoe-3.7 test? ( dev-ruby/minitest:5 )" -- cgit v1.2.3