[rubygem-pkg-config] Fix test failure with new png

Mamoru Tasaka mtasaka at fedoraproject.org
Mon Jan 16 08:07:28 UTC 2012


commit a03b3229ca0b6463993afaa183dd30653852410f
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Mon Jan 16 17:07:18 2012 +0900

    Fix test failure with new png

 rubygem-pkg-config-1.1.2-newpng.patch |   11 +++++++++++
 rubygem-pkg-config.spec               |   15 ++++++---------
 2 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/rubygem-pkg-config-1.1.2-newpng.patch b/rubygem-pkg-config-1.1.2-newpng.patch
new file mode 100644
index 0000000..36e8702
--- /dev/null
+++ b/rubygem-pkg-config-1.1.2-newpng.patch
@@ -0,0 +1,11 @@
+--- pkg-config-1.1.2/test/test_pkg_config.rb.newpng	2012-01-16 15:00:37.434231454 +0900
++++ pkg-config-1.1.2/test/test_pkg_config.rb	2012-01-16 17:01:44.098540024 +0900
+@@ -46,7 +46,7 @@
+ 
+     @cairo_png.msvc_syntax = true
+     result = pkg_config("cairo-png", "--libs-only-l")
+-    msvc_result = result.gsub(/-l(cairo|png12)\b/, '\1.lib')
++    msvc_result = result.gsub(/-l(cairo|png1[0-9])\b/, '\1.lib')
+     assert_not_equal(msvc_result, result)
+     assert_equal(msvc_result, @cairo_png.libs_only_l)
+   end
diff --git a/rubygem-pkg-config.spec b/rubygem-pkg-config.spec
index 2254edf..05bee70 100644
--- a/rubygem-pkg-config.spec
+++ b/rubygem-pkg-config.spec
@@ -14,6 +14,7 @@ License:	LGPLv2+
 URL:		http://github.com/rcairo/pkg-config
 
 Source0:	http://rubygems.org/gems/%{gemname}-%{version}.gem
+Patch0:		rubygem-pkg-config-1.1.2-newpng.patch
 BuildRequires:	ruby(abi) = %{rubyabi}
 BuildRequires:	rubygems
 # For %%check
@@ -53,14 +54,7 @@ gem install \
 	%{SOURCE0}
 
 pushd .%{geminstdir}
-# Kill failing tests (for newer cairo)
-# http://github.com/rcairo/pkg-config/issues#issue/1
-%if 0
-sed -i \
-	-e '\@^  def test_requires_private$@,\@^  end at s|^\(.*\)$|#\1|' \
-	-e '\@^  def test_cflags$@,\@^  end at s|^\(.*\)$|#\1|' \
-	test/test_pkg_config.rb
-%endif
+%patch0 -p1
 popd
 
 find . -name \*.gem | xargs chmod 0644
@@ -103,8 +97,11 @@ ruby -Ilib -rubygems test/run-test.rb
 %{gemdir}/doc/%{gemname}-%{version}/
 
 %changelog
+* Sun Jan 16 2012 Mamoru Tasaka <mtasaka at fedoraproject.org>
+- Fix test failure with new png
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+- F-17: Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
 * Sun Jul 17 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.1.2-1
 - 1.1.2


More information about the scm-commits mailing list