[ruby-cairo/f14/master] - Update to 1.8.5

Mamoru Tasaka mtasaka at fedoraproject.org
Thu Sep 2 10:04:17 UTC 2010


commit e553f822b2020df1c29e096edfae4b1d6713f0eb
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Thu Sep 2 19:04:19 2010 +0900

    - Update to 1.8.5

 .gitignore                                       |    1 +
 rcairo-1.8.5-test-failure-with-newer-cairo.patch |   12 +++++
 ruby-cairo.spec                                  |   50 +++++++++++++---------
 sources                                          |    2 +-
 4 files changed, 44 insertions(+), 21 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0bfea81..2bccfaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 rcairo-1.8.1.tar.gz
+/rcairo-1.8.5.tar.gz
diff --git a/rcairo-1.8.5-test-failure-with-newer-cairo.patch b/rcairo-1.8.5-test-failure-with-newer-cairo.patch
new file mode 100644
index 0000000..95aa49e
--- /dev/null
+++ b/rcairo-1.8.5-test-failure-with-newer-cairo.patch
@@ -0,0 +1,12 @@
+--- rcairo-1.8.5/test/test_pkg_config.rb.fail	2010-08-28 09:43:37.000000000 +0900
++++ rcairo-1.8.5/test/test_pkg_config.rb	2010-09-02 04:47:47.000000000 +0900
+@@ -51,6 +51,9 @@
+   end
+ 
+   def test_requires_private
++    # This test won't succeed with newer cairo
++    puts "test_requires_private disabled"
++    return
+     assert_equal(["freetype2", "fontconfig", "libpng12",
+                   "xcb", "xcb-render", "xcb-renderutil",
+                   "xrender", "x11", "pixman-1"],
diff --git a/ruby-cairo.spec b/ruby-cairo.spec
index a88346f..62e1096 100644
--- a/ruby-cairo.spec
+++ b/ruby-cairo.spec
@@ -2,7 +2,7 @@
 %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
 
 Name:           ruby-cairo
-Version:        1.8.1
+Version:        1.8.5
 Release:        1%{?dist}
 Summary:        Ruby bindings for cairo
 
@@ -11,10 +11,17 @@ Group:          System Environment/Libraries
 License:        GPLv2+
 URL:            http://cairographics.org/rcairo
 Source0:        http://cairographics.org/releases/rcairo-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# test_requires_private in test/test_pkg_config.rb will fail with newer cairo
+Patch0:         rcairo-1.8.5-test-failure-with-newer-cairo.patch
   
-BuildRequires:  ruby ruby-devel cairo-devel
-Requires:       ruby(abi) = 1.8 %{_bindir}/env
+BuildRequires:  ruby
+BuildRequires:  ruby-devel
+BuildRequires:  cairo-devel
+# Make it sure that at least one font is available during %%check
+# Otherwise test_text_to_glyphs() in test/test_context.rb fails on F-12/F13.
+BuildRequires(check): dejavu-sans-fonts
+
+Requires:       ruby(abi) = 1.8
 # If this package is mainly a ruby library, it should provide
 # whatever people have to require in their ruby scripts to use the library
 # For example, if people use this lib with "require 'foo'", it should provide
@@ -30,7 +37,8 @@ X Window System, win32, and image buffers.
 Summary:        Ruby-cairo development environment
 Group:          Development/Languages
 Requires:       %{name} = %{version}-%{release}
-Requires:       cairo-devel ruby-devel
+Requires:       cairo-devel
+Requires:       ruby-devel
 Provides:       ruby(cairo-devel) = %{version}-%{release}
 
 %description devel
@@ -40,39 +48,38 @@ ruby-cairo
 
 %prep
 %setup -q -n rcairo-%{version}
-ruby extconf.rb
-%{__chmod} 644 samples/agg/aa_test.rb
-%{__chmod} 644 samples/scalable.rb
-%{__chmod} 644 samples/text2.rb
-%{__chmod} 644 samples/png.rb
-%{__chmod} 644 samples/text-on-path.rb
-%{__chmod} 644 samples/blur.rb
+%patch0 -p1 -b .newcairo
 
+find samples/ -type f | xargs chmod 0644
 rm -f samples/.cvsignore
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS"
+ruby extconf.rb
 make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p"
+make install \
+  DESTDIR=$RPM_BUILD_ROOT \
+  INSTALL="install -c -p"
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%check
+ruby ./test/run-test.rb --verbose
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING GPL NEWS README samples
-# For noarch packages: ruby_sitelib
+%doc AUTHORS 
+%doc COPYING
+%doc GPL
+%doc NEWS
+%doc README.rdoc
+%doc samples/
 %{ruby_sitelib}/cairo.rb
 %{ruby_sitelib}/cairo/
-#%{ruby_sitelib}/cairo/context/circle.rb
-#%{ruby_sitelib}/cairo/context/path.rb
-#%{ruby_sitelib}/cairo/context/quad.rb
-#%{ruby_sitelib}/cairo/context/rectangle.rb
-# For arch-specific packages: ruby_sitearch
 %{ruby_sitearch}/cairo.so
 
 %files devel
@@ -81,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Sep  2 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> 1.8.5-1
+- Update to 1.8.5
+
 * Wed Dec 16 2009 Allisson Azevedo <allisson at gmail.com> 1.8.1-1
 - Update to 1.8.1
 
diff --git a/sources b/sources
index f2e949d..dca6fb8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-14efc24f0cbe281b32882d64f1b0d4b9  rcairo-1.8.1.tar.gz
+35e83d21994d72b07cc7d33787e99805  rcairo-1.8.5.tar.gz


More information about the scm-commits mailing list