diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-02-02 07:25:36 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-02-02 07:25:36 +0100 |
commit | 13108f4550f89538c3b016ab3b5a3f28d0ec1cab (patch) | |
tree | 23f0b0289304bebc685d56d89fa69123aa3db010 | |
parent | cab7ce0257081d0f1346e56c84384ede9e1d1876 (diff) |
php-pecl-hrtime: 0.5.0 (stable)
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | hrtime-svn.patch | 61 | ||||
-rw-r--r-- | php-pecl-hrtime.spec | 57 |
3 files changed, 32 insertions, 88 deletions
@@ -1,4 +1,4 @@ -Extension [ <persistent> extension #90 hrtime version 0.4.3 ] { +Extension [ <persistent> extension #96 hrtime version 0.5.0 ] { - Classes [3] { Class [ <internal:hrtime> class HRTime\PerformanceCounter ] { diff --git a/hrtime-svn.patch b/hrtime-svn.patch deleted file mode 100644 index 5efc701..0000000 --- a/hrtime-svn.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- pecl/hrtime/trunk/tests/001.phpt 2014/04/22 09:35:46 333402 -+++ pecl/hrtime/trunk/tests/001.phpt 2014/04/22 11:33:51 333403 -@@ -11,13 +11,11 @@ - $c = new HRTime\StopWatch; - - $t0 = microtime(true); -- for ($i = 0; $i < 1024; $i++); -- $t1 = microtime(true); -- $elapsed0 = $t1 - $t0; -- - $c->start(); -- for ($i = 0; $i < 1024; $i++); -+ for ($i = 0; $i < (1024*1024); $i++); -+ $t1 = microtime(true); - $c->stop(); -+ $elapsed0 = $t1 - $t0; - - $e0 = $elapsed0; - $e1 = $c->getLastElapsedTime(HRTime\Unit::SECOND); ---- pecl/hrtime/trunk/tests/004.phpt 2014/04/22 09:35:46 333402 -+++ pecl/hrtime/trunk/tests/004.phpt 2014/04/22 11:33:51 333403 -@@ -11,13 +11,11 @@ - $c = new HRTime\StopWatch; - - $t0 = microtime(true); -- usleep(1); -- $t1 = microtime(true); -- $elapsed0 = $t1 - $t0; -- - $c->start(); - usleep(1); -+ $t1 = microtime(true); - $c->stop(); -+ $elapsed0 = $t1 - $t0; - - $e0 = $elapsed0; - $e1 = $c->getLastElapsedTime(HRTime\Unit::SECOND); -=================================================================== ---- pecl/hrtime/trunk/config.m4 (révision 333402) -+++ pecl/hrtime/trunk/config.m4 (copie de travail) -@@ -7,6 +7,7 @@ - [ --enable-hrtime Enable hrtime support]) - - if test "$PHP_HRTIME" != "no"; then -- PHP_ADD_LIBRARY(rt) -+ PHP_ADD_LIBRARY(rt,,HRTIME_SHARED_LIBADD) -+ PHP_SUBST(HRTIME_SHARED_LIBADD) - PHP_NEW_EXTENSION(hrtime, hrtime.c timer.c, $ext_shared) - fi -=================================================================== ---- pecl/hrtime/trunk/timer.h (révision 333402) -+++ pecl/hrtime/trunk/timer.h (copie de travail) -@@ -75,3 +75,8 @@ - \return Current timestamp, in milliseconds */ - TIMER_API tick_t timer_system( void ); - -+/* Compatibility stuff for php < 5.3.7*/ -+#ifndef PHP_FE_END -+#define PHP_FE_END {NULL, NULL, NULL} -+#endif -+ diff --git a/php-pecl-hrtime.spec b/php-pecl-hrtime.spec index 22398d0..d75be09 100644 --- a/php-pecl-hrtime.spec +++ b/php-pecl-hrtime.spec @@ -21,23 +21,17 @@ Summary: High resolution timing Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 0.4.3 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}.1 +Version: 0.5.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# http://svn.php.net/viewvc?view=revision&revision=333403 -# http://svn.php.net/viewvc?view=revision&revision=333405 -Patch0: %{pecl_name}-svn.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.2 BuildRequires: %{?scl_prefix}php-pear -Requires(post): %{__pecl} -Requires(postun): %{__pecl} Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} @@ -49,17 +43,17 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} -Obsoletes: php53u-pecl-%{pecl_name} -Obsoletes: php54-pecl-%{pecl_name} -Obsoletes: php54w-pecl-%{pecl_name} +Obsoletes: php53-pecl-%{pecl_name} <= %{version} +Obsoletes: php53u-pecl-%{pecl_name} <= %{version} +Obsoletes: php54-pecl-%{pecl_name} <= %{version} +Obsoletes: php54w-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} -Obsoletes: php55w-pecl-%{pecl_name} +Obsoletes: php55u-pecl-%{pecl_name} <= %{version} +Obsoletes: php55w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} -Obsoletes: php56w-pecl-%{pecl_name} +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} +Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %endif %endif @@ -81,9 +75,10 @@ low level ticks delivered by the underlaying APIs. %setup -q -c mv %{pecl_name}-%{version} NTS -cd NTS -%patch0 -p3 -b .svn +# Don't install/register tests +sed -e 's/role="test"/role="src"/' -i package.xml +cd NTS # Sanity check, really often broken extver=$(sed -n '/#define PHP_HRTIME_VERSION/{s/.* "//;s/".*$//;p}' php_hrtime.h) if test "x${extver}" != "x%{version}"; then @@ -139,21 +134,26 @@ make -C ZTS \ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif -# Test & Documentation -for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i -done +# Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi %postun -if [ $1 -eq 0 ] ; then +if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi @@ -197,8 +197,8 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%doc %{pecl_testdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -210,6 +210,11 @@ rm -rf %{buildroot} %changelog +* Mon Feb 02 2015 Remi Collet <remi@fedoraproject.org> - 0.5.0-1 +- Update to 0.5.0 +- don't install test suite +- drop runtime dependency on pear, new scriptlets + * Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 0.4.3-2.1 - Fedora 21 SCL mass rebuild |