[arch-commits] Commit in leatherman/trunk (PKGBUILD ruby-2.4.patch)
Anatol Pomozov
anatolik at archlinux.org
Wed Jan 11 10:32:00 UTC 2017
Date: Wednesday, January 11, 2017 @ 10:31:59
Author: anatolik
Revision: 206793
upgpkg: leatherman 0.9.1-4
Ruby 2.4 rebuild
Added:
leatherman/trunk/ruby-2.4.patch
Modified:
leatherman/trunk/PKGBUILD
----------------+
PKGBUILD | 13 +++++++----
ruby-2.4.patch | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-01-11 10:28:12 UTC (rev 206792)
+++ PKGBUILD 2017-01-11 10:31:59 UTC (rev 206793)
@@ -2,7 +2,7 @@
pkgname=leatherman
pkgver=0.9.1
-pkgrel=3
+pkgrel=4
pkgdesc="Collection of C++ and CMake utility libraries"
arch=('i686' 'x86_64')
url="https://github.com/puppetlabs/leatherman"
@@ -10,9 +10,11 @@
makedepends=('boost' 'cmake' 'rapidjson')
checkdepends=('ruby')
source=($pkgname-$pkgver.tar.gz::https://github.com/puppetlabs/leatherman/archive/$pkgver.tar.gz
- boost-1.62.patch)
+ boost-1.62.patch
+ ruby-2.4.patch)
md5sums=('ad1c03f759a9451b333c867ec90e4a97'
- '18aeaac44f2b24702f04fb04535d3a3a')
+ '18aeaac44f2b24702f04fb04535d3a3a'
+ 'eb63e7694bd15e779ddc7b146adaad90')
prepare() {
cd $pkgname-$pkgver
@@ -22,7 +24,10 @@
$( grep -rl rb_data_object_alloc ruby )
# (LTH-115) Fix Boost.Log sink initialization with Boost 1.62
- patch -Np0 -i ../boost-1.62.patch
+ patch -Np0 -i ../boost-1.62.patch
+
+ # (LTH-124) Fix for ruby-2.4 related API changes
+ patch -p1 -i ../ruby-2.4.patch
}
build() {
Added: ruby-2.4.patch
===================================================================
--- ruby-2.4.patch (rev 0)
+++ ruby-2.4.patch 2017-01-11 10:31:59 UTC (rev 206793)
@@ -0,0 +1,63 @@
+diff --git a/ruby/inc/leatherman/ruby/api.hpp b/ruby/inc/leatherman/ruby/api.hpp
+index 32117c6..4f6c0ba 100644
+--- a/ruby/inc/leatherman/ruby/api.hpp
++++ b/ruby/inc/leatherman/ruby/api.hpp
+@@ -412,15 +412,11 @@ namespace leatherman { namespace ruby {
+ /**
+ * See MRI documentation.
+ */
+- VALUE* const rb_cFixnum;
++ VALUE* const rb_cInteger;
+ /**
+ * See MRI documentation.
+ */
+ VALUE* const rb_cFloat;
+- /**
+- * See MRI documentation.
+- */
+- VALUE* const rb_cBignum;
+
+ /**
+ * See MRI documentation.
+diff --git a/ruby/src/api.cc b/ruby/src/api.cc
+index 434f691..9e96e05 100644
+--- a/ruby/src/api.cc
++++ b/ruby/src/api.cc
+@@ -100,9 +100,8 @@ namespace leatherman { namespace ruby {
+ LOAD_SYMBOL(rb_cHash),
+ LOAD_SYMBOL(rb_cString),
+ LOAD_SYMBOL(rb_cSymbol),
+- LOAD_SYMBOL(rb_cFixnum),
++ LOAD_SYMBOL(rb_cInteger),
+ LOAD_SYMBOL(rb_cFloat),
+- LOAD_SYMBOL(rb_cBignum),
+ LOAD_SYMBOL(rb_eException),
+ LOAD_SYMBOL(rb_eArgError),
+ LOAD_SYMBOL(rb_eTypeError),
+@@ -396,12 +395,12 @@ namespace leatherman { namespace ruby {
+
+ bool api::is_fixednum(VALUE value) const
+ {
+- return is_a(value, *rb_cFixnum);
++ return is_a(value, *rb_cInteger);
+ }
+
+ bool api::is_bignum(VALUE value) const
+ {
+- return is_a(value, *rb_cBignum);
++ return is_a(value, *rb_cInteger);
+ }
+
+ bool api::is_float(VALUE value) const
+diff --git a/ruby/tests/api-test.cc b/ruby/tests/api-test.cc
+index 20bcec7..1d2cafb 100644
+--- a/ruby/tests/api-test.cc
++++ b/ruby/tests/api-test.cc
+@@ -52,7 +52,7 @@ TEST_CASE("api::is_*", "[ruby-api]") {
+ REQUIRE_FALSE(ruby.is_fixednum(ruby.eval("1.5")));
+
+ REQUIRE(ruby.is_bignum(ruby.eval(to_string(numeric_limits<int64_t>::max()))));
+- REQUIRE_FALSE(ruby.is_bignum(ruby.eval("2")));
++ REQUIRE(ruby.is_bignum(ruby.eval("2")));
+ REQUIRE_FALSE(ruby.is_bignum(ruby.eval("1.5")));
+ }
More information about the arch-commits
mailing list