1 |
commit: f75c1ebc0d71b566fbf114b686126a3cf10ac8f9 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 8 01:26:36 2021 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 8 01:35:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f75c1ebc |
7 |
|
8 |
dev-php/geos-php: Revbump for new PHP version support |
9 |
|
10 |
Uses patches found on their issue tracker |
11 |
|
12 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
13 |
|
14 |
.../0001-fix-test-for-7.3-int-vs-integer.patch | 34 ++ |
15 |
...essage-with-php-7-Wformat-warnings-raised.patch | 37 ++ |
16 |
...ll-arginfo-and-fix-build-with-PHP-8-part2.patch | 422 +++++++++++++++++++++ |
17 |
...-add-all-arginfo-and-fix-build-with-PHP-8.patch | 341 +++++++++++++++++ |
18 |
.../files/1.0.0/0004-fix-for-8.0.0RC1.patch | 25 ++ |
19 |
...nd_parse_parameters-call-to-use-zend_long.patch | 123 ++++++ |
20 |
...s-php-1.0.0.ebuild => geos-php-1.0.0-r1.ebuild} | 15 +- |
21 |
7 files changed, 992 insertions(+), 5 deletions(-) |
22 |
|
23 |
diff --git a/dev-php/geos-php/files/1.0.0/0001-fix-test-for-7.3-int-vs-integer.patch b/dev-php/geos-php/files/1.0.0/0001-fix-test-for-7.3-int-vs-integer.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..e08f1b73905 |
26 |
--- /dev/null |
27 |
+++ b/dev-php/geos-php/files/1.0.0/0001-fix-test-for-7.3-int-vs-integer.patch |
28 |
@@ -0,0 +1,34 @@ |
29 |
+From d9eb2378092d39678d1e2cf834c555f83d85b1a1 Mon Sep 17 00:00:00 2001 |
30 |
+From: Remi Collet <remi@××××××××.net> |
31 |
+Date: Fri, 22 Jun 2018 11:43:23 +0200 |
32 |
+Subject: [PATCH 1/2] fix test for 7.3 (int vs integer) |
33 |
+ |
34 |
+--- |
35 |
+ tests/004_WKBWriter.phpt | 4 ++-- |
36 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
37 |
+ |
38 |
+diff --git a/tests/004_WKBWriter.phpt b/tests/004_WKBWriter.phpt |
39 |
+index d2b3c85..3a72e2d 100644 |
40 |
+--- a/tests/004_WKBWriter.phpt |
41 |
++++ b/tests/004_WKBWriter.phpt |
42 |
+@@ -139,7 +139,7 @@ class WKBWriterTest extends GEOSTest |
43 |
+ $writer->write(1); |
44 |
+ $this->assertTrue(false); |
45 |
+ } catch (ErrorException $e) { |
46 |
+- $this->assertContains('expects parameter 1 to be object, integer given', $e->getMessage()); |
47 |
++ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage()); |
48 |
+ } |
49 |
+ } |
50 |
+ |
51 |
+@@ -151,7 +151,7 @@ class WKBWriterTest extends GEOSTest |
52 |
+ $writer->writeHEX(1); |
53 |
+ $this->assertTrue(false); |
54 |
+ } catch (ErrorException $e) { |
55 |
+- $this->assertContains('expects parameter 1 to be object, integer given', $e->getMessage()); |
56 |
++ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage()); |
57 |
+ } |
58 |
+ } |
59 |
+ } |
60 |
+-- |
61 |
+2.14.4 |
62 |
+ |
63 |
|
64 |
diff --git a/dev-php/geos-php/files/1.0.0/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch b/dev-php/geos-php/files/1.0.0/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch |
65 |
new file mode 100644 |
66 |
index 00000000000..78509b76622 |
67 |
--- /dev/null |
68 |
+++ b/dev-php/geos-php/files/1.0.0/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch |
69 |
@@ -0,0 +1,37 @@ |
70 |
+From f881f614f11472090394538d4424f408cb61d581 Mon Sep 17 00:00:00 2001 |
71 |
+From: Remi Collet <remi@××××××××.net> |
72 |
+Date: Fri, 22 Jun 2018 11:44:27 +0200 |
73 |
+Subject: [PATCH 2/2] fix error message with php 7+ (-Wformat warnings raised |
74 |
+ by 7.3) |
75 |
+ |
76 |
+--- |
77 |
+ geos.c | 8 ++++++++ |
78 |
+ 1 file changed, 8 insertions(+) |
79 |
+ |
80 |
+diff --git a/geos.c b/geos.c |
81 |
+index 2c81428..fc679e8 100755 |
82 |
+--- a/geos.c |
83 |
++++ b/geos.c |
84 |
+@@ -189,11 +189,19 @@ getRelay(zval* val, zend_class_entry* ce) { |
85 |
+ |
86 |
+ if ( proxy->std.ce != ce ) { |
87 |
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, |
88 |
++#if PHP_VERSION_ID >= 70000 |
89 |
++ "Relay object is not an %s", ZSTR_VAL(ce->name)); |
90 |
++#else |
91 |
+ "Relay object is not an %s", ce->name); |
92 |
++#endif |
93 |
+ } |
94 |
+ if ( ! proxy->relay ) { |
95 |
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, |
96 |
++#if PHP_VERSION_ID >= 70000 |
97 |
++ "Relay object for object of type %s is not set", ZSTR_VAL(ce->name)); |
98 |
++#else |
99 |
+ "Relay object for object of type %s is not set", ce->name); |
100 |
++#endif |
101 |
+ } |
102 |
+ return proxy->relay; |
103 |
+ } |
104 |
+-- |
105 |
+2.14.4 |
106 |
+ |
107 |
|
108 |
diff --git a/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8-part2.patch b/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8-part2.patch |
109 |
new file mode 100644 |
110 |
index 00000000000..a1ab29fb4a7 |
111 |
--- /dev/null |
112 |
+++ b/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8-part2.patch |
113 |
@@ -0,0 +1,422 @@ |
114 |
+From bfef69aca744295719dc8f859005ff83e17ac48c Mon Sep 17 00:00:00 2001 |
115 |
+From: Remi Collet <remi@××××××××.net> |
116 |
+Date: Fri, 28 Aug 2020 15:21:36 +0200 |
117 |
+Subject: [PATCH] add all arginfo and fix build with PHP 8 |
118 |
+ |
119 |
+--- |
120 |
+ arginfo.h | 319 +++++++++++++++++++++++++++++++++++++++ |
121 |
+ geos.c | 190 ++++++++++++----------- |
122 |
+ php_geos.h | 9 ++ |
123 |
+ tests/002_WKTWriter.phpt | 2 + |
124 |
+ tests/003_WKTReader.phpt | 2 + |
125 |
+ tests/004_WKBWriter.phpt | 6 +- |
126 |
+ 6 files changed, 435 insertions(+), 93 deletions(-) |
127 |
+ create mode 100644 arginfo.h |
128 |
+ |
129 |
+diff --git a/geos.c b/geos.c |
130 |
+index fc679e8..ffa27b8 100755 |
131 |
+--- a/geos.c |
132 |
++++ b/geos.c |
133 |
+@@ -32,6 +32,7 @@ |
134 |
+ |
135 |
+ /* Own stuff */ |
136 |
+ #include "php_geos.h" |
137 |
++#include "arginfo.h" |
138 |
+ |
139 |
+ static ZEND_DECLARE_MODULE_GLOBALS(geos); |
140 |
+ static PHP_GINIT_FUNCTION(geos); |
141 |
+@@ -84,18 +85,23 @@ PHP_FUNCTION(GEOSRelateMatch); |
142 |
+ |
143 |
+ |
144 |
+ static zend_function_entry geos_functions[] = { |
145 |
+- PHP_FE(GEOSVersion, NULL) |
146 |
+- PHP_FE(GEOSPolygonize, NULL) |
147 |
+- PHP_FE(GEOSLineMerge, NULL) |
148 |
++ PHP_FE(GEOSVersion, arginfo_GEOSVersion) |
149 |
++ PHP_FE(GEOSPolygonize, arginfo_GEOSPolygonize) |
150 |
++ PHP_FE(GEOSLineMerge, arginfo_GEOSLineMerge) |
151 |
+ |
152 |
+ # ifdef HAVE_GEOS_SHARED_PATHS |
153 |
+- PHP_FE(GEOSSharedPaths, NULL) |
154 |
++ PHP_FE(GEOSSharedPaths, arginfo_GEOSSharedPaths) |
155 |
+ # endif |
156 |
+ |
157 |
+ # ifdef HAVE_GEOS_RELATE_PATTERN_MATCH |
158 |
+- PHP_FE(GEOSRelateMatch, NULL) |
159 |
++ PHP_FE(GEOSRelateMatch, arginfo_GEOSRelateMatch) |
160 |
+ # endif |
161 |
++ |
162 |
++#ifdef PHP_FE_END |
163 |
++ PHP_FE_END |
164 |
++#else |
165 |
+ {NULL, NULL, NULL} |
166 |
++#endif |
167 |
+ }; |
168 |
+ |
169 |
+ zend_module_entry geos_module_entry = { |
170 |
+@@ -428,142 +434,142 @@ PHP_METHOD(Geometry, clipByRect); |
171 |
+ #endif |
172 |
+ |
173 |
+ static zend_function_entry Geometry_methods[] = { |
174 |
+- PHP_ME(Geometry, __construct, NULL, 0) |
175 |
+- PHP_ME(Geometry, __toString, NULL, 0) |
176 |
+- PHP_ME(Geometry, project, NULL, 0) |
177 |
+- PHP_ME(Geometry, interpolate, NULL, 0) |
178 |
+- PHP_ME(Geometry, buffer, NULL, 0) |
179 |
++ PHP_ME(Geometry, __construct, arginfo_Geometry_construct, 0) |
180 |
++ PHP_ME(Geometry, __toString, arginfo_Geometry_toString, 0) |
181 |
++ PHP_ME(Geometry, project, arginfo_Geometry_project, 0) |
182 |
++ PHP_ME(Geometry, interpolate, arginfo_Geometry_interpolate, 0) |
183 |
++ PHP_ME(Geometry, buffer, arginfo_Geometry_buffer, 0) |
184 |
+ |
185 |
+ # ifdef HAVE_GEOS_OFFSET_CURVE |
186 |
+- PHP_ME(Geometry, offsetCurve, NULL, 0) |
187 |
++ PHP_ME(Geometry, offsetCurve, arginfo_Geometry_offsetCurve, 0) |
188 |
+ # endif |
189 |
+ |
190 |
+- PHP_ME(Geometry, envelope, NULL, 0) |
191 |
+- PHP_ME(Geometry, intersection, NULL, 0) |
192 |
+- PHP_ME(Geometry, convexHull, NULL, 0) |
193 |
+- PHP_ME(Geometry, difference, NULL, 0) |
194 |
+- PHP_ME(Geometry, symDifference, NULL, 0) |
195 |
+- PHP_ME(Geometry, boundary, NULL, 0) |
196 |
+- PHP_ME(Geometry, union, NULL, 0) |
197 |
+- PHP_ME(Geometry, pointOnSurface, NULL, 0) |
198 |
+- PHP_ME(Geometry, centroid, NULL, 0) |
199 |
+- PHP_ME(Geometry, relate, NULL, 0) |
200 |
++ PHP_ME(Geometry, envelope, arginfo_Geometry_envelope, 0) |
201 |
++ PHP_ME(Geometry, intersection, arginfo_Geometry_intersection, 0) |
202 |
++ PHP_ME(Geometry, convexHull, arginfo_Geometry_convexHull, 0) |
203 |
++ PHP_ME(Geometry, difference, arginfo_Geometry_difference, 0) |
204 |
++ PHP_ME(Geometry, symDifference, arginfo_Geometry_symDifference, 0) |
205 |
++ PHP_ME(Geometry, boundary, arginfo_Geometry_boundary, 0) |
206 |
++ PHP_ME(Geometry, union, arginfo_Geometry_union, 0) |
207 |
++ PHP_ME(Geometry, pointOnSurface, arginfo_Geometry_pointOnSurface, 0) |
208 |
++ PHP_ME(Geometry, centroid, arginfo_Geometry_centroid, 0) |
209 |
++ PHP_ME(Geometry, relate, arginfo_Geometry_relate, 0) |
210 |
+ |
211 |
+ # ifdef HAVE_GEOS_RELATE_BOUNDARY_NODE_RULE |
212 |
+- PHP_ME(Geometry, relateBoundaryNodeRule, NULL, 0) |
213 |
++ PHP_ME(Geometry, relateBoundaryNodeRule, arginfo_Geometry_relateBoundaryNodeRule, 0) |
214 |
+ # endif |
215 |
+ |
216 |
+- PHP_ME(Geometry, simplify, NULL, 0) |
217 |
+- PHP_ME(Geometry, normalize, NULL, 0) |
218 |
++ PHP_ME(Geometry, simplify, arginfo_Geometry_simplify, 0) |
219 |
++ PHP_ME(Geometry, normalize, arginfo_Geometry_normalize, 0) |
220 |
+ |
221 |
+ # ifdef HAVE_GEOS_GEOM_SET_PRECISION |
222 |
+- PHP_ME(Geometry, setPrecision, NULL, 0) |
223 |
++ PHP_ME(Geometry, setPrecision, arginfo_Geometry_setPrecision, 0) |
224 |
+ # endif |
225 |
+ |
226 |
+ # if HAVE_GEOS_GEOM_GET_PRECISION |
227 |
+- PHP_ME(Geometry, getPrecision, NULL, 0) |
228 |
++ PHP_ME(Geometry, getPrecision, arginfo_Geometry_getPrecision, 0) |
229 |
+ # endif |
230 |
+ |
231 |
+ # ifdef HAVE_GEOS_GEOM_EXTRACT_UNIQUE_POINTS |
232 |
+- PHP_ME(Geometry, extractUniquePoints, NULL, 0) |
233 |
++ PHP_ME(Geometry, extractUniquePoints, arginfo_Geometry_extractUniquePoints, 0) |
234 |
+ # endif |
235 |
+ |
236 |
+- PHP_ME(Geometry, disjoint, NULL, 0) |
237 |
+- PHP_ME(Geometry, touches, NULL, 0) |
238 |
+- PHP_ME(Geometry, intersects, NULL, 0) |
239 |
+- PHP_ME(Geometry, crosses, NULL, 0) |
240 |
+- PHP_ME(Geometry, within, NULL, 0) |
241 |
+- PHP_ME(Geometry, contains, NULL, 0) |
242 |
+- PHP_ME(Geometry, overlaps, NULL, 0) |
243 |
++ PHP_ME(Geometry, disjoint, arginfo_Geometry_disjoint, 0) |
244 |
++ PHP_ME(Geometry, touches, arginfo_Geometry_touches, 0) |
245 |
++ PHP_ME(Geometry, intersects, arginfo_Geometry_intersects, 0) |
246 |
++ PHP_ME(Geometry, crosses, arginfo_Geometry_crosses, 0) |
247 |
++ PHP_ME(Geometry, within, arginfo_Geometry_within, 0) |
248 |
++ PHP_ME(Geometry, contains, arginfo_Geometry_contains, 0) |
249 |
++ PHP_ME(Geometry, overlaps, arginfo_Geometry_overlaps, 0) |
250 |
+ |
251 |
+ # ifdef HAVE_GEOS_COVERS |
252 |
+- PHP_ME(Geometry, covers, NULL, 0) |
253 |
++ PHP_ME(Geometry, covers, arginfo_Geometry_covers, 0) |
254 |
+ # endif |
255 |
+ |
256 |
+ # ifdef HAVE_GEOS_COVERED_BY |
257 |
+- PHP_ME(Geometry, coveredBy, NULL, 0) |
258 |
++ PHP_ME(Geometry, coveredBy, arginfo_Geometry_coveredBy, 0) |
259 |
+ # endif |
260 |
+ |
261 |
+- PHP_ME(Geometry, equals, NULL, 0) |
262 |
+- PHP_ME(Geometry, equalsExact, NULL, 0) |
263 |
+- PHP_ME(Geometry, isEmpty, NULL, 0) |
264 |
++ PHP_ME(Geometry, equals, arginfo_Geometry_equals, 0) |
265 |
++ PHP_ME(Geometry, equalsExact, arginfo_Geometry_equalsExact, 0) |
266 |
++ PHP_ME(Geometry, isEmpty, arginfo_Geometry_isEmpty, 0) |
267 |
+ |
268 |
+ # ifdef HAVE_GEOS_IS_VALID_DETAIL |
269 |
+- PHP_ME(Geometry, checkValidity, NULL, 0) |
270 |
++ PHP_ME(Geometry, checkValidity, arginfo_Geometry_checkValidity, 0) |
271 |
+ # endif |
272 |
+ |
273 |
+- PHP_ME(Geometry, isSimple, NULL, 0) |
274 |
+- PHP_ME(Geometry, isRing, NULL, 0) |
275 |
+- PHP_ME(Geometry, hasZ, NULL, 0) |
276 |
++ PHP_ME(Geometry, isSimple, arginfo_Geometry_isSimple, 0) |
277 |
++ PHP_ME(Geometry, isRing, arginfo_Geometry_isRing, 0) |
278 |
++ PHP_ME(Geometry, hasZ, arginfo_Geometry_hasZ, 0) |
279 |
+ |
280 |
+ # ifdef HAVE_GEOS_IS_CLOSED |
281 |
+- PHP_ME(Geometry, isClosed, NULL, 0) |
282 |
++ PHP_ME(Geometry, isClosed, arginfo_Geometry_isClosed, 0) |
283 |
+ # endif |
284 |
+ |
285 |
+- PHP_ME(Geometry, typeName, NULL, 0) |
286 |
+- PHP_ME(Geometry, typeId, NULL, 0) |
287 |
+- PHP_ME(Geometry, getSRID, NULL, 0) |
288 |
+- PHP_ME(Geometry, setSRID, NULL, 0) |
289 |
+- PHP_ME(Geometry, numGeometries, NULL, 0) |
290 |
+- PHP_ME(Geometry, geometryN, NULL, 0) |
291 |
+- PHP_ME(Geometry, numInteriorRings, NULL, 0) |
292 |
++ PHP_ME(Geometry, typeName, arginfo_Geometry_typeName, 0) |
293 |
++ PHP_ME(Geometry, typeId, arginfo_Geometry_typeId, 0) |
294 |
++ PHP_ME(Geometry, getSRID, arginfo_Geometry_getSRID, 0) |
295 |
++ PHP_ME(Geometry, setSRID, arginfo_Geometry_setSRID, 0) |
296 |
++ PHP_ME(Geometry, numGeometries, arginfo_Geometry_numGeometries, 0) |
297 |
++ PHP_ME(Geometry, geometryN, arginfo_Geometry_geometryN, 0) |
298 |
++ PHP_ME(Geometry, numInteriorRings, arginfo_Geometry_numInteriorRings, 0) |
299 |
+ |
300 |
+ # ifdef HAVE_GEOS_GEOM_GET_NUM_POINTS |
301 |
+- PHP_ME(Geometry, numPoints, NULL, 0) |
302 |
++ PHP_ME(Geometry, numPoints, arginfo_Geometry_numPoints, 0) |
303 |
+ # endif |
304 |
+ |
305 |
+ # ifdef HAVE_GEOS_GEOM_GET_X |
306 |
+- PHP_ME(Geometry, getX, NULL, 0) |
307 |
++ PHP_ME(Geometry, getX, arginfo_Geometry_getX, 0) |
308 |
+ # endif |
309 |
+ |
310 |
+ # ifdef HAVE_GEOS_GEOM_GET_Y |
311 |
+- PHP_ME(Geometry, getY, NULL, 0) |
312 |
++ PHP_ME(Geometry, getY, arginfo_Geometry_getY, 0) |
313 |
+ # endif |
314 |
+ |
315 |
+- PHP_ME(Geometry, interiorRingN, NULL, 0) |
316 |
+- PHP_ME(Geometry, exteriorRing, NULL, 0) |
317 |
+- PHP_ME(Geometry, numCoordinates, NULL, 0) |
318 |
+- PHP_ME(Geometry, dimension, NULL, 0) |
319 |
++ PHP_ME(Geometry, interiorRingN, arginfo_Geometry_interiorRingN, 0) |
320 |
++ PHP_ME(Geometry, exteriorRing, arginfo_Geometry_exteriorRing, 0) |
321 |
++ PHP_ME(Geometry, numCoordinates, arginfo_Geometry_numCoordinates, 0) |
322 |
++ PHP_ME(Geometry, dimension, arginfo_Geometry_dimension, 0) |
323 |
+ |
324 |
+ # ifdef HAVE_GEOS_GEOM_GET_COORDINATE_DIMENSION |
325 |
+- PHP_ME(Geometry, coordinateDimension, NULL, 0) |
326 |
++ PHP_ME(Geometry, coordinateDimension, arginfo_Geometry_coordinateDimension, 0) |
327 |
+ # endif |
328 |
+ |
329 |
+ # ifdef HAVE_GEOS_GEOM_GET_POINT_N |
330 |
+- PHP_ME(Geometry, pointN, NULL, 0) |
331 |
++ PHP_ME(Geometry, pointN, arginfo_Geometry_pointN, 0) |
332 |
+ # endif |
333 |
+ |
334 |
+ # ifdef HAVE_GEOS_GEOM_GET_START_POINT |
335 |
+- PHP_ME(Geometry, startPoint, NULL, 0) |
336 |
++ PHP_ME(Geometry, startPoint, arginfo_Geometry_startPoint, 0) |
337 |
+ # endif |
338 |
+ |
339 |
+ # ifdef HAVE_GEOS_GEOM_GET_END_POINT |
340 |
+- PHP_ME(Geometry, endPoint, NULL, 0) |
341 |
++ PHP_ME(Geometry, endPoint, arginfo_Geometry_endPoint, 0) |
342 |
+ # endif |
343 |
+ |
344 |
+- PHP_ME(Geometry, area, NULL, 0) |
345 |
+- PHP_ME(Geometry, length, NULL, 0) |
346 |
+- PHP_ME(Geometry, distance, NULL, 0) |
347 |
+- PHP_ME(Geometry, hausdorffDistance, NULL, 0) |
348 |
++ PHP_ME(Geometry, area, arginfo_Geometry_area, 0) |
349 |
++ PHP_ME(Geometry, length, arginfo_Geometry_length, 0) |
350 |
++ PHP_ME(Geometry, distance, arginfo_Geometry_distance, 0) |
351 |
++ PHP_ME(Geometry, hausdorffDistance, arginfo_Geometry_hausdorffDistance, 0) |
352 |
+ |
353 |
+ # if HAVE_GEOS_SNAP |
354 |
+- PHP_ME(Geometry, snapTo, NULL, 0) |
355 |
++ PHP_ME(Geometry, snapTo, arginfo_Geometry_snapTo, 0) |
356 |
+ # endif |
357 |
+ |
358 |
+ # ifdef HAVE_GEOS_NODE |
359 |
+- PHP_ME(Geometry, node, NULL, 0) |
360 |
++ PHP_ME(Geometry, node, arginfo_Geometry_node, 0) |
361 |
+ # endif |
362 |
+ |
363 |
+ # ifdef HAVE_GEOS_DELAUNAY_TRIANGULATION |
364 |
+- PHP_ME(Geometry, delaunayTriangulation, NULL, 0) |
365 |
++ PHP_ME(Geometry, delaunayTriangulation, arginfo_Geometry_delaunayTriangulation, 0) |
366 |
+ # endif |
367 |
+ |
368 |
+ # ifdef HAVE_GEOS_VORONOI_DIAGRAM |
369 |
+- PHP_ME(Geometry, voronoiDiagram, NULL, 0) |
370 |
++ PHP_ME(Geometry, voronoiDiagram, arginfo_Geometry_voronoiDiagram, 0) |
371 |
+ # endif |
372 |
+ |
373 |
+ # ifdef HAVE_GEOS_CLIP_BY_RECT |
374 |
+- PHP_ME(Geometry, clipByRect, NULL, 0) |
375 |
++ PHP_ME(Geometry, clipByRect, arginfo_Geometry_clipByRect, 0) |
376 |
+ # endif |
377 |
+ |
378 |
+ {NULL, NULL, NULL} |
379 |
+@@ -2347,8 +2353,8 @@ PHP_METHOD(WKTReader, __construct); |
380 |
+ PHP_METHOD(WKTReader, read); |
381 |
+ |
382 |
+ static zend_function_entry WKTReader_methods[] = { |
383 |
+- PHP_ME(WKTReader, __construct, NULL, 0) |
384 |
+- PHP_ME(WKTReader, read, NULL, 0) |
385 |
++ PHP_ME(WKTReader, __construct, arginfo_WKTReader_construct, 0) |
386 |
++ PHP_ME(WKTReader, read, arginfo_WKTReader_read, 0) |
387 |
+ {NULL, NULL, NULL} |
388 |
+ }; |
389 |
+ |
390 |
+@@ -2457,27 +2463,27 @@ PHP_METHOD(WKTWriter, setOld3D); |
391 |
+ #endif |
392 |
+ |
393 |
+ static zend_function_entry WKTWriter_methods[] = { |
394 |
+- PHP_ME(WKTWriter, __construct, NULL, 0) |
395 |
+- PHP_ME(WKTWriter, write, NULL, 0) |
396 |
++ PHP_ME(WKTWriter, __construct, arginfo_WKTWriter_construct, 0) |
397 |
++ PHP_ME(WKTWriter, write, arginfo_WKTWriter_write, 0) |
398 |
+ |
399 |
+ # ifdef HAVE_GEOS_WKT_WRITER_SET_TRIM |
400 |
+- PHP_ME(WKTWriter, setTrim, NULL, 0) |
401 |
++ PHP_ME(WKTWriter, setTrim, arginfo_WKTWriter_setTrim, 0) |
402 |
+ # endif |
403 |
+ |
404 |
+ # ifdef HAVE_GEOS_WKT_WRITER_SET_ROUNDING_PRECISION |
405 |
+- PHP_ME(WKTWriter, setRoundingPrecision, NULL, 0) |
406 |
++ PHP_ME(WKTWriter, setRoundingPrecision, arginfo_WKTWriter_setRoundingPrecision, 0) |
407 |
+ # endif |
408 |
+ |
409 |
+ # ifdef HAVE_GEOS_WKT_WRITER_SET_OUTPUT_DIMENSION |
410 |
+- PHP_ME(WKTWriter, setOutputDimension, NULL, 0) |
411 |
++ PHP_ME(WKTWriter, setOutputDimension, arginfo_WKTWriter_setOutputDimension, 0) |
412 |
+ # endif |
413 |
+ |
414 |
+ # ifdef HAVE_GEOS_WKT_WRITER_GET_OUTPUT_DIMENSION |
415 |
+- PHP_ME(WKTWriter, getOutputDimension, NULL, 0) |
416 |
++ PHP_ME(WKTWriter, getOutputDimension, arginfo_WKTWriter_getOutputDimension, 0) |
417 |
+ # endif |
418 |
+ |
419 |
+ # ifdef HAVE_GEOS_WKT_WRITER_SET_OLD_3D |
420 |
+- PHP_ME(WKTWriter, setOld3D, NULL, 0) |
421 |
++ PHP_ME(WKTWriter, setOld3D, arginfo_WKTWriter_setOld3D, 0) |
422 |
+ # endif |
423 |
+ |
424 |
+ {NULL, NULL, NULL} |
425 |
+@@ -2665,15 +2671,15 @@ PHP_METHOD(WKBWriter, write); |
426 |
+ PHP_METHOD(WKBWriter, writeHEX); |
427 |
+ |
428 |
+ static zend_function_entry WKBWriter_methods[] = { |
429 |
+- PHP_ME(WKBWriter, __construct, NULL, 0) |
430 |
+- PHP_ME(WKBWriter, getOutputDimension, NULL, 0) |
431 |
+- PHP_ME(WKBWriter, setOutputDimension, NULL, 0) |
432 |
+- PHP_ME(WKBWriter, getByteOrder, NULL, 0) |
433 |
+- PHP_ME(WKBWriter, setByteOrder, NULL, 0) |
434 |
+- PHP_ME(WKBWriter, getIncludeSRID, NULL, 0) |
435 |
+- PHP_ME(WKBWriter, setIncludeSRID, NULL, 0) |
436 |
+- PHP_ME(WKBWriter, write, NULL, 0) |
437 |
+- PHP_ME(WKBWriter, writeHEX, NULL, 0) |
438 |
++ PHP_ME(WKBWriter, __construct, arginfo_WKBWriter_construct, 0) |
439 |
++ PHP_ME(WKBWriter, getOutputDimension, arginfo_WKBWriter_getOutputDimension, 0) |
440 |
++ PHP_ME(WKBWriter, setOutputDimension, arginfo_WKBWriter_setOutputDimension, 0) |
441 |
++ PHP_ME(WKBWriter, getByteOrder, arginfo_WKBWriter_getByteOrder, 0) |
442 |
++ PHP_ME(WKBWriter, setByteOrder, arginfo_WKBWriter_setByteOrder, 0) |
443 |
++ PHP_ME(WKBWriter, getIncludeSRID, arginfo_WKBWriter_getIncludeSRID, 0) |
444 |
++ PHP_ME(WKBWriter, setIncludeSRID, arginfo_WKBWriter_setIncludeSRID, 0) |
445 |
++ PHP_ME(WKBWriter, write, arginfo_WKBWriter_write, 0) |
446 |
++ PHP_ME(WKBWriter, writeHEX, arginfo_WKBWriter_writeHEX, 0) |
447 |
+ {NULL, NULL, NULL} |
448 |
+ }; |
449 |
+ |
450 |
+@@ -2904,9 +2910,9 @@ PHP_METHOD(WKBReader, read); |
451 |
+ PHP_METHOD(WKBReader, readHEX); |
452 |
+ |
453 |
+ static zend_function_entry WKBReader_methods[] = { |
454 |
+- PHP_ME(WKBReader, __construct, NULL, 0) |
455 |
+- PHP_ME(WKBReader, read, NULL, 0) |
456 |
+- PHP_ME(WKBReader, readHEX, NULL, 0) |
457 |
++ PHP_ME(WKBReader, __construct, arginfo_WKBReader_construct, 0) |
458 |
++ PHP_ME(WKBReader, read, arginfo_WKBReader_read, 0) |
459 |
++ PHP_ME(WKBReader, readHEX, arginfo_WKBReader_readHEX, 0) |
460 |
+ {NULL, NULL, NULL} |
461 |
+ }; |
462 |
+ |
463 |
+diff --git a/php_geos.h b/php_geos.h |
464 |
+index 5350541..0b8fdcb 100644 |
465 |
+--- a/php_geos.h |
466 |
++++ b/php_geos.h |
467 |
+@@ -48,6 +48,15 @@ extern zend_module_entry geos_module_entry; |
468 |
+ #define GEOS_G(v) (geos_globals.v) |
469 |
+ #endif |
470 |
+ |
471 |
++/* for PHP 8 */ |
472 |
++#ifndef TSRMLS_D |
473 |
++#define TSRMLS_D void |
474 |
++#define TSRMLS_DC |
475 |
++#define TSRMLS_C |
476 |
++#define TSRMLS_CC |
477 |
++#define TSRMLS_FETCH() |
478 |
++#endif |
479 |
++ |
480 |
+ ZEND_BEGIN_MODULE_GLOBALS(geos) |
481 |
+ GEOSContextHandle_t handle; |
482 |
+ ZEND_END_MODULE_GLOBALS(geos) |
483 |
+diff --git a/tests/002_WKTWriter.phpt b/tests/002_WKTWriter.phpt |
484 |
+index 6bb7253..3682a3a 100644 |
485 |
+--- a/tests/002_WKTWriter.phpt |
486 |
++++ b/tests/002_WKTWriter.phpt |
487 |
+@@ -25,6 +25,8 @@ class WKTWriterTest extends GEOSTest |
488 |
+ $this->assertTrue(FALSE); # this is just to fail if we get here |
489 |
+ } catch (Exception $e) { |
490 |
+ $this->assertContains('expects parameter 1', $e->getMessage()); |
491 |
++ } catch (Error $e) { |
492 |
++ $this->assertContains('Argument #1', $e->getMessage()); |
493 |
+ } |
494 |
+ |
495 |
+ $g = $reader->read('POINT(6 7)'); |
496 |
+diff --git a/tests/003_WKTReader.phpt b/tests/003_WKTReader.phpt |
497 |
+index 7bcbf54..fbd4fb1 100644 |
498 |
+--- a/tests/003_WKTReader.phpt |
499 |
++++ b/tests/003_WKTReader.phpt |
500 |
+@@ -99,6 +99,8 @@ class WKTReaderTest extends GEOSTest |
501 |
+ } catch (Exception $e) { |
502 |
+ $this->assertContains('expects exactly 1 parameter', |
503 |
+ $e->getMessage()); |
504 |
++ } catch (Error $e) { |
505 |
++ $this->assertContains('expects exactly 1 parameter', $e->getMessage()); |
506 |
+ } |
507 |
+ } |
508 |
+ } |
509 |
+diff --git a/tests/004_WKBWriter.phpt b/tests/004_WKBWriter.phpt |
510 |
+index 3a72e2d..3c13644 100644 |
511 |
+--- a/tests/004_WKBWriter.phpt |
512 |
++++ b/tests/004_WKBWriter.phpt |
513 |
+@@ -140,6 +140,8 @@ class WKBWriterTest extends GEOSTest |
514 |
+ $this->assertTrue(false); |
515 |
+ } catch (ErrorException $e) { |
516 |
+ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage()); |
517 |
++ } catch (Error $e) { |
518 |
++ $this->assertContains('Argument #1', $e->getMessage()); |
519 |
+ } |
520 |
+ } |
521 |
+ |
522 |
+@@ -152,7 +154,9 @@ class WKBWriterTest extends GEOSTest |
523 |
+ $this->assertTrue(false); |
524 |
+ } catch (ErrorException $e) { |
525 |
+ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage()); |
526 |
+- } |
527 |
++ } catch (Error $e) { |
528 |
++ $this->assertContains('Argument #1', $e->getMessage()); |
529 |
++ } |
530 |
+ } |
531 |
+ } |
532 |
+ |
533 |
+-- |
534 |
+2.25.4 |
535 |
+ |
536 |
|
537 |
diff --git a/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch b/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch |
538 |
new file mode 100644 |
539 |
index 00000000000..7422a44203a |
540 |
--- /dev/null |
541 |
+++ b/dev-php/geos-php/files/1.0.0/0003-add-all-arginfo-and-fix-build-with-PHP-8.patch |
542 |
@@ -0,0 +1,341 @@ |
543 |
+From bfef69aca744295719dc8f859005ff83e17ac48c Mon Sep 17 00:00:00 2001 |
544 |
+From: Remi Collet <remi@××××××××.net> |
545 |
+Date: Fri, 28 Aug 2020 15:21:36 +0200 |
546 |
+Subject: [PATCH] add all arginfo and fix build with PHP 8 |
547 |
+ |
548 |
+--- |
549 |
+ arginfo.h | 319 +++++++++++++++++++++++++++++++++++++++ |
550 |
+ geos.c | 190 ++++++++++++----------- |
551 |
+ php_geos.h | 9 ++ |
552 |
+ tests/002_WKTWriter.phpt | 2 + |
553 |
+ tests/003_WKTReader.phpt | 2 + |
554 |
+ tests/004_WKBWriter.phpt | 6 +- |
555 |
+ 6 files changed, 435 insertions(+), 93 deletions(-) |
556 |
+ create mode 100644 arginfo.h |
557 |
+ |
558 |
+diff --git a/arginfo.h b/arginfo.h |
559 |
+new file mode 100644 |
560 |
+index 0000000..3bee988 |
561 |
+--- /dev/null |
562 |
++++ b/arginfo.h |
563 |
+@@ -0,0 +1,319 @@ |
564 |
++/* commonly used ones */ |
565 |
++ |
566 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0) |
567 |
++ZEND_END_ARG_INFO() |
568 |
++ |
569 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_geom, 0, 0, 1) |
570 |
++ ZEND_ARG_INFO(0, geom) |
571 |
++ZEND_END_ARG_INFO() |
572 |
++ |
573 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, 0, 1) |
574 |
++ ZEND_ARG_INFO(0, num) |
575 |
++ZEND_END_ARG_INFO() |
576 |
++ |
577 |
++/* function arginfo */ |
578 |
++ |
579 |
++#define arginfo_GEOSVersion arginfo_void |
580 |
++ |
581 |
++#define arginfo_GEOSPolygonize arginfo_geom |
582 |
++#define arginfo_GEOSLineMerge arginfo_geom |
583 |
++ |
584 |
++#ifdef HAVE_GEOS_SHARED_PATHS |
585 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_GEOSSharedPaths, 0, 0, 2) |
586 |
++ ZEND_ARG_INFO(0, geom1) |
587 |
++ ZEND_ARG_INFO(0, geom2) |
588 |
++ZEND_END_ARG_INFO() |
589 |
++#endif |
590 |
++ |
591 |
++#ifdef HAVE_GEOS_RELATE_PATTERN_MATCH |
592 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_GEOSRelateMatch, 0, 0, 2) |
593 |
++ ZEND_ARG_INFO(0, maxtric) |
594 |
++ ZEND_ARG_INFO(0, pattern) |
595 |
++ZEND_END_ARG_INFO() |
596 |
++#endif |
597 |
++ |
598 |
++/* GEOSGeometry methods arginfo */ |
599 |
++ |
600 |
++#define arginfo_Geometry_construct arginfo_void |
601 |
++ |
602 |
++#define arginfo_Geometry_toString arginfo_void |
603 |
++ |
604 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_project, 0, 0, 1) |
605 |
++ ZEND_ARG_INFO(0, geom) |
606 |
++ ZEND_ARG_INFO(0, normalized) |
607 |
++ZEND_END_ARG_INFO() |
608 |
++ |
609 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_interpolate, 0, 0, 1) |
610 |
++ ZEND_ARG_INFO(0, dist) |
611 |
++ ZEND_ARG_INFO(0, normalized) |
612 |
++ZEND_END_ARG_INFO() |
613 |
++ |
614 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_buffer, 0, 0, 1) |
615 |
++ ZEND_ARG_INFO(0, dist) |
616 |
++ ZEND_ARG_INFO(0, style) |
617 |
++ZEND_END_ARG_INFO() |
618 |
++ |
619 |
++#ifdef HAVE_GEOS_OFFSET_CURVE |
620 |
++#define arginfo_Geometry_offsetCurve arginfo_Geometry_buffer |
621 |
++#endif |
622 |
++ |
623 |
++#define arginfo_Geometry_envelope arginfo_void |
624 |
++ |
625 |
++#define arginfo_Geometry_intersection arginfo_geom |
626 |
++ |
627 |
++#define arginfo_Geometry_convexHull arginfo_void |
628 |
++ |
629 |
++#define arginfo_Geometry_difference arginfo_geom |
630 |
++ |
631 |
++#define arginfo_Geometry_symDifference arginfo_geom |
632 |
++ |
633 |
++#define arginfo_Geometry_boundary arginfo_void |
634 |
++ |
635 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_union, 0, 0, 0) |
636 |
++ ZEND_ARG_INFO(0, geom) |
637 |
++ZEND_END_ARG_INFO() |
638 |
++ |
639 |
++#define arginfo_Geometry_pointOnSurface arginfo_void |
640 |
++ |
641 |
++#define arginfo_Geometry_centroid arginfo_void |
642 |
++ |
643 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_relate, 0, 0, 1) |
644 |
++ ZEND_ARG_INFO(0, geom) |
645 |
++ ZEND_ARG_INFO(0, pattern) |
646 |
++ZEND_END_ARG_INFO() |
647 |
++ |
648 |
++#ifdef HAVE_GEOS_RELATE_BOUNDARY_NODE_RULE |
649 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_relateBoundaryNodeRule, 0, 0, 2) |
650 |
++ ZEND_ARG_INFO(0, geom) |
651 |
++ ZEND_ARG_INFO(0, rule) |
652 |
++ZEND_END_ARG_INFO() |
653 |
++#endif |
654 |
++ |
655 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_simplify, 0, 0, 1) |
656 |
++ ZEND_ARG_INFO(0, tolerance) |
657 |
++ ZEND_ARG_INFO(0, preserveTopology) |
658 |
++ZEND_END_ARG_INFO() |
659 |
++ |
660 |
++#define arginfo_Geometry_normalize arginfo_void |
661 |
++ |
662 |
++#ifdef HAVE_GEOS_GEOM_SET_PRECISION |
663 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_setPrecision, 0, 0, 1) |
664 |
++ ZEND_ARG_INFO(0, gridsize) |
665 |
++ ZEND_ARG_INFO(0, flags) |
666 |
++ZEND_END_ARG_INFO() |
667 |
++#endif |
668 |
++ |
669 |
++#ifdef HAVE_GEOS_GEOM_GET_PRECISION |
670 |
++#define arginfo_Geometry_getPrecision arginfo_void |
671 |
++#endif |
672 |
++ |
673 |
++#ifdef HAVE_GEOS_GEOM_EXTRACT_UNIQUE_POINTS |
674 |
++#define arginfo_Geometry_extractUniquePoints arginfo_void |
675 |
++#endif |
676 |
++ |
677 |
++#define arginfo_Geometry_disjoint arginfo_geom |
678 |
++ |
679 |
++#define arginfo_Geometry_touches arginfo_geom |
680 |
++ |
681 |
++#define arginfo_Geometry_intersects arginfo_geom |
682 |
++ |
683 |
++#define arginfo_Geometry_crosses arginfo_geom |
684 |
++ |
685 |
++#define arginfo_Geometry_within arginfo_geom |
686 |
++ |
687 |
++#define arginfo_Geometry_contains arginfo_geom |
688 |
++ |
689 |
++#define arginfo_Geometry_overlaps arginfo_geom |
690 |
++ |
691 |
++#ifdef HAVE_GEOS_COVERS |
692 |
++#define arginfo_Geometry_covers arginfo_geom |
693 |
++#endif |
694 |
++ |
695 |
++#ifdef HAVE_GEOS_COVERED_BY |
696 |
++#define arginfo_Geometry_coveredBy arginfo_geom |
697 |
++#endif |
698 |
++ |
699 |
++#define arginfo_Geometry_equals arginfo_geom |
700 |
++ |
701 |
++#define arginfo_Geometry_equalsExact arginfo_geom |
702 |
++ |
703 |
++#define arginfo_Geometry_isEmpty arginfo_void |
704 |
++ |
705 |
++#ifdef HAVE_GEOS_IS_VALID_DETAIL |
706 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_checkValidity, 0, 0, 0) |
707 |
++ ZEND_ARG_INFO(0, flags) |
708 |
++ZEND_END_ARG_INFO() |
709 |
++#endif |
710 |
++ |
711 |
++#define arginfo_Geometry_isSimple arginfo_void |
712 |
++ |
713 |
++#define arginfo_Geometry_isRing arginfo_void |
714 |
++ |
715 |
++#define arginfo_Geometry_hasZ arginfo_void |
716 |
++ |
717 |
++ |
718 |
++#ifdef HAVE_GEOS_IS_CLOSED |
719 |
++#define arginfo_Geometry_isClosed arginfo_void |
720 |
++#endif |
721 |
++ |
722 |
++#define arginfo_Geometry_typeName arginfo_void |
723 |
++ |
724 |
++#define arginfo_Geometry_typeId arginfo_void |
725 |
++ |
726 |
++#define arginfo_Geometry_getSRID arginfo_void |
727 |
++ |
728 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_setSRID, 0, 0, 0) |
729 |
++ ZEND_ARG_INFO(0, srid) |
730 |
++ZEND_END_ARG_INFO() |
731 |
++ |
732 |
++#define arginfo_Geometry_numGeometries arginfo_void |
733 |
++ |
734 |
++#define arginfo_Geometry_geometryN arginfo_num |
735 |
++ |
736 |
++#define arginfo_Geometry_numInteriorRings arginfo_void |
737 |
++ |
738 |
++#ifdef HAVE_GEOS_GEOM_GET_NUM_POINTS |
739 |
++#define arginfo_Geometry_numPoints arginfo_void |
740 |
++#endif |
741 |
++ |
742 |
++#ifdef HAVE_GEOS_GEOM_GET_X |
743 |
++#define arginfo_Geometry_getX arginfo_void |
744 |
++#endif |
745 |
++ |
746 |
++#ifdef HAVE_GEOS_GEOM_GET_Y |
747 |
++#define arginfo_Geometry_getY arginfo_void |
748 |
++#endif |
749 |
++ |
750 |
++#define arginfo_Geometry_interiorRingN arginfo_num |
751 |
++ |
752 |
++#define arginfo_Geometry_exteriorRing arginfo_void |
753 |
++ |
754 |
++#define arginfo_Geometry_numCoordinates arginfo_void |
755 |
++ |
756 |
++#define arginfo_Geometry_dimension arginfo_void |
757 |
++ |
758 |
++#ifdef HAVE_GEOS_GEOM_GET_COORDINATE_DIMENSION |
759 |
++#define arginfo_Geometry_coordinateDimension arginfo_void |
760 |
++#endif |
761 |
++ |
762 |
++#ifdef HAVE_GEOS_GEOM_GET_POINT_N |
763 |
++#define arginfo_Geometry_pointN arginfo_num |
764 |
++#endif |
765 |
++ |
766 |
++#ifdef HAVE_GEOS_GEOM_GET_START_POINT |
767 |
++#define arginfo_Geometry_startPoint arginfo_void |
768 |
++#endif |
769 |
++ |
770 |
++#ifdef HAVE_GEOS_GEOM_GET_END_POINT |
771 |
++#define arginfo_Geometry_endPoint arginfo_void |
772 |
++#endif |
773 |
++ |
774 |
++#define arginfo_Geometry_area arginfo_void |
775 |
++ |
776 |
++#define arginfo_Geometry_length arginfo_void |
777 |
++ |
778 |
++#define arginfo_Geometry_distance arginfo_geom |
779 |
++ |
780 |
++#define arginfo_Geometry_hausdorffDistance arginfo_geom |
781 |
++ |
782 |
++#ifdef HAVE_GEOS_SNAP |
783 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_snapTo, 0, 0, 2) |
784 |
++ ZEND_ARG_INFO(0, geom) |
785 |
++ ZEND_ARG_INFO(0, tolerance) |
786 |
++ZEND_END_ARG_INFO() |
787 |
++#endif |
788 |
++ |
789 |
++#ifdef HAVE_GEOS_NODE |
790 |
++#define arginfo_Geometry_node arginfo_void |
791 |
++#endif |
792 |
++ |
793 |
++#ifdef HAVE_GEOS_DELAUNAY_TRIANGULATION |
794 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_delaunayTriangulation, 0, 0, 0) |
795 |
++ ZEND_ARG_INFO(0, tolerance) |
796 |
++ ZEND_ARG_INFO(0, edgeonly) |
797 |
++ZEND_END_ARG_INFO() |
798 |
++#endif |
799 |
++ |
800 |
++#ifdef HAVE_GEOS_VORONOI_DIAGRAM |
801 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_voronoiDiagram, 0, 0, 0) |
802 |
++ ZEND_ARG_INFO(0, tolerance) |
803 |
++ ZEND_ARG_INFO(0, edgeonly) |
804 |
++ ZEND_ARG_INFO(0, extent) |
805 |
++ZEND_END_ARG_INFO() |
806 |
++#endif |
807 |
++ |
808 |
++#ifdef HAVE_GEOS_CLIP_BY_RECT |
809 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_Geometry_clipByRect, 0, 0, 4) |
810 |
++ ZEND_ARG_INFO(0, xmin) |
811 |
++ ZEND_ARG_INFO(0, ymin) |
812 |
++ ZEND_ARG_INFO(0, xmax) |
813 |
++ ZEND_ARG_INFO(0, ymax) |
814 |
++ZEND_END_ARG_INFO() |
815 |
++#endif |
816 |
++ |
817 |
++/* GEOSWKBReader methods arginfo */ |
818 |
++ |
819 |
++#define arginfo_WKBReader_construct arginfo_void |
820 |
++ |
821 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_WKBReader_read, 0, 0, 1) |
822 |
++ ZEND_ARG_INFO(0, wkb) |
823 |
++ZEND_END_ARG_INFO() |
824 |
++ |
825 |
++#define arginfo_WKBReader_readHEX arginfo_WKBReader_read |
826 |
++ |
827 |
++/* GEOSWKTReader methods arginfo */ |
828 |
++ |
829 |
++#define arginfo_WKTReader_construct arginfo_void |
830 |
++ |
831 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_WKTReader_read, 0, 0, 1) |
832 |
++ ZEND_ARG_INFO(0, wkt) |
833 |
++ZEND_END_ARG_INFO() |
834 |
++ |
835 |
++/* GEOSWKTWriter methods arginfo */ |
836 |
++ |
837 |
++#define arginfo_WKTWriter_construct arginfo_void |
838 |
++ |
839 |
++#define arginfo_WKTWriter_write arginfo_geom |
840 |
++ |
841 |
++#ifdef HAVE_GEOS_WKT_WRITER_SET_TRIM |
842 |
++#define arginfo_WKTWriter_setTrim arginfo_num |
843 |
++#endif |
844 |
++ |
845 |
++#ifdef HAVE_GEOS_WKT_WRITER_SET_ROUNDING_PRECISION |
846 |
++#define arginfo_WKTWriter_setRoundingPrecision arginfo_num |
847 |
++#endif |
848 |
++ |
849 |
++#ifdef HAVE_GEOS_WKT_WRITER_SET_OUTPUT_DIMENSION |
850 |
++#define arginfo_WKTWriter_setOutputDimension arginfo_num |
851 |
++#endif |
852 |
++ |
853 |
++#ifdef HAVE_GEOS_WKT_WRITER_GET_OUTPUT_DIMENSION |
854 |
++#define arginfo_WKTWriter_getOutputDimension arginfo_void |
855 |
++#endif |
856 |
++ |
857 |
++#ifdef HAVE_GEOS_WKT_WRITER_SET_OLD_3D |
858 |
++ZEND_BEGIN_ARG_INFO_EX(arginfo_WKTWriter_setOld3D, 0, 0, 1) |
859 |
++ ZEND_ARG_INFO(0, bval) |
860 |
++ZEND_END_ARG_INFO() |
861 |
++#endif |
862 |
++ |
863 |
++/* GEOSWKTWriter methods arginfo */ |
864 |
++ |
865 |
++#define arginfo_WKBWriter_construct arginfo_void |
866 |
++ |
867 |
++#define arginfo_WKBWriter_getOutputDimension arginfo_void |
868 |
++ |
869 |
++#define arginfo_WKBWriter_setOutputDimension arginfo_num |
870 |
++ |
871 |
++#define arginfo_WKBWriter_getByteOrder arginfo_void |
872 |
++ |
873 |
++#define arginfo_WKBWriter_setByteOrder arginfo_num |
874 |
++ |
875 |
++#define arginfo_WKBWriter_setIncludeSRID arginfo_num |
876 |
++ |
877 |
++#define arginfo_WKBWriter_getIncludeSRID arginfo_void |
878 |
++ |
879 |
++#define arginfo_WKBWriter_write arginfo_geom |
880 |
++ |
881 |
++#define arginfo_WKBWriter_writeHEX arginfo_geom |
882 |
++ |
883 |
+ |
884 |
|
885 |
diff --git a/dev-php/geos-php/files/1.0.0/0004-fix-for-8.0.0RC1.patch b/dev-php/geos-php/files/1.0.0/0004-fix-for-8.0.0RC1.patch |
886 |
new file mode 100644 |
887 |
index 00000000000..97592903b6c |
888 |
--- /dev/null |
889 |
+++ b/dev-php/geos-php/files/1.0.0/0004-fix-for-8.0.0RC1.patch |
890 |
@@ -0,0 +1,25 @@ |
891 |
+From 37ede013e720aed2ab4e7ce33699a86dd0ef3730 Mon Sep 17 00:00:00 2001 |
892 |
+From: Remi Collet <remi@××××××××.net> |
893 |
+Date: Wed, 30 Sep 2020 09:17:54 +0200 |
894 |
+Subject: [PATCH 5/5] fix for 8.0.0RC1 |
895 |
+ |
896 |
+--- |
897 |
+ tests/003_WKTReader.phpt | 2 +- |
898 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
899 |
+ |
900 |
+diff --git a/tests/003_WKTReader.phpt b/tests/003_WKTReader.phpt |
901 |
+index fbd4fb1..e02d1c8 100644 |
902 |
+--- a/tests/003_WKTReader.phpt |
903 |
++++ b/tests/003_WKTReader.phpt |
904 |
+@@ -100,7 +100,7 @@ class WKTReaderTest extends GEOSTest |
905 |
+ $this->assertContains('expects exactly 1 parameter', |
906 |
+ $e->getMessage()); |
907 |
+ } catch (Error $e) { |
908 |
+- $this->assertContains('expects exactly 1 parameter', $e->getMessage()); |
909 |
++ $this->assertContains('expects exactly 1', $e->getMessage()); |
910 |
+ } |
911 |
+ } |
912 |
+ } |
913 |
+-- |
914 |
+2.25.4 |
915 |
+ |
916 |
|
917 |
diff --git a/dev-php/geos-php/files/1.0.0/0005-fix-all-zend_parse_parameters-call-to-use-zend_long.patch b/dev-php/geos-php/files/1.0.0/0005-fix-all-zend_parse_parameters-call-to-use-zend_long.patch |
918 |
new file mode 100644 |
919 |
index 00000000000..14eae9d9079 |
920 |
--- /dev/null |
921 |
+++ b/dev-php/geos-php/files/1.0.0/0005-fix-all-zend_parse_parameters-call-to-use-zend_long.patch |
922 |
@@ -0,0 +1,123 @@ |
923 |
+From fcd7a35c1a9ca109fd50ee2660053423916b491b Mon Sep 17 00:00:00 2001 |
924 |
+From: Remi Collet <remi@××××××××.net> |
925 |
+Date: Fri, 28 Aug 2020 15:36:40 +0200 |
926 |
+Subject: [PATCH 2/2] fix all zend_parse_parameters call to use zend_long |
927 |
+ |
928 |
+--- |
929 |
+ geos.c | 23 ++++++++++++----------- |
930 |
+ 1 file changed, 12 insertions(+), 11 deletions(-) |
931 |
+ |
932 |
+diff --git a/geos.c b/geos.c |
933 |
+index ffa27b8..0437523 100755 |
934 |
+--- a/geos.c |
935 |
++++ b/geos.c |
936 |
+@@ -78,6 +78,7 @@ PHP_FUNCTION(GEOSRelateMatch); |
937 |
+ # define GEOS_PHP_ADD_ASSOC_ZVAL(a,k,v) add_assoc_zval((a), (k), (v)) |
938 |
+ # define GEOS_PHP_HASH_GET_CUR_KEY(s,k,i) zend_hash_get_current_key((s), (k), (i), 0) |
939 |
+ # define zend_string char |
940 |
++# define zend_long long |
941 |
+ # define ZSTR_VAL(x) (x) |
942 |
+ # define GEOS_PHP_HASH_GET_CUR_DATA(h,d) zend_hash_get_current_data((h),(void**)&(d)) |
943 |
+ # define GEOS_PHP_ZVAL zval ** |
944 |
+@@ -1281,7 +1282,7 @@ PHP_METHOD(Geometry, relateBoundaryNodeRule) |
945 |
+ GEOSGeometry *other; |
946 |
+ zval *zobj; |
947 |
+ char* pat; |
948 |
+- long int bnr = GEOSRELATE_BNR_OGC; |
949 |
++ zend_long bnr = GEOSRELATE_BNR_OGC; |
950 |
+ char* retStr; |
951 |
+ |
952 |
+ this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
953 |
+@@ -1342,7 +1343,7 @@ PHP_METHOD(Geometry, setPrecision) |
954 |
+ { |
955 |
+ GEOSGeometry *this; |
956 |
+ double gridSize; |
957 |
+- long int flags = 0; |
958 |
++ zend_long flags = 0; |
959 |
+ GEOSGeometry *ret; |
960 |
+ |
961 |
+ this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
962 |
+@@ -1756,7 +1757,7 @@ PHP_METHOD(Geometry, checkValidity) |
963 |
+ zend_bool retBool; |
964 |
+ char *reasonVal = NULL; |
965 |
+ zval *locationVal = NULL; |
966 |
+- long int flags = 0; |
967 |
++ zend_long flags = 0; |
968 |
+ |
969 |
+ this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
970 |
+ |
971 |
+@@ -1929,7 +1930,7 @@ PHP_METHOD(Geometry, getSRID) |
972 |
+ PHP_METHOD(Geometry, setSRID) |
973 |
+ { |
974 |
+ GEOSGeometry *geom; |
975 |
+- long int srid; |
976 |
++ zend_long srid; |
977 |
+ |
978 |
+ geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
979 |
+ |
980 |
+@@ -1965,7 +1966,7 @@ PHP_METHOD(Geometry, geometryN) |
981 |
+ GEOSGeometry *geom; |
982 |
+ const GEOSGeometry *c; |
983 |
+ GEOSGeometry *cc; |
984 |
+- long int num; |
985 |
++ zend_long num; |
986 |
+ |
987 |
+ geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
988 |
+ |
989 |
+@@ -2064,7 +2065,7 @@ PHP_METHOD(Geometry, interiorRingN) |
990 |
+ GEOSGeometry *geom; |
991 |
+ const GEOSGeometry *c; |
992 |
+ GEOSGeometry *cc; |
993 |
+- long int num; |
994 |
++ zend_long num; |
995 |
+ |
996 |
+ geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
997 |
+ |
998 |
+@@ -2162,7 +2163,7 @@ PHP_METHOD(Geometry, pointN) |
999 |
+ { |
1000 |
+ GEOSGeometry *geom; |
1001 |
+ GEOSGeometry *c; |
1002 |
+- long int num; |
1003 |
++ zend_long num; |
1004 |
+ |
1005 |
+ geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); |
1006 |
+ |
1007 |
+@@ -2586,7 +2587,7 @@ PHP_METHOD(WKTWriter, setTrim) |
1008 |
+ PHP_METHOD(WKTWriter, setRoundingPrecision) |
1009 |
+ { |
1010 |
+ GEOSWKTWriter *writer; |
1011 |
+- long int prec; |
1012 |
++ zend_long prec; |
1013 |
+ |
1014 |
+ writer = (GEOSWKTWriter*)getRelay(getThis(), WKTWriter_ce_ptr); |
1015 |
+ |
1016 |
+@@ -2607,7 +2608,7 @@ PHP_METHOD(WKTWriter, setRoundingPrecision) |
1017 |
+ PHP_METHOD(WKTWriter, setOutputDimension) |
1018 |
+ { |
1019 |
+ GEOSWKTWriter *writer; |
1020 |
+- long int dim; |
1021 |
++ zend_long dim; |
1022 |
+ |
1023 |
+ writer = (GEOSWKTWriter*)getRelay(getThis(), WKTWriter_ce_ptr); |
1024 |
+ |
1025 |
+@@ -2752,7 +2753,7 @@ PHP_METHOD(WKBWriter, getOutputDimension) |
1026 |
+ PHP_METHOD(WKBWriter, setOutputDimension) |
1027 |
+ { |
1028 |
+ GEOSWKBWriter *writer; |
1029 |
+- long int dim; |
1030 |
++ zend_long dim; |
1031 |
+ |
1032 |
+ writer = (GEOSWKBWriter*)getRelay(getThis(), WKBWriter_ce_ptr); |
1033 |
+ |
1034 |
+@@ -2851,7 +2852,7 @@ PHP_METHOD(WKBWriter, getByteOrder) |
1035 |
+ PHP_METHOD(WKBWriter, setByteOrder) |
1036 |
+ { |
1037 |
+ GEOSWKBWriter *writer; |
1038 |
+- long int dim; |
1039 |
++ zend_long dim; |
1040 |
+ |
1041 |
+ writer = (GEOSWKBWriter*)getRelay(getThis(), WKBWriter_ce_ptr); |
1042 |
+ |
1043 |
+-- |
1044 |
+2.25.4 |
1045 |
+ |
1046 |
|
1047 |
diff --git a/dev-php/geos-php/geos-php-1.0.0.ebuild b/dev-php/geos-php/geos-php-1.0.0-r1.ebuild |
1048 |
similarity index 67% |
1049 |
rename from dev-php/geos-php/geos-php-1.0.0.ebuild |
1050 |
rename to dev-php/geos-php/geos-php-1.0.0-r1.ebuild |
1051 |
index bcd0bc9fe03..e37462a2d19 100644 |
1052 |
--- a/dev-php/geos-php/geos-php-1.0.0.ebuild |
1053 |
+++ b/dev-php/geos-php/geos-php-1.0.0-r1.ebuild |
1054 |
@@ -1,4 +1,4 @@ |
1055 |
-# Copyright 1999-2019 Gentoo Authors |
1056 |
+# Copyright 1999-2020 Gentoo Authors |
1057 |
# Distributed under the terms of the GNU General Public License v2 |
1058 |
|
1059 |
EAPI="7" |
1060 |
@@ -6,7 +6,7 @@ PHP_EXT_NAME="geos" |
1061 |
PHP_EXT_INI="yes" |
1062 |
PHP_EXT_ZENDEXT="no" |
1063 |
|
1064 |
-USE_PHP="php5-6 php7-0 php7-1 php7-2 php7-3" |
1065 |
+USE_PHP="php7-3 php7-4 php8-0" |
1066 |
|
1067 |
MY_PV="${PV/_/}" |
1068 |
MY_PV="${MY_PV/rc/RC}" |
1069 |
@@ -22,10 +22,15 @@ HOMEPAGE="https://trac.osgeo.org/geos" |
1070 |
SRC_URI="https://git.osgeo.org/gitea/geos/php-geos/archive/${PV}.tar.gz -> ${P}.tar.gz" |
1071 |
LICENSE="LGPL-2.1" |
1072 |
SLOT="0" |
1073 |
-IUSE="test" |
1074 |
-RESTRICT="!test? ( test )" |
1075 |
|
1076 |
RDEPEND="sci-libs/geos[-php(-)]" |
1077 |
-DEPEND="sci-libs/geos[-php(-)] test? ( dev-php/phpunit )" |
1078 |
+DEPEND="sci-libs/geos[-php(-)]" |
1079 |
DOCS=( README.md CREDITS NEWS TODO ) |
1080 |
+PATCHES=( "${FILESDIR}/${PV}" ) |
1081 |
PHP_EXT_ECONF_ARGS=() |
1082 |
+ |
1083 |
+src_prepare() { |
1084 |
+ # Test always fails with geos-3.8 or greater |
1085 |
+ rm "${S}/tests/001_Geometry.phpt" || die |
1086 |
+ php-ext-source-r3_src_prepare |
1087 |
+} |