Package: ruby-grib / 0.4.0-2

0003-Use-eccodes-instead-of-grib_api.patch Patch series | download
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: Sun, 24 Sep 2017 23:59:38 +0900
Subject: Use eccodes instead of grib_api

Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
 ext/extconf.rb           | 4 ++--
 lib/numru/grib/setenv.rb | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ext/extconf.rb b/ext/extconf.rb
index 761f2bd..1980ba3 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -54,7 +54,7 @@ unless have_header("narray.h")
   exit(-1)
 end
 
-dir_config("grib_api")
-if have_header("grib_api.h") && have_library("grib_api")
+dir_config("eccodes")
+if have_header("grib_api.h") && have_library("eccodes")
   create_makefile("numru/grib")
 end
diff --git a/lib/numru/grib/setenv.rb b/lib/numru/grib/setenv.rb
index f67c60f..3aae9cb 100644
--- a/lib/numru/grib/setenv.rb
+++ b/lib/numru/grib/setenv.rb
@@ -5,7 +5,7 @@ if File.exist?(def_path)
     ENV[env_name] = "#{gdp}:#{def_path}"
   else
     begin
-      path = `grib_info -d`.strip
+      path = `codes_info -d`.strip
     rescue
       $stderr.print <<-EOM
 The 'grib_info' command cannot be found.