summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--10.patch47
-rw-r--r--php-pecl-pcs.spec19
3 files changed, 64 insertions, 9 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/10.patch b/10.patch
new file mode 100644
index 0000000..d33e5a4
--- /dev/null
+++ b/10.patch
@@ -0,0 +1,47 @@
+From e1eadcf2e44cecbf2816290f1d4edb0a74767028 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sun, 25 Jun 2017 06:52:52 +0200
+Subject: [PATCH] Fix test suite for php 7.2
+
+---
+ package.xml | 1 +
+ tests/autoload_001.phpt | 18 ++++++++++--------
+ tests/autoload_002.phpt | 17 +++++++++++++++++
+ 3 files changed, 28 insertions(+), 8 deletions(-)
+ create mode 100644 tests/autoload_002.phpt
+
+diff --git a/tests/autoload_001.phpt b/tests/autoload_001.phpt
+index 96ef592..eeaa20a 100644
+--- a/tests/autoload_001.phpt
++++ b/tests/autoload_001.phpt
+@@ -1,5 +1,7 @@
+ --TEST--
+ __autoload() is functional
++--SKIPIF--
++<?php if (PHP_VERSION_ID >= 70200) die("skip PHP < 7.2 only"); ?>
+ --FILE--
+ <?php
+
+diff --git a/tests/autoload_002.phpt b/tests/autoload_002.phpt
+new file mode 100644
+index 0000000..cf9a16a
+--- /dev/null
++++ b/tests/autoload_002.phpt
+@@ -0,0 +1,17 @@
++--TEST--
++spl_autoload() is functional
++--FILE--
++<?php
++
++function my_autoload($sym)
++{
++var_dump($sym);
++}
++spl_autoload_register('my_autoload');
++class_exists('undefined');
++
++?>
++===DONE===
++--EXPECTF--
++string(9) "undefined"
++===DONE===
diff --git a/php-pecl-pcs.spec b/php-pecl-pcs.spec
index 4f35c06..0fdc722 100644
--- a/php-pecl-pcs.spec
+++ b/php-pecl-pcs.spec
@@ -24,13 +24,14 @@
Summary: PHP Code Service
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.3.3
-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
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: 10.patch
+
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-tokenizer
@@ -108,6 +109,9 @@ mv %{pecl_name}-%{version} NTS
cd NTS
%{?_licensedir:cp pecl-compat/LICENSE LICENSE_pecl_compat}
+sed -e 's/\r//' -i tests/autoload_001.phpt
+%patch0 -p1 -b .pr10
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PCS_VERSION/{s/.* "//;s/".*$//;p}' php_pcs.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -152,7 +156,6 @@ make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
%{?dtsenable}
make -C NTS install INSTALL_ROOT=%{buildroot}
@@ -240,12 +243,7 @@ REPORT_EXIT_STATUS=1 \
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{?_licensedir:%license NTS/LICENSE*}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -260,7 +258,6 @@ rm -rf %{buildroot}
%files devel
-%defattr(-,root,root,-)
%doc %{pecl_testdir}/%{pecl_name}
%{php_incldir}/ext/%{pecl_name}
@@ -270,6 +267,10 @@ rm -rf %{buildroot}
%changelog
+* Sun Jun 25 2017 Remi Collet <remi@fedoraproject.org> - 1.3.3-2
+- add patch for test suite with php 7.2 from
+ https://github.com/flaupretre/pecl-pcs/pull/10
+
* Fri Jan 20 2017 Remi Collet <remi@fedoraproject.org> - 1.3.3-1
- Update to 1.3.3 (rc)