[ruby-oci8-commit] [549] trunk/ruby-oci8: add languange mode to the extension library name when ths ruby engine is rubinius
nobody at rubyforge.org
nobody at rubyforge.org
Thu Jan 3 02:13:26 UTC 2013
Revision: 549
Author: kubo
Date: 2013-01-03 02:13:25 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
add languange mode to the extension library name when ths ruby engine is rubinius
and explicitly claim that jruby is not supported when it is jruby.
Modified Paths:
--------------
trunk/ruby-oci8/ChangeLog
trunk/ruby-oci8/ext/oci8/extconf.rb
trunk/ruby-oci8/lib/oci8.rb.in
Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog 2013-01-03 01:38:58 UTC (rev 548)
+++ trunk/ruby-oci8/ChangeLog 2013-01-03 02:13:25 UTC (rev 549)
@@ -1,4 +1,9 @@
2013-01-03 KUBO Takehiro <kubo at jiubao.org>
+ * ext/oci8/extconf.rb, lib/oci8.rb.in: add languange mode to the extension
+ library name when ths ruby engine is rubinius and explicitly claim that
+ jruby is not supported when it is jruby.
+
+2013-01-03 KUBO Takehiro <kubo at jiubao.org>
* ext/oci8/encoding.c, lib/oci8/encoding-init.rb: delete an internal method
OCI8.nls_ratio= when the ruby is 1.9 or greater. nls_ratio is set by
OCI8.encoding=.
Modified: trunk/ruby-oci8/ext/oci8/extconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/extconf.rb 2013-01-03 01:38:58 UTC (rev 548)
+++ trunk/ruby-oci8/ext/oci8/extconf.rb 2013-01-03 02:13:25 UTC (rev 549)
@@ -134,7 +134,8 @@
ruby_engine = (defined? RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
so_basename = 'oci8lib_'
-if ruby_engine == 'ruby'
+case ruby_engine
+when 'ruby'
# The extension library name includes the ruby ABI (application binary interface)
# version. It is for binary gems which contain more than one extension library
# and use correct one depending on the ABI version.
@@ -168,8 +169,22 @@
else
raise 'unsupported ruby version: ' + RUBY_VERSION
end
+when 'rbx'
+ # "rbx -X18" and "rbx -X19" use different C header files.
+ case RUBY_VERSION
+ when /^2\.0/
+ so_basename += 'rbx20'
+ when /^1\.9/
+ so_basename += 'rbx19'
+ when /^1\.8/
+ so_basename += 'rbx18'
+ else
+ raise 'unsupported language mode: ' + RUBY_VERSION
+ end
+when 'jruby'
+ raise "Ruby-oci8 doesn't support jruby because its C extension support is in development in jruby 1.6 and deprecated in jruby 1.7."
else
- so_basename += ruby_engine
+ raise 'unsupported ruby engine: ' + RUBY_ENGINE
end
$defs << "-DInit_oci8lib=Init_#{so_basename}"
Modified: trunk/ruby-oci8/lib/oci8.rb.in
===================================================================
--- trunk/ruby-oci8/lib/oci8.rb.in 2013-01-03 01:38:58 UTC (rev 548)
+++ trunk/ruby-oci8/lib/oci8.rb.in 2013-01-03 02:13:25 UTC (rev 549)
@@ -26,7 +26,8 @@
ruby_engine = (defined? RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
so_basename = 'oci8lib_'
-if ruby_engine == 'ruby'
+case ruby_engine
+when 'ruby'
# The extension library name includes the ruby ABI (application binary interface)
# version. It is for binary gems which contain more than one extension library
# and use correct one depending on the ABI version.
@@ -60,8 +61,22 @@
else
raise 'unsupported ruby version: ' + RUBY_VERSION
end
+when 'rbx'
+ # "rbx -X18" and "rbx -X19" use different C header files.
+ case RUBY_VERSION
+ when /^2\.0/
+ so_basename += 'rbx20'
+ when /^1\.9/
+ so_basename += 'rbx19'
+ when /^1\.8/
+ so_basename += 'rbx18'
+ else
+ raise 'unsupported language mode: ' + RUBY_VERSION
+ end
+when 'jruby'
+ raise "Ruby-oci8 doesn't support jruby because its C extension support is in development in jruby 1.6 and deprecated in jruby 1.7."
else
- so_basename += ruby_engine
+ raise 'unsupported ruby engine: ' + RUBY_ENGINE
end
require so_basename
More information about the ruby-oci8-commit
mailing list