summaryrefslogtreecommitdiff
path: root/gis/grass
diff options
context:
space:
mode:
authorBenjamin Trigona-Harany <bosth@alumni.sfu.ca>2021-06-29 14:25:53 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-03 11:36:07 +0700
commit9ff886a98a398b0da87daa5e89afb75edb37ccae (patch)
tree61719430c2caa8e071e6fd47714080cee6d56851 /gis/grass
parent9108ec7d9a9273058b24986dad1abffbfdbd3ce4 (diff)
downloadslackbuilds-9ff886a98a398b0da87daa5e89afb75edb37ccae.tar.gz
gis/grass: Fix for GDAL 3.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis/grass')
-rw-r--r--gis/grass/gdal-3.3.patch84
-rw-r--r--gis/grass/grass.SlackBuild2
2 files changed, 86 insertions, 0 deletions
diff --git a/gis/grass/gdal-3.3.patch b/gis/grass/gdal-3.3.patch
new file mode 100644
index 0000000000..c5e018aaaa
--- /dev/null
+++ b/gis/grass/gdal-3.3.patch
@@ -0,0 +1,84 @@
+From b86314c7f3b8aea961d380dbb836087b3990d7af Mon Sep 17 00:00:00 2001
+From: nilason <n_larsson@yahoo.com>
+Date: Thu, 6 May 2021 22:27:48 +0200
+Subject: [PATCH] v.hull: use standard C boolean type
+
+Fixes #1563
+---
+ vector/v.hull/chull.c | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c
+index 1ad97396fa..41b627c50f 100644
+--- a/vector/v.hull/chull.c
++++ b/vector/v.hull/chull.c
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
++#include <stdbool.h>
+
+ #include <grass/gis.h>
+ #include <grass/vector.h>
+@@ -29,10 +30,6 @@
+
+ #include "globals.h"
+
+-/*Define Boolean type */
+-typedef enum
+-{ BFALSE, BTRUE } bool;
+-
+ /* Define vertex indices. */
+ #define X 0
+ #define Y 1
+@@ -76,10 +73,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 +433,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 +443,7 @@ bool AddOne(tVertex p)
+
+ if (vol < 0) {
+ f->visible = VISIBLE;
+- vis = BTRUE;
++ vis = true;
+ }
+ f = f->next;
+ } while (f != faces);
+@@ -454,7 +451,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 +467,7 @@ bool AddOne(tVertex p)
+ e->newface = MakeConeFace(e, p);
+ e = temp;
+ } while (e != edges);
+- return BTRUE;
++ return true;
+ }
+
+ /*---------------------------------------------------------------------
diff --git a/gis/grass/grass.SlackBuild b/gis/grass/grass.SlackBuild
index 28d48e51ad..e12033cdfb 100644
--- a/gis/grass/grass.SlackBuild
+++ b/gis/grass/grass.SlackBuild
@@ -73,6 +73,8 @@ find -L . \
# Option handling:
set -- $(echo $ENABLE | sed 's/,/ /g')
+patch -p1 < $CWD/gdal-3.3.patch
+
while [ "$1" != "" ]; do
case "$1"
in