aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2014-10-17 21:59:46 +0800
committerdinoex <dinoex@FreeBSD.org>2014-10-17 21:59:46 +0800
commit352d0971fcdd6c63bbf333290b056a58eef5d8ea (patch)
tree1cfcab097a64aecbe002f73ad0b393d31513673c /databases
parentf6c4860c2b502584f94ea6b6ad71dea522004b8e (diff)
downloadfreebsd-ports-gnome-352d0971fcdd6c63bbf333290b056a58eef5d8ea.tar.gz
freebsd-ports-gnome-352d0971fcdd6c63bbf333290b056a58eef5d8ea.tar.zst
freebsd-ports-gnome-352d0971fcdd6c63bbf333290b056a58eef5d8ea.zip
- fix ruby 2.0
Diffstat (limited to 'databases')
-rw-r--r--databases/rubygem-dbi/Makefile1
-rw-r--r--databases/rubygem-dbi/files/patch-row.rb39
-rw-r--r--databases/rubygem-dbi/files/patch-tc_types.rb14
3 files changed, 54 insertions, 0 deletions
diff --git a/databases/rubygem-dbi/Makefile b/databases/rubygem-dbi/Makefile
index a62e3e2d2c1a..49a89268ac3c 100644
--- a/databases/rubygem-dbi/Makefile
+++ b/databases/rubygem-dbi/Makefile
@@ -3,6 +3,7 @@
PORTNAME= dbi
PORTVERSION= 0.4.5
+PORTREVISION= 1
CATEGORIES= databases rubygems
MASTER_SITES= RG
diff --git a/databases/rubygem-dbi/files/patch-row.rb b/databases/rubygem-dbi/files/patch-row.rb
new file mode 100644
index 000000000000..90dd99456c64
--- /dev/null
+++ b/databases/rubygem-dbi/files/patch-row.rb
@@ -0,0 +1,39 @@
+--- lib/dbi/row.rb.orig 2014-10-17 15:50:24.000000000 +0200
++++ lib/dbi/row.rb 2014-10-17 15:54:47.000000000 +0200
+@@ -209,7 +209,6 @@
+ end
+
+
+- if RUBY_VERSION =~ /^1\.9/
+ def __getobj__
+ @arr
+ end
+@@ -217,28 +216,6 @@
+ def __setobj__(obj)
+ @delegate_dc_obj = @arr = obj
+ end
+- else
+- #
+- # See Object#clone.
+- #
+- # #clone and #dup here, however, are both deep copies via Marshal.
+- #
+- def clone
+- Marshal.load(Marshal.dump(self))
+- end
+-
+- def dup
+- row = self.class.allocate
+- row.instance_variable_set :@column_types, @column_types
+- row.instance_variable_set :@convert_types, @convert_types
+- row.instance_variable_set :@column_map, @column_map
+- row.instance_variable_set :@column_names, @column_names
+- # this is the only one we actually dup...
+- row.instance_variable_set :@arr, arr = @arr.dup
+- row.instance_variable_set :@_dc_obj, arr
+- row
+- end
+- end
+
+ private
+
diff --git a/databases/rubygem-dbi/files/patch-tc_types.rb b/databases/rubygem-dbi/files/patch-tc_types.rb
new file mode 100644
index 000000000000..0695599305e6
--- /dev/null
+++ b/databases/rubygem-dbi/files/patch-tc_types.rb
@@ -0,0 +1,14 @@
+--- test/dbi/tc_types.rb.orig 2014-10-17 15:44:22.000000000 +0200
++++ test/dbi/tc_types.rb 2014-10-17 15:48:58.000000000 +0200
+@@ -114,11 +114,7 @@
+ d = Date.today
+ assert_equal(DateTime.parse(d.to_s).to_s, klass.parse(d).to_s)
+
+- md = "10-11"
+-
+- if RUBY_VERSION =~ /^1\.9/
+ md = "11-10"
+- end
+
+ # be sure we're actually getting the right data back
+ assert_equal(