diff --git a/rubygem-nokogiri-1.3.3-optional_attr-test.patch b/rubygem-nokogiri-1.3.3-optional_attr-test.patch new file mode 100644 index 0000000..0d91520 --- /dev/null +++ b/rubygem-nokogiri-1.3.3-optional_attr-test.patch @@ -0,0 +1,14 @@ +--- test/html/test_element_description.rb.debug 2009-12-02 02:06:03.000000000 +0900 ++++ test/html/test_element_description.rb 2009-12-02 02:48:44.000000000 +0900 +@@ -66,7 +66,10 @@ + def test_optional_attributes + attrs = ElementDescription['table'].optional_attributes + assert attrs +- assert_equal 22, attrs.length ++ # Actually 23, not 22 (with libxml2 2.7.6). "22" was due to ++ # bug in libxml2 2.7.3 (GNOME bug 581803) ++ # Anyway no longer check this (as nokogiri 1.4.0 does not check this) ++ # assert_equal 22, attrs.length + end + + def test_deprecated_attributes diff --git a/rubygem-nokogiri.spec b/rubygem-nokogiri.spec index dc40a74..44e6295 100644 --- a/rubygem-nokogiri.spec +++ b/rubygem-nokogiri.spec @@ -18,6 +18,8 @@ Group: Development/Languages License: MIT URL: http://nokogiri.rubyforge.org/nokogiri/ Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem +# Not needed with nokogiri 1.4.0 +Patch0: rubygem-nokogiri-1.3.3-optional_attr-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby(abi) = %{rubyabi} @@ -71,6 +73,10 @@ gem install \ -V --force \ %{SOURCE0} +pushd .%{geminstdir} +%patch0 -p0 +popd + %build # cflags wrong (-O3 passed), recompiling pushd ./%{geminstdir} @@ -204,6 +210,7 @@ popd %changelog * Wed Dec 2 2009 Mamoru Tasaka - 1.3.3-3 - Rebuild against libxml2 again (bug 537303) +- And add patch to make test pass (related to GNOME bug 581803) * Sat Aug 22 2009 Mamoru Tasaka - 1.3.3-2 - Fix test failure on sparc