summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-11-29 08:11:55 +0100
committerRemi Collet <fedora@famillecollet.com>2015-11-29 08:11:55 +0100
commitee4e8f2fb65bb61daf514f87ef255cd59261c70d (patch)
tree762b0a601b74ac69ff5547a076a8058e28491203
parent4f1fa7c9d3fe4d05aaefd303425a6d2863f50ecf (diff)
php-pecl-pcs: 1.2.0
-rw-r--r--REFLECTION27
-rw-r--r--pcs-pr2.patch47
-rw-r--r--php-pecl-pcs.spec27
3 files changed, 96 insertions, 5 deletions
diff --git a/REFLECTION b/REFLECTION
index b9d3630..b14c699 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,9 @@
-Extension [ <persistent> extension #132 pcs version 1.1.0 ] {
+Extension [ <persistent> extension #131 pcs version 1.2.0 ] {
+
+ - Dependencies {
+ Dependency [ tokenizer (Required) ]
+ Dependency [ SPL (Required) ]
+ }
- Classes [1] {
Class [ <internal:pcs> class PCS\Mgr ] {
@@ -9,7 +14,7 @@ Extension [ <persistent> extension #132 pcs version 1.1.0 ] {
- Static properties [0] {
}
- - Static methods [7] {
+ - Static methods [10] {
Method [ <internal:pcs> static public method autoloadHook ] {
- Parameters [2] {
@@ -59,6 +64,24 @@ Extension [ <persistent> extension #132 pcs version 1.1.0 ] {
Parameter #0 [ <required> $arg1 ]
}
}
+
+ Method [ <internal:pcs> static public method fileCount ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:pcs> static public method fileInfos ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:pcs> static public method symbolInfos ] {
+
+ - Parameters [0] {
+ }
+ }
}
- Properties [0] {
diff --git a/pcs-pr2.patch b/pcs-pr2.patch
new file mode 100644
index 0000000..0b87ac2
--- /dev/null
+++ b/pcs-pr2.patch
@@ -0,0 +1,47 @@
+From 60a8bd52a299521a53e770961779950b83c83b56 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 29 Nov 2015 07:42:17 +0100
+Subject: [PATCH] tokenizer is required, fix #1
+
+---
+ .gitignore | 1 +
+ config.m4 | 3 ++-
+ php_pcs.c | 10 +++++++++-
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/config.m4 b/config.m4
+index 6a093c1..18de3cf 100644
+--- a/config.m4
++++ b/config.m4
+@@ -12,7 +12,8 @@ if test "$PHP_PCS" != "no"; then
+ fi
+ fi
+ PHP_NEW_EXTENSION(pcs, php_pcs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+- # PCS must be loaded after SPL
++ # PCS must be loaded after tokenizer and SPL
++ PHP_ADD_EXTENSION_DEP(pcs, tokenizer)
+ PHP_ADD_EXTENSION_DEP(pcs, spl)
+ fi
+
+diff --git a/php_pcs.c b/php_pcs.c
+index f43307c..d9788bb 100644
+--- a/php_pcs.c
++++ b/php_pcs.c
+@@ -242,8 +242,16 @@ static PHP_MSHUTDOWN_FUNCTION(pcs)
+ /*---------------------------------------------------------------*/
+ /*-- Module definition --*/
+
++static const zend_module_dep pcs_deps[] = {
++ ZEND_MOD_REQUIRED("tokenizer")
++ ZEND_MOD_REQUIRED("SPL")
++ ZEND_MOD_END
++};
++
+ zend_module_entry pcs_module_entry = {
+- STANDARD_MODULE_HEADER,
++ STANDARD_MODULE_HEADER_EX,
++ NULL,
++ pcs_deps,
+ MODULE_NAME,
+ NULL,
+ PHP_MINIT(pcs),
diff --git a/php-pecl-pcs.spec b/php-pecl-pcs.spec
index 7a8198f..e99e715 100644
--- a/php-pecl-pcs.spec
+++ b/php-pecl-pcs.spec
@@ -25,21 +25,28 @@
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
+# After 20-spl.ini and 20-tokenizer.so
%global ini_name 40-%{pecl_name}.ini
%endif
Summary: PHP Code Service
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.1.1
+Version: 1.2.0
Release: 1%{?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
+# https://github.com/flaupretre/pecl-pcs/issues/1
+# https://github.com/flaupretre/pecl-pcs/pull/2
+Patch0: %{pecl_name}-pr2.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel > 5.3
BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-tokenizer
+BuildRequires: %{?scl_prefix}php-spl
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -111,6 +118,7 @@ sed -e '\:examples:s/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr2
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PCS_VERSION/{s/.* "//;s/".*$//;p}' php_pcs.h)
@@ -196,16 +204,22 @@ fi
%check
+[ -f %{php_extdir}/tokenizer.so ] && MODDEP="-d extension=tokenizer.so"
+
+# We don't want to run tests in examples folder
+rm -r ?TS/examples
+
cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
+ $MODDEP \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n $MODDEP -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php --show-diff
@@ -215,13 +229,14 @@ REPORT_EXIT_STATUS=1 \
cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
+ $MODDEP \
--define extension=%{buildroot}%{php_ztsextdir}//%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n $MODDEP -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php --show-diff
@@ -259,6 +274,12 @@ rm -rf %{buildroot}
%changelog
+* Sun Nov 29 2015 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
+- Update to 1.2.0
+- add patch for tokenizer dependency
+ open https://github.com/flaupretre/pecl-pcs/issues/1
+ open https://github.com/flaupretre/pecl-pcs/pull/2
+
* Wed Nov 25 2015 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
- Update to 1.1.1