summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--33.patch32
-rw-r--r--php-pecl-couchbase3.spec11
2 files changed, 42 insertions, 1 deletions
diff --git a/33.patch b/33.patch
new file mode 100644
index 0000000..45a7ed4
--- /dev/null
+++ b/33.patch
@@ -0,0 +1,32 @@
+From 151df28b1b6d545ad71846f11a3a3af65bb1f3be Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 21 Jul 2021 08:32:57 +0200
+Subject: [PATCH] fix for 8.1.0beta1
+
+---
+ couchbase.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/couchbase.h b/couchbase.h
+index bc93c10..9748205 100644
+--- a/couchbase.h
++++ b/couchbase.h
+@@ -243,11 +243,18 @@ void pcbc_exception_init(zval *return_value, long code, const char *message);
+ #define PCBC_ALLOC_OBJECT_T(obj_t, class_type) \
+ (obj_t *)ecalloc(1, sizeof(obj_t) + zend_object_properties_size(class_type))
+
++#if PHP_VERSION_ID < 80100
+ #define PCBC_CE_DISABLE_SERIALIZATION(ce) \
+ do { \
+ ce->serialize = zend_class_serialize_deny; \
+ ce->unserialize = zend_class_unserialize_deny; \
+ } while (0);
++#else
++#define PCBC_CE_DISABLE_SERIALIZATION(ce) \
++ do { \
++ ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \
++ } while (0);
++#endif
+
+ #define PCBC_STRLEN_P(__pcbc_zval) Z_STRLEN((__pcbc_zval))
+ #define PCBC_STRVAL_P(__pcbc_zval) Z_STRVAL((__pcbc_zval))
diff --git a/php-pecl-couchbase3.spec b/php-pecl-couchbase3.spec
index 381a2fe..8ccb59e 100644
--- a/php-pecl-couchbase3.spec
+++ b/php-pecl-couchbase3.spec
@@ -26,12 +26,13 @@
Summary: Couchbase Server PHP extension
Name: %{?sub_prefix}php-pecl-couchbase3
Version: 3.1.2
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
URL: https://pecl.php.net/package/couchbase
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
Patch0: https://patch-diff.githubusercontent.com/raw/couchbase/php-couchbase/pull/32.patch
+Patch1: https://patch-diff.githubusercontent.com/raw/couchbase/php-couchbase/pull/33.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -85,6 +86,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "8.0"
Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.1"
+Obsoletes: php81-pecl-%{pecl_name} <= %{version}
+%endif
%endif
@@ -107,6 +111,7 @@ mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
%patch0 -p1 -b .pr32
+%patch1 -p1 -b .pr33
# Drop bundled library
sed -e '/fastlz/d' -i ../package.xml
@@ -241,6 +246,10 @@ fi
%changelog
+* Wed Jul 21 2021 Remi Collet <remi@remirepo.net> - 3.1.2-2
+- add patch for PHP 8.1.0beta1 from
+ https://github.com/couchbase/php-couchbase/pull/33
+
* Fri May 14 2021 Remi Collet <remi@remirepo.net> - 3.1.2-1
- update to 3.1.2