summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2017-10-13 16:07:51 +0000
committertaca <taca@pkgsrc.org>2017-10-13 16:07:51 +0000
commit301c2144666e060c9d5a6069977ed99bf4d9597c (patch)
tree825cb16c6e4f3444e892d2d85e95e24d7308a550 /databases
parent1ea2ba57683e36696f2b96864862758f518e9e88 (diff)
downloadpkgsrc-301c2144666e060c9d5a6069977ed99bf4d9597c.tar.gz
databases/ruby-mysql28: Fix build problem on ruby24.
Diffstat (limited to 'databases')
-rw-r--r--databases/ruby-mysql28/distinfo3
-rw-r--r--databases/ruby-mysql28/patches/patch-mysql.c19
2 files changed, 21 insertions, 1 deletions
diff --git a/databases/ruby-mysql28/distinfo b/databases/ruby-mysql28/distinfo
index 18782477e56..e74f6491fce 100644
--- a/databases/ruby-mysql28/distinfo
+++ b/databases/ruby-mysql28/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1 2017/09/18 02:36:01 taca Exp $
+$NetBSD: distinfo,v 1.2 2017/10/13 16:07:51 taca Exp $
SHA1 (mysql-ruby-2.8.2.tar.gz) = c20ec0f41f19f11270963d9c9e0d5a2bba27801e
RMD160 (mysql-ruby-2.8.2.tar.gz) = 0cd9a6071f0878a5ab4b47d9a023066f5ae39955
SHA512 (mysql-ruby-2.8.2.tar.gz) = f39bba5679031bab2d78bc5cb44bb00e7818c1f94e20af374e7b843ced85981e82f185f7442962728165abf9afa9f4d384e3ff6ca22c32320cf4bfa3af84c0e6
Size (mysql-ruby-2.8.2.tar.gz) = 32710 bytes
SHA1 (patch-extconf.rb) = 339b618a3057a3868448f971932b9231fd059404
+SHA1 (patch-mysql.c) = 5072b514a748845a279539b5b526c66ae052b1ca
diff --git a/databases/ruby-mysql28/patches/patch-mysql.c b/databases/ruby-mysql28/patches/patch-mysql.c
new file mode 100644
index 00000000000..cfb1eb08418
--- /dev/null
+++ b/databases/ruby-mysql28/patches/patch-mysql.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-mysql.c,v 1.1 2017/10/13 16:07:51 taca Exp $
+
+* Fix build with ruby24.
+
+--- mysql.c.orig 2010-02-11 10:42:54.000000000 +0000
++++ mysql.c
+@@ -1317,7 +1317,11 @@ static VALUE stmt_bind_result(int argc,
+ }
+ else if (argv[i] == rb_cString)
+ s->result.bind[i].buffer_type = MYSQL_TYPE_STRING;
+- else if (argv[i] == rb_cNumeric || argv[i] == rb_cInteger || argv[i] == rb_cFixnum)
++ else if (argv[i] == rb_cNumeric || argv[i] == rb_cInteger
++#if RUBY_API_VERSION_MAJOR >=2 && RUBY_API_VERSION_MINOR < 4
++ || argv[i] == rb_cFixnum
++#endif
++ )
+ s->result.bind[i].buffer_type = MYSQL_TYPE_LONGLONG;
+ else if (argv[i] == rb_cFloat)
+ s->result.bind[i].buffer_type = MYSQL_TYPE_DOUBLE;