diff --git a/alexandria-0.6.9-iconv.patch b/alexandria-0.6.9-iconv.patch new file mode 100644 index 0000000..97c20a5 --- /dev/null +++ b/alexandria-0.6.9-iconv.patch @@ -0,0 +1,23 @@ +--- alexandria-0.6.9/lib/alexandria/book_providers/adlibris.rb.iconv 2009-12-22 06:49:50.000000000 +0900 ++++ alexandria-0.6.9/lib/alexandria/book_providers/adlibris.rb 2013-02-16 09:52:51.000000000 +0900 +@@ -26,7 +26,7 @@ + + require 'cgi' + require 'alexandria/net' +-require 'iconv' ++#require 'iconv' + + module Alexandria + class BookProviders +--- alexandria-0.6.9/lib/alexandria/book_providers/web.rb.iconv 2010-08-03 05:40:36.000000000 +0900 ++++ alexandria-0.6.9/lib/alexandria/book_providers/web.rb 2013-02-16 09:55:55.000000000 +0900 +@@ -17,7 +17,8 @@ + if source_data_charset == "UTF-8" + utf8_html = html + else +- utf8_html = Iconv.conv("UTF-8", source_data_charset, html) ++ #utf8_html = Iconv.conv("UTF-8", source_data_charset, html) ++ utf8_html = html.encode("UTF-8", source_data_charset, :invalid => :replace, :replace => '') + end + normalized_html = @htmlentities.decode(utf8_html) + Hpricot(normalized_html) diff --git a/alexandria-0.6.9-newbook-nothread.patch b/alexandria-0.6.9-newbook-nothread.patch new file mode 100644 index 0000000..a564486 --- /dev/null +++ b/alexandria-0.6.9-newbook-nothread.patch @@ -0,0 +1,22 @@ +--- alexandria-0.6.9/lib/alexandria/ui/dialogs/new_book_dialog.rb.nothread 2013-02-16 09:59:08.000000000 +0900 ++++ alexandria-0.6.9/lib/alexandria/ui/dialogs/new_book_dialog.rb 2013-02-16 10:41:58.000000000 +0900 +@@ -345,15 +345,17 @@ + get_images_async + false #continue == false if you get to here. Stop timeout_add. + end +- else ++ elsif @find_thread + # Stop if the book find thread has stopped. + @find_thread.alive? ++ else ++ true + end + # continue == false if @find_error OR if results are returned + # timeout_add ends if continue is false! + + unless continue +- unless @find_thread.alive? #This happens after find_thread is done ++ unless (@find_thread && @find_thread.alive?) #This happens after find_thread is done + unless @destroyed + # Gtk.timeout_remove(progress_pulsing) + # @progressbar.hide diff --git a/alexandria.spec b/alexandria.spec index 980034f..fa751d8 100644 --- a/alexandria.spec +++ b/alexandria.spec @@ -9,7 +9,7 @@ %undefine minorver %undefine ifpre -%define fedorarel 3 +%define fedorarel 4 %define rel %{?ifpre:0.}%{fedorarel}%{?minorver:.%minorver} @@ -80,6 +80,10 @@ Patch22: alexandria-0.6.8-yaml-unescape.patch # Add a feature to remove broken yaml files at startup when requested # (bug 869556) Patch23: alexandria-0.6.9-delete-broken-yaml.patch +# Kill iconv +Patch24: alexandria-0.6.9-iconv.patch +# Handle the case thread was not created with adding new book +Patch25: alexandria-0.6.9-newbook-nothread.patch BuildArch: noarch BuildRequires: ruby(abi) >= %{rubyabi} @@ -153,6 +157,8 @@ Alexandria is a GNOME application to help you manage your book collection. %patch21 -p1 -b .icon_kanji %patch22 -p1 -b .broken_yaml %patch23 -p1 -b .delete_yaml +%patch24 -p1 -b .iconv +%patch25 -p1 -b .nothread # Embed Fedora EVR %{__sed} -i.evr \ @@ -249,6 +255,10 @@ exit 0 %{_datadir}/icons/hicolor/*/apps/%{name}.* %changelog +* Sat Feb 16 2013 Mamoru TASAKA - 0.6.9-4 +- Kill iconv and use encode instead +- Handle the case thread was not created with adding new book + * Sat Feb 9 2013 Mamoru TASAKA - 0.6.9-3 - F-19: kill vendorization of desktop file (fpc#247)