summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-05-28 10:04:54 +0200
committerRemi Collet <fedora@famillecollet.com>2016-05-28 10:04:54 +0200
commit3430d4f196857dd32f877740cb77b4d7ec6e750b (patch)
tree277ed95b3fd799c866aa532596ee06c8650fecc8
parentd5f837b0185533dd2aecab7d25fd044da55077e4 (diff)
php-pecl-stats: 1.0.4 (php 5, stable)
-rw-r--r--3_0.txt68
-rw-r--r--REFLECTION6
-rw-r--r--php-pecl-stats-php7.spec4
-rw-r--r--php-pecl-stats.spec26
-rw-r--r--stats-upstream.patch29
5 files changed, 45 insertions, 88 deletions
diff --git a/3_0.txt b/3_0.txt
deleted file mode 100644
index 6c1c170..0000000
--- a/3_0.txt
+++ /dev/null
@@ -1,68 +0,0 @@
---------------------------------------------------------------------
- The PHP License, version 3.0
-Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact group@php.net.
-
- 4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from group@php.net. You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
-
- 5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP, freely available from
- <http://www.php.net/>".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see <http://www.php.net>.
-
-This product includes the Zend Engine, freely available at
-<http://www.zend.com>.
diff --git a/REFLECTION b/REFLECTION
index 805d519..bc106fc 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #133 stats version 1.0.3 ] {
+Extension [ <persistent> extension #162 stats version 1.0.4 ] {
- Functions {
Function [ <internal:stats> function stats_cdf_t ] {
@@ -125,12 +125,12 @@ Extension [ <persistent> extension #133 stats version 1.0.3 ] {
}
Function [ <internal:stats> function stats_stat_factorial ] {
}
+ Function [ <internal:stats> function stats_variance ] {
+ }
Function [ <internal:stats> function stats_standard_deviation ] {
}
Function [ <internal:stats> function stats_absolute_deviation ] {
}
- Function [ <internal:stats> function stats_variance ] {
- }
Function [ <internal:stats> function stats_harmonic_mean ] {
}
Function [ <internal:stats> function stats_skew ] {
diff --git a/php-pecl-stats-php7.spec b/php-pecl-stats-php7.spec
index e39c6d2..9ee72e2 100644
--- a/php-pecl-stats-php7.spec
+++ b/php-pecl-stats-php7.spec
@@ -169,7 +169,7 @@ TEST_PHP_EXECUTABLE=%{_bindir}/php \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php
+%{_bindir}/php -n run-tests.php --show-diff
%if %{with_zts}
@@ -184,7 +184,7 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__ztsphp} -n run-tests.php --show-diff
%endif
diff --git a/php-pecl-stats.spec b/php-pecl-stats.spec
index ae199ee..9ae9e49 100644
--- a/php-pecl-stats.spec
+++ b/php-pecl-stats.spec
@@ -18,16 +18,14 @@
Summary: Routines for statistical computation
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.0.3
-Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.0.4
+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://bugs.php.net/65884 Please Provides LICENSE file
-# Link from the headers
-Source1: http://www.php.net/license/3_0.txt
+Patch0: %{pecl_name}-upstream.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel
@@ -41,8 +39,10 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+%if "%{?scl_prefix}" != "%{?sub_prefix}"
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%endif
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
@@ -83,14 +83,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-
-# empty this file which try to dl("stats.so")
-> tests/common.php
-
-cp %{SOURCE1} LICENSE
-
-# Fix version
-sed -e '/PHP_STATS_VERSION/s/1.0.3-dev/%{version}/' -i php_stats.h
+%patch0 -p1 -b .fix
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_STATS_VERSION/{s/.* "//;s/".*$//;p}' php_stats.h)
@@ -189,7 +182,7 @@ TEST_PHP_EXECUTABLE=%{_bindir}/php \
TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php
+%{_bindir}/php -n run-tests.php --show-diff
%if %{with_zts}
@@ -204,7 +197,7 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php
+%{__ztsphp} -n run-tests.php --show-diff
%endif
@@ -228,6 +221,9 @@ rm -rf %{buildroot}
%changelog
+* Sat May 28 2016 Remi Collet <remi@fedoraproject.org> - 1.0.4-1
+- update to 1.0.4 (php 5, stable)
+
* Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 1.0.3-6
- adapt for F24
diff --git a/stats-upstream.patch b/stats-upstream.patch
new file mode 100644
index 0000000..327d250
--- /dev/null
+++ b/stats-upstream.patch
@@ -0,0 +1,29 @@
+From 9eadb06e96aabfaed7598bc3a7e730d74a9a9631 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Sat, 28 May 2016 09:48:44 +0200
+Subject: [PATCH] fix zend_parse_parameters call and segfault in
+ stats_stat_binomial_coef
+
+---
+ php_stats.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/php_stats.c b/php_stats.c
+index 8b7c3ef..d7da5fd 100644
+--- a/php_stats.c
++++ b/php_stats.c
+@@ -3381,9 +3381,9 @@ PHP_FUNCTION(stats_stat_correlation)
+ Not documented */
+ PHP_FUNCTION(stats_stat_binomial_coef)
+ {
+- int i;
++ long i;
+ long n;
+- int x;
++ long x;
+ double bc = 1.0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &x, &n) == FAILURE) {
+--
+2.1.4
+