summaryrefslogtreecommitdiff
path: root/academic/grace/patches/xmgrace-netcdf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'academic/grace/patches/xmgrace-netcdf.patch')
-rw-r--r--academic/grace/patches/xmgrace-netcdf.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/academic/grace/patches/xmgrace-netcdf.patch b/academic/grace/patches/xmgrace-netcdf.patch
new file mode 100644
index 0000000000..f18fbb6fe1
--- /dev/null
+++ b/academic/grace/patches/xmgrace-netcdf.patch
@@ -0,0 +1,16 @@
+diff -Naur grace-5.1.21.orig/configure grace-5.1.21/configure
+--- grace-5.1.21.orig/configure 2007-02-16 17:44:49.000000000 -0500
++++ grace-5.1.21/configure 2008-04-03 08:54:45.000000000 -0400
+@@ -15181,7 +15181,11 @@
+ int main(void) {
+ char *vlib;
+ vlib = nc_inq_libvers();
+- if (strcmp(vlib, "3.0") < 0) {
++ /* nc_inq_libvers() has changed. It now returns a long string,
++ a portion of which is in quotes. Advance the pointer to
++ eliminate the first quote, then compare. But also need
++ to ensure backward compatibility. */
++ if ((strcmp(vlib, "3.0") || strcmp(++vlib, "3.0")) < 0) {
+ exit(1);
+ }
+ exit(0);