summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-Fix-incompatible-pointer-types.patch34
-rw-r--r--0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch29
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION2
-rw-r--r--php-geos.spec22
5 files changed, 88 insertions, 5 deletions
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 <remi@remirepo.net>
+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/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
new file mode 100644
index 0000000..454c5ff
--- /dev/null
+++ b/0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
@@ -0,0 +1,29 @@
+From 833412c316ba370718cdb46368199c9bae6fa5af Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 17 Jul 2025 10:44:23 +0200
+Subject: [PATCH] use zend_ce_exception instead of zend_exception_get_default()
+ for 8.5
+
+---
+ geos.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/geos.c b/geos.c
+index ad2dce2..8f4bdd3 100644
+--- a/geos.c
++++ b/geos.c
+@@ -150,7 +150,11 @@ static void errorHandler(const char *fmt, ...)
+ va_end(args);
+
+ /* TODO: use a GEOSException ? */
++#if PHP_VERSION_ID < 80000
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C),
++#else
++ zend_throw_exception_ex(zend_ce_exception,
++#endif
+ 1 TSRMLS_CC, "%s", message);
+
+ }
+--
+2.50.1
+
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 [ <persistent> extension #124 geos version 1.0.0 ] {
+Extension [ <persistent> 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..2332d06 100644
--- a/php-geos.spec
+++ b/php-geos.spec
@@ -1,8 +1,8 @@
# remirepo spec file for php-geos
#
-# Copyright (c) 2016-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -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: 32%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP module for GEOS
@@ -53,6 +53,10 @@ 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
+# https://git.osgeo.org/gitea/geos/php-geos/issues/35
+Patch7: 0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -86,6 +90,8 @@ chmod -x *.c
%patch -P3 -p1 -b .zendlong
%patch -P4 -p1 -b .arg
%patch -P5 -p1 -b .php82
+%patch -P6 -p1 -b .pointers
+%patch -P7 -p1 -b .php85
sed -e '/PHP_GEOS_VERSION/s/"0.0"/"%{version}%{?prever}"/' -i php_geos.h
@@ -207,6 +213,14 @@ exit $ret
%changelog
+* Thu Jul 17 2025 Remi Collet <remi@remirepo.net> - 1.0.0-32
+- fix build with PHP 8.5.0alpha2 using patch from
+- re-license spec file to CECILL-2.1
+
+* Mon Jan 29 2024 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 1.0.0-26
- rebuild for PHP 8.3.0RC1