[postgis] 01/01: Add patch by Helge Deller to fix wkb_output test failure on hppa & mips.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jan 12 22:43:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository postgis.

commit 5f644eeb8210f5cfe504977957fe4562112eaf3d
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue Jan 12 23:35:27 2016 +0100

    Add patch by Helge Deller to fix wkb_output test failure on hppa & mips.
---
 debian/changelog          |  7 +++++++
 debian/patches/hppa.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 3 files changed, 58 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c804432..84b44c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+postgis (2.2.1+dfsg-2) UNRELEASED; urgency=medium
+
+  * Add patch by Helge Deller to fix wkb_output test failure on hppa & mips.
+    (closes: #810859)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Tue, 12 Jan 2016 23:34:26 +0100
+
 postgis (2.2.1+dfsg-1) unstable; urgency=medium
 
   * Move from experimental to unstable.
diff --git a/debian/patches/hppa.patch b/debian/patches/hppa.patch
new file mode 100644
index 0000000..276d88a
--- /dev/null
+++ b/debian/patches/hppa.patch
@@ -0,0 +1,50 @@
+Description: Fix test failure on hppa and mips.
+Author: Helge Deller <deller at gmx.de>
+Bug-Debian: https://bugs.debian.org/810859
+
+--- a/liblwgeom/cunit/cu_out_wkb.c
++++ b/liblwgeom/cunit/cu_out_wkb.c
+@@ -66,6 +66,13 @@ static void cu_wkb(char *wkt)
+ }
+ 
+ 
++/* parisc and mips (at least some processors) have a different nan representation from other arches. */
++#if !defined(__hppa__) && !defined(__mips__)
++# define nan_val( v1, v2)  v1
++#else
++# define nan_val( v1, v2)  v2
++#endif
++
+ static void test_wkb_out_point(void)
+ {
+ 	cu_wkb("POINT(0 0 0 0)");
+@@ -75,19 +82,24 @@ static void test_wkb_out_point(void)
+ 	CU_ASSERT_STRING_EQUAL(s,"0060000001000000043FF00000000000003FF00000000000003FF0000000000000");
+ 	
+ 	cu_wkb("POINT EMPTY");
+-	CU_ASSERT_STRING_EQUAL(s,"00000000017FF80000000000007FF8000000000000");
++	CU_ASSERT_STRING_EQUAL(s, nan_val("00000000017FF80000000000007FF8000000000000",
++					  "00000000017FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF"));
+ 
+ 	cu_wkb("SRID=4326;POINT EMPTY");
+-	CU_ASSERT_STRING_EQUAL(s,"0020000001000010E67FF80000000000007FF8000000000000");
++	CU_ASSERT_STRING_EQUAL(s, nan_val("0020000001000010E67FF80000000000007FF8000000000000",
++					  "0020000001000010E67FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF"));
+ 
+ 	cu_wkb("POINT Z EMPTY");
+-	CU_ASSERT_STRING_EQUAL(s,"00800000017FF80000000000007FF80000000000007FF8000000000000");
++	CU_ASSERT_STRING_EQUAL(s, nan_val("00800000017FF80000000000007FF80000000000007FF8000000000000",
++					  "00800000017FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF"));
+ 
+ 	cu_wkb("POINT M EMPTY");
+-	CU_ASSERT_STRING_EQUAL(s,"00400000017FF80000000000007FF80000000000007FF8000000000000");
++	CU_ASSERT_STRING_EQUAL(s, nan_val("00400000017FF80000000000007FF80000000000007FF8000000000000",
++					  "00400000017FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF"));
+ 
+ 	cu_wkb("POINT ZM EMPTY");
+-	CU_ASSERT_STRING_EQUAL(s,"00C00000017FF80000000000007FF80000000000007FF80000000000007FF8000000000000");
++	CU_ASSERT_STRING_EQUAL(s, nan_val("00C00000017FF80000000000007FF80000000000007FF80000000000007FF8000000000000",
++					  "00C00000017FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF7FF7FFFFFFFFFFFF"));
+ }
+ 
+ static void test_wkb_out_linestring(void)
diff --git a/debian/patches/series b/debian/patches/series
index b6bbddc..74b8328 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 link-liblwgeom
+hppa.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/postgis.git



More information about the Pkg-grass-devel mailing list