Compare commits
No commits in common. "rawhide" and "f31" have entirely different histories.
36 changed files with 663 additions and 564 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1 +1,5 @@
|
|||
/alexandria-*.tar.gz
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
--- 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
|
||||
--- 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
|
||||
GLib::Idle.add do
|
||||
Gtk.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)
|
||||
@@ -372,7 +372,7 @@ module Alexandria
|
||||
@@ -423,7 +423,7 @@
|
||||
Alexandria::BookProviders.instance.delete_observer(self)
|
||||
notify_end_add_by_isbn
|
||||
end
|
||||
end
|
||||
- end
|
||||
+ #end
|
||||
|
||||
10
alexandria-0.6.8-always-require-rubygems.patch
Normal file
10
alexandria-0.6.8-always-require-rubygems.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- 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
|
||||
16
alexandria-0.6.8-ascii-fix.patch
Normal file
16
alexandria-0.6.8-ascii-fix.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
25
alexandria-0.6.8-evalfix.patch
Normal file
25
alexandria-0.6.8-evalfix.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
|
||||
34
alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch
Normal file
34
alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
--- 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
|
||||
45
alexandria-0.6.8-export-to-HTML-with-ruby19.patch
Normal file
45
alexandria-0.6.8-export-to-HTML-with-ruby19.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
--- 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 << <<EOS
|
||||
<img class="book_cover"
|
||||
src="#{File.join("pixmaps", final_cover(book))}"
|
||||
- alt="Cover file for '#{xhtml_escape(book.title)}'"
|
||||
+ alt="Cover file for '#{xhtml_escape(book.title).force_encoding("UTF-8")}'"
|
||||
EOS
|
||||
if $IMAGE_SIZE_LOADED
|
||||
image_s = ImageSize.new(IO.read(cover(book)))
|
||||
@@ -439,7 +439,7 @@
|
||||
|
||||
unless book.title == nil
|
||||
xhtml << <<EOS
|
||||
-<p class="book_title">#{xhtml_escape(book.title)}</p>
|
||||
+<p class="book_title">#{xhtml_escape(book.title).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
xhtml << "<ul class=\"book_authors\">"
|
||||
book.authors.each do |author|
|
||||
xhtml << <<EOS
|
||||
-<li class="book_author">#{xhtml_escape(author)}</li>
|
||||
+<li class="book_author">#{xhtml_escape(author).force_encoding("UTF-8")}</li>
|
||||
EOS
|
||||
end
|
||||
xhtml << "</ul>"
|
||||
@@ -455,13 +455,13 @@
|
||||
|
||||
unless book.edition == nil
|
||||
xhtml << <<EOS
|
||||
-<p class="book_binding">#{xhtml_escape(book.edition)}</p>
|
||||
+<p class="book_binding">#{xhtml_escape(book.edition).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
unless book.publisher == nil
|
||||
xhtml << <<EOS
|
||||
-<p class="book_publisher">#{xhtml_escape(book.publisher)}</p>
|
||||
+<p class="book_publisher">#{xhtml_escape(book.publisher).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- 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 @@
|
||||
--- 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 @@
|
||||
iter[Columns::IDENT] = book.ident.to_s
|
||||
iter[Columns::TITLE] = book.title
|
||||
title = book.title.sub(REDUCE_TITLE_REGEX, '\1...')
|
||||
38
alexandria-0.6.8-nogst-support.patch
Normal file
38
alexandria-0.6.8-nogst-support.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
--- 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}"
|
||||
13
alexandria-0.6.8-rdoc.patch
Normal file
13
alexandria-0.6.8-rdoc.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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'))
|
||||
28
alexandria-0.6.8-utf8-convert.patch
Normal file
28
alexandria-0.6.8-utf8-convert.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
--- 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 "")
|
||||
53
alexandria-0.6.8-yaml-unescape.patch
Normal file
53
alexandria-0.6.8-yaml-unescape.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
--- 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)
|
||||
11
alexandria-0.6.8-z3950-next.patch
Normal file
11
alexandria-0.6.8-z3950-next.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- 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)
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
--- 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)
|
||||
--- 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)
|
||||
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-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
|
||||
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 @@
|
||||
false
|
||||
end
|
||||
end
|
||||
139
alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch
Normal file
139
alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
--- 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
|
||||
10
alexandria-0.6.9-glade-gettext.patch
Normal file
10
alexandria-0.6.9-glade-gettext.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--- 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
|
||||
11
alexandria-0.6.9-goocanvas-version.patch
Normal file
11
alexandria-0.6.9-goocanvas-version.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- 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
|
||||
23
alexandria-0.6.9-iconv.patch
Normal file
23
alexandria-0.6.9-iconv.patch
Normal file
|
|
@ -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)
|
||||
11
alexandria-0.6.9-negative-value.patch
Normal file
11
alexandria-0.6.9-negative-value.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- 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(",")
|
||||
22
alexandria-0.6.9-newbook-nothread.patch
Normal file
22
alexandria-0.6.9-newbook-nothread.patch
Normal file
|
|
@ -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
|
||||
30
alexandria-0.6.9-rbconfig.patch
Normal file
30
alexandria-0.6.9-rbconfig.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
13
alexandria-0.6.9-z3950-zoom-count.patch
Normal file
13
alexandria-0.6.9-z3950-zoom-count.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- 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]
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
--- 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
|
||||
<img class="book_cover"
|
||||
src="#{File.join('pixmaps', final_cover(book))}"
|
||||
- alt="Cover file for '#{xhtml_escape(book.title)}'"
|
||||
+ alt="Cover file for '#{xhtml_escape(book.title).force_encoding("UTF-8")}'"
|
||||
height="#{image_s.height}" width="#{image_s.width}"
|
||||
/>
|
||||
EOS
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
unless book.title.nil?
|
||||
xhtml << <<~EOS
|
||||
- <p class="book_title">#{xhtml_escape(book.title)}</p>
|
||||
+ <p class="book_title">#{xhtml_escape(book.title).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
xhtml << '<ul class="book_authors">'
|
||||
book.authors.each do |author|
|
||||
xhtml << <<~EOS
|
||||
- <li class="book_author">#{xhtml_escape(author)}</li>
|
||||
+ <li class="book_author">#{xhtml_escape(author).force_encoding("UTF-8")}</li>
|
||||
EOS
|
||||
end
|
||||
xhtml << "</ul>"
|
||||
@@ -330,13 +330,13 @@
|
||||
|
||||
unless book.edition.nil?
|
||||
xhtml << <<~EOS
|
||||
- <p class="book_binding">#{xhtml_escape(book.edition)}</p>
|
||||
+ <p class="book_binding">#{xhtml_escape(book.edition).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
unless book.publisher.nil?
|
||||
xhtml << <<~EOS
|
||||
- <p class="book_publisher">#{xhtml_escape(book.publisher)}</p>
|
||||
+ <p class="book_publisher">#{xhtml_escape(book.publisher).force_encoding("UTF-8")}</p>
|
||||
EOS
|
||||
end
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- 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)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
--- 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 "<TITLE>#{book.title} </TITLE>"
|
||||
# put a link to the book's cover. only works on iPod 5G and above(?).
|
||||
if File.exist?(cover(book))
|
||||
- io.puts '<A HREF="pixmaps/' + book.ident + ".jpg" + '">' + book.title + "</A>"
|
||||
+ io.puts '<A HREF="pixmaps/' + book.ident + ".jpg" + '">' + book.title.force_encoding('UTF-8') + "</A>"
|
||||
else
|
||||
- io.puts book.title
|
||||
+ io.puts book.title.force_encoding('UTF-8')
|
||||
end
|
||||
- io.puts book.authors.join(", ")
|
||||
- io.puts book.edition
|
||||
+ io.puts book.authors.join(", ").force_encoding('UTF-8')
|
||||
+ io.puts book.edition.force_encoding('UTF-8')
|
||||
io.puts((book.isbn || ""))
|
||||
# we need to close the files so the iPod can be ejected/unmounted
|
||||
# without us closing Alexandria
|
||||
@@ -380,8 +380,8 @@ module Alexandria
|
||||
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 && !book.notes.empty?
|
||||
bibtex << "OPTnote = \"#{latex_escape(book.notes)}\",\n"
|
||||
end
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- alexandria-book-collection-manager-0.7.6/lib/alexandria/ui/new_book_dialog.rb.nothread 2020-11-03 00:29:34.194485720 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.6/lib/alexandria/ui/new_book_dialog.rb 2020-11-03 00:34:01.426386821 +0900
|
||||
@@ -281,15 +281,17 @@ module Alexandria
|
||||
get_images_async
|
||||
false # continue == false if you get to here. Stop timeout.
|
||||
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 ends if continue is false!
|
||||
|
||||
# @find_thread.alive? happens after find_thread is done
|
||||
- unless continue || @find_thread.alive? || @destroyed
|
||||
+ unless continue || (@find_thread && @find_thread.alive?) || @destroyed
|
||||
notify_end_add_by_isbn
|
||||
@button_add.sensitive = false
|
||||
end
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- alexandria-book-collection-manager-0.7.8/lib/alexandria/export_library.rb.image_size 2020-11-29 20:50:34.000000000 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.8/lib/alexandria/export_library.rb 2021-08-27 11:09:49.794917238 +0900
|
||||
@@ -5,6 +5,7 @@
|
||||
# See the file README.md for authorship and licensing information.
|
||||
|
||||
require "csv"
|
||||
+gem "image_size"
|
||||
require "image_size"
|
||||
require "tmpdir"
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff -urp '--exclude=*~' alexandria-book-collection-manager-0.7.8/lib/alexandria/ui/ui_manager.rb alexandria-book-collection-manager-0.7.8.new/lib/alexandria/ui/ui_manager.rb
|
||||
--- alexandria-book-collection-manager-0.7.8/lib/alexandria/ui/ui_manager.rb 2021-03-05 00:06:46.604012398 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.8.new/lib/alexandria/ui/ui_manager.rb 2021-03-04 23:53:11.560895622 +0900
|
||||
@@ -569,7 +569,10 @@ module Alexandria
|
||||
end
|
||||
@iconview.unfreeze
|
||||
@listview.unfreeze # NEW
|
||||
- select_a_book(book) if [Library::BOOK_ADDED, Library::BOOK_UPDATED].include? kind
|
||||
+ if [Library::BOOK_ADDED, Library::BOOK_UPDATED].include? kind
|
||||
+ on_clear_search_results
|
||||
+ select_a_book(book)
|
||||
+ end
|
||||
elsif selected_library.is_a?(SmartLibrary)
|
||||
refresh_books
|
||||
end
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- 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 = File.read(t.source)
|
||||
+ data = File.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
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/conflict_while_copying_dialog.rb.utf8 2019-10-25 01:20:07.000000000 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/conflict_while_copying_dialog.rb 2020-01-03 16:11:41.543997217 +0900
|
||||
@@ -13,9 +13,11 @@ module Alexandria
|
||||
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,
|
||||
format(_("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.force_encoding("UTF-8"),
|
||||
Gtk::Stock::DIALOG_QUESTION,
|
||||
[[_("_Skip"), Gtk::ResponseType::CANCEL],
|
||||
[_("_Replace"), Gtk::ResponseType::OK]],
|
||||
--- alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb.utf8 2019-10-25 01:20:07.000000000 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.4/lib/alexandria/ui/ui_manager.rb 2020-01-03 16:14:53.165730869 +0900
|
||||
@@ -714,7 +714,9 @@ module Alexandria
|
||||
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.dup.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
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
--- alexandria-book-collection-manager-0.7.6/lib/alexandria/library_store.rb.broken_yaml 2020-11-01 21:35:07.000000000 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.6/lib/alexandria/library_store.rb 2020-11-03 00:26:24.240552377 +0900
|
||||
@@ -48,8 +48,23 @@ module Alexandria
|
||||
Dir["*" + Library::EXT[:book]].sort.each do |filename|
|
||||
test[1] = filename if (test[0]).zero?
|
||||
|
||||
+ book_valid_p = true
|
||||
+
|
||||
unless File.size? test[1]
|
||||
log.warn { "Book file #{test[1]} was empty" }
|
||||
+ book_valid_p = false
|
||||
+ end
|
||||
+
|
||||
+ if book_valid_p
|
||||
+ begin
|
||||
+ book = 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})#{Library::EXT[:book]}/.match(filename)
|
||||
if md
|
||||
file_isbn = md[1]
|
||||
@@ -60,7 +75,7 @@ module Alexandria
|
||||
end
|
||||
next
|
||||
end
|
||||
- book = regularize_book_from_yaml(test[1])
|
||||
+
|
||||
old_isbn = book.isbn
|
||||
old_pub_year = book.publishing_year
|
||||
begin
|
||||
@@ -181,6 +196,9 @@ module Alexandria
|
||||
private
|
||||
|
||||
def regularize_book_from_yaml(name)
|
||||
+ require 'syck/constants'
|
||||
+ require 'syck/encoding'
|
||||
+
|
||||
text = File.read(name)
|
||||
|
||||
# Code to remove the mystery string in books imported from Amazon
|
||||
@@ -203,7 +221,7 @@ module Alexandria
|
||||
end
|
||||
|
||||
- book = Book.from_yaml(text)
|
||||
+ book = Book.from_yaml(Syck::unescape(text))
|
||||
|
||||
unless book.isbn.instance_of? String
|
||||
# HACK
|
||||
md = /isbn: (.+)/.match(text)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- alexandria-book-collection-manager-0.7.4/lib/alexandria/book_providers/z3950_provider.rb.zoom_count 2019-10-25 01:20:07.000000000 +0900
|
||||
+++ alexandria-book-collection-manager-0.7.4/lib/alexandria/book_providers/z3950_provider.rb 2020-01-04 13:59:39.224201295 +0900
|
||||
@@ -149,7 +149,11 @@ module Alexandria
|
||||
|
||||
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, ZOOM's "define_zoom_option" calls rbz_connection_get_option,
|
||||
+ #conn.count must be string, ZOOM's "define_zoom_option" calls rbz_connection_get_option,
|
||||
+ #which calls ZOOM_connection_option_get, and it expects that conn.count is string.
|
||||
+ conn.count = conn_count.to_s
|
||||
attr = case type
|
||||
when SEARCH_BY_ISBN then [7]
|
||||
when SEARCH_BY_TITLE then [4]
|
||||
356
alexandria.spec
356
alexandria.spec
|
|
@ -1,28 +1,26 @@
|
|||
%define BothRequires() \
|
||||
Requires: %{*} \
|
||||
BuildRequires: %{*} \
|
||||
%{nil}
|
||||
%if 0%{?fedora} <= 19
|
||||
%define rubyabi 1.9.1
|
||||
%endif
|
||||
|
||||
%define majorver 0.7.9
|
||||
%define repoid 76353
|
||||
|
||||
%define majorver 0.6.9
|
||||
%undefine minorver
|
||||
%undefine ifpre
|
||||
|
||||
%define baserelease 12
|
||||
%define rel %{?ifpre:0.}%{baserelease}%{?minorver:.%minorver}
|
||||
%define fedorarel 11
|
||||
%define rel %{?ifpre:0.}%{fedorarel}%{?minorver:.%minorver}
|
||||
|
||||
|
||||
|
||||
Name: alexandria
|
||||
Version: %{majorver}
|
||||
Release: %{rel}%{?dist}
|
||||
Release: %{rel}%{?dist}.7
|
||||
Summary: Book collection manager
|
||||
|
||||
# Overall GPL-2.0-or-later
|
||||
# share/gnome/help/alexandria/C/alexandria.xml GFDL-1.2-or-later
|
||||
# SPDX confirmed
|
||||
License: GPL-2.0-or-later AND GPL-2.0-or-later
|
||||
URL: https://github.com/mvz/alexandria-book-collection-manager/
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}%{?minorver:-%{minorver}}.tar.gz
|
||||
License: GPLv2+
|
||||
URL: http://alexandria.rubyforge.org/
|
||||
Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{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
|
||||
|
|
@ -31,68 +29,83 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}%{?minorver:-%{minorver}}.
|
|||
# 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.7.4-dont_use_thread_when_adding_file_by_isdn.patch
|
||||
Patch3: alexandria-0.6.6-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.7.9-ascii-fix.patch
|
||||
Patch14: alexandria-0.6.8-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
|
||||
Patch15: alexandria-0.6.8-kcodefix.patch
|
||||
# eval fix
|
||||
Patch16: alexandria-0.6.8-evalfix.patch
|
||||
# With working zoom and ruby19, z3950 provider aborts
|
||||
# with syntax error about next
|
||||
Patch17: alexandria-0.6.8-z3950-next.patch
|
||||
# Two fixes:
|
||||
# a. loading yaml file generated by ruby 18x will show garbage characters
|
||||
# b. moving book entry to another library which also contains the
|
||||
# same book will cause crash..
|
||||
Patch18: alexandria-0.7.9-utf8-convert.patch
|
||||
Patch18: alexandria-0.6.8-utf8-convert.patch
|
||||
# More UTF-8 fix on ruby 1.9, when exporting library to HTML
|
||||
# (bug 819188)
|
||||
Patch19: alexandria-0.7.4-export-to-HTML-with-ruby19.patch
|
||||
Patch19: alexandria-0.6.8-export-to-HTML-with-ruby19.patch
|
||||
# More UTF-8 fix on ruby 1.9, when exporting library to csv
|
||||
# or bibtex
|
||||
Patch20: alexandria-0.7.5-export-to-CSV-bintex-with-ruby19.patch
|
||||
Patch20: alexandria-0.6.8-export-to-CSV-bintex-with-ruby19.patch
|
||||
# Remove garbage character with icon view on multibyte locate
|
||||
Patch21: alexandria-0.7.4-iconview-multibyte.patch
|
||||
Patch21: alexandria-0.6.8-iconview-multibyte.patch
|
||||
# Split Patch18 into two patches, one for lib/alexandria/models/library.rb
|
||||
# (this file) and other. Also handle broken yaml file correctly and let
|
||||
# user redownload it
|
||||
# (bug 861740)
|
||||
Patch22: alexandria-0.7.9-yaml-unescape.patch
|
||||
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.7.4-delete-broken-yaml.patch
|
||||
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.7.6-newbook-nothread.patch
|
||||
Patch25: alexandria-0.6.9-newbook-nothread.patch
|
||||
# Make z3950 provider work
|
||||
# ZOOM::Connection.count must be string
|
||||
Patch26: alexandria-0.7.9-z3950-zoom-count.patch
|
||||
Patch26: alexandria-0.6.9-z3950-zoom-count.patch
|
||||
# Read negative value as integer in case position has such value
|
||||
# (bug 1014295)
|
||||
# https://github.com/mvz/alexandria-book-collection-manager/issues/135
|
||||
# Applied in 0.7.9
|
||||
#Patch27: alexandria-0.7.6-negative-value.patch
|
||||
Patch27: alexandria-0.6.9-negative-value.patch
|
||||
# Specify goocanvas version (bug 1024931)
|
||||
# This is obsolete with 0.7.4. 0.7.4 uses goocanvas2 with introspection
|
||||
Patch28: alexandria-0.6.9-goocanvas-version.patch
|
||||
# Make glade2 translatable text actually translated (i10ned)
|
||||
Patch29: alexandria-0.7.4-glade-gettext.patch
|
||||
# Workaround: more force_encoding for title, etc for loading old yaml
|
||||
Patch30: alexandria-0.7.4-title-force-encoding.patch
|
||||
# Remove undefined / unneeded method
|
||||
Patch31: alexandria-0.7.4-remove-undefined-method.patch
|
||||
# Once reset search text when adding new book (bug 1909500)
|
||||
# https://github.com/mvz/alexandria-book-collection-manager/issues/106
|
||||
Patch32: alexandria-0.7.8-reset-search-when-adding-new-book.patch
|
||||
# Explicitly specify image_size gem
|
||||
Patch33: alexandria-0.7.8-explicitly-specify_gem_image_size.patch
|
||||
Patch29: alexandria-0.6.9-glade-gettext.patch
|
||||
# Make this compatible with rubygem-gdk_pixbuf2 3.0.9
|
||||
Patch30: alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%if 0%{?fedora} >= 19
|
||||
Requires: ruby(release)
|
||||
BuildRequires: ruby(release)
|
||||
%else
|
||||
Requires: ruby(abi) = %{rubyabi}
|
||||
Requires: ruby
|
||||
BuildRequires: ruby(abi) = %{rubyabi}
|
||||
BuildRequires: ruby
|
||||
%endif
|
||||
|
||||
# For ruby macros
|
||||
BuildRequires: ruby-devel
|
||||
|
|
@ -102,56 +115,47 @@ BuildRequires: desktop-file-utils
|
|||
BuildRequires: GConf2
|
||||
BuildRequires: gettext
|
||||
BuildRequires: intltool
|
||||
# From 0.7.4
|
||||
BuildRequires: rubygem(rspec)
|
||||
# Needed since Ruby 3.0.
|
||||
# https://github.com/mvz/alexandria-book-collection-manager/issues/124
|
||||
%BothRequires rubygem(rexml)
|
||||
# rspec test
|
||||
BuildRequires: %{_bindir}/xvfb-run
|
||||
BuildRequires: %{_bindir}/ping
|
||||
BuildRequires: rubygem(webmock)
|
||||
BuildRequires: rubygem(json)
|
||||
BuildRequires: rubygem(pry)
|
||||
BuildRequires: gstreamer1-plugins-base
|
||||
# autoaudiosink
|
||||
BuildRequires: gstreamer1-plugins-good
|
||||
|
||||
# 0.7.9 uses nokogiri instead of hpricot
|
||||
# Amazon AWS v3 -> v4 switch
|
||||
# AWS v4 is supported by alexandria itself
|
||||
# But hpricot is still needed
|
||||
#Requires: ruby(amazon)
|
||||
%BothRequires rubygem(gettext)
|
||||
%BothRequires rubygem(htmlentities)
|
||||
%BothRequires rubygem(image_size)
|
||||
%BothRequires rubygem(nokogiri)
|
||||
Requires: rubygem(gettext)
|
||||
Requires: rubygem(hpricot)
|
||||
Requires: rubygem(htmlentities)
|
||||
Requires: ruby(imagesize)
|
||||
# Dependency removed on 0.6.4b1
|
||||
#Requires: ruby(mechanize)
|
||||
# Kill ruby(revolution) dependency
|
||||
#Requires: ruby(revolution)
|
||||
%BothRequires rubygem(psych)
|
||||
|
||||
# ruby(zoom) -> rubygem(zoom) switch
|
||||
#Requires: ruby(zoom)
|
||||
%BothRequires rubygem(zoom) >= 0.3.0
|
||||
%BothRequires rubygem(marc)
|
||||
Requires: rubygem(zoom) >= 0.3.0
|
||||
Requires: rubygem(marc)
|
||||
|
||||
# Killed on 0.6.8
|
||||
#Requires: ruby(gconf2)
|
||||
# Explicitly
|
||||
Requires: GConf2
|
||||
%BothRequires rubygem(gdk_pixbuf2)
|
||||
%BothRequires rubygem(glib2)
|
||||
Requires: rubygem(gdk_pixbuf2)
|
||||
Requires: rubygem(glib2)
|
||||
# Killed on 0.6.8
|
||||
#Requires: ruby(gnome2)
|
||||
#Requires: ruby(libglade2)
|
||||
# Added from 0.6.8
|
||||
# Requires: rubygem(goocanvas)
|
||||
# The above needs more explicit
|
||||
# With 0.7.4 this dependency changed, goocanvas2 + introspection
|
||||
%BothRequires rubygem(goocanvas) >= 2
|
||||
%BothRequires rubygem(gstreamer)
|
||||
%BothRequires rubygem(gtk3)
|
||||
%if 0%{?fedora} >= 20
|
||||
Requires: rubygem-goocanvas1
|
||||
%else
|
||||
Requires: rubygem-goocanvas
|
||||
%endif
|
||||
Requires: rubygem(gstreamer)
|
||||
# Uses syck (bug 922217)
|
||||
%BothRequires rubygem(syck)
|
||||
%if 0%{?fedora} >= 19
|
||||
Requires: rubygem(syck)
|
||||
%endif
|
||||
|
||||
Requires(pre): GConf2
|
||||
Requires(post): GConf2
|
||||
|
|
@ -161,32 +165,32 @@ Requires(preun): GConf2
|
|||
Alexandria is a GNOME application to help you manage your book collection.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-book-collection-manager-%{majorver}%{?minorver:-%{?minorver}}
|
||||
|
||||
%setup -q -n %{name}-%{majorver}%{?minorver:-%{?minorver}}
|
||||
# Check if patch2 issue is fixed in rev 1154
|
||||
#%%patch -P2 -p0 -b .up25348
|
||||
%patch -P3 -p1 -b .up28263.isdn
|
||||
#%%patch -P4 -p0 -b .up29479.search
|
||||
%patch -P14 -p1 -b .ascii -Z
|
||||
#%%patch -P15 -p1 -b .kcodefix
|
||||
%patch -P18 -p1 -b .ruby19_utf8 -Z
|
||||
%patch -P19 -p1 -b .export_html -Z
|
||||
%patch -P20 -p1 -b .export_csv -Z
|
||||
%patch -P21 -p1 -b .icon_kanji -Z
|
||||
%patch -P22 -p1 -b .broken_yaml -Z
|
||||
%patch -P23 -p1 -b .delete_yaml -Z
|
||||
%patch -P25 -p1 -b .nothread -Z
|
||||
%patch -P26 -p1 -b .z3950_count -Z
|
||||
#%%patch -P27 -p1 -b .negative -Z
|
||||
%patch -P29 -p1 -b .gettext -Z
|
||||
%patch -P30 -p1 -b .utf8_2 -Z
|
||||
%patch -P31 -p1 -b .undefined_method -Z
|
||||
%patch -P32 -p1 -b .reset_search -Z
|
||||
%patch -P33 -p1 -b .image_size -Z
|
||||
|
||||
# Part of https://github.com/mvz/alexandria-book-collection-manager/commit/d9116e99242c209129bf09c3c1ad9a4ff6fdcf44
|
||||
# Needed for ruby3.2 - removes File.exists?
|
||||
sed -i util/rake/gettextgenerate.rb -e 's|unless FileTest.exists.*$||'
|
||||
#%%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
|
||||
%patch17 -p1 -b .z3950_next
|
||||
%patch18 -p1 -b .ruby19_utf8
|
||||
%patch19 -p1 -b .export_html
|
||||
%patch20 -p1 -b .export_csv
|
||||
%patch21 -p1 -b .icon_kanji
|
||||
%patch22 -p1 -b .broken_yaml
|
||||
%patch23 -p1 -b .delete_yaml
|
||||
%patch24 -p1 -b .iconv
|
||||
%patch25 -p1 -b .nothread
|
||||
%patch26 -p1 -b .z3950_count
|
||||
%patch27 -p1 -b .negative
|
||||
%patch28 -p1 -b .goocanvasver
|
||||
%patch29 -p1 -b .gettext
|
||||
%patch30 -p1 -b .rg309
|
||||
|
||||
# Embed Fedora EVR
|
||||
%{__sed} -i.evr \
|
||||
|
|
@ -198,13 +202,6 @@ sed -i util/rake/gettextgenerate.rb -e 's|unless FileTest.exists.*$||'
|
|||
-e '/system/s|msgfmt |msgfmt --statistics |' \
|
||||
util/rake/gettextgenerate.rb
|
||||
|
||||
# Workaround for directory hierarchy
|
||||
ln -sf share data
|
||||
|
||||
# Use system wide directory for datadir
|
||||
sed -i lib/alexandria/config.rb \
|
||||
-e "\@^[ \t]*SHARE_DIR@s|SHARE_DIR[ \t]*=.*|SHARE_DIR = '/usr/share'|"
|
||||
|
||||
%build
|
||||
rake build --trace
|
||||
|
||||
|
|
@ -214,6 +211,9 @@ rake install_package_staging \
|
|||
RUBYLIBDIR=%{ruby_vendorlibdir}
|
||||
|
||||
desktop-file-install \
|
||||
%if 0%{?fedora} < 19
|
||||
--vendor fedora \
|
||||
%endif
|
||||
--dir $RPM_BUILD_ROOT%{_datadir}/applications/ \
|
||||
--delete-original \
|
||||
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
|
||||
|
|
@ -239,8 +239,8 @@ desktop-file-install \
|
|||
#
|
||||
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo
|
||||
cat > $RPM_BUILD_ROOT%{_datadir}/metainfo/%{name}.appdata.xml <<EOF
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
|
||||
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
BugReportURL: https://github.com/mvz/alexandria-book-collection-manager/issues/2
|
||||
|
|
@ -276,53 +276,6 @@ EOF
|
|||
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
export LANG=C.utf8
|
||||
# Tweak config path for %%check
|
||||
sed -i.testsuite lib/alexandria/config.rb \
|
||||
-e 's|/usr/share|%{buildroot}%{_datadir}|'
|
||||
# Kill tests which needs network
|
||||
disable_test() {
|
||||
sed -i.testsuite $1 -e "\@$2@s|it|xit|"
|
||||
}
|
||||
|
||||
|
||||
rm -rf .config/gconf
|
||||
mkdir -p .config/gconf
|
||||
export XDG_CONFIG_HOME=$(pwd)/.config
|
||||
|
||||
# fake bundler
|
||||
mkdir -p FAKE/bundler
|
||||
touch FAKE/bundler/setup.rb
|
||||
touch FAKE/simplecov.rb
|
||||
export RUBYLIB=$(pwd)/FAKE
|
||||
|
||||
# Disable z3950 provider test
|
||||
disable_test spec/alexandria/book_providers/bl_provider_spec.rb "works"
|
||||
|
||||
ping -w3 www.google.co.jp && \
|
||||
{
|
||||
# Need taking a look at this
|
||||
disable_test spec/alexandria/book_providers/loc_provider_spec.rb "works for a book";
|
||||
true;
|
||||
} \
|
||||
|| \
|
||||
{
|
||||
disable_test spec/alexandria/book_providers/thalia_provider_spec.rb "works when searching by ISBN";
|
||||
disable_test spec/alexandria/book_providers/loc_provider_spec.rb "works for a book";
|
||||
disable_test spec/alexandria/book_providers/sbn_provider_spec.rb "works";
|
||||
sed -i spec/alexandria/book_providers_spec.rb -e "\@Alexandria::BookProviders::SBNProvider@{n;s|it|xit|}";
|
||||
}
|
||||
|
||||
xvfb-run \
|
||||
-s "-screen 0 640x480x24" \
|
||||
rake spec:unit
|
||||
|
||||
find . -name \*.testsuite | while read f
|
||||
do
|
||||
mv ${f} ${f%.testsuite}
|
||||
done
|
||||
|
||||
%pre
|
||||
%gconf_schema_prepare %{name}
|
||||
|
||||
|
|
@ -333,11 +286,11 @@ done
|
|||
%gconf_schema_remove %{name}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%license COPYING
|
||||
%doc COPYING
|
||||
%doc ChangeLog*
|
||||
%doc INSTALL.md
|
||||
%doc INSTALL
|
||||
%doc README*
|
||||
%doc TODO.md
|
||||
%doc TODO
|
||||
%doc doc/[A-Z]*
|
||||
%doc doc/cuecat_support.rdoc
|
||||
|
||||
|
|
@ -354,108 +307,11 @@ done
|
|||
%{_datadir}/omf/%{name}/
|
||||
%{_datadir}/sounds/%{name}/
|
||||
|
||||
%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%{_datadir}/appdata/%{name}.appdata.xml
|
||||
%{_datadir}/applications/*%{name}.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Nov 16 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.9-9
|
||||
- Add missing syck file import (bug 2326632)
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Jan 2 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.9-5
|
||||
- SPDX migration
|
||||
|
||||
* Fri Dec 22 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.9-4
|
||||
- Disable z3950x provider test
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Oct 17 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.9-2
|
||||
- Backport some changes on upstream git for ruby3.2 File.exists? removal
|
||||
|
||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sun Feb 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.9-1
|
||||
- 0.7.9
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-6.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Jan 17 2022 Kevin Fenzi <kevin@scrye.com> - 0.7.8-6.1
|
||||
- Rebuild for hiredis 1.0.2
|
||||
|
||||
* Fri Aug 27 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.8-6
|
||||
- Switch to image_size gem, specify explicitly
|
||||
- Disable 1 failing test
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-5.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sun Mar 7 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.8-5
|
||||
- set XDG_CONFIG_HOME for test suite
|
||||
|
||||
* Fri Mar 5 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.8-4
|
||||
- Simply use rake spec, and fake bundler / simplecov
|
||||
|
||||
* Fri Mar 5 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.8-3
|
||||
- Once reset search text when adding new book (bug 1909500)
|
||||
- Enable test, fix Fedora specific patch (errors detected with the test)
|
||||
|
||||
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Jan 7 2021 Vít Ondruch <vondruch@redhat.com> - 0.7.8-2
|
||||
- Add ReXML dependency needed for Ruby 3.0.
|
||||
|
||||
* Thu Dec 3 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.8-1
|
||||
- 0.7.8
|
||||
|
||||
* Mon Nov 2 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.6-1
|
||||
- 0.7.6
|
||||
|
||||
* Fri Oct 30 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.5-1
|
||||
- 0.7.5
|
||||
- Once revert upstream change about setting initial visibility to false
|
||||
(upstream bug 86)
|
||||
|
||||
* Sun Aug 9 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.4-3
|
||||
- syck is needed, adding to Requires again
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon May 11 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.4-2
|
||||
- Fix Requires, expecially, add R: rubygem(gtk3) (bug 1833761)
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.4-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jan 15 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.7.4-1
|
||||
- 0.7.4, move to github mvz fork
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.9-11.7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (alexandria-0.7.9.tar.gz) = c1619b68778c1b94b6dff32c7be698afe29488c96c1719fcf65b6a03b3078c58053a5e76e9771a00a06dc654f95329af381c6659521f137df8eccca351811a18
|
||||
8a3cbc21fd63596a3bdc784caf66ea79 alexandria-0.6.9.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue