summaryrefslogtreecommitdiffstats
path: root/geospatial-php8.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-28 17:14:39 +0100
committerRemi Collet <remi@remirepo.net>2021-01-28 17:14:39 +0100
commitc88c334e58119956139378f19df82a7e1e64d854 (patch)
treed891f4445ecac1545c33d76231e23569411dac40 /geospatial-php8.patch
parent88bc5f8431eac15c9c3a03730126061cf556bd04 (diff)
update to 0.3.1
raise dependency on PHP 7.0
Diffstat (limited to 'geospatial-php8.patch')
-rw-r--r--geospatial-php8.patch442
1 files changed, 0 insertions, 442 deletions
diff --git a/geospatial-php8.patch b/geospatial-php8.patch
deleted file mode 100644
index 149da98..0000000
--- a/geospatial-php8.patch
+++ /dev/null
@@ -1,442 +0,0 @@
-diff -up ./geospatial.c.pr ./geospatial.c
---- ./geospatial.c.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./geospatial.c 2020-09-30 15:55:40.091268935 +0200
-@@ -1,8 +1,8 @@
- /*
- +----------------------------------------------------------------------+
-- | PHP Version 5/7 |
-+ | PHP Version 5/7/8 |
- +----------------------------------------------------------------------+
-- | Copyright (c) 1997-2016 The PHP Group |
-+ | Copyright (c) 1997-2020 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
-@@ -34,6 +34,11 @@
- #include "Zend/zend_exceptions.h"
- #include "ext/spl/spl_exceptions.h"
-
-+#ifndef TSRMLS_CC
-+#define TSRMLS_CC
-+#define TSRMLS_DC
-+#endif
-+
- ZEND_BEGIN_ARG_INFO_EX(haversine_args, 0, 0, 2)
- ZEND_ARG_INFO(0, geoJsonPointFrom)
- ZEND_ARG_INFO(0, geoJsonPointTo)
-@@ -450,7 +455,7 @@ geo_cartesian polar_to_cartesian(double
- geo_lat_long cartesian_to_polar(double x, double y, double z, geo_ellipsoid eli)
- {
-
-- double nu, lambda, h;
-+ double nu = 0, lambda, h;
- geo_lat_long polar;
-
- /* aiming for 1m accuracy */
-diff -up ./.gitignore.pr ./.gitignore
---- ./.gitignore.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./.gitignore 2020-09-30 15:54:31.215548030 +0200
-@@ -15,6 +15,7 @@
- /config.sub
- /configure
- /configure.in
-+/configure.ac
- /config.status
- /config.cache
- /conftest
-diff -up ./tests/decimal_to_dms.phpt.pr ./tests/decimal_to_dms.phpt
---- ./tests/decimal_to_dms.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/decimal_to_dms.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -9,14 +9,14 @@ var_dump($dms);
- $dms = decimal_to_dms(-1.034291666667, 'latitude');
- var_dump($dms);
- ?>
----EXPECT--
-+--EXPECTF--
- array(4) {
- ["degrees"]=>
- int(1)
- ["minutes"]=>
- int(2)
- ["seconds"]=>
-- float(3.4500000011994)
-+ float(3.450000001199%s)
- ["direction"]=>
- string(1) "W"
- }
-@@ -26,7 +26,7 @@ array(4) {
- ["minutes"]=>
- int(2)
- ["seconds"]=>
-- float(3.4500000011994)
-+ float(3.450000001199%s)
- ["direction"]=>
- string(1) "S"
- }
-diff -up ./tests/dms_to_decimal.phpt.pr ./tests/dms_to_decimal.phpt
---- ./tests/dms_to_decimal.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/dms_to_decimal.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -16,10 +16,10 @@ var_dump($decimal);
- $decimal = dms_to_decimal(74, 34, 31, 'W');
- var_dump($decimal);
- ?>
----EXPECT--
--float(-1.0342916666667)
--float(-2.3071388888889)
--float(-2.3071388888889)
--float(-2.3071388888889)
--float(-0.1025)
--float(-74.575277777778)
-+--EXPECTF--
-+float(-1.034291666666%s)
-+float(-2.307138888888%s)
-+float(-2.307138888888%s)
-+float(-2.307138888888%s)
-+float(-0.102%s)
-+float(-74.57527777777%s)
-diff -up ./tests/fraction_along-001.phpt.pr ./tests/fraction_along-001.phpt
---- ./tests/fraction_along-001.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/fraction_along-001.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -12,7 +12,7 @@ var_dump(fraction_along_gc_line($point1,
- var_dump(fraction_along_gc_line($point1, $point2, 0.8));
- var_dump(fraction_along_gc_line($point1, $point2, 1));
- ?>
----EXPECT--
-+--EXPECTF--
- array(2) {
- ["type"]=>
- string(5) "Point"
-@@ -30,9 +30,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(6.9998522347268)
-+ float(6.999852234726%s)
- [1]=>
-- float(10.023944943799)
-+ float(10.02394494379%s)
- }
- }
- array(2) {
-@@ -41,9 +41,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(8.9999260791276)
-+ float(8.999926079127%s)
- [1]=>
-- float(10.035925156339)
-+ float(10.03592515633%s)
- }
- }
- array(2) {
-@@ -52,9 +52,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(11.000073920872)
-+ float(11.00007392087%s)
- [1]=>
-- float(10.035925156339)
-+ float(10.03592515633%s)
- }
- }
- array(2) {
-@@ -63,9 +63,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(13.000147765273)
-+ float(13.00014776527%s)
- [1]=>
-- float(10.023944943799)
-+ float(10.02394494379%s)
- }
- }
- array(2) {
-@@ -74,7 +74,7 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(15)
-+ float(1%s)
- [1]=>
- float(10)
- }
-diff -up ./tests/fraction_along-002.phpt.pr ./tests/fraction_along-002.phpt
---- ./tests/fraction_along-002.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/fraction_along-002.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -7,15 +7,15 @@ $point2 = [ 'type' => 'Point', 'coordina
-
- var_dump(fraction_along_gc_line($point1, $point2, 0.5));
- ?>
----EXPECT--
-+--EXPECTF--
- array(2) {
- ["type"]=>
- string(5) "Point"
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(1.5809481271999)
-+ float(1.580948127199%s)
- [1]=>
-- float(53.743611334154)
-+ float(53.74361133415%s)
- }
- }
-diff -up ./tests/geohash_decode.phpt.pr ./tests/geohash_decode.phpt
---- ./tests/geohash_decode.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/geohash_decode.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -25,7 +25,7 @@ var_dump(geohash_decode('u2edjnw17enr'))
-
- var_dump(geohash_decode('zzzzzzzzzzzz'));
- ?>
----EXPECT--
-+--EXPECTF--
- array(2) {
- ["type"]=>
- string(5) "Point"
-@@ -87,9 +87,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.02966308594)
-+ float(171.029663085%s)
- [1]=>
-- float(49.671936035156)
-+ float(49.6719360351%s)
- }
- }
- array(2) {
-@@ -98,9 +98,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.02897644043)
-+ float(171.028976440%s)
- [1]=>
-- float(49.67399597168)
-+ float(49.6739959716%s)
- }
- }
- array(2) {
-@@ -109,9 +109,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.0284614563)
-+ float(171.028461456%s)
- [1]=>
-- float(49.674081802368)
-+ float(49.6740818023%s)
- }
- }
- array(2) {
-@@ -120,9 +120,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.02861166)
-+ float(171.0286116%s)
- [1]=>
-- float(49.674146175385)
-+ float(49.67414617%s)
- }
- }
- array(2) {
-@@ -131,9 +131,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.02859556675)
-+ float(171.0285955667%s)
- [1]=>
-- float(49.674154222012)
-+ float(49.67415422201%s)
- }
- }
- array(2) {
-@@ -142,9 +142,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.0285962373)
-+ float(171.028596237%s)
- [1]=>
-- float(49.674153551459)
-+ float(49.67415355145%s)
- }
- }
- array(2) {
-@@ -153,9 +153,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(171.02859674022)
-+ float(171.0285967402%s)
- [1]=>
-- float(49.674154138193)
-+ float(49.67415413819%s)
- }
- }
- array(2) {
-@@ -186,9 +186,9 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(16.40000006184)
-+ float(16.4000000618%s)
- [1]=>
-- float(48.199999993667)
-+ float(48.19999999366%s)
- }
- }
- array(2) {
-@@ -197,8 +197,8 @@ array(2) {
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(179.99999983236)
-+ float(179.9999998323%s)
- [1]=>
-- float(89.999999916181)
-+ float(89.99999991618%s)
- }
- }
-diff -up ./tests/Greenwich.phpt.pr ./tests/Greenwich.phpt
---- ./tests/Greenwich.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/Greenwich.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -25,16 +25,16 @@ var_dump($polar);
- echo round($diferenceWGS84, 8),PHP_EOL;
- echo round($diferenceAiry, 8),PHP_EOL;
- ?>
----EXPECT--
-+--EXPECTF--
- array(2) {
- ["type"]=>
- string(5) "Point"
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(0.00013627354767069)
-+ float(0.0001362735476706%s)
- [1]=>
-- float(51.477400823311)
-+ float(51.47740082331%s)
- }
- }
- 102.84185171
-diff -up ./tests/helmert.phpt.pr ./tests/helmert.phpt
---- ./tests/helmert.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/helmert.phpt 2020-09-30 15:54:31.215548030 +0200
-@@ -8,12 +8,12 @@ $z = 5020322.478;
-
- var_dump(helmert($x, $y, $z));
- ?>
----EXPECT--
-+--EXPECTF--
- array(3) {
- ["x"]=>
-- float(3909460.0676711)
-+ float(3909460.067671%s)
- ["y"]=>
-- float(-146987.30138174)
-+ float(-146987.301381%s)
- ["z"]=>
-- float(5019888.0705933)
-+ float(5019888.070593%s)
- }
-diff -up ./tests/initial_bearing1.phpt.pr ./tests/initial_bearing1.phpt
---- ./tests/initial_bearing1.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/initial_bearing1.phpt 2020-09-30 15:54:31.216548027 +0200
-@@ -14,5 +14,5 @@ $to = array(
- );
- var_dump(initial_bearing($from, $to));
- ?>
----EXPECT--
--float(148.270892801715)
-+--EXPECTF--
-+float(148.27089280171%s)
-diff -up ./tests/initial_bearing2.phpt.pr ./tests/initial_bearing2.phpt
---- ./tests/initial_bearing2.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/initial_bearing2.phpt 2020-09-30 15:54:31.216548027 +0200
-@@ -14,5 +14,5 @@ $to = array(
- );
- var_dump(initial_bearing($from, $to));
- ?>
----EXPECT--
--float(337.890440190492)
-+--EXPECTF--
-+float(337.89044019049%s)
-diff -up ./tests/JodrellBank.phpt.pr ./tests/JodrellBank.phpt
---- ./tests/JodrellBank.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/JodrellBank.phpt 2020-09-30 15:54:31.216548027 +0200
-@@ -12,15 +12,15 @@ $polar = transform_datum($from, GEO_WGS8
-
- var_dump($polar);
- ?>
----EXPECT--
-+--EXPECTF--
- array(2) {
- ["type"]=>
- string(5) "Point"
- ["coordinates"]=>
- array(2) {
- [0]=>
-- float(-2.3057171628534)
-+ float(-2.305717162853%s)
- [1]=>
-- float(53.235974015543)
-+ float(53.23597401554%s)
- }
- }
-diff -up ./tests/OSGB36_to_WGS84.phpt.pr ./tests/OSGB36_to_WGS84.phpt
---- ./tests/OSGB36_to_WGS84.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/OSGB36_to_WGS84.phpt 2020-09-30 15:54:31.216548027 +0200
-@@ -13,14 +13,14 @@ $polar = transform_datum($from, GEO_AIRY
- var_dump(decimal_to_dms($polar['coordinates'][1], 'latitude'));
- var_dump(decimal_to_dms($polar['coordinates'][0] ,'longitude'));
- ?>
----EXPECT--
-+--EXPECTF--
- array(4) {
- ["degrees"]=>
- int(53)
- ["minutes"]=>
- int(14)
- ["seconds"]=>
-- float(11.493372672732)
-+ float(11.49337267273%s)
- ["direction"]=>
- string(1) "N"
- }
-@@ -30,7 +30,7 @@ array(4) {
- ["minutes"]=>
- int(18)
- ["seconds"]=>
-- float(30.817794659248)
-+ float(30.81779465924%s)
- ["direction"]=>
- string(1) "W"
- }
-diff -up ./tests/polar_to_cartesian.phpt.pr ./tests/polar_to_cartesian.phpt
---- ./tests/polar_to_cartesian.phpt.pr 2019-01-08 12:37:40.000000000 +0100
-+++ ./tests/polar_to_cartesian.phpt 2020-09-30 15:54:31.216548027 +0200
-@@ -7,12 +7,12 @@ $long = 1.4669444444;
-
- var_dump(polar_to_cartesian($lat, $long, GEO_AIRY_1830));
- ?>
----EXPECT--
-+--EXPECTF--
- array(3) {
- ["x"]=>
-- float(3810891.6734396)
-+ float(3810891.673439%s)
- ["y"]=>
-- float(97591.624686311)
-+ float(97591.62468631%s)
- ["z"]=>
-- float(5095766.3939034)
-+ float(5095766.393903%s)
- }