summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--88.patch21
-rw-r--r--php-pecl-trace.spec17
3 files changed, 41 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/88.patch b/88.patch
new file mode 100644
index 0000000..d2f0409
--- /dev/null
+++ b/88.patch
@@ -0,0 +1,21 @@
+From 0ef8d69a60fc4398621a62ace60304d9528e1c64 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 28 Jun 2017 16:35:41 +0200
+Subject: [PATCH] Fix #87 skip test with 7.2 (create_function is deprecated)
+
+---
+ extension/tests/trace_002.phpt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/extension/tests/trace_002.phpt b/extension/tests/trace_002.phpt
+index cedd592..dfe3709 100644
+--- a/extension/tests/trace_002.phpt
++++ b/extension/tests/trace_002.phpt
+@@ -1,5 +1,7 @@
+ --TEST--
+ Trace include, require, lambda, eval
++--SKIPIF--
++<?php (PHP_VERSION_ID < 70200) or die("skip PHP <= 7.2 only"); ?>
+ --INI--
+ trace.dotrace=1
+ --FILE--
diff --git a/php-pecl-trace.spec b/php-pecl-trace.spec
index a67a563..f3605b0 100644
--- a/php-pecl-trace.spec
+++ b/php-pecl-trace.spec
@@ -23,14 +23,15 @@
Summary: Trace is a low-overhead tracing tool for PHP
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.0.1
-Release: 0.1.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 0.2.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
# common/sds is BSD-2, other is ASL 2.0
License: ASL 2.0 and BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: 88.patch
+
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -69,6 +70,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
@@ -99,6 +104,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd %{pecl_name}-%{version}%{?prever}/extension
+%patch0 -p2 -b .pr88
+
cp -p ../deps/sds/LICENSE ../LICENSE_sds
# Sanity check, really often broken
@@ -134,7 +141,6 @@ make cli %{?_smp_mflags}
%install
-rm -rf %{buildroot}
%{?dtsenable}
make -C %{pecl_name}-%{version}%{?prever}/extension install-all INSTALL_ROOT=%{buildroot}
@@ -191,7 +197,6 @@ rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
%{?_licensedir:%license %{pecl_name}-%{version}%{?prever}/LICENSE*}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -202,6 +207,10 @@ rm -rf %{buildroot}
%changelog
+* Wed Jun 28 2017 Remi Collet <remi@remirepo.net> - 1.0.1-0.2.beta
+- fix test suite for PHP 7.2 from
+ https://github.com/Qihoo360/phptrace/pull/88
+
* Tue Mar 14 2017 Remi Collet <remi@remirepo.net> - 1.0.1-0.1.beta
- Update to 1.0.1beta
- drop patch merged upstream