diff options
| author | Remi Collet <fedora@famillecollet.com> | 2016-03-01 06:56:19 +0100 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2016-03-01 06:56:19 +0100 | 
| commit | 16eacc6eeef047345e055d13917bc9da386ec81e (patch) | |
| tree | 8ab90ea3b9c2058ab62269ddb2ce522f84c30488 | |
| parent | 6013af3cf72e21822f4198676f4379f4ea935431 (diff) | |
php-pecl-msgpack: 2.0.1 (beta)
| -rw-r--r-- | REFLECTION-PHP7 | 2 | ||||
| -rw-r--r-- | bench.php | 76 | ||||
| -rw-r--r-- | php-pecl-msgpack-php7.spec | 47 | 
3 files changed, 24 insertions, 101 deletions
diff --git a/REFLECTION-PHP7 b/REFLECTION-PHP7 index 0b18f05..b892bec 100644 --- a/REFLECTION-PHP7 +++ b/REFLECTION-PHP7 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #81 msgpack version 2.0.0 ] { +Extension [ <persistent> extension #67 msgpack version 2.0.1 ] {    - INI {      Entry [ msgpack.error_display <ALL> ] diff --git a/bench.php b/bench.php deleted file mode 100644 index 130761b..0000000 --- a/bench.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -//ini_set('memory_limit' ,'128M'); - -$ary = get_loaded_extensions(); -for($i=0; $i<pow(2, 9); $i++){ -    $ary = array_merge($ary, range(0, 1024)); -	$ary[] = md5("$i"); -} - -echo "count:".count($ary)."\n"; - -function getSize($ary) -{ -    if (ini_get('mbstring.func_overload') & 2 && function_exists('mb_strlen')) { -        $size = mb_strlen($ary, 'ASCII'); -    } else { -        $size = strlen($ary); -    } - -    return $size; -} - -echo "----\n"; -echo "PHP\n"; -$a = microtime(true); -$packed = serialize($ary); -$b = microtime(true); -echo ($refpck=($b-$a)) . " sec, " . ($refsize=getSize($packed)) . " bytes\n"; - -$a = microtime(true); -$pack = unserialize($packed); -$b = microtime(true); -echo ($refunp=($b-$a)) . " sec\n"; - - -echo "----\n"; -echo "IgBinary\n"; -$a = microtime(true); -$packed = igbinary_serialize($ary); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refpck) . "%, ". ($x=getSize($packed)) . " bytes, ".round($x*100/$refsize)."%\n"; - -$a = microtime(true); -$pack = igbinary_unserialize($packed); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refunp) . "%\n"; - - -echo "----\n"; -echo "MessagePack\n"; -$a = microtime(true); -$packed = msgpack_pack($ary); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refpck) . "%, ". ($x=getSize($packed)) . " bytes, ".round($x*100/$refsize)."%\n"; - -$a = microtime(true); -$pack = msgpack_unpack($packed); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refunp) . "%\n"; - - -echo "----\n"; -echo "JSON\n"; -$a = microtime(true); -$jsoned = json_encode($ary); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refpck) . "%, ". ($x=getSize($jsoned)) . " bytes, ".round($x*100/$refsize)."%\n"; - -$a = microtime(true); -$json = json_decode($jsoned); -$b = microtime(true); -echo ($t=($b-$a)) . " sec, " . round($t*100/$refunp) . "%\n"; - - -?> diff --git a/php-pecl-msgpack-php7.spec b/php-pecl-msgpack-php7.spec index 3cede04..f990719 100644 --- a/php-pecl-msgpack-php7.spec +++ b/php-pecl-msgpack-php7.spec @@ -10,17 +10,10 @@  # Please, preserve the changelog entries  #  %if 0%{?scl:1} -%if "%{scl}" == "rh-php56" -%global sub_prefix more-php56- -%else  %global sub_prefix %{scl_prefix}  %endif -%endif  %{?scl:          %scl_package         php-pecl-msgpack} -%{!?php_inidir:  %global php_inidir   %{_sysconfdir}/php.d} -%{!?__pecl:      %global __pecl       %{_bindir}/pecl} -%{!?__php:       %global __php        %{_bindir}/php}  %global gh_commit   b29f3fd572b9d2ad8c053efa6279f93862f63657  %global gh_short    %(c=%{gh_commit}; echo ${c:0:7}) @@ -28,12 +21,8 @@  %global gh_project  msgpack-php  #global gh_date     20151014  %global pecl_name   msgpack -%global with_zts    0%{?__ztsphp:1} -%if "%{php_version}" < "5.6" -%global ini_name  %{pecl_name}.ini -%else -%global ini_name  40-%{pecl_name}.ini -%endif +%global with_zts    0%{!?_without_zts:%{?__ztsphp:1}} +%global ini_name    40-%{pecl_name}.ini  %if 0  %global        with_msgpack 1 @@ -43,16 +32,17 @@  Summary:       API for communicating with MessagePack serialization  Name:          %{?sub_prefix}php-pecl-msgpack -Version:       2.0.0 +Version:       2.0.1  %if 0%{?gh_date:1}  Release:       0.1.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0:       https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz  %else  Release:       1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz  %endif  License:       BSD  Group:         Development/Languages  URL:           http://pecl.php.net/package/msgpack -Source0:       https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz  BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root  BuildRequires: %{?scl_prefix}php-devel >= 7 @@ -71,6 +61,8 @@ 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} +Provides:      %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides:      %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}  %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}  # Other third party repo stuff @@ -78,19 +70,13 @@ 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} <= %{version}  Obsoletes:     php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6"  Obsoletes:     php56u-pecl-%{pecl_name} <= %{version}  Obsoletes:     php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0"  Obsoletes:     php70u-pecl-%{pecl_name} <= %{version}  Obsoletes:     php70w-pecl-%{pecl_name} <= %{version}  %endif -%endif  %if 0%{?fedora} < 20 && 0%{?rhel} < 7  # Filter shared private @@ -129,10 +115,15 @@ These are the files needed to compile programs using MessagePack serializer.  %prep  %setup -qc +%if 0%{?gh_date:1}  mv %{gh_project}-%{gh_commit} NTS  mv NTS/package.xml . -  sed -e '/release/s/0.5.6/%{version}%{?gh_date:dev}/' -i package.xml +%else +mv %{pecl_name}-%{version} NTS +%endif + +%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} \  cd NTS @@ -203,6 +194,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml  cd NTS  for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')  do [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i +   [ -f $i ]       && install -Dpm 644 $i       %{buildroot}%{pecl_testdir}/%{pecl_name}/$i  done  for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')  do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i @@ -211,7 +203,7 @@ done  %check  # Known by upstream as failed test (travis result) -rm */tests/026.phpt +rm */tests/041.phpt  %ifnarch x86_64  rm */tests/{040,040b,040d}.phpt  %endif @@ -245,6 +237,7 @@ REPORT_EXIT_STATUS=1 \  %endif +%if 0%{?fedora} < 24  # when pear installed alone, after us  %triggerin -- %{?scl_prefix}php-pear  if [ -x %{__pecl} ] ; then @@ -261,6 +254,7 @@ fi  if [ $1 -eq 0 -a -x %{__pecl} ] ; then      %{pecl_uninstall} %{pecl_name} >/dev/null || :  fi +%endif  %clean @@ -269,6 +263,7 @@ rm -rf %{buildroot}  %files  %defattr(-,root,root,-) +%{?_licensedir:%license NTS/LICENSE}  %doc %{pecl_docdir}/%{pecl_name}  %{pecl_xmldir}/%{name}.xml @@ -292,8 +287,12 @@ rm -rf %{buildroot}  %changelog +* Tue Mar  1 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-1 +- update to 2.0.1 (php 7, beta) +- use sources from pecl +  * Tue Oct 27 2015 Remi Collet <remi@fedoraproject.org> - 2.0.0-1 -- update to 2.0.0 (php 7) +- update to 2.0.0 (php 7, beta)  * Wed Oct 14 2015 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.1.20151014git75991cf  - new snapshot, version bump to 2.0.0dev  | 
