summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-07-18 07:42:46 +0200
committerRemi Collet <remi@remirepo.net>2018-07-18 07:42:46 +0200
commit8a2c0d8a045ed0143599cf5a677a8e705bfb5eb6 (patch)
tree5c00d86ff6a146945ebce8a42d9475175edd61de
parent7b9bc612d2110b45178cfcd76ea95670d6285537 (diff)
rebuild for 7.3.0alpha4 new ABI
-rw-r--r--950b257a9376d4f83fd24a7afadeafaf31f8855a.patch55
-rw-r--r--php-pecl-pq.spec14
2 files changed, 67 insertions, 2 deletions
diff --git a/950b257a9376d4f83fd24a7afadeafaf31f8855a.patch b/950b257a9376d4f83fd24a7afadeafaf31f8855a.patch
new file mode 100644
index 0000000..efb6385
--- /dev/null
+++ b/950b257a9376d4f83fd24a7afadeafaf31f8855a.patch
@@ -0,0 +1,55 @@
+From 950b257a9376d4f83fd24a7afadeafaf31f8855a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 18 Jul 2018 07:39:47 +0200
+Subject: [PATCH] fix for 7.3.0alpha4
+
+---
+ src/php_pq_params.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/src/php_pq_params.c b/src/php_pq_params.c
+index 6739b45..3c6b920 100644
+--- a/src/php_pq_params.c
++++ b/src/php_pq_params.c
+@@ -123,7 +123,7 @@ static int apply_to_param_from_array(zval *zparam, void *arg_ptr)
+ struct apply_to_param_from_array_arg subarg, *arg = arg_ptr;
+ char *tmp;
+ size_t len;
+- zend_string *str;
++ zend_string *str, *tmpstr;
+
+ if (arg->index++) {
+ smart_str_appendc(arg->buffer, arg->delim);
+@@ -134,7 +134,7 @@ static int apply_to_param_from_array(zval *zparam, void *arg_ptr)
+
+ ZVAL_LONG(&ztype, arg->type);
+ zend_call_method_with_2_params(arg->zconv, NULL, NULL, "converttostring", &rv, zparam, &ztype);
+- str = zval_get_string(&rv);
++ tmpstr = zval_get_string(&rv);
+ zval_ptr_dtor(&rv);
+ goto append_string;
+
+@@ -176,15 +176,20 @@ static int apply_to_param_from_array(zval *zparam, void *arg_ptr)
+ break;
+
+ case IS_OBJECT:
+- if ((str = object_param_to_string(arg->params, zparam, arg->type))) {
++ if ((tmpstr = object_param_to_string(arg->params, zparam, arg->type))) {
+ goto append_string;
+ }
+ /* no break */
+ default:
+- str = zval_get_string(zparam);
++ tmpstr = zval_get_string(zparam);
+
+ append_string:
+- str = php_addslashes(str, 1);
++#if PHP_VERSION_ID < 70300
++ str = php_addslashes(tmpstr, 1);
++#else
++ str = php_addslashes(tmpstr);
++ zend_string_release(tmpstr);
++#endif
+ smart_str_appendc(arg->buffer, '"');
+ smart_str_appendl(arg->buffer, str->val, str->len);
+ smart_str_appendc(arg->buffer, '"');
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 4776c45..24aec07 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -32,15 +32,17 @@ Summary: PostgreSQL client library (libpq) binding
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 2.1.4
%if 0%{?gh_date:1}
-Release: 0.6.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 0.7.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-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;')}}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
%endif
License: BSD
URL: http://pecl.php.net/package/%{pecl_name}
+Patch0: https://github.com/m6w6/ext-pq/commit/950b257a9376d4f83fd24a7afadeafaf31f8855a.patch
+
BuildRequires: postgresql-devel > 9
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7
@@ -81,6 +83,10 @@ Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.3"
+Obsoletes: php73u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -119,6 +125,7 @@ sed -e '/role="test"/d' \
-i package.xml
cd NTS
+%patch0 -p1 -b .up
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h)
@@ -294,6 +301,9 @@ exit $RET
%changelog
+* Wed Jul 18 2018 Remi Collet <remi@remirepo.net> - 2.1.4-2.7.1
+- rebuild for 7.3.0alpha4 new ABI
+
* Tue Jun 26 2018 Remi Collet <remi@remirepo.net> - 2.1.4-1
- update to 2.1.4 (stable)