1 |
commit: 9cff2e3f8b003d0a30e31244f8c26f8cc6acb031 |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 08:24:43 2018 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 08:25:12 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cff2e3f |
7 |
|
8 |
dev-ruby/multi_xml: fix compat with ox > 2.4.11 |
9 |
|
10 |
Backport upstream pull requests approved by ox maintainer to fix |
11 |
specs with ox > 2.4.11 and ensure more consistent options. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/640090 |
14 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
15 |
|
16 |
.../multi_xml/files/multi_xml-0.6.0-ox24.patch | 23 +++++++++++++ |
17 |
dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild | 39 ++++++++++++++++++++++ |
18 |
2 files changed, 62 insertions(+) |
19 |
|
20 |
diff --git a/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch b/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..a0568a8fb52 |
23 |
--- /dev/null |
24 |
+++ b/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch |
25 |
@@ -0,0 +1,23 @@ |
26 |
+From f9d18d87c3340aa53f524524bf189b99459ab1e6 Mon Sep 17 00:00:00 2001 |
27 |
+From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri@×××××××.cz> |
28 |
+Date: Thu, 18 May 2017 23:10:48 +0200 |
29 |
+Subject: [PATCH] Update for ox > 2.4.11 |
30 |
+ |
31 |
+There is more pedantic parsing of white-space characters in ox > 2.4.11. Better to set explicitly the expected skip mode. |
32 |
+--- |
33 |
+ lib/multi_xml/parsers/ox.rb | 2 +- |
34 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
35 |
+ |
36 |
+diff --git a/lib/multi_xml/parsers/ox.rb b/lib/multi_xml/parsers/ox.rb |
37 |
+index e52a560..dc1413e 100644 |
38 |
+--- a/lib/multi_xml/parsers/ox.rb |
39 |
++++ b/lib/multi_xml/parsers/ox.rb |
40 |
+@@ -29,7 +29,7 @@ def parse_error |
41 |
+ |
42 |
+ def parse(io) |
43 |
+ handler = Handler.new |
44 |
+- ::Ox.sax_parse(handler, io, :convert_special => true) |
45 |
++ ::Ox.sax_parse(handler, io, convert_special: true, skip: :skip_return) |
46 |
+ handler.doc |
47 |
+ end |
48 |
+ |
49 |
|
50 |
diff --git a/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild b/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild |
51 |
new file mode 100644 |
52 |
index 00000000000..e995f1ad720 |
53 |
--- /dev/null |
54 |
+++ b/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild |
55 |
@@ -0,0 +1,39 @@ |
56 |
+# Copyright 1999-2018 Gentoo Foundation |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+EAPI=6 |
60 |
+ |
61 |
+USE_RUBY="ruby23 ruby24 ruby25" |
62 |
+ |
63 |
+RUBY_FAKEGEM_RECIPE_TEST="rspec3" |
64 |
+RUBY_FAKEGEM_TASK_DOC="yard" |
65 |
+ |
66 |
+RUBY_FAKEGEM_DOCDIR="doc" |
67 |
+RUBY_FAKEGEM_EXTRADOC="README.md" |
68 |
+ |
69 |
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" |
70 |
+ |
71 |
+inherit ruby-fakegem |
72 |
+ |
73 |
+DESCRIPTION="A generic swappable back-end for XML parsing" |
74 |
+HOMEPAGE="https://www.rubydoc.info/gems/multi_xml" |
75 |
+SRC_URI="https://github.com/sferik/multi_xml/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
76 |
+LICENSE="MIT" |
77 |
+ |
78 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
79 |
+SLOT="0" |
80 |
+IUSE="" |
81 |
+ |
82 |
+ruby_add_bdepend "doc? ( dev-ruby/yard )" |
83 |
+ruby_add_bdepend "test? ( dev-ruby/ox )" |
84 |
+ |
85 |
+all_ruby_prepare() { |
86 |
+ eapply "${FILESDIR}/${P}-ox24.patch" |
87 |
+ |
88 |
+ sed -i -e '/simplecov/,/^end/ s:^:#:' spec/helper.rb || die |
89 |
+ sed -i -e '/bundler/I s:^:#:' -e '/yardstick/,/end/ s:^:#:' Rakefile || die |
90 |
+} |
91 |
+ |
92 |
+each_ruby_test() { |
93 |
+ CI=true each_fakegem_test |
94 |
+} |