summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch139
-rw-r--r--alexandria.spec10
2 files changed, 147 insertions, 2 deletions
diff --git a/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch b/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch
new file mode 100644
index 0000000..2797d05
--- /dev/null
+++ b/alexandria-0.6.9-gdk_pixbuf2-3.0.9.patch
@@ -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
diff --git a/alexandria.spec b/alexandria.spec
index 8a9137e..21e97f9 100644
--- a/alexandria.spec
+++ b/alexandria.spec
@@ -8,14 +8,14 @@
%undefine minorver
%undefine ifpre
-%define fedorarel 10
+%define fedorarel 11
%define rel %{?ifpre:0.}%{fedorarel}%{?minorver:.%minorver}
Name: alexandria
Version: %{majorver}
-Release: %{rel}%{?dist}.3
+Release: %{rel}%{?dist}
Summary: Book collection manager
Group: Applications/Productivity
@@ -93,6 +93,8 @@ Patch27: alexandria-0.6.9-negative-value.patch
Patch28: alexandria-0.6.9-goocanvas-version.patch
# 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
BuildArch: noarch
@@ -189,6 +191,7 @@ Alexandria is a GNOME application to help you manage your book collection.
%patch27 -p1 -b .negative
%patch28 -p1 -b .goocanvasver
%patch29 -p1 -b .gettext
+%patch30 -p1 -b .rg309
# Embed Fedora EVR
%{__sed} -i.evr \
@@ -328,6 +331,9 @@ exit 0
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%changelog
+* Mon Aug 15 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.9-11
+- Make this compatible with gdk_pixbuf2 3.0.9
+
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.9-10.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild