summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-07-17 17:43:19 +0200
committerRemi Collet <remi@remirepo.net>2018-07-17 17:43:19 +0200
commit662989c1effa5d0e4f15236d0852ed98586ecbc8 (patch)
treeef927a25b5d9601d4fba01154f53abf30513746f
parentc95721f8c1e19faa2d6ef0b03d3eee69c52add8f (diff)
add patch for PHP 7.3 from
+ https://github.com/pdezwart/php-amqp/pull/323
-rw-r--r--323.patch37
-rw-r--r--php-pecl-amqp.spec19
2 files changed, 47 insertions, 9 deletions
diff --git a/323.patch b/323.patch
new file mode 100644
index 0000000..c71590d
--- /dev/null
+++ b/323.patch
@@ -0,0 +1,37 @@
+From f798463e8359f853a62e1b66550a0fcbc6dbe194 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 21 Jun 2018 10:33:36 +0200
+Subject: [PATCH] fix for 7.3
+
+---
+ amqp_channel.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/amqp_channel.c b/amqp_channel.c
+index f3dba5d..032526e 100644
+--- a/amqp_channel.c
++++ b/amqp_channel.c
+@@ -101,7 +101,11 @@ static void php_amqp_destroy_fci(zend_fcall_info *fci) {
+ if (fci->size > 0) {
+ zval_ptr_dtor(&fci->function_name);
+ if (fci->object != NULL) {
++#if PHP_VERSION_ID >= 70300
++ GC_DELREF(fci->object);
++#else
+ GC_REFCOUNT(fci->object)--;
++#endif
+ }
+ fci->size = 0;
+ }
+@@ -112,7 +116,11 @@ static void php_amqp_duplicate_fci(zend_fcall_info *source) {
+
+ zval_add_ref(&source->function_name);
+ if (source->object != NULL) {
++#if PHP_VERSION_ID >= 70300
++ GC_ADDREF(source->object);
++#else
+ GC_REFCOUNT(source->object)++;
++#endif
+ }
+ }
+ }
diff --git a/php-pecl-amqp.spec b/php-pecl-amqp.spec
index ea23952..fac4f4d 100644
--- a/php-pecl-amqp.spec
+++ b/php-pecl-amqp.spec
@@ -33,13 +33,14 @@
Summary: Communicate with any AMQP compliant server
Name: %{?sub_prefix}php-pecl-amqp
Version: 1.9.3
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
-Group: Development/Languages
URL: http://pecl.php.net/package/amqp
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-BuildRequires: %{?dtsprefix}gcc
+Patch0: https://patch-diff.githubusercontent.com/raw/pdezwart/php-amqp/pull/323.patch
+
+BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
#BuildRequires: php-debuginfo valgrind gdb
@@ -70,14 +71,8 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{re
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
Obsoletes: php54-pecl-%{pecl_name} <= %{version}
Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "5.6"
Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
@@ -123,6 +118,8 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1 -b .pr323
+
sed -e 's/CFLAGS="-I/CFLAGS="-fPIC -I/' -i config.m4
# Upstream often forget to change this
@@ -311,6 +308,10 @@ fi
%changelog
+* Fri Jun 22 2018 Remi Collet <remi@remirepo.net> - 1.9.3-4
+- add patch for PHP 7.3 from
+ https://github.com/pdezwart/php-amqp/pull/323
+
* Mon May 14 2018 Remi Collet <remi@remirepo.net> - 1.9.3-2
- rebuild for librabbitmq 0.8 in RHEL 7.5