rpms/alexandria/devel alexandria-0.6.5-glib_convert-syntax.patch, 1.1, 1.2 alexandria.spec, 1.36, 1.37

Mamoru Tasaka mtasaka at fedoraproject.org
Thu Aug 20 19:04:03 UTC 2009


Author: mtasaka

Update of /cvs/extras/rpms/alexandria/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1795

Modified Files:
	alexandria-0.6.5-glib_convert-syntax.patch alexandria.spec 
Log Message:
* Fri Aug 21 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.5-3
- Clarify GLib.convert usage in utils.rb (does not change the 
  functionality of alexandria)


alexandria-0.6.5-glib_convert-syntax.patch:
 utils.rb |   52 +++++++++-------------------------------------------
 1 file changed, 9 insertions(+), 43 deletions(-)

Index: alexandria-0.6.5-glib_convert-syntax.patch
===================================================================
RCS file: /cvs/extras/rpms/alexandria/devel/alexandria-0.6.5-glib_convert-syntax.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- alexandria-0.6.5-glib_convert-syntax.patch	19 Aug 2009 22:13:59 -0000	1.1
+++ alexandria-0.6.5-glib_convert-syntax.patch	20 Aug 2009 19:04:03 -0000	1.2
@@ -1,17 +1,65 @@
 Index: lib/alexandria/utils.rb
 ===================================================================
 --- lib/alexandria/utils.rb	(revision 1085)
-+++ lib/alexandria/utils.rb	(working copy)
-@@ -20,7 +20,11 @@
++++ lib/alexandria/utils.rb	(revision 1086)
+@@ -15,51 +15,17 @@
+ # write to the Free Software Foundation, Inc., 51 Franklin Street,
+ # Fifth Floor, Boston, MA 02110-1301 USA.
+ 
+-#begin
+ require 'glib2'
  
  class String
-   def convert(charset_from, charset_to)
+-  def convert(charset_from, charset_to)
 -    GLib.convert(self, charset_from, charset_to)
-+#
-+# Ask upstream!! Perhaps from <-> to are reverse
-+# http://ruby-gnome2.sourceforge.jp/hiki.cgi?GLib#GLib.convert
-+#
-+    GLib.convert(self, charset_to, charset_from)
++  
++  # Converts this string into the desired charset.
++  #
++  # Note that this may raise a GLib::ConvertError if the
++  # desired_charset cannot accommodate all the characters present in
++  # the string, e.g. trying to convert Japanese Kanji to ISO-8859-1
++  # will obviously not work.
++  def convert(desired_charset, source_data_charset)
++    GLib.convert(self, desired_charset, source_data_charset)
    end
  end
- 
+-
+-=begin
+-rescue LoadError
+-
+-  # We assume that Ruby/Cocoa is loaded there
+-
+-  #require 'iconv'
+-
+-  class String
+-    def to_utf8_nsstring
+-      # This should be writen in ObjC in order to catch the ObjC exception if the
+-      # string could not be converted to UTF8.
+-      (OSX::NSString.stringWithUTF8String(self) or self)
+-    end
+-
+-    def convert(charset_from, charset_to)
+-      # Do nothing for the moment...
+-      self
+-    end
+-
+-        return OSX::NSString.stringWithUTF8String(self)
+-        x = Iconv.iconv(charset_to, charset_from, self).first
+-        p "#{self} -> #{x}"
+-        return x
+-        #p charset_from, charset_to
+-        #return self
+-
+-        from = OSX::NSString.alloc.initWithString(self)
+-        encoding = charset_to.nsencoding
+-        encoding = OSX::NSUnicodeStringEncoding
+-        data = from.dataUsingEncoding(encoding)
+-        s = OSX::NSString.alloc.initWithData_encoding(data, encoding).to_s
+-        s
+-        #self
+-    end
+-
+-  end
+-
+-end
+-=end


Index: alexandria.spec
===================================================================
RCS file: /cvs/extras/rpms/alexandria/devel/alexandria.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- alexandria.spec	20 Aug 2009 08:47:00 -0000	1.36
+++ alexandria.spec	20 Aug 2009 19:04:03 -0000	1.37
@@ -5,7 +5,7 @@
 %define		majorver	0.6.5
 %undefine		minorver	
 
-%define		fedorarel	2
+%define		fedorarel	3
 %define		rel		%{?minorver:0.}%{fedorarel}%{?minorver:.%minorver}
 
 
@@ -22,12 +22,9 @@ Source0:	http://rubyforge.org/frs/downlo
 # Trial fix for hang up when importing list containing invalid isdn
 # ref: alexandria-Bugs-25348
 Patch2:		alexandria-0.6.4.1-hang-importing-invalid-isdn.patch
-# Need ask to upstream
-# perhaps there is some confusion about GLib.convert...
-#Patch3:		alexandria-0.6.5-glib_convert-syntax.patch
-# Need ask to upstream
-# Sometimes search result has empty book or cover entry
-#Patch4:		alexandria-0.6.5-search-result-sanity-check.patch
+# Clarify the usage of GLib.convert 
+# ref: alexandria-Bugs-26968
+Patch3:		alexandria-0.6.5-glib_convert-syntax.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:	noarch
@@ -78,8 +75,7 @@ Alexandria is a GNOME application to hel
 %prep
 %setup -q -n %{name}-%{majorver}%{?minorver}
 %patch2 -p0 -b .up25348
-#%%patch3 -p0 -b .glib
-#%%patch4 -p0 -b .result
+%patch3 -p0 -b .glib
 
 # Embed Fedora EVR
 %{__sed} -i.evr \
@@ -206,6 +202,10 @@ exit 0
 %{_datadir}/icons/hicolor/*/apps/%{name}.*
 
 %changelog
+* Fri Aug 21 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.5-3
+- Clarify GLib.convert usage in utils.rb (does not change the 
+  functionality of alexandria)
+
 * Thu Aug 20 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.6.5-2
 - Kill the previous 2 patches (for now)
 




More information about the fedora-extras-commits mailing list