commit:     8b6e14e4c2ed387c2cf5c978ea8859e8dc30cc59
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 07:58:44 2016 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Jan  3 07:58:44 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b6e14e4

dev-ruby/ruby-poppler: fix compilation with new poppler, bug 570634

Package-Manager: portage-2.2.26

 .../ruby-poppler-3.0.7-type-orientation.patch      | 27 ++++++++++++++++++
 dev-ruby/ruby-poppler/ruby-poppler-3.0.7-r1.ebuild | 33 ++++++++++++++++++++++
 2 files changed, 60 insertions(+)

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
index 0000000..50f5f52
--- /dev/null
+++ b/dev-ruby/ruby-poppler/files/ruby-poppler-3.0.7-type-orientation.patch
@@ -0,0 +1,27 @@
+From 3dda85661515d71101f1028dc7d68d4e53de45b1 Mon Sep 17 00:00:00 2001
+From: Kouhei Sutou <[email protected]>
+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
index 0000000..e37472e
--- /dev/null
+++ b/dev-ruby/ruby-poppler/ruby-poppler-3.0.7-r1.ebuild
@@ -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
+}

Reply via email to