diff --git a/alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch b/alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch deleted file mode 100644 index b8635d2..0000000 --- a/alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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 @@ - notify_start_add_by_isbn - Gtk.idle_add do - -- @find_thread = Thread.new do -- log.info { "New @find_thread #{Thread.current}" } -+ #@find_thread = Thread.new do -+ #log.info { "New @find_thread #{Thread.current}" } - begin - # MAJOR HACK, add this again... - Alexandria::BookProviders.instance.add_observer(self) -@@ -423,7 +423,7 @@ - Alexandria::BookProviders.instance.delete_observer(self) - notify_end_add_by_isbn - end -- end -+ #end - - false - end 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-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.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.7.4-ascii-fix.patch b/alexandria-0.7.4-ascii-fix.patch new file mode 100644 index 0000000..abda240 --- /dev/null +++ b/alexandria-0.7.4-ascii-fix.patch @@ -0,0 +1,15 @@ +--- alexandria-book-collection-manager-0.7.4/util/rake/omfgenerate.rb.ascii 2020-01-03 12:47:58.335653134 +0900 ++++ alexandria-book-collection-manager-0.7.4/util/rake/omfgenerate.rb 2020-01-03 12:50:29.657487059 +0900 +@@ -67,10 +67,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.7.4-dont_use_thread_when_adding_file_by_isdn.patch b/alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch new file mode 100644 index 0000000..3a83798 --- /dev/null +++ b/alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch @@ -0,0 +1,22 @@ +--- 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 + GLib::Idle.add do +- @find_thread = Thread.new do +- log.info { "New @find_thread #{Thread.current}" } ++ #@find_thread = Thread.new do ++ #log.info { "New @find_thread #{Thread.current}" } + begin + # MAJOR HACK, add this again... + Alexandria::BookProviders.instance.add_observer(self) +@@ -372,7 +372,7 @@ module Alexandria + Alexandria::BookProviders.instance.delete_observer(self) + notify_end_add_by_isbn + end +- end ++ #end + + false + end diff --git a/alexandria.spec b/alexandria.spec index 8d6f50d..00449ae 100644 --- a/alexandria.spec +++ b/alexandria.spec @@ -1,26 +1,20 @@ -%if 0%{?fedora} <= 19 -%define rubyabi 1.9.1 -%endif - -%define repoid 76353 - -%define majorver 0.6.9 +%define majorver 0.7.4 %undefine minorver %undefine ifpre -%define fedorarel 11 +%define fedorarel 0.100 %define rel %{?ifpre:0.}%{fedorarel}%{?minorver:.%minorver} Name: alexandria Version: %{majorver} -Release: %{rel}%{?dist}.7 +Release: %{rel}%{?dist} Summary: Book collection manager License: GPLv2+ -URL: http://alexandria.rubyforge.org/ -Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{name}-%{version}%{?minorver:-%{minorver}}.tar.gz +URL: https://github.com/mvz/alexandria-book-collection-manager/ +Source0: %{url}/archive/v%{version}/%{name}-%{version}%{?minorver:-%{minorver}}.tar.gz # Patches discussing with the upstream # Trial fix for hang up when importing list containing invalid isdn # ref: alexandria-Bugs-25348 @@ -29,31 +23,19 @@ Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{name}-%{version}%{?mi # Trial fix for crash when importing a book with isdn # With alexandria-0.6.6, the fix for this issue is still incomplete # ref: alexandria-BUgs-28263 -Patch3: alexandria-0.6.6-dont_use_thread_when_adding_file_by_isdn.patch +Patch3: alexandria-0.7.4-dont_use_thread_when_adding_file_by_isdn.patch # Fix crash when searching book # ref: alexandria-Bugs-29479 Patch by Tomoh K. # Applied in 0.6.9 # Patch4: alexandria-0.6.8-set_status_label.patch # Upstream patches # Patches not submitted to the upstream -# Support when rubygem(gst) (gstreamer) is not installed -# Note that rubygem-gstreamer is not yet in Fedora -#Patch10: alexandria-0.6.8-nogst-support.patch -# Always require rubygems -Patch11: alexandria-0.6.8-always-require-rubygems.patch -# Use RbConfig -Patch12: alexandria-0.6.9-rbconfig.patch -# Use rdoc -# Well, seems not needed on 0.6.9 -# Patch13: alexandria-0.6.8-rdoc.patch # Force encoding type to make rake happy -Patch14: alexandria-0.6.8-ascii-fix.patch +Patch14: alexandria-0.7.4-ascii-fix.patch # Fix kcode issues with 1.9 # Well, with the original fix, some strange failure on startup # happens on ja_JP.utf8... -Patch15: alexandria-0.6.8-kcodefix.patch -# eval fix -Patch16: alexandria-0.6.8-evalfix.patch +#Patch15: alexandria-0.6.8-kcodefix.patch # With working zoom and ruby19, z3950 provider aborts # with syntax error about next Patch17: alexandria-0.6.8-z3950-next.patch @@ -165,18 +147,14 @@ Requires(preun): GConf2 Alexandria is a GNOME application to help you manage your book collection. %prep -%setup -q -n %{name}-%{majorver}%{?minorver:-%{?minorver}} +%setup -q -n %{name}-book-collection-manager-%{majorver}%{?minorver:-%{?minorver}} + # Check if patch2 issue is fixed in rev 1154 #%%patch2 -p0 -b .up25348 %patch3 -p1 -b .up28263.isdn #%%patch4 -p0 -b .up29479.search -#%%patch10 -p1 -b .nogst -%patch11 -p1 -b .gem -%patch12 -p1 -b .rbconfig -#%%patch13 -p1 -b .rdoc %patch14 -p1 -b .ascii -%patch15 -p1 -b .kcodefix -%patch16 -p1 -b .evalfix +#%%patch15 -p1 -b .kcodefix %patch17 -p1 -b .z3950_next %patch18 -p1 -b .ruby19_utf8 %patch19 -p1 -b .export_html