[Git][debian-gis-team/postgis][master] 3 commits: Add patch to fix FTBFS with proj 5.0.0. (closes: #889981)

Bas Couwenberg gitlab at salsa.debian.org
Sat Feb 17 11:44:24 UTC 2018


Bas Couwenberg pushed to branch master at Debian GIS Project / postgis


Commits:
a24ebb9a by Bas Couwenberg at 2018-02-17T12:07:17+01:00
Add patch to fix FTBFS with proj 5.0.0. (closes: #889981)

- - - - -
3c0d1ec7 by Bas Couwenberg at 2018-02-17T12:24:26+01:00
Strip trailing whitespace from changelog file.

- - - - -
d9c77afe by Bas Couwenberg at 2018-02-17T12:24:43+01:00
Set distribution to unstable.

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/svn-r16382-pj_transform-Reset-pj_errno-after-any-error.patch


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
-postgis (2.4.3+dfsg-3) UNRELEASED; urgency=medium
+postgis (2.4.3+dfsg-3) unstable; urgency=medium
 
   * Fix deprecated source override location.
+  * Add patch to fix FTBFS with proj 5.0.0.
+    (closes: #889981)
+  * Strip trailing whitespace from changelog file.
 
- -- Bas Couwenberg <sebastic at debian.org>  Sat, 10 Feb 2018 11:48:30 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 17 Feb 2018 12:24:27 +0100
 
 postgis (2.4.3+dfsg-2) unstable; urgency=medium
 
@@ -959,7 +962,7 @@ postgis (1.5.2-1) unstable; urgency=low
 
   * New upstream release, with a few bug fixes.
   * Added shp2pgsql-gui binary.
-  * Removed patches, applied upstream: getopt.	
+  * Removed patches, applied upstream: getopt.
 
  -- Alan Boudreault <aboudreault at mapgears.com>  Wed, 29 Sep 2010 09:16:10 -0400
 


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 link-liblwgeom
 relax-test-timing-constraints.patch
 autotools-pkg-config-macro-not-cross-compilation-safe.patch
+svn-r16382-pj_transform-Reset-pj_errno-after-any-error.patch


=====================================
debian/patches/svn-r16382-pj_transform-Reset-pj_errno-after-any-error.patch
=====================================
--- /dev/null
+++ b/debian/patches/svn-r16382-pj_transform-Reset-pj_errno-after-any-error.patch
@@ -0,0 +1,52 @@
+Description: pj_transform: Reset pj_errno after any error.
+Author: Raúl Marín Rodríguez
+Origin: https://trac.osgeo.org/postgis/changeset/16382
+Bug: https://trac.osgeo.org/postgis/ticket/4016
+Bug-Debian: https://bugs.debian.org/889981
+
+--- a/liblwgeom/lwgeom_transform.c
++++ b/liblwgeom/lwgeom_transform.c
+@@ -130,7 +130,7 @@ lwgeom_transform(LWGEOM *geom, projPJ in
+ int
+ point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj)
+ {
+-	int* pj_errno_ref;
++
+ 	POINT4D orig_pt;
+ 
+ 	/* Make a copy of the input point so we can report the original should an error occur */
+@@ -142,25 +142,25 @@ point4d_transform(POINT4D *pt, projPJ sr
+ 
+ 	LWDEBUGF(4, "transforming POINT(%f %f) from '%s' to '%s'", orig_pt.x, orig_pt.y, pj_get_def(srcpj,0), pj_get_def(dstpj,0));
+ 
+-	/* Perform the transform */
+-	pj_transform(srcpj, dstpj, 1, 0, &(pt->x), &(pt->y), &(pt->z));
++	if (pj_transform(srcpj, dstpj, 1, 0, &(pt->x), &(pt->y), &(pt->z)) != 0)
++	{
++		int* pj_errno_ref = pj_get_errno_ref();
++		int pj_errno_val = *pj_errno_ref;
+ 
+-	/* For NAD grid-shift errors, display an error message with an additional hint */
+-	pj_errno_ref = pj_get_errno_ref();
++		/* Force a reset of pj_errno to avoid future errors */
++		*pj_errno_ref = 0;
+ 
+-	if (*pj_errno_ref != 0)
+-	{
+-		if (*pj_errno_ref == -38)
++		if (pj_errno_val == -38)
+ 		{
+ 			lwnotice("PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour.");
+ 			lwerror("transform: couldn't project point (%g %g %g): %s (%d)",
+-			        orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref);
++			        orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(pj_errno_val), pj_errno_val);
+ 			return 0;
+ 		}
+ 		else
+ 		{
+ 			lwerror("transform: couldn't project point (%g %g %g): %s (%d)",
+-			        orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref);
++			        orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(pj_errno_val), pj_errno_val);
+ 			return 0;
+ 		}
+ 	}



View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/compare/9ee985b6c5b7995a8b0d7b8c2119b47ca466fba4...d9c77afe625496b91f0cd77667423a5816379b3d

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/compare/9ee985b6c5b7995a8b0d7b8c2119b47ca466fba4...d9c77afe625496b91f0cd77667423a5816379b3d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180217/5fc48983/attachment-0001.html>


More information about the Pkg-grass-devel mailing list