summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-06-19 16:06:34 +0200
committerRemi Collet <remi@php.net>2025-06-19 16:06:34 +0200
commitc4975645f6e9343fcdd8ed741ffae50c79da0fa8 (patch)
tree2e2b14076e8d9f2582ff6e7d302ed5f4d9ab20b4
parenta91b12e8de4fcada3d21c3c0ffcdb8b6b7ec2490 (diff)
update to 0.3.3HEADmaster
drop patch merged upstream re-license spec file to CECILL-2.1 fix test suite on aarch64 using patch from https://github.com/php-geospatial/geospatial/pull/33
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION127
-rw-r--r--php-pecl-geospatial.spec37
-rw-r--r--tests.patch73
4 files changed, 164 insertions, 75 deletions
diff --git a/PHPINFO b/PHPINFO
index fb9a04d..52c3c2b 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,4 +2,4 @@
geospatial
Geospatial functions => enabled
-Version => 0.3.2
+Version => 0.3.3
diff --git a/REFLECTION b/REFLECTION
index 1821bfc..399c321 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #119 geospatial version 0.3.2 ] {
+Extension [ <persistent> extension #83 geospatial version 0.3.3 ] {
- Constants [4] {
Constant [ float GEO_DEG_TO_RAD ] { 0.017453292519943 }
@@ -8,123 +8,128 @@ Extension [ <persistent> extension #119 geospatial version 0.3.2 ] {
}
- Functions {
- Function [ <internal:geospatial> function haversine ] {
-
- - Parameters [3] {
- Parameter #0 [ <required> $geoJsonPointFrom ]
- Parameter #1 [ <required> $geoJsonPointTo ]
- Parameter #2 [ <optional> $radius = <default> ]
- }
- }
- Function [ <internal:geospatial> function initial_bearing ] {
+ Function [ <internal:geospatial> function dms_to_decimal ] {
- - Parameters [3] {
- Parameter #0 [ <required> $geoJsonPointFrom ]
- Parameter #1 [ <required> $geoJsonPointTo ]
- Parameter #2 [ <optional> $radius = <default> ]
+ - Parameters [4] {
+ Parameter #0 [ <required> float $degrees ]
+ Parameter #1 [ <required> float $minutes ]
+ Parameter #2 [ <required> float $seconds ]
+ Parameter #3 [ <optional> string $direction = "" ]
}
+ - Return [ float ]
}
- Function [ <internal:geospatial> function fraction_along_gc_line ] {
+ Function [ <internal:geospatial> function decimal_to_dms ] {
- - Parameters [4] {
- Parameter #0 [ <required> $geoJsonPointFrom ]
- Parameter #1 [ <required> $geoJsonPointTo ]
- Parameter #2 [ <required> $fraction ]
- Parameter #3 [ <optional> $radius = <default> ]
+ - Parameters [2] {
+ Parameter #0 [ <required> float $decimal ]
+ Parameter #1 [ <required> string $coordinate ]
}
+ - Return [ array ]
}
Function [ <internal:geospatial> function helmert ] {
- Parameters [5] {
- Parameter #0 [ <required> $x ]
- Parameter #1 [ <required> $y ]
- Parameter #2 [ <required> $z ]
- Parameter #3 [ <optional> $from_reference_ellipsoid = <default> ]
- Parameter #4 [ <optional> $to_reference_ellipsoid = <default> ]
+ Parameter #0 [ <required> float $x ]
+ Parameter #1 [ <required> float $y ]
+ Parameter #2 [ <required> float $z ]
+ Parameter #3 [ <optional> int $from_reference_ellipsoid = 0 ]
+ Parameter #4 [ <optional> int $to_reference_ellipsoid = 0 ]
}
+ - Return [ array ]
}
Function [ <internal:geospatial> function polar_to_cartesian ] {
- Parameters [3] {
- Parameter #0 [ <required> $latitude ]
- Parameter #1 [ <required> $longitude ]
- Parameter #2 [ <optional> $reference_ellipsoid = <default> ]
+ Parameter #0 [ <required> float $latitude ]
+ Parameter #1 [ <required> float $longitude ]
+ Parameter #2 [ <optional> int $reference_ellipsoid = 0 ]
}
+ - Return [ array ]
}
Function [ <internal:geospatial> function cartesian_to_polar ] {
- Parameters [4] {
- Parameter #0 [ <required> $x ]
- Parameter #1 [ <required> $y ]
- Parameter #2 [ <required> $z ]
- Parameter #3 [ <optional> $reference_ellipsoid = <default> ]
+ Parameter #0 [ <required> float $x ]
+ Parameter #1 [ <required> float $y ]
+ Parameter #2 [ <required> float $z ]
+ Parameter #3 [ <optional> int $reference_ellipsoid = 0 ]
}
+ - Return [ array ]
}
Function [ <internal:geospatial> function transform_datum ] {
- Parameters [3] {
- Parameter #0 [ <required> $GeoJSONPoint ]
- Parameter #1 [ <required> $from_reference_ellipsoid ]
- Parameter #2 [ <required> $to_reference_ellipsoid ]
+ Parameter #0 [ <required> array $coordinates ]
+ Parameter #1 [ <required> int $from_reference_ellipsoid ]
+ Parameter #2 [ <required> int $to_reference_ellipsoid ]
}
+ - Return [ array ]
}
- Function [ <internal:geospatial> function dms_to_decimal ] {
+ Function [ <internal:geospatial> function haversine ] {
- - Parameters [4] {
- Parameter #0 [ <required> $degrees ]
- Parameter #1 [ <required> $minutes ]
- Parameter #2 [ <required> $seconds ]
- Parameter #3 [ <optional> $direction = <default> ]
+ - Parameters [3] {
+ Parameter #0 [ <required> array $from ]
+ Parameter #1 [ <required> array $to ]
+ Parameter #2 [ <optional> float $radius = GEO_EARTH_RADIUS ]
}
+ - Return [ float ]
}
- Function [ <internal:geospatial> function decimal_to_dms ] {
+ Function [ <internal:geospatial> function vincenty ] {
- - Parameters [2] {
- Parameter #0 [ <required> $decimal ]
- Parameter #1 [ <required> $coordinate ]
+ - Parameters [3] {
+ Parameter #0 [ <required> array $from ]
+ Parameter #1 [ <required> array $to ]
+ Parameter #2 [ <optional> float $reference_ellipsoid = GEO_WGS84 ]
}
+ - Return [ float ]
}
- Function [ <internal:geospatial> function vincenty ] {
+ Function [ <internal:geospatial> function fraction_along_gc_line ] {
- Parameters [3] {
- Parameter #0 [ <required> $geoJsonPointFrom ]
- Parameter #1 [ <required> $geoJsonPointTo ]
- Parameter #2 [ <optional> $reference_ellipsoid = <default> ]
+ Parameter #0 [ <required> array $from ]
+ Parameter #1 [ <required> array $to ]
+ Parameter #2 [ <required> float $fraction ]
}
+ - Return [ array ]
}
- Function [ <internal:geospatial> function rdp_simplify ] {
+ Function [ <internal:geospatial> function interpolate_linestring ] {
- Parameters [2] {
- Parameter #0 [ <required> $pointsArray ]
- Parameter #1 [ <required> $epsilon ]
+ Parameter #0 [ <required> array $line ]
+ Parameter #1 [ <required> float $epsilon ]
}
+ - Return [ array ]
}
- Function [ <internal:geospatial> function interpolate_linestring ] {
+ Function [ <internal:geospatial> function initial_bearing ] {
- Parameters [2] {
- Parameter #0 [ <required> $GeoJSONLineString ]
- Parameter #1 [ <required> $epsilon ]
+ Parameter #0 [ <required> array $from ]
+ Parameter #1 [ <required> array $to ]
}
+ - Return [ float ]
}
- Function [ <internal:geospatial> function interpolate_polygon ] {
+ Function [ <internal:geospatial> function rdp_simplify ] {
- Parameters [2] {
- Parameter #0 [ <required> $GeoJSONPolygon ]
- Parameter #1 [ <required> $epsilon ]
+ Parameter #0 [ <required> array $points ]
+ Parameter #1 [ <required> float $epsilon ]
}
+ - Return [ array ]
}
Function [ <internal:geospatial> function geohash_encode ] {
- Parameters [2] {
- Parameter #0 [ <required> $GeoJSONPoint ]
- Parameter #1 [ <required> $precision ]
+ Parameter #0 [ <required> array $point ]
+ Parameter #1 [ <optional> int $precision = 12 ]
}
+ - Return [ string ]
}
Function [ <internal:geospatial> function geohash_decode ] {
- Parameters [1] {
- Parameter #0 [ <required> $geohash ]
+ Parameter #0 [ <required> string $geohash ]
}
+ - Return [ array ]
}
}
}
diff --git a/php-pecl-geospatial.spec b/php-pecl-geospatial.spec
index b4d0623..f3825e6 100644
--- a/php-pecl-geospatial.spec
+++ b/php-pecl-geospatial.spec
@@ -1,14 +1,16 @@
# remirepo spec file for php-pecl-geospatial
#
-# Copyright (c) 2015-2024 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
%{?scl:%scl_package php-pecl-geospatial}
-%global gh_commit d3f3ab0a836f10eacb7e117c06f12ea57e1e8649
+%global pie_vend php-geospatial
+%global pie_proj geospatial
+%global gh_commit 6cd0365f9f89a22131755a6c60daa92473ecb4c3
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner php-geospatial
%global gh_project geospatial
@@ -23,22 +25,22 @@
Summary: PHP Extension to handle common geospatial functions
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 0.3.2
+Version: 0.3.3
%if 0%{?gh_date:1}
Release: 0.11.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
-Patch0: 31.patch
+Patch0: tests.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7.0
+BuildRequires: %{?scl_prefix}php-devel >= 8.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
@@ -46,11 +48,13 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
# Package have be renamed
-Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version}
-Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
-Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
-Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version}
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version}
+Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version}
%description
@@ -195,6 +199,13 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Jun 19 2025 Remi Collet <remi@remirepo.net> - 0.3.3-1
+- update to 0.3.3
+- drop patch merged upstream
+- re-license spec file to CECILL-2.1
+- fix test suite on aarch64 using patch from
+ https://github.com/php-geospatial/geospatial/pull/33
+
* Wed Sep 25 2024 Remi Collet <remi@remirepo.net> - 0.3.2-4
- spec cleanup
- fix test suite on aarch64 using patch from
diff --git a/tests.patch b/tests.patch
new file mode 100644
index 0000000..42ddba7
--- /dev/null
+++ b/tests.patch
@@ -0,0 +1,73 @@
+From 59826af88d8e41f56dadcf9cd83af83d87698401 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 19 Jun 2025 15:55:09 +0200
+Subject: [PATCH] relax new test for aarch64
+
+---
+ tests/interpolate-line-string-001.phpt | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/tests/interpolate-line-string-001.phpt b/tests/interpolate-line-string-001.phpt
+index 50292f3..d372595 100644
+--- a/tests/interpolate-line-string-001.phpt
++++ b/tests/interpolate-line-string-001.phpt
+@@ -32,9 +32,9 @@ array(26) {
+ [2]=>
+ array(2) {
+ [0]=>
+- float(11.000073920872426)
++ float(11.0000739208724%d)
+ [1]=>
+- float(10.035925156338873)
++ float(10.0359251563388%d)
+ }
+ [3]=>
+ array(2) {
+@@ -55,7 +55,7 @@ array(26) {
+ [0]=>
+ float(14.431497984318062)
+ [1]=>
+- float(7.0743500242581225)
++ float(7.07435002425812%d)
+ }
+ [6]=>
+ array(2) {
+@@ -74,9 +74,9 @@ array(26) {
+ [8]=>
+ array(2) {
+ [0]=>
+- float(12.756998952507347)
++ float(12.7569989525073%d)
+ [1]=>
+- float(-1.7055449208364544)
++ float(-1.70554492083645%d)
+ }
+ [9]=>
+ array(2) {
+@@ -95,9 +95,9 @@ array(26) {
+ [11]=>
+ array(2) {
+ [0]=>
+- float(11.067030621797189)
++ float(11.0670306217971%d)
+ [1]=>
+- float(-10.483970622513857)
++ float(-10.4839706225138%d)
+ }
+ [12]=>
+ array(2) {
+@@ -125,12 +125,12 @@ array(26) {
+ [0]=>
+ float(8.642194115015831)
+ [1]=>
+- float(-22.172231059691807)
++ float(-22.1722310596918%d)
+ }
+ [16]=>
+ array(2) {
+ [0]=>
+- float(7.979717846837639)
++ float(7.9797178468376%d)
+ [1]=>
+ float(-25.08894018486976)
+ }