dev-ruby/ruby-poppler: fix compilation with new poppler, bug 570634
authorHans de Graaff <graaff@gentoo.org>
Sun, 3 Jan 2016 07:58:44 +0000 (08:58 +0100)
committerHans de Graaff <graaff@gentoo.org>
Sun, 3 Jan 2016 07:58:44 +0000 (08:58 +0100)
Package-Manager: portage-2.2.26

dev-ruby/ruby-poppler/files/ruby-poppler-3.0.7-type-orientation.patch [new file with mode: 0644]
dev-ruby/ruby-poppler/ruby-poppler-3.0.7-r1.ebuild [new file with mode: 0644]

diff --git a/dev-ruby/ruby-poppler/files/ruby-poppler-3.0.7-type-orientation.patch b/dev-ruby/ruby-poppler/files/ruby-poppler-3.0.7-type-orientation.patch
new file mode 100644 (file)
index 0000000..50f5f52
--- /dev/null
@@ -0,0 +1,27 @@
+From 3dda85661515d71101f1028dc7d68d4e53de45b1 Mon Sep 17 00:00:00 2001
+From: Kouhei Sutou <kou@clear-code.com>
+Date: Fri, 25 Dec 2015 23:36:00 +0900
+Subject: [PATCH] poppler: remove needless POPPLER_TYPE_ORIENTATION binding
+
+Poppler 0.39 removed it. And there are no Poppler releases that use
+POPPLER_TYPE_ORIENTATION.
+
+GitHub: fix #653
+
+Reported by Rob Brackett. Thanks!!!
+---
+ poppler/ext/poppler/rbpoppler.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/poppler/ext/poppler/rbpoppler.c b/poppler/ext/poppler/rbpoppler.c
+index 2b28f95..fb3bfed 100644
+--- a/poppler/ext/poppler/rbpoppler.c
++++ b/poppler/ext/poppler/rbpoppler.c
+@@ -56,7 +56,6 @@ Init_poppler(void)
+                                 INT2FIX(POPPLER_MICRO_VERSION)));
+ 
+     G_DEF_CLASS(POPPLER_TYPE_ERROR, "Error", RG_TARGET_NAMESPACE);
+-    G_DEF_CLASS(POPPLER_TYPE_ORIENTATION, "Orientation", RG_TARGET_NAMESPACE);
+ 
+     G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION_TYPE,
+                 "PageTransitionType", RG_TARGET_NAMESPACE);
diff --git a/dev-ruby/ruby-poppler/ruby-poppler-3.0.7-r1.ebuild b/dev-ruby/ruby-poppler/ruby-poppler-3.0.7-r1.ebuild
new file mode 100644 (file)
index 0000000..e37472e
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby20 ruby21 ruby22"
+
+inherit ruby-ng-gnome2
+
+DESCRIPTION="Ruby poppler-glib bindings"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND+=" app-text/poppler[cairo]"
+DEPEND+=" app-text/poppler[cairo]"
+
+RUBY_PATCHES=( ${P}-type-orientation.patch )
+
+ruby_add_rdepend "dev-ruby/ruby-gdkpixbuf2
+       >=dev-ruby/ruby-glib2-${PV}
+       >=dev-ruby/ruby-gtk2-${PV}"
+
+all_ruby_prepare() {
+       # Avoid compilation of dependencies during test.
+       sed -i -e '/if have_make/,/^  end/ s:^:#:' test/run-test.rb || die
+
+       # Avoid tests downloading a test PDF directly.
+       rm -f test/test_{annotation,document,page}.rb || die
+}
+
+each_ruby_test() {
+       ${RUBY} test/run-test.rb || die
+}