[wgrib2] Update to 1.9.6 Disable gctpc support for now - bundled library

Orion Poplawski orion at fedoraproject.org
Fri May 18 15:41:17 UTC 2012


commit 997d01b2424f2159aa84229469cfe7afdf12d5b4
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Fri May 18 09:41:14 2012 -0600

    Update to 1.9.6
    Disable gctpc support for now - bundled library

 .gitignore           |    1 +
 config.h             |    1 +
 sources              |    2 +-
 wgrib2-nogctpc.patch |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 wgrib2.spec          |   18 +++++++++++++-----
 5 files changed, 65 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 14b2f32..9a57550 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
 /wgrib2_nolib.tgz.v1.9.4
 /wgrib2_nolib.tgz.v1.9.5
 /wgrib2_nolib.tgz.v1.9.5.1
+/wgrib2_nolib.tgz.v1.9.6
diff --git a/config.h b/config.h
index f8533dd..c3062d1 100644
--- a/config.h
+++ b/config.h
@@ -3,3 +3,4 @@
 #define USE_TIGGE
 #define USE_NETCDF4
 #define USE_MYSQL
+#define USE_OPENMP
diff --git a/sources b/sources
index 684d790..256edca 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-052a90231b01d509618110f7caf48a1b  wgrib2_nolib.tgz.v1.9.5.1
+4bab033802973d2a8d7411b667862c6e  wgrib2_nolib.tgz.v1.9.6
diff --git a/wgrib2-nogctpc.patch b/wgrib2-nogctpc.patch
new file mode 100644
index 0000000..a8947b4
--- /dev/null
+++ b/wgrib2-nogctpc.patch
@@ -0,0 +1,49 @@
+diff -up grib2/wgrib2/geo.c.nogctpc grib2/wgrib2/geo.c
+--- grib2/wgrib2/geo.c.nogctpc	2012-04-16 13:03:03.000000000 -0600
++++ grib2/wgrib2/geo.c	2012-05-18 09:29:24.934246773 -0600
+@@ -879,11 +879,6 @@ int closest_init(unsigned char **sec) {
+    int grid_type;
+ 
+ 
+-   if (use_gctpc && output_order == wesn && nx > 0 && ny > 0) {
+-      if (gctpc_ll2xy_init(sec, lon, lat) == 0) return 0;
+-   }
+-
+-
+    grid_type = code_table_3_1(sec);
+ 
+    /* if grids with (lat,lon) -> (i,j) insert code here */
+@@ -928,10 +923,6 @@ int closest(unsigned char **sec, double
+     int grid_type, j;
+     double t, xx, yy, zz, small;
+ 
+-    if (use_gctpc && output_order == wesn && nx > 0 && ny > 0) {
+-	if (gctpc_ll2i(1, &plon, &plat, &j) == 0) return j;
+-    }
+-
+     grid_type = code_table_3_1(sec);
+     // if grid with (lat,lon) -> (i,j) /l.. insert code here
+     if (grid_type == 0 && nx > 0 && ny > 0 && output_order == wesn) return latlon_closest(sec, plat, plon);
+diff -up grib2/wgrib2/wgrib2.c.nogctpc grib2/wgrib2/wgrib2.c
+--- grib2/wgrib2/wgrib2.c.nogctpc	2012-03-15 09:06:40.000000000 -0600
++++ grib2/wgrib2/wgrib2.c	2012-05-18 09:28:21.784527671 -0600
+@@ -128,9 +128,6 @@ int main(int argc, char **argv) {
+     inv_file = stdout;
+ //    jas_init();
+ 
+-//  gctpc initialiation
+-    init(-1,-1,"gctpc_1,txt", "gctpc_2.txt");
+-
+     /* no arguments .. help screen */
+     if (argc == 1) {
+ 	f_help(-1,NULL,NULL,0,inv_out,local,"most");
+@@ -489,9 +486,6 @@ int main(int argc, char **argv) {
+ 
+             if (latlon) {
+ 		i = 1;
+-		if (use_gctpc && output_order == wesn) {		/* use gctpc to get lat lon values */
+-		   i = gctpc_get_latlon(sec, &lon, &lat);
+-		}
+ 		if (i) get_latlon(sec, &lon, &lat);			 /* get lat lon of grid points */
+ 	    }
+ 	}
diff --git a/wgrib2.spec b/wgrib2.spec
index 8a5d3ec..41e2ddb 100644
--- a/wgrib2.spec
+++ b/wgrib2.spec
@@ -1,6 +1,6 @@
 Name:           wgrib2
-Version:        1.9.5.1
-Release:        2%{?dist}
+Version:        1.9.6
+Release:        1%{?dist}
 Summary:        Manipulate, inventory and decode GRIB2 files
 
 Group:          Applications/Engineering
@@ -9,6 +9,8 @@ License:        GPLv2+
 URL:            http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
 Source0:        http://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2_nolib.tgz.v%{version}
 Source1:        config.h
+# Disable gctpc for now - bundled library
+Patch0:         wgrib2-nogctpc.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  g2clib-static, zlib-devel, netcdf-devel
@@ -21,14 +23,16 @@ extract data. You can do basic database operations and other nifty things.
 
 %prep
 %setup -q -n grib2
-rm -r g2clib-*
+%patch0 -p1 -b .nogctpc
+rm -r g2clib-* wgrib2/{fnlist,Gctpc,gctpc_ll2xy}.[ch]
 cp %SOURCE1 wgrib2/config.h
 
 
 %build
 cd wgrib2
-export CFLAGS="-I%{_includedir}/netcdf -I%{_includedir}/mysql $RPM_OPT_FLAGS"
-export LDFLAGS="-lgrib2c -ljasper -lnetcdf -lpng -L%{_libdir}/mysql -lmysqlclient -lz -lm"
+export CFLAGS="-I.. -I%{_includedir}/netcdf -I%{_includedir}/mysql $RPM_OPT_FLAGS -fopenmp"
+export LDFLAGS="-lgrib2c -ljasper -lnetcdf -lpng -L%{_libdir}/mysql -lmysqlclient -lz -lm -fopenmp"
+make fnlist.h fnlist.c
 make
 
 
@@ -49,6 +53,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri May 18 2012 Orion Poplawski <orion at cora.nwra.com> - 1.9.6-1
+- Update to 1.9.6
+- Disable gctpc support for now - bundled library
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9.5.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list