[ruby-oci8-commit] [248] trunk/ruby-oci8/ext/oci8: * ext/oci8/extconf.rb: output a message to say 'install

nobody at rubyforge.org nobody at rubyforge.org
Tue Mar 4 03:13:21 EST 2008


Revision: 248
Author:   kubo
Date:     2008-03-04 03:13:21 -0500 (Tue, 04 Mar 2008)

Log Message:
-----------
* ext/oci8/extconf.rb: output a message to say 'install
    a ruby development package' when 'mkmf.rb' is not
    found and the platform is Linux. Both ruby and its
    development package are required to compile extension
    libraries on Linux.

Modified Paths:
--------------
    branches/ruby-oci8-1.0/ChangeLog
    branches/ruby-oci8-1.0/ext/oci8/extconf.rb
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/extconf.rb

Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog	2008-03-04 06:21:04 UTC (rev 247)
+++ branches/ruby-oci8-1.0/ChangeLog	2008-03-04 08:13:21 UTC (rev 248)
@@ -1,3 +1,10 @@
+2008-03-04  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/extconf.rb: output a message to say 'install
+	    a ruby development package' when 'mkmf.rb' is not
+	    found and the platform is Linux. Both ruby and its
+	    development package are required to compile extension
+	    libraries on Linux.
+
 2008-02-17  KUBO Takehiro  <kubo at jiubao.org>
 	* test/config.rb, test/test_break.rb, test/test_dbi.rb,
 	  test/test_dbi_clob.rb, test/test_metadata.rb, test/test_oci8.rb

Modified: branches/ruby-oci8-1.0/ext/oci8/extconf.rb
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/extconf.rb	2008-03-04 06:21:04 UTC (rev 247)
+++ branches/ruby-oci8-1.0/ext/oci8/extconf.rb	2008-03-04 08:13:21 UTC (rev 248)
@@ -1,4 +1,14 @@
-require 'mkmf'
+begin
+  require 'mkmf'
+rescue LoadError
+  if /linux/ =~ RUBY_PLATFORM
+    raise <<EOS
+You need to install a ruby development package ruby-devel, ruby-dev or so.
+EOS
+  end
+  raise
+end
+
 require File.dirname(__FILE__) + '/oraconf'
 
 RUBY_OCI8_VERSION = open("#{File.dirname(__FILE__)}/../../VERSION") {|f| f.read}.chomp

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2008-03-04 06:21:04 UTC (rev 247)
+++ trunk/ruby-oci8/ChangeLog	2008-03-04 08:13:21 UTC (rev 248)
@@ -1,3 +1,10 @@
+2008-03-04  KUBO Takehiro  <kubo at jiubao.org>
+	* ext/oci8/extconf.rb: output a message to say 'install
+	    a ruby development package' when 'mkmf.rb' is not
+	    found and the platform is Linux. Both ruby and its
+	    development package are required to compile extension
+	    libraries on Linux.
+
 2008-03-04 KUBO Takehiro <kubo at jiubao.org>
 	* ext/oci8/ocinumber.c: fix for ruby-1.9.0-1.
 	    The arguments of rb_num_coerce_cmp() and rb_num_coerce_bin()

Modified: trunk/ruby-oci8/ext/oci8/extconf.rb
===================================================================
--- trunk/ruby-oci8/ext/oci8/extconf.rb	2008-03-04 06:21:04 UTC (rev 247)
+++ trunk/ruby-oci8/ext/oci8/extconf.rb	2008-03-04 08:13:21 UTC (rev 248)
@@ -1,4 +1,14 @@
-require 'mkmf'
+begin
+  require 'mkmf'
+rescue LoadError
+  if /linux/ =~ RUBY_PLATFORM
+    raise <<EOS
+You need to install a ruby development package ruby-devel, ruby-dev or so.
+EOS
+  end
+  raise
+end
+
 require File.dirname(__FILE__) + '/oraconf'
 require File.dirname(__FILE__) + '/apiwrap'
 




More information about the ruby-oci8-commit mailing list