1 |
commit: 33214a8b309b90f280b40816e5b84c14d13b74a7 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 27 15:53:25 2017 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 27 15:53:57 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33214a8b |
7 |
|
8 |
dev-ruby/facter: fix building with leatherman-1.0.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
dev-ruby/facter/facter-3.6.5.ebuild | 3 +- |
13 |
.../facter/files/is-integer_fact-1624_3.6.5.patch | 58 ++++++++++++++++++++++ |
14 |
2 files changed, 60 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-ruby/facter/facter-3.6.5.ebuild b/dev-ruby/facter/facter-3.6.5.ebuild |
17 |
index 47f77c3cc1a..c4b3000acb2 100644 |
18 |
--- a/dev-ruby/facter/facter-3.6.5.ebuild |
19 |
+++ b/dev-ruby/facter/facter-3.6.5.ebuild |
20 |
@@ -4,7 +4,7 @@ |
21 |
EAPI=5 |
22 |
USE_RUBY="ruby21 ruby22" |
23 |
|
24 |
-inherit cmake-utils multilib ruby-ng |
25 |
+inherit cmake-utils eutils multilib ruby-ng |
26 |
|
27 |
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems" |
28 |
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/" |
29 |
@@ -43,6 +43,7 @@ src_prepare() { |
30 |
# make the require work |
31 |
sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die |
32 |
# patches |
33 |
+ epatch "${FILESDIR}/is-integer_fact-1624_3.6.5.patch" |
34 |
epatch_user |
35 |
} |
36 |
|
37 |
|
38 |
diff --git a/dev-ruby/facter/files/is-integer_fact-1624_3.6.5.patch b/dev-ruby/facter/files/is-integer_fact-1624_3.6.5.patch |
39 |
new file mode 100644 |
40 |
index 00000000000..c7b8d80b2c7 |
41 |
--- /dev/null |
42 |
+++ b/dev-ruby/facter/files/is-integer_fact-1624_3.6.5.patch |
43 |
@@ -0,0 +1,58 @@ |
44 |
+From 9cb17d9fdffabab3693f6548f6bfc54ed2251325 Mon Sep 17 00:00:00 2001 |
45 |
+From: Maggie Dreyer <maggie@××××××.com> |
46 |
+Date: Tue, 2 May 2017 10:21:06 -0700 |
47 |
+Subject: [PATCH] (FACT-1624) Use `is_integer` instead of `is_fixednum` and |
48 |
+ `is_bignum` |
49 |
+ |
50 |
+Ruby 2.4 unified Fixnum and Bignum into Integer. We updated the |
51 |
+Leatherman API to match this. This commit updates Facter to use the new |
52 |
+API. |
53 |
+--- |
54 |
+ lib/src/ruby/module.cc | 2 +- |
55 |
+ lib/src/ruby/ruby_value.cc | 6 +++--- |
56 |
+ 2 files changed, 4 insertions(+), 4 deletions(-) |
57 |
+ |
58 |
+diff --git a/lib/src/ruby/module.cc b/lib/src/ruby/module.cc |
59 |
+index 2d7223e0f..b8aeeed09 100644 |
60 |
+--- a/lib/src/ruby/module.cc |
61 |
++++ b/lib/src/ruby/module.cc |
62 |
+@@ -866,7 +866,7 @@ namespace facter { namespace ruby { |
63 |
+ // Unfortunately we have to call to_sym rather than using ID2SYM, which is Ruby version dependent |
64 |
+ uint32_t timeout = 0; |
65 |
+ volatile VALUE timeout_option = ruby.rb_hash_lookup(argv[1], ruby.to_symbol("timeout")); |
66 |
+- if (ruby.is_fixednum(timeout_option)) { |
67 |
++ if (ruby.is_integer(timeout_option)) { |
68 |
+ timeout = ruby.num2size_t(timeout_option); |
69 |
+ } |
70 |
+ |
71 |
+diff --git a/lib/src/ruby/ruby_value.cc b/lib/src/ruby/ruby_value.cc |
72 |
+index d8ea20ce6..645472a3f 100644 |
73 |
+--- a/lib/src/ruby/ruby_value.cc |
74 |
++++ b/lib/src/ruby/ruby_value.cc |
75 |
+@@ -86,7 +86,7 @@ namespace facter { namespace ruby { |
76 |
+ json.SetString(str, size, allocator); |
77 |
+ return; |
78 |
+ } |
79 |
+- if (ruby.is_fixednum(value) || ruby.is_bignum(value)) { |
80 |
++ if (ruby.is_integer(value)) { |
81 |
+ json.SetInt64(ruby.rb_num2ll(value)); |
82 |
+ return; |
83 |
+ } |
84 |
+@@ -155,7 +155,7 @@ namespace facter { namespace ruby { |
85 |
+ } |
86 |
+ return; |
87 |
+ } |
88 |
+- if (ruby.is_fixednum(value) || ruby.is_bignum(value)) { |
89 |
++ if (ruby.is_integer(value)) { |
90 |
+ os << ruby.rb_num2ll(value); |
91 |
+ return; |
92 |
+ } |
93 |
+@@ -241,7 +241,7 @@ namespace facter { namespace ruby { |
94 |
+ emitter << str; |
95 |
+ return; |
96 |
+ } |
97 |
+- if (ruby.is_fixednum(value) || ruby.is_bignum(value)) { |
98 |
++ if (ruby.is_integer(value)) { |
99 |
+ emitter << ruby.rb_num2ll(value); |
100 |
+ return; |
101 |
+ } |