1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: Youhei SASAKI <uwabami@gfd-dennou.org>
Date: Wed, 9 Jul 2014 18:04:07 +0900
Subject: Fix NArray PATH
Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
ext/mpi/extconf.rb | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
--- ruby-mpi.orig/ext/mpi/extconf.rb
+++ ruby-mpi/ext/mpi/extconf.rb
@@ -1,23 +1,7 @@
require "mkmf"
CONFIG['CC'] = "mpicc"
-gem_path = nil
-begin
- require "rubygems"
- if Gem::Specification.respond_to?(:find_by_name)
- if spec = Gem::Specification.find_by_name("narray")
- gem_path = spec.full_gem_path
- end
- else
- if (spec = Gem.source_index.find_name("narray")).any?
- gem_path = spec.full_gem_path
- end
- end
-rescue LoadError
- dir_config("narray", Config::CONFIG["sitearchdir"])
-end
-unless find_header("narray.h", gem_path)
- find_header("narray.h", File.join(gem_path,"src"))
-end
+dir_config("narray", RbConfig::CONFIG["vendorarchdir"])
+find_header("narray.h", RbConfig::CONFIG["vendorarchdir"])
create_makefile("mpi")
|