rpms/rubygem-gettext/devel rubygem-gettext-2.0.0-4args-bindtextdomain.patch, NONE, 1.1 rubygem-gettext-2.0.0-gem-NoMethodError.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 rubygem-gettext.spec, 1.3, 1.4 sources, 1.2, 1.3

Mamoru Tasaka mtasaka at fedoraproject.org
Tue Mar 31 04:37:52 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/rubygem-gettext/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6746

Modified Files:
	.cvsignore rubygem-gettext.spec sources 
Added Files:
	rubygem-gettext-2.0.0-4args-bindtextdomain.patch 
	rubygem-gettext-2.0.0-gem-NoMethodError.patch 
Log Message:
* Sat Mar 29 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.0-1
- Update to 2.0.0
- Now require rubygem(locale)
- Rescue NoMethodError on gem call on gettext.rb
- Reintroduce 4 args bindtextdomain() compatibility


rubygem-gettext-2.0.0-4args-bindtextdomain.patch:

--- NEW FILE rubygem-gettext-2.0.0-4args-bindtextdomain.patch ---
commit 2d11da4f60fa324aee1130707a103d66b9dc0957
Author: Masao Mutoh <mutoh at highway.ne.jp>
Date:   Sat Mar 28 00:33:03 2009 +0900

    Keep backward compatibility of bindtextdomain.
    
    Reported by Mamoru Tasaka(#24947), Mathieu Blondel.

diff --git a/lib/gettext.rb b/lib/gettext.rb
index 30975f8..f83e8ec 100644
--- a/lib/gettext.rb
+++ b/lib/gettext.rb
@@ -53,8 +53,8 @@ module GetText
   #     library doesn't use this option. Application may use this once.
   # * Returns: the GetText::TextDomainManager.
   #
-  def bindtextdomain(domainname, options = {})
-    bindtextdomain_to(self, domainname, options)
+  def bindtextdomain(domainname, *options)
+    bindtextdomain_to(self, domainname, *options)
   end
 
   # Includes GetText module and bind a textdomain to a class.

rubygem-gettext-2.0.0-gem-NoMethodError.patch:

--- NEW FILE rubygem-gettext-2.0.0-gem-NoMethodError.patch ---
commit cf3bdc5a7ab920f2aab5029ffbd2d485e84eb47f
Author: Masao Mutoh <mutoh at highway.ne.jp>
Date:   Sat Mar 28 12:40:06 2009 +0900

    Work unless rubygems.

diff --git a/lib/gettext.rb b/lib/gettext.rb
index eda571b..8ddc67b 100644
--- a/lib/gettext.rb
+++ b/lib/gettext.rb
@@ -13,7 +13,12 @@
   $Id: gettext.rb,v 1.46 2008/09/13 18:23:55 mutoh Exp $
 =end
 
-begin gem 'locale', '>=0.9'; rescue LoadError;end
+begin
+  gem 'locale', '>=0.9' 
+rescue NoMethodError
+else LoadError
+end
+
 require 'locale'
 raise "Insall locale as gem or uninstall old gettext" unless Locale.respond_to? :candidates
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	8 Oct 2008 10:38:59 -0000	1.2
+++ .cvsignore	31 Mar 2009 04:37:21 -0000	1.3
@@ -1 +1 @@
-gettext-1.93.0.gem
+gettext-2.0.0.gem


Index: rubygem-gettext.spec
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext/devel/rubygem-gettext.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rubygem-gettext.spec	24 Feb 2009 14:15:32 -0000	1.3
+++ rubygem-gettext.spec	31 Mar 2009 04:37:22 -0000	1.4
@@ -7,21 +7,28 @@
 %define		rubyabi		1.8
 
 Name:		rubygem-%{gemname}
-Version:	1.93.0
-Release:	8%{?dist}
+Version:	2.0.0
+Release:	1%{?dist}
 Summary:	RubyGem of Localization Library and Tools for Ruby
 Group:		Development/Languages
 
 License:	Ruby
 URL:		http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext
 Source0:	http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+# "begin gem 'locale', '>=0.9'" raises NoMethodError
+# instead of LoadError
+Patch0:		rubygem-gettext-2.0.0-gem-NoMethodError.patch
+# revive 4 argument bintextdomain() compatibility
+# Upstream bug 24947, GNOME bug 576826
+Patch1:		rubygem-gettext-2.0.0-4args-bindtextdomain.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	ruby(abi) = %{rubyabi}
 BuildRequires:	ruby(rubygems)
-BuildRequires:  rubygem(rake)
+BuildRequires:	rubygem(rake)
 Requires:	ruby(abi) = %{rubyabi}
 Requires:	ruby(rubygems)
+Requires:	rubygem(locale) >= 2.0.0
 Requires:	irb
 Provides:	rubygem(%{gemname}) = %{version}-%{release}
 
@@ -37,8 +44,7 @@
 %package	doc
 Summary:	Documentation for %{name}
 Group:		Documentation
-# Directory ownership issue
-Requires:	ruby(rubygems)
+Requires:	%{name} = %{version}-%{release}
 
 %description	doc
 This package contains documentation for %{name}.
@@ -48,6 +54,7 @@
 Summary:	Localization Library and Tools for Ruby
 Group:		Development/Languages
 Requires:	%{name} = %{version}-%{release}
+Requires:	ruby(locale) >= 2.0.0
 Provides:	ruby(gettext-package) = %{version}-%{release}
 
 %description -n	ruby-gettext-package
@@ -62,75 +69,44 @@
 %prep 
 %setup -q -T -c
 
-# Unpack source to recreate stripped gem file
-%{__mkdir} Repackage
-pushd Repackage
-
-tar xf %{SOURCE0}
-%{__mkdir} DATA
-cd DATA/
-tar xzf ../data.tar.gz
-popd
-
-# ... and unpack source again for documentation
-tar xf %{SOURCE0}
-
-%{__mkdir} DATA
-cd DATA/
-tar xzf ../data.tar.gz
-find \
-	samples/ \
-	test/ \
-	-type f | xargs %{__chmod} 0644
-cd ..
-
-# fix timestamps
-find . -type f -print0 | xargs -0 touch -r %{SOURCE0}
-
-%build
-TOPDIR=$(pwd)
+gem install \
+	--local \
+	--install-dir .%{gemdir} \
+	--force \
+	--rdoc \
+	-V \
+	%{SOURCE0}
 
-# Recreate gem with unneeded files stripped
-pushd Repackage/DATA/
+pushd .%{geminstdir}
+%patch0 -p1 -b .patch0
+%patch1 -p1 -b .patch1
+popd
 
-## Recreate gettext .mo file
-find data/locale/ -name \*.mo -print0 | xargs -0 %{__rm} -f
-ruby post-setup.rb
+%{__rm} -f .%{geminstdir}/Rakefile
+%{__rm} -f .%{geminstdir}/%{gemname}.gemspec
+%{__rm} -rf .%{geminstdir}/po/
+%{__rm} -rf .%{gemdir}/bin/
+%{__chmod} 0755 .%{geminstdir}/bin/*
+%{__chmod} 0644 .%{gemdir}/cache/*.gem
+find .%{geminstdir}/ -name \*.po | xargs %{__chmod} 0644
 
 # Cleanups for rpmlint
-find lib -name \*.rb | while read f
+find .%{geminstdir}/lib/ -name \*.rb | while read f
 do
 	%{__sed} -i -e '/^#!/d' $f
 done
 
-## Strip out unneeded files and create gem
-%{__rm} -rf \
-	*setup.rb \
-	doc/ \
-	samples/ \
-	test/ \
-	po/
-
-rake gem
-%{__mv} pkg/*gem ${TOPDIR}/
+# fix timestamps
+find . -type f -print0 | xargs -0 touch -r %{SOURCE0}
 
-popd
+%build
 
 %install
 %{__rm} -rf %{buildroot}
 %{__mkdir_p} %{buildroot}%{gemdir}
 
-gem install \
-	--local \
-	--install-dir %{buildroot}%{gemdir}/ \
-	--force \
-	--rdoc \
-	*.gem
-
-# Cleanups..
-%{__chmod} 0755 %{buildroot}%{geminstdir}/bin/*
-%{__rm} -rf %{buildroot}%{gemdir}/bin/
-%{__chmod} 0644 %{buildroot}%{gemdir}/cache/*.gem
+%{__cp} -a .%{gemdir}/* %{buildroot}%{gemdir}/
+find %{buildroot}%{gemdir} -name \*.rb.patch\* -delete
 
 # Create symlinks
 ##
@@ -195,7 +171,6 @@
 # For --short-circult
 %{__rm} -f *.lang
 
-%find_lang rails
 %find_lang rgettext
 %{__cat} *.lang >> %{name}.lang
 
@@ -205,7 +180,6 @@
 	/usr/lib/rpm/find-lang.sh \
 	> find-lang-modified.sh
 
-sh find-lang-modified.sh %{buildroot} rails rails-gem.lang
 sh find-lang-modified.sh %{buildroot} rgettext rgettext-gem.lang
 %{__cat} *-gem.lang >> %{name}-gem.lang
 
@@ -235,19 +209,23 @@
 
 %files		doc
 %defattr(-,root,root,-)
-%doc	DATA/samples/
-%doc	DATA/test/
 %{gemdir}/doc/%{gemname}-%{version}/
+%{geminstdir}/samples/
+%{geminstdir}/test/
 
 %files -n	ruby-gettext-package	-f %{name}.lang
 %defattr(-,root,root,-)
 %{ruby_sitelib}/%{gemname}.rb
 %{ruby_sitelib}/%{gemname}/
-%{ruby_sitelib}/locale.rb
-%{ruby_sitelib}/locale/
 
 
 %changelog
+* Sat Mar 29 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 2.0.0-1
+- Update to 2.0.0
+- Now require rubygem(locale)
+- Rescue NoMethodError on gem call on gettext.rb
+- Reintroduce 4 args bindtextdomain() compatibility
+
 * Tue Feb 24 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.93.0-8
 - %%global-ize "nested" macro 
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rubygem-gettext/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	8 Oct 2008 10:38:59 -0000	1.2
+++ sources	31 Mar 2009 04:37:22 -0000	1.3
@@ -1 +1 @@
-bda59913062bad008ff92b61506a148d  gettext-1.93.0.gem
+f1a237f5777c6129292012b0d161f3df  gettext-2.0.0.gem




More information about the fedora-extras-commits mailing list