From c8482f9c6b5368fbb207f90600eb60214fbd01fd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 29 Jan 2024 10:53:08 +0100 Subject: fix incompatible pointer types using patch from https://git.osgeo.org/gitea/geos/php-geos/issues/32 --- 0001-Fix-incompatible-pointer-types.patch | 34 +++++++++++++++++++++++++++++++ PHPINFO | 6 ++++++ REFLECTION | 2 +- php-geos.spec | 11 ++++++++-- 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 0001-Fix-incompatible-pointer-types.patch create mode 100644 PHPINFO diff --git a/0001-Fix-incompatible-pointer-types.patch b/0001-Fix-incompatible-pointer-types.patch new file mode 100644 index 0000000..031db8b --- /dev/null +++ b/0001-Fix-incompatible-pointer-types.patch @@ -0,0 +1,34 @@ +From 5ad2bce06d6ecb252e427e96dde5490f34db9ba6 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 29 Jan 2024 10:25:42 +0100 +Subject: [PATCH] Fix incompatible pointer types + +--- + geos.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/geos.c b/geos.c +index 0437523..ad2dce2 100644 +--- a/geos.c ++++ b/geos.c +@@ -878,7 +878,7 @@ PHP_METHOD(Geometry, buffer) + GEOS_PHP_ZVAL data; + HashTable *style; + zend_string *key; +- ulong index; ++ zend_ulong index; + + this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); + +@@ -971,7 +971,7 @@ PHP_METHOD(Geometry, offsetCurve) + GEOS_PHP_ZVAL data; + HashTable *style; + zend_string *key; +- ulong index; ++ zend_ulong index; + + this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr); + +-- +2.43.0 + diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..e80970d --- /dev/null +++ b/PHPINFO @@ -0,0 +1,6 @@ + +geos + +GEOS - Geometry Engine Open Source => enabled +Version => 1.0.0 +GEOS Version => 3.12.1-CAPI-1.18.1 diff --git a/REFLECTION b/REFLECTION index 1fd699c..53be0ca 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #124 geos version 1.0.0 ] { +Extension [ extension #66 geos version 1.0.0 ] { - Constants [20] { Constant [ int GEOSBUF_CAP_ROUND ] { 1 } diff --git a/php-geos.spec b/php-geos.spec index 0a42fab..797267a 100644 --- a/php-geos.spec +++ b/php-geos.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-geos # -# Copyright (c) 2016-2023 Remi Collet +# Copyright (c) 2016-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -33,7 +33,7 @@ Name: %{?scl_prefix}php-%{pecl_name} Version: 1.0.0 -Release: 26%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 31%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: PHP module for GEOS @@ -53,6 +53,8 @@ Patch4: 0005-fix-for-8.0.0RC1.patch Patch3: 0004-fix-all-zend_parse_parameters-call-to-use-zend_long.patch # https://git.osgeo.org/gitea/geos/php-geos/issues/27 Patch5: 0006-fix-__toString-with-8.2.patch +# https://git.osgeo.org/gitea/geos/php-geos/issues/32 +Patch6: 0001-Fix-incompatible-pointer-types.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel @@ -86,6 +88,7 @@ chmod -x *.c %patch -P3 -p1 -b .zendlong %patch -P4 -p1 -b .arg %patch -P5 -p1 -b .php82 +%patch -P6 -p1 -b .pointers sed -e '/PHP_GEOS_VERSION/s/"0.0"/"%{version}%{?prever}"/' -i php_geos.h @@ -207,6 +210,10 @@ exit $ret %changelog +* Mon Jan 29 2024 Remi Collet - 1.0.0-31 +- fix incompatible pointer types + using patch from https://git.osgeo.org/gitea/geos/php-geos/issues/32 + * Wed Aug 30 2023 Remi Collet - 1.0.0-26 - rebuild for PHP 8.3.0RC1 -- cgit