From b264c3d65ce34284af8da4bf3aed50ba7f47eeeb Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Jan 04 2020 05:51:28 +0000 Subject: WIP: importing patch once done --- 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.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.spec b/alexandria.spec index ad016cf..8b56c8d 100644 --- a/alexandria.spec +++ b/alexandria.spec @@ -68,9 +68,7 @@ Patch27: alexandria-0.7.4-negative-value.patch # Specify goocanvas version (bug 1024931) # This is obsolete with 0.7.4. 0.7.4 uses goocanvas2 with introspection # Make glade2 translatable text actually translated (i10ned) -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 +Patch29: alexandria-0.7.4-glade-gettext.patch BuildArch: noarch @@ -161,7 +159,6 @@ Alexandria is a GNOME application to help you manage your book collection. %patch26 -p1 -b .z3950_count %patch27 -p1 -b .negative %patch29 -p1 -b .gettext -%patch30 -p1 -b .rg309 # Embed Fedora EVR %{__sed} -i.evr \