[GMT] Update to 4.5.6 Add patch to avoid triangulate segfault on no or empty input (bug 681957).
Orion Poplawski
orion at fedoraproject.org
Thu Mar 10 15:53:18 UTC 2011
commit 952fdfa6e441bcd75a0d7b4fb418d2698a232f2c
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Thu Mar 10 08:53:07 2011 -0700
Update to 4.5.6
Add patch to avoid triangulate segfault on no or empty input (bug 681957).
.gitignore | 4 ++++
GMT-4.5.6-triangulate.patch | 33 +++++++++++++++++++++++++++++++++
GMT.spec | 13 ++++++++++---
sources | 8 ++++----
4 files changed, 51 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b53d8d8..4946dcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,7 @@ GMT4.5.3_suppl.tar.bz2
/GMT4.5.5_share.tar.bz2
/GMT4.5.5_src.tar.bz2
/GMT4.5.5_suppl.tar.bz2
+/GMT4.5.6_doc.tar.bz2
+/GMT4.5.6_share.tar.bz2
+/GMT4.5.6_src.tar.bz2
+/GMT4.5.6_suppl.tar.bz2
diff --git a/GMT-4.5.6-triangulate.patch b/GMT-4.5.6-triangulate.patch
new file mode 100644
index 0000000..66b22a8
--- /dev/null
+++ b/GMT-4.5.6-triangulate.patch
@@ -0,0 +1,33 @@
+--- GMT4.5.6/src/triangulate.c 2011-03-03 14:02:51.000000000 -0700
++++ GMT/src/triangulate.c 2011-03-10 08:42:44.274903875 -0700
+@@ -1,5 +1,5 @@
+ /*--------------------------------------------------------------------
+- * $Id: triangulate.c,v 1.78 2011/03/03 21:02:51 guru Exp $
++ * $Id: triangulate.c,v 1.79 2011/03/10 00:08:21 guru Exp $
+ *
+ * Copyright (c) 1991-2011 by P. Wessel and W. H. F. Smith
+ * See LICENSE.TXT file for copying and redistribution conditions.
+@@ -305,6 +305,7 @@
+ }
+ else if ((fp = GMT_fopen (argv[fno], GMT_io.r_mode)) == NULL) {
+ fprintf (stderr, "%s: Cannot open file %s\n", GMT_program, argv[fno]);
++ n_files--;
+ continue;
+ }
+
+@@ -343,6 +344,15 @@
+ if (fp != GMT_stdin) GMT_fclose (fp);
+ }
+
++ if (n_files == 0) {
++ fprintf (stderr, "%s: ERROR: No files could be read\n", GMT_program);
++ exit (EXIT_FAILURE);
++ }
++ if (n_read == 0) {
++ fprintf (stderr, "%s: ERROR: No data points read\n", GMT_program);
++ exit (EXIT_FAILURE);
++ }
++
+ xx = (double *) GMT_memory ((void *)xx, (size_t)n, sizeof (double), GMT_program);
+ yy = (double *) GMT_memory ((void *)yy, (size_t)n, sizeof (double), GMT_program);
+ if (do_grid) zz = (double *) GMT_memory ((void *)zz, (size_t)n, sizeof (double), GMT_program);
diff --git a/GMT.spec b/GMT.spec
index 3ea4419..f59e2be 100644
--- a/GMT.spec
+++ b/GMT.spec
@@ -11,8 +11,8 @@
%endif
Name: GMT
-Version: 4.5.5
-Release: 3%{?dist}
+Version: 4.5.6
+Release: 1%{?dist}
Summary: Generic Mapping Tools
Group: Applications/Engineering
@@ -22,6 +22,8 @@ Source0: ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_src.tar.bz2
Source1: ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_share.tar.bz2
Source2: ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_suppl.tar.bz2
Source3: ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_doc.tar.bz2
+# Patch from CVS to fix triangulate segfault with no/empty input
+Patch0: GMT-4.5.6-triangulate.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gdal-devel
@@ -129,6 +131,7 @@ GMT 2 dimensional grids.
%prep
%setup -q -b1 -b2 -b3 -n GMT%{version}
+%patch0 -p1 -b .triangulate
#We don't care about .bat files
find -name \*.bat | xargs rm
#Fix permissions
@@ -141,7 +144,7 @@ export CSH=sh
export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf"
%configure --datadir=%{gmthome} \
--enable-debug \
- --enable-gdal GDAL_INC=%{_includedir}/gdal \
+ --enable-gdal \
--enable-shared \
%if %with octave
--enable-octave --enable-mex-mdir=%{octave_mdir} \
@@ -252,6 +255,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Mar 10 2011 Orion Poplawski <orion at cora.nwra.com> 4.5.6-1
+- Update to 4.5.6
+- Add patch to avoid triangulate segfault on no or empty input (bug 681957).
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.5.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/sources b/sources
index c34b77e..7326b17 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-0a99b8f820689d872b18cf689efad9b9 GMT4.5.5_doc.tar.bz2
-55b9142fb8ad3e17a49542f42b36d923 GMT4.5.5_share.tar.bz2
-051554f98bff57365eebab2d227e3285 GMT4.5.5_src.tar.bz2
-38e01e420876bfe3cafe60b207c91de6 GMT4.5.5_suppl.tar.bz2
+9a7b78d58311beff31d47b42d0d30bad GMT4.5.6_doc.tar.bz2
+9b29e35a0c939345ae593dc6487c8b00 GMT4.5.6_share.tar.bz2
+79cdb798b48c0411483d9b1c60944163 GMT4.5.6_src.tar.bz2
+1519e3fdfd337a852d53f5ce819ac3cc GMT4.5.6_suppl.tar.bz2
More information about the scm-commits
mailing list