summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-use-zend_ce_exception-instead-of-zend_exception_get_.patch29
-rw-r--r--php-geos.spec15
2 files changed, 40 insertions, 4 deletions
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/php-geos.spec b/php-geos.spec
index 797267a..2332d06 100644
--- a/php-geos.spec
+++ b/php-geos.spec
@@ -1,8 +1,8 @@
# remirepo spec file for php-geos
#
-# Copyright (c) 2016-2024 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: 31%{?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
@@ -55,6 +55,8 @@ Patch3: 0004-fix-all-zend_parse_parameters-call-to-use-zend_long.patch
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
@@ -89,6 +91,7 @@ chmod -x *.c
%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
@@ -210,6 +213,10 @@ 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