1 |
commit: d849efc7539748cecb34c3d6e69ca30e0a58f5b4 |
2 |
Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de> |
3 |
AuthorDate: Sat May 29 17:35:48 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 29 17:45:46 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d849efc7 |
7 |
|
8 |
sci-geosciences/grass: fix build failure with GCC 11 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/792801 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.2 |
12 |
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/21039 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
sci-geosciences/grass/files/grass-7.8.5-bool.patch | 164 +++++++++++++++++++++ |
17 |
sci-geosciences/grass/grass-7.8.5.ebuild | 4 +- |
18 |
2 files changed, 167 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/sci-geosciences/grass/files/grass-7.8.5-bool.patch b/sci-geosciences/grass/files/grass-7.8.5-bool.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..fddcb9f6df8 |
23 |
--- /dev/null |
24 |
+++ b/sci-geosciences/grass/files/grass-7.8.5-bool.patch |
25 |
@@ -0,0 +1,164 @@ |
26 |
+diff --git a/include/gis.h b/include/gis.h |
27 |
+index 46bb06c52f..333651b938 100644 |
28 |
+--- a/include/gis.h |
29 |
++++ b/include/gis.h |
30 |
+@@ -23,6 +23,8 @@ |
31 |
+ /* System include files */ |
32 |
+ #include <stdio.h> |
33 |
+ #include <stdarg.h> |
34 |
++#include <stdbool.h> |
35 |
++ |
36 |
+ |
37 |
+ /* Grass and local include files */ |
38 |
+ #include <grass/config.h> |
39 |
+@@ -51,13 +53,14 @@ static const char *GRASS_copyright __attribute__ ((unused)) |
40 |
+ #define G_gisinit(pgm) G__gisinit(GIS_H_VERSION, (pgm)) |
41 |
+ #define G_no_gisinit() G__no_gisinit(GIS_H_VERSION) |
42 |
+ |
43 |
+-/* Define TRUE and FALSE for boolean comparisons */ |
44 |
++/* For boolean values and comparisons use the C99 type 'bool' with values 'true' */ |
45 |
++/* and 'false' For historical reasons 'TRUE' and 'FALSE' are still valid. */ |
46 |
+ #ifndef TRUE |
47 |
+-#define TRUE 1 |
48 |
++#define TRUE true |
49 |
+ #endif |
50 |
+ |
51 |
+ #ifndef FALSE |
52 |
+-#define FALSE 0 |
53 |
++#define FALSE false |
54 |
+ #endif |
55 |
+ |
56 |
+ #if (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) || (__APPLE__ && __LP64__) |
57 |
+diff --git a/lib/lidar/lidar.h b/lib/lidar/lidar.h |
58 |
+index 89a25de3bf..978894ea74 100644 |
59 |
+--- a/lib/lidar/lidar.h |
60 |
++++ b/lib/lidar/lidar.h |
61 |
+@@ -62,9 +62,6 @@ |
62 |
+ /* INTERPOLATOR */ |
63 |
+ #define P_BILINEAR 1 |
64 |
+ #define P_BICUBIC 0 |
65 |
+- /* Boolean definitions */ |
66 |
+-#define TRUE 1 |
67 |
+-#define FALSE 0 |
68 |
+ |
69 |
+ /*----------------------------------------------------------------------------------------------------------*/ |
70 |
+ /*STRUCTS DECLARATION */ |
71 |
+diff --git a/raster/r.param.scale/param.h b/raster/r.param.scale/param.h |
72 |
+index 9c1dab4e81..2512fedaa2 100644 |
73 |
+--- a/raster/r.param.scale/param.h |
74 |
++++ b/raster/r.param.scale/param.h |
75 |
+@@ -18,8 +18,6 @@ |
76 |
+ /* 'blank' edge around raster. */ |
77 |
+ #define MAX_WSIZE 499 /* Maximum dimensions of window. */ |
78 |
+ /* Some useful labels. */ |
79 |
+-#define TRUE 1 |
80 |
+-#define FALSE 0 |
81 |
+ |
82 |
+ #define RAD2DEG M_R2D |
83 |
+ #define DEG2RAD M_D2R |
84 |
+diff --git a/raster/r.surf.idw/main.h b/raster/r.surf.idw/main.h |
85 |
+index 33164f43cb..47028e7444 100644 |
86 |
+--- a/raster/r.surf.idw/main.h |
87 |
++++ b/raster/r.surf.idw/main.h |
88 |
+@@ -1,8 +1,6 @@ |
89 |
+ #include <grass/raster.h> |
90 |
+ |
91 |
+ #define SHORT short |
92 |
+-#define TRUE 1 |
93 |
+-#define FALSE 0 |
94 |
+ |
95 |
+ #define MELEMENT struct Melement |
96 |
+ MELEMENT { |
97 |
+diff --git a/raster3d/r3.showdspf/Ball.c b/raster3d/r3.showdspf/Ball.c |
98 |
+index fb3b79882f..ae3ec3933a 100644 |
99 |
+--- a/raster3d/r3.showdspf/Ball.c |
100 |
++++ b/raster3d/r3.showdspf/Ball.c |
101 |
+@@ -7,8 +7,6 @@ |
102 |
+ #include "Ball.h" |
103 |
+ #include "BallMath.h" |
104 |
+ #include <stdio.h> |
105 |
+-#define TRUE 1 |
106 |
+-#define FALSE 0 |
107 |
+ |
108 |
+ HMatrix mId = { {1, 0, 0, 0} |
109 |
+ , {0, 1, 0, 0} |
110 |
+diff --git a/raster3d/r3.showdspf/togif.c b/raster3d/r3.showdspf/togif.c |
111 |
+index 589f243a8d..b48236b33f 100644 |
112 |
+--- a/raster3d/r3.showdspf/togif.c |
113 |
++++ b/raster3d/r3.showdspf/togif.c |
114 |
+@@ -324,9 +324,6 @@ static int ditherrow(unsigned short *r, unsigned short *g, unsigned short *b, |
115 |
+ * |
116 |
+ *****************************************************************************/ |
117 |
+ |
118 |
+-#define TRUE 1 |
119 |
+-#define FALSE 0 |
120 |
+- |
121 |
+ |
122 |
+ /************************** BumpPixel() ********************************/ |
123 |
+ /* |
124 |
+diff --git a/vector/v.hull/chull.c b/vector/v.hull/chull.c |
125 |
+index 1ad97396fa..584af5d8ba 100644 |
126 |
+--- a/vector/v.hull/chull.c |
127 |
++++ b/vector/v.hull/chull.c |
128 |
+@@ -29,10 +29,6 @@ |
129 |
+ |
130 |
+ #include "globals.h" |
131 |
+ |
132 |
+-/*Define Boolean type */ |
133 |
+-typedef enum |
134 |
+-{ BFALSE, BTRUE } bool; |
135 |
+- |
136 |
+ /* Define vertex indices. */ |
137 |
+ #define X 0 |
138 |
+ #define Y 1 |
139 |
+@@ -76,10 +72,10 @@ struct tFaceStructure |
140 |
+ }; |
141 |
+ |
142 |
+ /* Define flags */ |
143 |
+-#define ONHULL BTRUE |
144 |
+-#define REMOVED BTRUE |
145 |
+-#define VISIBLE BTRUE |
146 |
+-#define PROCESSED BTRUE |
147 |
++#define ONHULL true |
148 |
++#define REMOVED true |
149 |
++#define VISIBLE true |
150 |
++#define PROCESSED true |
151 |
+ |
152 |
+ /* Global variable definitions */ |
153 |
+ tVertex vertices = NULL; |
154 |
+@@ -436,7 +432,7 @@ bool AddOne(tVertex p) |
155 |
+ tFace f; |
156 |
+ tEdge e, temp; |
157 |
+ long int vol; |
158 |
+- bool vis = BFALSE; |
159 |
++ bool vis = false; |
160 |
+ |
161 |
+ |
162 |
+ /* Mark faces visible from p. */ |
163 |
+@@ -446,7 +442,7 @@ bool AddOne(tVertex p) |
164 |
+ |
165 |
+ if (vol < 0) { |
166 |
+ f->visible = VISIBLE; |
167 |
+- vis = BTRUE; |
168 |
++ vis = true; |
169 |
+ } |
170 |
+ f = f->next; |
171 |
+ } while (f != faces); |
172 |
+@@ -454,7 +450,7 @@ bool AddOne(tVertex p) |
173 |
+ /* If no faces are visible from p, then p is inside the hull. */ |
174 |
+ if (!vis) { |
175 |
+ p->onhull = !ONHULL; |
176 |
+- return BFALSE; |
177 |
++ return false; |
178 |
+ } |
179 |
+ |
180 |
+ /* Mark edges in interior of visible region for deletion. |
181 |
+@@ -470,7 +466,7 @@ bool AddOne(tVertex p) |
182 |
+ e->newface = MakeConeFace(e, p); |
183 |
+ e = temp; |
184 |
+ } while (e != edges); |
185 |
+- return BTRUE; |
186 |
++ return true; |
187 |
+ } |
188 |
+ |
189 |
+ /*--------------------------------------------------------------------- |
190 |
|
191 |
diff --git a/sci-geosciences/grass/grass-7.8.5.ebuild b/sci-geosciences/grass/grass-7.8.5.ebuild |
192 |
index eb00d1ab6a8..7b96039d1d7 100644 |
193 |
--- a/sci-geosciences/grass/grass-7.8.5.ebuild |
194 |
+++ b/sci-geosciences/grass/grass-7.8.5.ebuild |
195 |
@@ -20,7 +20,7 @@ SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz" |
196 |
|
197 |
LICENSE="GPL-2" |
198 |
SLOT="0/7.8.0" |
199 |
-KEYWORDS="amd64 ~ppc x86" |
200 |
+KEYWORDS="~amd64 ~ppc ~x86" |
201 |
IUSE="blas cxx fftw geos lapack liblas mysql netcdf nls odbc opencl opengl openmp png postgres readline sqlite threads tiff truetype X zstd" |
202 |
REQUIRED_USE=" |
203 |
${PYTHON_REQUIRED_USE} |
204 |
@@ -82,6 +82,8 @@ S="${WORKDIR}/${MY_P}" |
205 |
PATCHES=( |
206 |
# bug 746590 |
207 |
"${FILESDIR}/${PN}-7.8-flock.patch" |
208 |
+ # bug 792801 |
209 |
+ "${FILESDIR}/${PN}-7.8.5-bool.patch" |
210 |
) |
211 |
|
212 |
pkg_setup() { |