summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-04-14 09:35:24 +0200
committerRemi Collet <remi@remirepo.net>2017-04-14 09:35:24 +0200
commit56ebaa85fc339d78cef2012c20977a996fdffe14 (patch)
treead825aa7f74cfaa9a93b9435abbd7d7a2719df3e
parent3adc25037fb9fe3b6e0eaddc962af427d7eaca1a (diff)
add patch for 7.2
-rw-r--r--msgpack-pr118.patch31
-rw-r--r--msgpack.patch12
-rw-r--r--php-pecl-msgpack.spec21
3 files changed, 48 insertions, 16 deletions
diff --git a/msgpack-pr118.patch b/msgpack-pr118.patch
new file mode 100644
index 0000000..b740b51
--- /dev/null
+++ b/msgpack-pr118.patch
@@ -0,0 +1,31 @@
+From 99f9db8cd68cf458b330047b8d1cc0f15240abf2 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 14 Apr 2017 09:23:39 +0200
+Subject: [PATCH] use spl_autoload_register (to avoid deprecation warning with
+ 7.2)
+
+---
+ tests/019.phpt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/019.phpt b/tests/019.phpt
+index 46cccb3..693f5cf 100644
+--- a/tests/019.phpt
++++ b/tests/019.phpt
+@@ -17,7 +17,7 @@ function test($type, $variable, $test) {
+ echo $test || $unserialized->b == 2 ? 'OK' : 'ERROR', PHP_EOL;
+ }
+
+-function __autoload($classname) {
++function test_autoload($classname) {
+ class Obj {
+ var $a;
+ var $b;
+@@ -28,6 +28,7 @@ function __autoload($classname) {
+ }
+ }
+ }
++spl_autoload_register('test_autoload');
+
+ test('autoload', '83c0a34f626aa16101a16202', false);
+ ?>
diff --git a/msgpack.patch b/msgpack.patch
deleted file mode 100644
index bd440db..0000000
--- a/msgpack.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- msgpack-0.5.5/msgpack_unpack.h.old 2013-02-19 04:03:35.000000000 +0100
-+++ msgpack-0.5.5/msgpack_unpack.h 2013-02-20 09:55:53.969440978 +0100
-@@ -67,6 +67,9 @@
- int msgpack_unserialize_map_item(
- msgpack_unserialize_data *unpack, zval **container, zval *key, zval *val);
-
-+void msgpack_serialize_var_destroy(msgpack_serialize_data_t *var_hash);
-+void msgpack_serialize_var_init(msgpack_serialize_data_t *var_hash);
-+
- /* template functions */
- #define msgpack_unpack_struct(name) struct template ## name
- #define msgpack_unpack_func(ret, name) ret template ## name
diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec
index 5d4bcd1..7f51a0e 100644
--- a/php-pecl-msgpack.spec
+++ b/php-pecl-msgpack.spec
@@ -36,13 +36,15 @@ Version: 2.0.2
Release: 0.2.%{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;')}}
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/msgpack
+Patch0: %{pecl_name}-pr118.patch
+
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
%if %{with_msgpack}
@@ -79,6 +81,10 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -134,14 +140,13 @@ mv %{pecl_name}-%{version} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%patch0 -p1 -b .pr118
+
%if %{with_msgpack}
# use system library
rm -rf msgpack
%endif
-# When this file will be removed, clean the description.
-[ -f EXPERIMENTAL ] || exit 1
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_MSGPACK_VERSION/{s/.* "//;s/".*$//;p}' php_msgpack.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
@@ -169,6 +174,8 @@ EOF
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
@@ -183,6 +190,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
# Install the NTS stuff
make -C NTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -287,6 +296,10 @@ fi
%changelog
+* Fri Apr 14 2017 Remi Collet <remi@remirepo.net> - 2.0.2-2
+- add patch for test suite with PHP 7.2 from
+ https://github.com/msgpack/msgpack-php/pull/118
+
* Wed Dec 7 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
- update to 2.0.2