[rubygem-glib2] Workaround on build issue and test suite with GLib 2.31.2
Mamoru Tasaka
mtasaka at fedoraproject.org
Wed Nov 30 23:19:27 UTC 2011
commit 381cdd40f11294b80d3b8ca83fa7cf2a2550de06
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Thu Dec 1 08:19:12 2011 +0900
Workaround on build issue and test suite with GLib 2.31.2
rubygem-glib-1.0.3-test-with-new-glib.patch | 16 ++++++++++++++++
rubygem-glib2.spec | 19 +++++++++++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/rubygem-glib-1.0.3-test-with-new-glib.patch b/rubygem-glib-1.0.3-test-with-new-glib.patch
new file mode 100644
index 0000000..bf1fee8
--- /dev/null
+++ b/rubygem-glib-1.0.3-test-with-new-glib.patch
@@ -0,0 +1,16 @@
+--- glib2-1.0.3/test/test_key_file.rb.newglib 2011-11-30 23:14:29.000000000 +0900
++++ glib2-1.0.3/test/test_key_file.rb 2011-12-01 07:52:19.000000000 +0900
+@@ -19,8 +19,11 @@
+ assert_raise(GLib::KeyFileError) do
+ key_file.load_from_dirs("non-existent", search_dirs)
+ end
+- assert_raise(GLib::KeyFileError) do
+- key_file.load_from_dirs(base_name, search_dirs)
++
++ unless GLib.check_version?(2, 31,2)
++ assert_raise(GLib::KeyFileError) do
++ key_file.load_from_dirs(base_name, search_dirs)
++ end
+ end
+ temp.puts(<<-EOK)
+ [General]
diff --git a/rubygem-glib2.spec b/rubygem-glib2.spec
index 52e05e2..cebcd35 100644
--- a/rubygem-glib2.spec
+++ b/rubygem-glib2.spec
@@ -12,12 +12,13 @@
Summary: Ruby binding of GLib-2.x
Name: rubygem-%{gemname}
Version: 1.0.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Languages
# from README
License: LGPLv2
URL: http://ruby-gnome2.sourceforge.jp/
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+Patch0: rubygem-glib-1.0.3-test-with-new-glib.patch
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems
@@ -83,7 +84,9 @@ rubygem-%{gemname}
%setup -q -c -T
mkdir -p .%{gemdir}
-export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+# Workaround for GLib header inclusion change:
+# https://github.com/ruby-gnome2/ruby-gnome2/issues/65
+export CONFIGURE_ARGS="--with-cflags='%{optflags} -DGLIB_COMPILATION'"
export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig"
gem install \
-V \
@@ -93,6 +96,15 @@ gem install \
--rdoc \
%{SOURCE0}
+# GLib 2.31.2 no longer throws G_KEY_FILE_ERROR when the key file
+# is empty
+# https://bugzilla.gnome.org/show_bug.cgi?id=663432
+# https://github.com/ruby-gnome2/ruby-gnome2/issues/66
+(
+pushd .%{geminstdir}
+%patch0 -p1
+)
+
find . -name \*.gem | xargs chmod 0644
# Make pkg-config devel dependency (not runtime)
@@ -290,6 +302,9 @@ popd
%changelog
+* Thu Dec 1 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.0.3-2
+- Workaround on build issue and test suite with GLib 2.31.2
+
* Mon Sep 19 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.0.3-1
- 1.0.3
More information about the scm-commits
mailing list