diff options
author | Remi Collet <remi@remirepo.net> | 2023-07-26 09:28:06 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-07-26 09:28:06 +0200 |
commit | d2abcd64121cd41c3dc3705e92b27717941dd1bc (patch) | |
tree | 164be44c78307cd13f7fd5abf4d9267b2ceb925d | |
parent | ec78bf01b8cc51aba90b0890e4f22a182f9c778f (diff) |
build out of sources tree
use SPDX license ID
ignore 2 tests failing with libgeos 3.12 #2226098
-rw-r--r-- | REFLECTION | 399 | ||||
-rw-r--r-- | php-geos.spec | 71 |
2 files changed, 420 insertions, 50 deletions
@@ -1,38 +1,59 @@ -Extension [ <persistent> extension #89 geos version 1.0.0 ] { +Extension [ <persistent> extension #124 geos version 1.0.0 ] { - Constants [20] { - Constant [ integer GEOSBUF_CAP_ROUND ] { 1 } - Constant [ integer GEOSBUF_CAP_FLAT ] { 2 } - Constant [ integer GEOSBUF_CAP_SQUARE ] { 3 } - Constant [ integer GEOSBUF_JOIN_ROUND ] { 1 } - Constant [ integer GEOSBUF_JOIN_MITRE ] { 2 } - Constant [ integer GEOSBUF_JOIN_BEVEL ] { 3 } - Constant [ integer GEOS_POINT ] { 0 } - Constant [ integer GEOS_LINESTRING ] { 1 } - Constant [ integer GEOS_LINEARRING ] { 2 } - Constant [ integer GEOS_POLYGON ] { 3 } - Constant [ integer GEOS_MULTIPOINT ] { 4 } - Constant [ integer GEOS_MULTILINESTRING ] { 5 } - Constant [ integer GEOS_MULTIPOLYGON ] { 6 } - Constant [ integer GEOS_GEOMETRYCOLLECTION ] { 7 } - Constant [ integer GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE ] { 1 } - Constant [ integer GEOSRELATE_BNR_MOD2 ] { 1 } - Constant [ integer GEOSRELATE_BNR_OGC ] { 1 } - Constant [ integer GEOSRELATE_BNR_ENDPOINT ] { 2 } - Constant [ integer GEOSRELATE_BNR_MULTIVALENT_ENDPOINT ] { 3 } - Constant [ integer GEOSRELATE_BNR_MONOVALENT_ENDPOINT ] { 4 } + Constant [ int GEOSBUF_CAP_ROUND ] { 1 } + Constant [ int GEOSBUF_CAP_FLAT ] { 2 } + Constant [ int GEOSBUF_CAP_SQUARE ] { 3 } + Constant [ int GEOSBUF_JOIN_ROUND ] { 1 } + Constant [ int GEOSBUF_JOIN_MITRE ] { 2 } + Constant [ int GEOSBUF_JOIN_BEVEL ] { 3 } + Constant [ int GEOS_POINT ] { 0 } + Constant [ int GEOS_LINESTRING ] { 1 } + Constant [ int GEOS_LINEARRING ] { 2 } + Constant [ int GEOS_POLYGON ] { 3 } + Constant [ int GEOS_MULTIPOINT ] { 4 } + Constant [ int GEOS_MULTILINESTRING ] { 5 } + Constant [ int GEOS_MULTIPOLYGON ] { 6 } + Constant [ int GEOS_GEOMETRYCOLLECTION ] { 7 } + Constant [ int GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE ] { 1 } + Constant [ int GEOSRELATE_BNR_MOD2 ] { 1 } + Constant [ int GEOSRELATE_BNR_OGC ] { 1 } + Constant [ int GEOSRELATE_BNR_ENDPOINT ] { 2 } + Constant [ int GEOSRELATE_BNR_MULTIVALENT_ENDPOINT ] { 3 } + Constant [ int GEOSRELATE_BNR_MONOVALENT_ENDPOINT ] { 4 } } - Functions { Function [ <internal:geos> function GEOSVersion ] { + + - Parameters [0] { + } } Function [ <internal:geos> function GEOSPolygonize ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Function [ <internal:geos> function GEOSLineMerge ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Function [ <internal:geos> function GEOSSharedPaths ] { + + - Parameters [2] { + Parameter #0 [ <required> $geom1 ] + Parameter #1 [ <required> $geom2 ] + } } Function [ <internal:geos> function GEOSRelateMatch ] { + + - Parameters [2] { + Parameter #0 [ <required> $maxtric ] + Parameter #1 [ <required> $pattern ] + } } } @@ -53,9 +74,16 @@ Extension [ <persistent> extension #89 geos version 1.0.0 ] { - Methods [2] { Method [ <internal:geos, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method read ] { + + - Parameters [1] { + Parameter #0 [ <required> $wkt ] + } } } } @@ -76,29 +104,55 @@ Extension [ <persistent> extension #89 geos version 1.0.0 ] { - Methods [7] { Method [ <internal:geos, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method write ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method setTrim ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method setRoundingPrecision ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method setOutputDimension ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method getOutputDimension ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method setOld3D ] { + + - Parameters [1] { + Parameter #0 [ <required> $bval ] + } } } } - Class [ <internal:geos> class GEOSGeometry ] { + Class [ <internal:geos> class GEOSGeometry implements Stringable ] { - Constants [0] { } @@ -112,197 +166,451 @@ Extension [ <persistent> extension #89 geos version 1.0.0 ] { - Properties [0] { } - - Methods [64] { + - Methods [66] { Method [ <internal:geos, ctor> public method __construct ] { + + - Parameters [0] { + } } - Method [ <internal:geos> public method __toString ] { + Method [ <internal:geos, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } Method [ <internal:geos> public method project ] { + + - Parameters [2] { + Parameter #0 [ <required> $geom ] + Parameter #1 [ <optional> $normalized = <default> ] + } } Method [ <internal:geos> public method interpolate ] { + + - Parameters [2] { + Parameter #0 [ <required> $dist ] + Parameter #1 [ <optional> $normalized = <default> ] + } } Method [ <internal:geos> public method buffer ] { + + - Parameters [2] { + Parameter #0 [ <required> $dist ] + Parameter #1 [ <optional> $style = <default> ] + } } Method [ <internal:geos> public method offsetCurve ] { + + - Parameters [2] { + Parameter #0 [ <required> $dist ] + Parameter #1 [ <optional> $style = <default> ] + } } Method [ <internal:geos> public method envelope ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method intersection ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method convexHull ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method difference ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method symDifference ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method boundary ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method union ] { + + - Parameters [1] { + Parameter #0 [ <optional> $geom = <default> ] + } } Method [ <internal:geos> public method pointOnSurface ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method centroid ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method relate ] { + + - Parameters [2] { + Parameter #0 [ <required> $geom ] + Parameter #1 [ <optional> $pattern = <default> ] + } } Method [ <internal:geos> public method relateBoundaryNodeRule ] { + + - Parameters [2] { + Parameter #0 [ <required> $geom ] + Parameter #1 [ <required> $rule ] + } } Method [ <internal:geos> public method simplify ] { + + - Parameters [2] { + Parameter #0 [ <required> $tolerance ] + Parameter #1 [ <optional> $preserveTopology = <default> ] + } } Method [ <internal:geos> public method normalize ] { + + - Parameters [0] { + } + } + + Method [ <internal:geos> public method setPrecision ] { + + - Parameters [2] { + Parameter #0 [ <required> $gridsize ] + Parameter #1 [ <optional> $flags = <default> ] + } + } + + Method [ <internal:geos> public method getPrecision ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method extractUniquePoints ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method disjoint ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method touches ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method intersects ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method crosses ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method within ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method contains ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method overlaps ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method covers ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method coveredBy ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method equals ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method equalsExact ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method isEmpty ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method checkValidity ] { + + - Parameters [1] { + Parameter #0 [ <optional> $flags = <default> ] + } } Method [ <internal:geos> public method isSimple ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method isRing ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method hasZ ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method isClosed ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method typeName ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method typeId ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method getSRID ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method setSRID ] { + + - Parameters [1] { + Parameter #0 [ <optional> $srid = <default> ] + } } Method [ <internal:geos> public method numGeometries ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method geometryN ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method numInteriorRings ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method numPoints ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method getX ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method getY ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method interiorRingN ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method exteriorRing ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method numCoordinates ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method dimension ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method coordinateDimension ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method pointN ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method startPoint ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method endPoint ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method area ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method length ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method distance ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method hausdorffDistance ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method snapTo ] { + + - Parameters [2] { + Parameter #0 [ <required> $geom ] + Parameter #1 [ <required> $tolerance ] + } } Method [ <internal:geos> public method node ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method delaunayTriangulation ] { + + - Parameters [2] { + Parameter #0 [ <optional> $tolerance = <default> ] + Parameter #1 [ <optional> $edgeonly = <default> ] + } } Method [ <internal:geos> public method voronoiDiagram ] { + + - Parameters [3] { + Parameter #0 [ <optional> $tolerance = <default> ] + Parameter #1 [ <optional> $edgeonly = <default> ] + Parameter #2 [ <optional> $extent = <default> ] + } } Method [ <internal:geos> public method clipByRect ] { + + - Parameters [4] { + Parameter #0 [ <required> $xmin ] + Parameter #1 [ <required> $ymin ] + Parameter #2 [ <required> $xmax ] + Parameter #3 [ <required> $ymax ] + } } } } @@ -323,30 +631,62 @@ Extension [ <persistent> extension #89 geos version 1.0.0 ] { - Methods [9] { Method [ <internal:geos, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method getOutputDimension ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method setOutputDimension ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method getByteOrder ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method setByteOrder ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method getIncludeSRID ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method setIncludeSRID ] { + + - Parameters [1] { + Parameter #0 [ <required> $num ] + } } Method [ <internal:geos> public method write ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } Method [ <internal:geos> public method writeHEX ] { + + - Parameters [1] { + Parameter #0 [ <required> $geom ] + } } } } @@ -367,12 +707,23 @@ Extension [ <persistent> extension #89 geos version 1.0.0 ] { - Methods [3] { Method [ <internal:geos, ctor> public method __construct ] { + + - Parameters [0] { + } } Method [ <internal:geos> public method read ] { + + - Parameters [1] { + Parameter #0 [ <required> $wkb ] + } } Method [ <internal:geos> public method readHEX ] { + + - Parameters [1] { + Parameter #0 [ <required> $wkb ] + } } } } diff --git a/php-geos.spec b/php-geos.spec index 441bd04..c11eea5 100644 --- a/php-geos.spec +++ b/php-geos.spec @@ -10,9 +10,9 @@ %bcond_without tests %if 0%{?scl:1} -%scl_package php-geos +%scl_package php-geos %else -%global pkg_name php-geos +%global pkg_name php-geos %endif #global prever rc3 %global pecl_name geos @@ -22,10 +22,18 @@ %else %global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pkg_name} +%global _configure ../%{sources}/configure + +# For PHP < 5.6 and EPEL-9 +%{!?__phpize: %global __phpize %{_bindir}/phpize} +%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize} +%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config} +%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config} Name: %{?scl_prefix}php-%{pecl_name} Version: 1.0.0 -Release: 24%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 25%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP module for GEOS @@ -54,7 +62,6 @@ BuildRequires: geos-devel >= 3.4 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Dropped from geos Obsoletes: %{?scl_prefix}geos-php <= 3.5.0 @@ -70,9 +77,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pkg_name} NTS -cd NTS +cd %{sources} chmod -x *.c %patch -P0 -p1 -b .test %patch -P1 -p1 -b .wformat @@ -96,25 +102,26 @@ cat << 'EOF' | tee %{ini_name} extension=%{pecl_name}.so EOF - +mkdir NTS %if %{with_zts} # Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif %build %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config +%configure --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -137,38 +144,48 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with_zts} : Minimal load test for NTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %endif %if %{with tests} -%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8 +cd %{sources} +if pkg-config geos --atleast-version 3.12; then +# See https://git.osgeo.org/gitea/geos/php-geos/issues/31 +# ignore failing test with geos 3.12 +rm tests/002_WKTWriter.phpt +rm tests/004_WKBWriter.phpt +rm tests/005_WKBReader.phpt +fi +if pkg-config geos --atleast-version 3.8; then # See https://git.osgeo.org/gitea/geos/php-geos/issues/23 # ignore failing test with geos 3.8 -rm ?TS/tests/001_Geometry.phpt +rm tests/001_Geometry.phpt +fi +%ifarch ppc64 ppc64le aarch64 armv7hl s390 s390x +# see https://git.osgeo.org/gogs/geos/php-geos/issues/17 +# ignore failing tests +rm -f tests/001_Geometry.phpt +rm -f tests/005_WKBReader.phpt %endif -cd NTS : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff || ret=1 +%{__php} -n run-tests.php -q --show-diff || ret=1 %if %{with_zts} -cd ../ZTS : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff || ret=1 +%{__ztsphp} -n run-tests.php -q --show-diff || ret=1 %endif exit $ret @@ -177,8 +194,8 @@ exit $ret %files %{!?_licensedir:%global license %%doc} -%license NTS/{COPYING,LGPL-2,MIT-LICENSE} -%doc NTS/{CREDITS,NEWS,README.md,TODO} +%license %{sources}/{COPYING,LGPL-2,MIT-LICENSE} +%doc %{sources}/{CREDITS,NEWS,README.md,TODO} %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -190,8 +207,10 @@ exit $ret %changelog -* Fri Mar 31 2023 Remi Collet <remi@remirepo.net> - 1.0.0-27 +* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.0.0-25 +- build out of sources tree - use SPDX license ID +- ignore 2 tests failing with libgeos 3.12 #2226098 * Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 1.0.0-24 - add patch for PHP 8.2 from |