summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1.patch48
-rw-r--r--998a115360e9713c5d2da959dcde3ff49dc1a4fc.patch22
-rw-r--r--php-pecl-uopz.spec10
3 files changed, 79 insertions, 1 deletions
diff --git a/2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1.patch b/2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1.patch
new file mode 100644
index 0000000..9d5a465
--- /dev/null
+++ b/2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1.patch
@@ -0,0 +1,48 @@
+From 2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1 Mon Sep 17 00:00:00 2001
+From: Peter Kokot <peterkokot@gmail.com>
+Date: Thu, 27 Jun 2019 00:33:27 +0200
+Subject: [PATCH] Remove HAVE_SPL
+
+The HAVE_SPL symbol is defined in PHP to indicate the presence of the
+spl extension. Since PHP 5.3 the spl extension is always availabe and
+since PHP-7.4 the HAVE_SPL symbol has also been removed.
+---
+ uopz.c | 6 ------
+ uopz.h | 7 +------
+ 2 files changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/uopz.c b/uopz.c
+index 2f8c193..68b31e6 100644
+--- a/uopz.c
++++ b/uopz.c
+@@ -24,12 +24,6 @@
+ #include "php_ini.h"
+ #include "ext/standard/info.h"
+
+-#ifndef HAVE_SPL
+-/* {{{ */
+-zend_class_entry *spl_ce_RuntimeException;
+-zend_class_entry *spl_ce_InvalidArgumentException; /* }}} */
+-#endif
+-
+ #include "uopz.h"
+
+ #include "src/util.h"
+diff --git a/uopz.h b/uopz.h
+index 3ac5bcb..e543554 100644
+--- a/uopz.h
++++ b/uopz.h
+@@ -44,12 +44,7 @@ ZEND_END_MODULE_GLOBALS(uopz)
+ #define UOPZ(v) (uopz_globals.v)
+ #endif
+
+-#ifdef HAVE_SPL
+-# include "ext/spl/spl_exceptions.h"
+-#else
+- extern zend_class_entry* spl_ce_RuntimeException;
+-#endif
+-
++#include "ext/spl/spl_exceptions.h"
+ #include "Zend/zend_inheritance.h"
+ #include "Zend/zend_exceptions.h"
+ #include "Zend/zend_closures.h"
diff --git a/998a115360e9713c5d2da959dcde3ff49dc1a4fc.patch b/998a115360e9713c5d2da959dcde3ff49dc1a4fc.patch
new file mode 100644
index 0000000..9eca301
--- /dev/null
+++ b/998a115360e9713c5d2da959dcde3ff49dc1a4fc.patch
@@ -0,0 +1,22 @@
+From 998a115360e9713c5d2da959dcde3ff49dc1a4fc Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sat, 24 Aug 2019 07:37:17 +0200
+Subject: [PATCH] fix #177 build with recent 7.4 changes
+
+---
+ src/class.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/class.c b/src/class.c
+index fd1e195..1973545 100644
+--- a/src/class.c
++++ b/src/class.c
+@@ -173,7 +173,7 @@ zend_bool uopz_extend(zend_class_entry *clazz, zend_class_entry *parent) {
+ clazz->ce_flags &= ~ZEND_ACC_TRAIT;
+ parent->ce_flags &= ~ZEND_ACC_TRAIT;
+ }
+- zend_do_link_class(clazz, parent);
++ zend_do_inheritance(clazz, parent);
+ if (is_trait) {
+ clazz->ce_flags |= ZEND_ACC_TRAIT;
+ parent->ce_flags |= ZEND_ACC_TRAIT;
diff --git a/php-pecl-uopz.spec b/php-pecl-uopz.spec
index 0658f5f..e5ffa2e 100644
--- a/php-pecl-uopz.spec
+++ b/php-pecl-uopz.spec
@@ -24,7 +24,7 @@
Summary: User Operations for Zend
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 6.1.0
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
URL: http://pecl.php.net/package/%{pecl_name}
%if 0%{?gh_commit:1}
@@ -33,6 +33,9 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
+Patch0: https://github.com/krakjoe/uopz/commit/2b3ab9da097a07825e7f36ee400fa28b8d3ce8e1.patch
+Patch1: https://github.com/krakjoe/uopz/commit/998a115360e9713c5d2da959dcde3ff49dc1a4fc.patch
+
BuildRequires: %{?scl_prefix}php-devel > 7.1
BuildRequires: %{?scl_prefix}php-pear
@@ -121,6 +124,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .up1
+%patch1 -p1 -b .up2
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_UOPZ_VERSION/{s/.* "//;s/".*$//;p}' uopz.h)
@@ -257,6 +262,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Sun Aug 25 2019 Remi Collet <remi@remirepo.net> - 6.1.0-3
+- add upstream patches for 7.4
+
* Wed May 29 2019 Remi Collet <remi@remirepo.net> - 6.1.0-2
- rebuild