[Git][debian-gis-team/grass][master] 2 commits: Add upstream patch to fix FTBFS with GDAL 3.3.1. (closes: #992530)
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Fri Aug 20 06:20:34 BST 2021
Bas Couwenberg pushed to branch master at Debian GIS Project / grass
Commits:
3e273ffe by Bas Couwenberg at 2021-08-20T06:44:10+02:00
Add upstream patch to fix FTBFS with GDAL 3.3.1. (closes: #992530)
- - - - -
4e40184e by Bas Couwenberg at 2021-08-20T06:44:21+02:00
Set distribution to unstable.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/pr1567-v.hull-use-standard-C-boolean-type.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+grass (7.8.5-2) unstable; urgency=medium
+
+ * Add upstream patch to fix FTBFS with GDAL 3.3.1.
+ (closes: #992530)
+
+ -- Bas Couwenberg <sebastic at debian.org> Fri, 20 Aug 2021 06:44:13 +0200
+
grass (7.8.5-1) unstable; urgency=medium
* New upstream release.
=====================================
debian/patches/pr1567-v.hull-use-standard-C-boolean-type.patch
=====================================
@@ -0,0 +1,160 @@
+Description: v.hull: use standard C boolean type
+ GDAL 3.3.0 introduces the use of standard C bool type. Redefining bool
+ locally, as in vector/v.hull/chull.c causes failure. Since GRASS now
+ adhere to C11 standard this PR addresses this issue by replacing the
+ local bool with the standard C bool.
+Author: nilason <n_larsson at yahoo.com>
+Origin: https://github.com/OSGeo/grass/pull/1567
+Bug: https://github.com/OSGeo/grass/issues/1563
+Bug-Debian: https://bugs.debian.org/992530
+
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -29,10 +29,6 @@
+
+ #include "globals.h"
+
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X 0
+ #define Y 1
+@@ -76,10 +72,10 @@ struct tFaceStructure
+ };
+
+ /* Define flags */
+-#define ONHULL BTRUE
+-#define REMOVED BTRUE
+-#define VISIBLE BTRUE
+-#define PROCESSED BTRUE
++#define ONHULL true
++#define REMOVED true
++#define VISIBLE true
++#define PROCESSED true
+
+ /* Global variable definitions */
+ tVertex vertices = NULL;
+@@ -436,7 +432,7 @@ bool AddOne(tVertex p)
+ tFace f;
+ tEdge e, temp;
+ long int vol;
+- bool vis = BFALSE;
++ bool vis = false;
+
+
+ /* Mark faces visible from p. */
+@@ -446,7 +442,7 @@ bool AddOne(tVertex p)
+
+ if (vol < 0) {
+ f->visible = VISIBLE;
+- vis = BTRUE;
++ vis = true;
+ }
+ f = f->next;
+ } while (f != faces);
+@@ -454,7 +450,7 @@ bool AddOne(tVertex p)
+ /* If no faces are visible from p, then p is inside the hull. */
+ if (!vis) {
+ p->onhull = !ONHULL;
+- return BFALSE;
++ return false;
+ }
+
+ /* Mark edges in interior of visible region for deletion.
+@@ -470,7 +466,7 @@ bool AddOne(tVertex p)
+ e->newface = MakeConeFace(e, p);
+ e = temp;
+ } while (e != edges);
+- return BTRUE;
++ return true;
+ }
+
+ /*---------------------------------------------------------------------
+--- a/include/gis.h
++++ b/include/gis.h
+@@ -23,6 +23,8 @@
+ /* System include files */
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <stdbool.h>
++
+
+ /* Grass and local include files */
+ #include <grass/config.h>
+@@ -51,13 +53,14 @@ static const char *GRASS_copyright __att
+ #define G_gisinit(pgm) G__gisinit(GIS_H_VERSION, (pgm))
+ #define G_no_gisinit() G__no_gisinit(GIS_H_VERSION)
+
+-/* Define TRUE and FALSE for boolean comparisons */
++/* For boolean values and comparisons use the C99 type 'bool' with values 'true' */
++/* and 'false' For historical reasons 'TRUE' and 'FALSE' are still valid. */
+ #ifndef TRUE
+-#define TRUE 1
++#define TRUE true
+ #endif
+
+ #ifndef FALSE
+-#define FALSE 0
++#define FALSE false
+ #endif
+
+ #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
+--- a/lib/lidar/lidar.h
++++ b/lib/lidar/lidar.h
+@@ -62,9 +62,6 @@
+ /* INTERPOLATOR */
+ #define P_BILINEAR 1
+ #define P_BICUBIC 0
+- /* Boolean definitions */
+-#define TRUE 1
+-#define FALSE 0
+
+ /*----------------------------------------------------------------------------------------------------------*/
+ /*STRUCTS DECLARATION */
+--- a/raster/r.param.scale/param.h
++++ b/raster/r.param.scale/param.h
+@@ -18,8 +18,6 @@
+ /* 'blank' edge around raster. */
+ #define MAX_WSIZE 499 /* Maximum dimensions of window. */
+ /* Some useful labels. */
+-#define TRUE 1
+-#define FALSE 0
+
+ #define RAD2DEG M_R2D
+ #define DEG2RAD M_D2R
+--- a/raster/r.surf.idw/main.h
++++ b/raster/r.surf.idw/main.h
+@@ -1,8 +1,6 @@
+ #include <grass/raster.h>
+
+ #define SHORT short
+-#define TRUE 1
+-#define FALSE 0
+
+ #define MELEMENT struct Melement
+ MELEMENT {
+--- a/raster3d/r3.showdspf/Ball.c
++++ b/raster3d/r3.showdspf/Ball.c
+@@ -7,8 +7,6 @@
+ #include "Ball.h"
+ #include "BallMath.h"
+ #include <stdio.h>
+-#define TRUE 1
+-#define FALSE 0
+
+ HMatrix mId = { {1, 0, 0, 0}
+ , {0, 1, 0, 0}
+--- a/raster3d/r3.showdspf/togif.c
++++ b/raster3d/r3.showdspf/togif.c
+@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r,
+ *
+ *****************************************************************************/
+
+-#define TRUE 1
+-#define FALSE 0
+-
+
+ /************************** BumpPixel() ********************************/
+ /*
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ pager
instdir
no-fail-html.patch
jquery.patch
+pr1567-v.hull-use-standard-C-boolean-type.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/-/compare/7822a6fad32e7a6eaf308e2048e30c4df0fd96d8...4e40184ec83d9baae7a92f80add0746b5cfcff3a
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/-/compare/7822a6fad32e7a6eaf308e2048e30c4df0fd96d8...4e40184ec83d9baae7a92f80add0746b5cfcff3a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20210820/90883eab/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list