diff --git a/.gitignore b/.gitignore
index 7596002..52ef19e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1 @@
-alexandria-0.6.6.tar.gz
-/alexandria-0.6.6-svn1154_trunk.tar.gz
-/alexandria-0.6.7.tar.gz
-/alexandria-0.6.8.tar.gz
-/alexandria-0.6.9.tar.gz
+/alexandria-*.tar.gz
diff --git a/alexandria-0.6.8-always-require-rubygems.patch b/alexandria-0.6.8-always-require-rubygems.patch
deleted file mode 100644
index 9ae8525..0000000
--- a/alexandria-0.6.8-always-require-rubygems.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- alexandria-0.6.8/bin/alexandria.gem 2009-12-13 05:58:08.000000000 +0900
-+++ alexandria-0.6.8/bin/alexandria 2011-12-25 02:37:12.000000000 +0900
-@@ -2,6 +2,7 @@
-
- $KCODE = 'U'
-
-+require 'rubygems'
- begin
- require 'gettext'
- rescue LoadError
diff --git a/alexandria-0.6.8-ascii-fix.patch b/alexandria-0.6.8-ascii-fix.patch
deleted file mode 100644
index 5c43ebf..0000000
--- a/alexandria-0.6.8-ascii-fix.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up alexandria-0.6.8/util/rake/omfgenerate.rb.ascii alexandria-0.6.8/util/rake/omfgenerate.rb
---- alexandria-0.6.8/util/rake/omfgenerate.rb.ascii 2012-03-23 15:31:31.766631433 -0400
-+++ alexandria-0.6.8/util/rake/omfgenerate.rb 2012-03-23 15:31:50.460456351 -0400
-@@ -73,10 +73,10 @@ class OmfGenerateTask < Rake::TaskLib
- rule '.omf' => ['.omf.in'] do |t|
- path = File.join(@gnome_helpfiles_dir, @projectname,
- locale_for(t.name), "#{@projectname}.xml")
-- data = IO.read(t.source)
-+ data = IO.read(t.source, :encoding => "BINARY")
- data.sub!(/PATH_TO_DOC_FILE/, path)
- puts "Generating #{t.name}..."
-- File.open(t.name, 'w') { |io| io.puts data }
-+ File.open(t.name, 'w', :encoding => "BINARY") { |io| io.puts data }
- end
- omf_files.each {|o| @generated_files << o }
- end
diff --git a/alexandria-0.6.8-evalfix.patch b/alexandria-0.6.8-evalfix.patch
deleted file mode 100644
index 487ab16..0000000
--- a/alexandria-0.6.8-evalfix.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -up alexandria-0.6.8/lib/alexandria/book_providers.rb.evalfix alexandria-0.6.8/lib/alexandria/book_providers.rb
---- alexandria-0.6.8/lib/alexandria/book_providers.rb.evalfix 2011-11-15 07:43:04.000000000 -0500
-+++ alexandria-0.6.8/lib/alexandria/book_providers.rb 2012-03-23 16:25:22.415869366 -0400
-@@ -375,7 +375,7 @@ module Alexandria
- providers = {}
- self.class.constants.each do |constant|
- next unless md = /(.+)Provider$/.match(constant)
-- klass = self.class.module_eval(constant)
-+ klass = self.class.module_eval(constant.to_s)
- if klass.ancestors.include?(AbstractProvider) and
- klass != GenericProvider and
- klass != WebsiteBasedProvider and
-diff -up alexandria-0.6.8/lib/alexandria/smart_library.rb.evalfix alexandria-0.6.8/lib/alexandria/smart_library.rb
---- alexandria-0.6.8/lib/alexandria/smart_library.rb.evalfix 2009-03-25 19:09:32.000000000 -0400
-+++ alexandria-0.6.8/lib/alexandria/smart_library.rb 2012-03-23 16:24:11.833511912 -0400
-@@ -471,8 +471,7 @@ begin
-
- })
-
-- ALL = self.constants.map \
-- { |x| self.module_eval(x) }.select \
-+ ALL = self.constants.map { |x| self.module_eval(x.to_s) }.select \
- { |x| x.is_a?(Operator) }
- end
-
diff --git a/alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch b/alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch
deleted file mode 100644
index ee53db3..0000000
--- a/alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- alexandria-0.6.8/lib/alexandria/export_library.rb.ruby19_csv 2012-05-30 10:04:18.167329943 +0900
-+++ alexandria-0.6.8/lib/alexandria/export_library.rb 2012-05-30 10:07:52.230277906 +0900
-@@ -241,7 +241,14 @@
- File.open(filename, 'w') do |io|
- io.puts "Title" + ';' + "Authors" + ';' + "Publisher" + ';' + "Edition" + ';' + "ISBN" + ';' + "Year Published" + ';' + "Rating" + "(0 to #{UI::MainApp::MAX_RATING_STARS.to_s})" + ';' + "Notes" + ';' + "Want?" + ';' + "Read?" + ';' + "Own?" + ';' + "Tags"
- each do |book|
-- io.puts book.title + ';' + book.authors.join(', ') + ';' + (book.publisher or "") + ';' + (book.edition or "") + ';' + (book.isbn or "") + ';' + (book.publishing_year.to_s or "") + ';' + (book.rating.to_s or "0") + ';' + (book.notes or "") + ';' + ( book.want ? "1" : "0") + ';' + ( book.redd ? "1" : "0") + ';' + ( book.own ? "1" : "0") + ';' + (book.tags ? book.tags.join(', ') : "")
-+ io.puts book.title.force_encoding('UTF-8') + ';' +
-+ book.authors.join(', ').force_encoding('UTF-8') + ';' +
-+ (book.publisher or "").force_encoding('UTF-8') + ';' +
-+ (book.edition or "").force_encoding('UTF-8') + ';' + (book.isbn or "") + ';' +
-+ (book.publishing_year.to_s or "") + ';' + (book.rating.to_s or "0") + ';' +
-+ (book.notes or "") + ';' + ( book.want ? "1" : "0") + ';' +
-+ ( book.redd ? "1" : "0") + ';' + ( book.own ? "1" : "0") +
-+ ';' + (book.tags ? book.tags.join(', ') : "")
- end
- end
- end
-@@ -499,12 +506,12 @@
- if book.authors != []
- bibtex << book.authors[0]
- book.authors[1..-1].each do |author|
-- bibtex << " and #{latex_escape(author)}"
-+ bibtex << " and #{latex_escape(author.force_encoding('UTF-8'))}"
- end
- end
- bibtex << "\",\n"
-- bibtex << "title = \"#{latex_escape(book.title)}\",\n"
-- bibtex << "publisher = \"#{latex_escape(book.publisher)}\",\n"
-+ bibtex << "title = \"#{latex_escape(book.title.force_encoding('UTF-8'))}\",\n"
-+ bibtex << "publisher = \"#{latex_escape(book.publisher.force_encoding('UTF-8'))}\",\n"
- if book.notes and not book.notes.empty?
- bibtex << "OPTnote = \"#{latex_escape(book.notes)}\",\n"
- end
diff --git a/alexandria-0.6.8-export-to-HTML-with-ruby19.patch b/alexandria-0.6.8-export-to-HTML-with-ruby19.patch
deleted file mode 100644
index dec5c0b..0000000
--- a/alexandria-0.6.8-export-to-HTML-with-ruby19.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- alexandria-0.6.8/lib/alexandria/export_library.rb.export 2009-03-26 08:09:32.000000000 +0900
-+++ alexandria-0.6.8/lib/alexandria/export_library.rb 2012-05-06 01:22:03.000000000 +0900
-@@ -420,7 +420,7 @@
- xhtml << <
#{xhtml_escape(book.title).force_encoding("UTF-8")}
- EOS - end - -@@ -447,7 +447,7 @@ - xhtml << "" -@@ -455,13 +455,13 @@ - - unless book.edition == nil - xhtml << <#{xhtml_escape(book.edition).force_encoding("UTF-8")}
- EOS - end - - unless book.publisher == nil - xhtml << <#{xhtml_escape(book.publisher).force_encoding("UTF-8")}
- EOS - end - diff --git a/alexandria-0.6.8-nogst-support.patch b/alexandria-0.6.8-nogst-support.patch deleted file mode 100644 index 49104b4..0000000 --- a/alexandria-0.6.8-nogst-support.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- alexandria-0.6.8/lib/alexandria/ui/dialogs/acquire_dialog.rb.nogst 2011-11-16 02:37:09.000000000 +0900 -+++ alexandria-0.6.8/lib/alexandria/ui/dialogs/acquire_dialog.rb 2011-12-25 02:22:12.000000000 +0900 -@@ -20,7 +20,18 @@ - require 'alexandria/scanners/cuecat' - require 'alexandria/scanners/keyboard' - --require 'alexandria/ui/sound' -+support_sound = true -+begin -+ require 'gst' -+rescue LoadError => e -+ Alexandria::log.warn { e.message } -+ Alexandria::log.warn { "Sound support is disabled" } -+ support_sound = false -+end -+ -+if support_sound -+ require 'alexandria/ui/sound' -+end - require 'alexandria/ui/dialogs/barcode_animation' - - module Alexandria -@@ -556,6 +567,7 @@ - end - end - -+ return unless support_sound - # @sound_player = SoundEffectsPlayer.new - @sound_players = {} - @sound_players["scanning"] = SoundEffectsPlayer.new -@@ -565,6 +577,7 @@ - end - - def play_sound(effect) -+ return unless support_sound - # HACK, do some thread waiting, if possible - puts "scanning sound : #{@prefs.play_scanning_sound}" - puts "scan sound: #{ @prefs.play_scan_sound}" diff --git a/alexandria-0.6.8-rdoc.patch b/alexandria-0.6.8-rdoc.patch deleted file mode 100644 index a6d2417..0000000 --- a/alexandria-0.6.8-rdoc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up alexandria-0.6.8/doc/cuecat_support.rdoc alexandria-0.6.8/doc/cuecat_support -diff -up alexandria-0.6.8/Rakefile.rdoc alexandria-0.6.8/Rakefile ---- alexandria-0.6.8/Rakefile.rdoc 2012-03-23 12:19:23.151041440 -0400 -+++ alexandria-0.6.8/Rakefile 2012-03-23 12:19:32.967945925 -0400 -@@ -32,7 +32,7 @@ rescue LoadError - end - - require 'rake/clean' --require 'rake/rdoctask' -+require 'rdoc/task' - require 'rake/packagetask' - - $:.unshift(File.join(File.dirname(__FILE__), 'util/rake')) diff --git a/alexandria-0.6.8-utf8-convert.patch b/alexandria-0.6.8-utf8-convert.patch deleted file mode 100644 index 8db1fbc..0000000 --- a/alexandria-0.6.8-utf8-convert.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- alexandria-0.6.8/lib/alexandria/ui/dialogs/misc_dialogs.rb.ruby19_utf8 2009-03-26 08:09:32.000000000 +0900 -+++ alexandria-0.6.8/lib/alexandria/ui/dialogs/misc_dialogs.rb 2012-04-13 12:38:05.065369194 +0900 -@@ -22,9 +22,11 @@ - GetText.bindtextdomain(Alexandria::TEXTDOMAIN, :charset => "UTF-8") - - def initialize(parent, library, book) -+ # Don't know why, however force_encoding seems needed here to -+ # prevent crash... - super(parent, - _("The book '%s' already exists in '%s'. Would you like " + -- "to replace it?") % [ book.title, library.name ], -+ "to replace it?") % [ book.title, library.name ].dup.map!{|str| str.force_encoding("UTF-8")}, - Gtk::Stock::DIALOG_QUESTION, - [[_("_Skip"), Gtk::Dialog::RESPONSE_CANCEL], - [_("_Replace"), Gtk::Dialog::RESPONSE_OK]], ---- alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb.ruby19_utf8 2011-11-15 22:09:19.000000000 +0900 -+++ alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb 2012-04-13 12:38:05.066369229 +0900 -@@ -825,7 +825,9 @@ - iter[Columns::TITLE] = book.title - title = book.title.sub(REDUCE_TITLE_REGEX, '\1...') - iter[Columns::TITLE_REDUCED] = title -- iter[Columns::AUTHORS] = book.authors.join(', ') -+ # Don't know why, however force_encoding seems needed here to -+ # prevent crash... -+ iter[Columns::AUTHORS] = book.authors.dup.map!{|str| str.force_encoding("UTF-8")}.join(', ') - iter[Columns::ISBN] = book.isbn.to_s - iter[Columns::PUBLISHER] = book.publisher - iter[Columns::PUBLISH_DATE] = (book.publishing_year.to_s rescue "") diff --git a/alexandria-0.6.8-yaml-unescape.patch b/alexandria-0.6.8-yaml-unescape.patch deleted file mode 100644 index c1a166a..0000000 --- a/alexandria-0.6.8-yaml-unescape.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- alexandria-0.6.8/lib/alexandria/models/library.rb.broken_yaml 2009-12-07 05:16:57.000000000 +0900 -+++ alexandria-0.6.8/lib/alexandria/models/library.rb 2012-10-13 03:25:24.000000000 +0900 -@@ -78,8 +78,23 @@ - - test[1] = filename if test[0] == 0 - -+ book_valid_p = true -+ - if not File.size? test[1] - log.warn { "Book file #{test[1]} was empty"} -+ book_valid_p = false -+ end -+ -+ if book_valid_p -+ begin -+ book = self.regularize_book_from_yaml(test[1]) -+ rescue Psych::SyntaxError => e -+ log.warn "Book file #{test[1]} could not be parsed" -+ book_valid_p = false -+ end -+ end -+ -+ if not book_valid_p - md = /([\dxX]{10,13})#{EXT[:book]}/.match(filename) - if md - file_isbn = md[1] -@@ -90,7 +105,7 @@ - end - next - end -- book = self.regularize_book_from_yaml(test[1]) -+ - old_isbn = book.isbn - old_pub_year = book.publishing_year - begin -@@ -178,6 +193,8 @@ - end - - def self.regularize_book_from_yaml(name) -+ require 'syck/encoding' -+ - text = IO.read(name) - - #Code to remove the mystery string in books imported from Amazon -@@ -198,7 +215,7 @@ - new_yaml.sub!(/^\s*\-+\s*/, '') - text.sub!(md[0], "loaned_since: #{new_yaml}\n") - end -- book = YAML.load(text) -+ book = YAML.load(Syck::unescape(text)) - unless book.isbn.class == String - # HACK - md = /isbn: (.+)/.match(text) diff --git a/alexandria-0.6.8-z3950-next.patch b/alexandria-0.6.8-z3950-next.patch deleted file mode 100644 index 665f5e5..0000000 --- a/alexandria-0.6.8-z3950-next.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- alexandria-0.6.8/./lib/alexandria/book_providers/z3950.rb.next 2009-12-22 06:13:29.000000000 +0900 -+++ alexandria-0.6.8/./lib/alexandria/book_providers/z3950.rb 2012-04-10 23:40:53.000000000 +0900 -@@ -100,7 +100,7 @@ - msg - } - -- next if marc.title.nil? # or marc.authors.empty? -+ raise if marc.title.nil? # or marc.authors.empty? - - isbn = isbn or marc.isbn - isbn = Library.canonicalise_ean(isbn) diff --git a/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch b/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch deleted file mode 100644 index 2797d05..0000000 --- a/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- alexandria-0.6.9/lib/alexandria/ui/icons.rb.rg309 2009-08-29 21:27:15.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/icons.rb 2016-08-15 17:32:58.220820991 +0900 -@@ -15,18 +15,26 @@ - # write to the Free Software Foundation, Inc., 51 Franklin Street, - # Fifth Floor, Boston, MA 02110-1301 USA. - --class Gdk::Pixbuf -+if !defined?(GDK_PIXBUF) -+ if defined?(GdkPixbuf) -+ GDK_PIXBUF = GdkPixbuf::Pixbuf -+ else -+ GDK_PIXBUF = Gdk::Pixbuf -+ end -+end -+ -+class GDK_PIXBUF - def tag(tag_pixbuf) - # Computes some tweaks. - tweak_x = tag_pixbuf.width / 3 - tweak_y = tag_pixbuf.height / 3 - - # Creates the destination pixbuf. -- new_pixbuf = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, -- true, -- 8, -- self.width + tweak_x, -- self.height + tweak_y) -+ new_pixbuf = GDK_PIXBUF.new(:colorspace => :rgb, -+ :has_alpha => true, -+ :bits_per_sample => 8, -+ :width => self.width + tweak_x, -+ :height => self.height + tweak_y) - - # Fills with blank. - new_pixbuf.fill!(0) -@@ -39,13 +47,24 @@ - - # Copies the tag pixbuf there (north-est). - tag_pixbuf_x = self.width - (tweak_x * 2) -- new_pixbuf.composite!(tag_pixbuf, -+ if defined?(GdkPixbuf) -+ new_pixbuf.composite!(tag_pixbuf, -+ :dest_x =>0, :dest_y => 0, -+ :dest_width => tag_pixbuf.width + tag_pixbuf_x, -+ :dest_height => tag_pixbuf.height, -+ :offset_x => tag_pixbuf_x, :offset_y => 0, -+ :scale_x => 1, :scale_y => 1, -+ :interpolation_type => :hyper, :overall_alpha => 255 -+ ) -+ else -+ new_pixbuf.composite!(tag_pixbuf, - 0, 0, - tag_pixbuf.width + tag_pixbuf_x, - tag_pixbuf.height, - tag_pixbuf_x, 0, - 1, 1, - Gdk::Pixbuf::INTERP_HYPER, 255) -+ end - return new_pixbuf - end - end -@@ -66,7 +85,7 @@ - # Don't use upcase and use tr instead - # For example in Turkish the upper case of 'i' is still 'i'. - name = File.basename(file, ".png").tr('a-z', 'A-Z') -- const_set(name, Gdk::Pixbuf.new(File.join(ICONS_DIR, file))) -+ const_set(name, GDK_PIXBUF.new(:file => File.join(ICONS_DIR, file))) - end - end - -@@ -75,7 +94,7 @@ - return BOOK_ICON if library.nil? - filename = library.cover(book) - if File.exists?(filename) -- return Gdk::Pixbuf.new(filename) -+ return GDK_PIXBUF.new(:file => filename) - end - rescue Exception => err - # report load error; FIX should go to a Logger... -@@ -88,7 +107,7 @@ - - def self.blank?(filename) - begin -- pixbuf = Gdk::Pixbuf.new(filename) -+ pixbuf = GdkPixbuf::Pixbuf.new(:file => filename) - pixbuf.width == 1 and pixbuf.height == 1 - rescue Exception => err - puts err.message ---- alexandria-0.6.9/lib/alexandria/ui/sidepane.rb.rg309 2009-03-26 08:09:32.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/sidepane.rb 2016-08-15 17:13:47.764552444 +0900 -@@ -1,3 +1,11 @@ -+if !defined?(GDK_PIXBUF) -+ if defined?(GdkPixbuf) -+ GDK_PIXBUF = GdkPixbuf::Pixbuf -+ else -+ GDK_PIXBUF = Gdk::Pixbuf -+ end -+end -+ - module Alexandria - module UI - class SidePaneManager -@@ -80,7 +88,7 @@ - end - - def setup_sidepane -- @library_listview.model = Gtk::ListStore.new(Gdk::Pixbuf, -+ @library_listview.model = Gtk::ListStore.new(GDK_PIXBUF, - String, - TrueClass, - TrueClass) ---- alexandria-0.6.9/lib/alexandria/ui/ui_manager.rb.rg309 2016-08-15 21:32:21.259657750 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/ui_manager.rb 2016-08-15 17:12:04.362982918 +0900 -@@ -16,6 +16,14 @@ - # write to the Free Software Foundation, Inc., 51 Franklin Street, - # Fifth Floor, Boston, MA 02110-1301 USA. - -+if !defined?(GDK_PIXBUF) -+ if defined?(GdkPixbuf) -+ GDK_PIXBUF = GdkPixbuf::Pixbuf -+ else -+ GDK_PIXBUF = Gdk::Pixbuf -+ end -+end -+ - module Alexandria - module UI - MAX_RATING_STARS = 5 -@@ -263,8 +271,8 @@ - log.debug { "setting up active model" } - # The active model. - -- list = [Gdk::Pixbuf, # COVER_LIST -- Gdk::Pixbuf, # COVER_ICON -+ list = [GDK_PIXBUF, # COVER_LIST -+ GDK_PIXBUF, # COVER_ICON - String, # TITLE - String, # TITLE_REDUCED - String, # AUTHORS diff --git a/alexandria-0.6.9-glade-gettext.patch b/alexandria-0.6.9-glade-gettext.patch deleted file mode 100644 index f4636f9..0000000 --- a/alexandria-0.6.9-glade-gettext.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- alexandria-0.6.9/lib/alexandria/ui/builder_base.rb.gettext 2011-11-19 23:07:23.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/builder_base.rb 2014-02-12 12:25:09.695018378 +0900 -@@ -22,6 +22,7 @@ module Alexandria - def initialize(filename, widget_names) - file = File.join(Alexandria::Config::DATA_DIR, 'glade', filename) - builder = Gtk::Builder.new -+ builder.set_translation_domain(Alexandria::TEXTDOMAIN) - builder.add_from_file(file) - builder.connect_signals do |handler| - begin diff --git a/alexandria-0.6.9-goocanvas-version.patch b/alexandria-0.6.9-goocanvas-version.patch deleted file mode 100644 index e016840..0000000 --- a/alexandria-0.6.9-goocanvas-version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- alexandria-0.6.9/lib/alexandria/ui/dialogs/barcode_animation.rb.goocanvasver 2011-11-19 23:49:44.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/dialogs/barcode_animation.rb 2013-11-01 19:29:54.745495052 +0900 -@@ -20,6 +20,8 @@ - # Boston, MA 02110-1301 USA. - #++ - -+require 'rubygems' -+gem 'goocanvas', '~> 1.0' - require 'goocanvas' - - module Alexandria diff --git a/alexandria-0.6.9-iconv.patch b/alexandria-0.6.9-iconv.patch deleted file mode 100644 index 97c20a5..0000000 --- a/alexandria-0.6.9-iconv.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- 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-negative-value.patch b/alexandria-0.6.9-negative-value.patch deleted file mode 100644 index 07e53cf..0000000 --- a/alexandria-0.6.9-negative-value.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- alexandria-0.6.9/lib/alexandria/preferences.rb.negative 2011-11-19 23:48:14.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/preferences.rb 2013-10-07 11:56:16.598198605 +0900 -@@ -326,7 +326,7 @@ - return true - elsif value == "false" # bool - return false -- elsif value =~ /^[0-9]+$/ # int -+ elsif value =~ /^-?[0-9]+$/ # int - return value.to_i - elsif value =~ /^\[(.*)\]$/ # list (assume of type String) - return $1.split(",") diff --git a/alexandria-0.6.9-newbook-nothread.patch b/alexandria-0.6.9-newbook-nothread.patch deleted file mode 100644 index a564486..0000000 --- a/alexandria-0.6.9-newbook-nothread.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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-0.6.9-rbconfig.patch b/alexandria-0.6.9-rbconfig.patch deleted file mode 100644 index f8288b1..0000000 --- a/alexandria-0.6.9-rbconfig.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up alexandria-0.6.8/util/rake/fileinstall.rb.fix alexandria-0.6.8/util/rake/fileinstall.rb ---- alexandria-0.6.8/util/rake/fileinstall.rb.fix 2012-03-23 12:15:39.827228029 -0400 -+++ alexandria-0.6.8/util/rake/fileinstall.rb 2012-03-23 12:16:01.774011895 -0400 -@@ -185,12 +185,12 @@ class FileInstallTask < Rake::TaskLib - private - - def calculate_ruby_dir -- ruby_prefix = Config::CONFIG['prefix'] -+ ruby_prefix = RbConfig::CONFIG['prefix'] - - if @install_to_rubylibdir -- ruby_libdir = Config::CONFIG['rubylibdir'] -+ ruby_libdir = RbConfig::CONFIG['rubylibdir'] - else -- ruby_libdir = Config::CONFIG['sitelibdir'] -+ ruby_libdir = RbConfig::CONFIG['sitelibdir'] - end - if ENV.has_key?('RUBYLIBDIR') - ruby_libdir = ENV['RUBYLIBDIR'] ---- alexandria-0.6.9/lib/alexandria/ui/iconview_tooltips.rb.rbconfig 2011-11-19 23:47:12.000000000 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/iconview_tooltips.rb 2015-01-19 13:58:03.414409764 +0900 -@@ -68,7 +68,7 @@ - def workaround_safe_from_tooltip_crashes - begin - require 'rbconfig' -- arch_is_x86_64 = Config::CONFIG['arch'] =~ /x86_64/i -+ arch_is_x86_64 = RbConfig::CONFIG['arch'] =~ /x86_64/i - ruby_gnome2_atleast017 = false - if Gtk::BINDING_VERSION and Gtk::BINDING_VERSION.instance_of? Array - major, minor, micro = Gtk::BINDING_VERSION diff --git a/alexandria-0.6.9-z3950-zoom-count.patch b/alexandria-0.6.9-z3950-zoom-count.patch deleted file mode 100644 index 03311e3..0000000 --- a/alexandria-0.6.9-z3950-zoom-count.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- alexandria-0.6.9/lib/alexandria/book_providers/z3950.rb.zoom_count 2013-08-21 17:23:31.427078416 +0900 -+++ alexandria-0.6.9/lib/alexandria/book_providers/z3950.rb 2013-08-21 16:08:23.424525528 +0900 -@@ -169,7 +169,9 @@ - - conn.preferred_record_syntax = prefs['record_syntax'] - conn.element_set_name = 'F' -- conn.count = conn_count -+ #conn.count = conn_count -+ #conn.count must be string, later ZOOM_options_get_int() changes this into int -+ conn.count = conn_count.to_s - attr = case type - when SEARCH_BY_ISBN then [7] - when SEARCH_BY_TITLE then [4] diff --git a/alexandria-0.6.9-delete-broken-yaml.patch b/alexandria-0.7.4-delete-broken-yaml.patch similarity index 82% rename from alexandria-0.6.9-delete-broken-yaml.patch rename to alexandria-0.7.4-delete-broken-yaml.patch index 8141ef6..c5409c6 100644 --- a/alexandria-0.6.9-delete-broken-yaml.patch +++ b/alexandria-0.7.4-delete-broken-yaml.patch @@ -1,17 +1,17 @@ ---- alexandria-0.6.9/lib/alexandria/models/library.rb.delbroken 2012-10-25 14:39:40.029847934 +0900 -+++ alexandria-0.6.9/lib/alexandria/models/library.rb 2012-10-24 13:58:38.445172696 +0900 -@@ -98,7 +98,7 @@ - md = /([\dxX]{10,13})#{EXT[:book]}/.match(filename) +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/library_store.rb.delbroken 2020-01-03 17:38:07.340338529 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/library_store.rb 2020-01-04 13:04:55.467319713 +0900 +@@ -68,7 +68,7 @@ module Alexandria + md = /([\dxX]{10,13})#{Library::EXT[:book]}/.match(filename) if md file_isbn = md[1] - ruined_books << [nil, file_isbn, library] + ruined_books << [nil, file_isbn, library, filename, library.path] else - log.warn { "Filename #{filename} does not contain an ISBN"} - #TODO delete this file... ---- alexandria-0.6.9/lib/alexandria/ui/ui_manager.rb.delbroken 2012-10-25 14:39:40.026847577 +0900 -+++ alexandria-0.6.9/lib/alexandria/ui/ui_manager.rb 2012-10-24 14:03:49.811462773 +0900 -@@ -805,6 +805,73 @@ + log.warn { "Filename #{filename} does not contain an ISBN" } + # TODO: delete this file... +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb.delbroken 2020-01-03 17:37:42.404366230 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb 2020-01-04 13:09:04.588530827 +0900 +@@ -694,6 +694,73 @@ module Alexandria false end end diff --git a/alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch b/alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch similarity index 57% rename from alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch rename to alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch index b8635d2..3a83798 100644 --- a/alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch +++ b/alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch @@ -1,9 +1,9 @@ ---- alexandria-0.6.6/./lib/alexandria/ui/dialogs/new_book_dialog.rb.up28263 2010-06-19 10:36:21.000000000 +0900 -+++ alexandria-0.6.6/./lib/alexandria/ui/dialogs/new_book_dialog.rb 2010-06-22 16:51:25.000000000 +0900 -@@ -389,8 +389,8 @@ +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/new_book_dialog.rb.up28263 2019-10-25 01:20:07.000000000 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/new_book_dialog.rb 2020-01-03 12:36:21.720395196 +0900 +@@ -345,8 +345,8 @@ module Alexandria + @button_add.sensitive = false notify_start_add_by_isbn - Gtk.idle_add do - + GLib::Idle.add do - @find_thread = Thread.new do - log.info { "New @find_thread #{Thread.current}" } + #@find_thread = Thread.new do @@ -11,10 +11,10 @@ begin # MAJOR HACK, add this again... Alexandria::BookProviders.instance.add_observer(self) -@@ -423,7 +423,7 @@ +@@ -372,7 +372,7 @@ module Alexandria Alexandria::BookProviders.instance.delete_observer(self) notify_end_add_by_isbn - end + end - end + #end diff --git a/alexandria-0.7.4-export-to-HTML-with-ruby19.patch b/alexandria-0.7.4-export-to-HTML-with-ruby19.patch new file mode 100644 index 0000000..70cf52f --- /dev/null +++ b/alexandria-0.7.4-export-to-HTML-with-ruby19.patch @@ -0,0 +1,45 @@ +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/export_library.rb.export_html 2020-01-03 16:17:05.053552865 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/export_library.rb 2020-01-03 16:24:11.989122168 +0900 +@@ -302,7 +302,7 @@ + xhtml << <<~EOS +#{xhtml_escape(book.title)}
++#{xhtml_escape(book.title).force_encoding("UTF-8")}
+ EOS + end + +@@ -322,7 +322,7 @@ + xhtml << '" +@@ -330,13 +330,13 @@ + + unless book.edition.nil? + xhtml << <<~EOS +-#{xhtml_escape(book.edition)}
++#{xhtml_escape(book.edition).force_encoding("UTF-8")}
+ EOS + end + + unless book.publisher.nil? + xhtml << <<~EOS +-#{xhtml_escape(book.publisher)}
++#{xhtml_escape(book.publisher).force_encoding("UTF-8")}
+ EOS + end + diff --git a/alexandria-0.7.4-glade-gettext.patch b/alexandria-0.7.4-glade-gettext.patch new file mode 100644 index 0000000..a55685c --- /dev/null +++ b/alexandria-0.7.4-glade-gettext.patch @@ -0,0 +1,10 @@ +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/builder_base.rb.gettext 2019-10-25 01:20:07.000000000 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/builder_base.rb 2020-01-04 14:41:27.424900676 +0900 +@@ -10,6 +10,7 @@ module Alexandria + def initialize(filename, widget_names) + file = File.join(Alexandria::Config::DATA_DIR, "glade", filename) + builder = Gtk::Builder.new ++ builder.set_translation_domain(Alexandria::TEXTDOMAIN) + # TODO: This emits the warning 'GtkDialog mapped without a transient + # parent. This is discouraged.' + builder.add_from_file(file) diff --git a/alexandria-0.6.8-iconview-multibyte.patch b/alexandria-0.7.4-iconview-multibyte.patch similarity index 65% rename from alexandria-0.6.8-iconview-multibyte.patch rename to alexandria-0.7.4-iconview-multibyte.patch index 30bfef0..65db51f 100644 --- a/alexandria-0.6.8-iconview-multibyte.patch +++ b/alexandria-0.7.4-iconview-multibyte.patch @@ -1,6 +1,6 @@ ---- alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb.icon_multibyte 2012-05-30 10:04:18.132330198 +0900 -+++ alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb 2012-05-29 18:29:54.430690741 +0900 -@@ -824,6 +824,9 @@ +--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb.icon_multibyte 2020-01-03 16:17:05.051552867 +0900 ++++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb 2020-01-03 16:41:08.841182941 +0900 +@@ -713,6 +713,9 @@ iter[Columns::IDENT] = book.ident.to_s iter[Columns::TITLE] = book.title title = book.title.sub(REDUCE_TITLE_REGEX, '\1...') diff --git a/alexandria-0.7.4-remove-undefined-method.patch b/alexandria-0.7.4-remove-undefined-method.patch new file mode 100644 index 0000000..d03435a --- /dev/null +++ b/alexandria-0.7.4-remove-undefined-method.patch @@ -0,0 +1,12 @@ +diff -urp alexandria-book-collection-manager-0.7.4.old.2/lib/alexandria/ui/book_properties_dialog_base.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog_base.rb +--- alexandria-book-collection-manager-0.7.4.old.2/lib/alexandria/ui/book_properties_dialog_base.rb 2020-01-15 14:38:34.849856129 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog_base.rb 2020-01-15 14:39:05.733196547 +0900 +@@ -303,7 +303,7 @@ module Alexandria + def on_destroy + @book_properties_dialog.hide + # Stop notebook trying to set tab labels at this time +- @notebook.show_tabs = false ++ #@notebook.show_tabs = false + end + + def on_loaned diff --git a/alexandria-0.7.4-title-force-encoding.patch b/alexandria-0.7.4-title-force-encoding.patch new file mode 100644 index 0000000..23be90e --- /dev/null +++ b/alexandria-0.7.4-title-force-encoding.patch @@ -0,0 +1,37 @@ +diff -urp alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/book_properties_dialog.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog.rb +--- alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/book_properties_dialog.rb 2019-10-25 01:20:07.000000000 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/book_properties_dialog.rb 2020-01-15 14:34:40.160543409 +0900 +@@ -34,9 +34,10 @@ module Alexandria + @button_box << help_button + @button_box.set_child_secondary(help_button, true) + +- @entry_title.text = @book_properties_dialog.title = book.title ++ book_title = book.title.dup.force_encoding('UTF-8') ++ @entry_title.text = @book_properties_dialog.title = book_title + @entry_isbn.text = (book.isbn || "") +- @entry_publisher.text = book.publisher ++ @entry_publisher.text = book.publisher.dup.force_encoding('UTF-8') + @entry_publish_date.text = book.publishing_year.to_s + @entry_publish_date.signal_connect("focus-out-event") do + text = @entry_publish_date.text +@@ -54,7 +55,7 @@ module Alexandria + end + end + end +- @entry_edition.text = book.edition ++ @entry_edition.text = book.edition ? book.edition.dup.force_encoding('UTF-8') : "" + if book.tags + @entry_tags.text = book.tags.join(",") # tags are comma-separated + end +diff -urp alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/ui_manager.rb alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/ui_manager.rb +--- alexandria-book-collection-manager-0.7.4.old/lib/alexandria/ui/ui_manager.rb 2020-01-14 16:14:43.703190269 +0900 ++++ alexandria-book-collection-manager-0.7.4.new/lib/alexandria/ui/ui_manager.rb 2020-01-15 14:30:29.284927911 +0900 +@@ -427,7 +427,7 @@ module Alexandria + end + + def set_status_label(txt) +- @status_label.text = txt ++ @status_label.text = txt.force_encoding('UTF-8') + end + + def on_books_selection_changed diff --git a/alexandria-0.7.5-export-to-CSV-bintex-with-ruby19.patch b/alexandria-0.7.5-export-to-CSV-bintex-with-ruby19.patch new file mode 100644 index 0000000..95c0ac7 --- /dev/null +++ b/alexandria-0.7.5-export-to-CSV-bintex-with-ruby19.patch @@ -0,0 +1,30 @@ +--- alexandria-book-collection-manager-0.7.5/lib/alexandria/export_library.rb.export_csv 2020-10-17 15:49:16.241200513 +0900 ++++ alexandria-book-collection-manager-0.7.5/lib/alexandria/export_library.rb 2020-10-17 16:01:18.184960155 +0900 +@@ -108,12 +108,12 @@ module Alexandria + io.puts "