diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-04-13 12:41:56 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-04-13 12:41:56 +0200 |
commit | de58fe55f871154a304d2efb24e76fccac4420ce (patch) | |
tree | c56f470ab8b9a76220b21c83c6c2c0a0ac54d59a | |
parent | 02e5398a41e1170c40459a81e969e84a2641589c (diff) |
php-pecl-uopz: 5.0.0 (php 7)
-rw-r--r-- | REFLECTION-PHP7 | 56 | ||||
-rw-r--r-- | php-pecl-uopz-php7.spec | 99 | ||||
-rw-r--r-- | php-pecl-uopz.spec | 13 |
3 files changed, 115 insertions, 53 deletions
diff --git a/REFLECTION-PHP7 b/REFLECTION-PHP7 new file mode 100644 index 0000000..e47ee50 --- /dev/null +++ b/REFLECTION-PHP7 @@ -0,0 +1,56 @@ +Extension [ <persistent> extension #15 uopz version 5.0.0 ] { + + - Constants [7] { + Constant [ integer ZEND_ACC_PUBLIC ] { 256 } + Constant [ integer ZEND_ACC_PRIVATE ] { 1024 } + Constant [ integer ZEND_ACC_PROTECTED ] { 512 } + Constant [ integer ZEND_ACC_PPP_MASK ] { 1792 } + Constant [ integer ZEND_ACC_STATIC ] { 1 } + Constant [ integer ZEND_ACC_FINAL ] { 4 } + Constant [ integer ZEND_ACC_ABSTRACT ] { 2 } + } + + - Functions { + Function [ <internal:uopz> function uopz_set_return ] { + } + Function [ <internal:uopz> function uopz_get_return ] { + } + Function [ <internal:uopz> function uopz_unset_return ] { + } + Function [ <internal:uopz> function uopz_set_mock ] { + } + Function [ <internal:uopz> function uopz_get_mock ] { + } + Function [ <internal:uopz> function uopz_unset_mock ] { + } + Function [ <internal:uopz> function uopz_get_static ] { + } + Function [ <internal:uopz> function uopz_set_static ] { + } + Function [ <internal:uopz> function uopz_set_hook ] { + } + Function [ <internal:uopz> function uopz_get_hook ] { + } + Function [ <internal:uopz> function uopz_unset_hook ] { + } + Function [ <internal:uopz> function uopz_add_function ] { + } + Function [ <internal:uopz> function uopz_del_function ] { + } + Function [ <internal:uopz> function uopz_extend ] { + } + Function [ <internal:uopz> function uopz_implement ] { + } + Function [ <internal:uopz> function uopz_flags ] { + } + Function [ <internal:uopz> function uopz_redefine ] { + } + Function [ <internal:uopz> function uopz_undefine ] { + } + Function [ <internal:uopz> function uopz_set_property ] { + } + Function [ <internal:uopz> function uopz_get_property ] { + } + } +} + diff --git a/php-pecl-uopz-php7.spec b/php-pecl-uopz-php7.spec index 50c4ac2..3a12d28 100644 --- a/php-pecl-uopz-php7.spec +++ b/php-pecl-uopz-php7.spec @@ -6,27 +6,33 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-uopz} +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-pecl-uopz +%endif -%global with_zts 0%{?__ztsphp:1} -%global pecl_name uopz +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name uopz +%global ini_name 05-%{pecl_name}.ini -%if "%{php_version}" < "5.6" -# uopz should be loaded before opcache (k as krakjoe) -%global ini_name k-%{pecl_name}.ini -%else -%global ini_name 05-%{pecl_name}.ini -%endif +# see https://github.com/krakjoe/uopz/releases +%global gh_commit c335700be4dc4350605bc4fb1efd8e96ba51b733 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner krakjoe +%global gh_project uopz Summary: User Operations for Zend -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 2.0.7 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: 5.0.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} +%if 0%{?gh_commit:1} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +%else Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz - +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{?scl_prefix}php-devel > 5.4 BuildRequires: %{?scl_prefix}php-pear @@ -39,8 +45,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 @@ -48,14 +56,12 @@ 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 +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -88,7 +94,21 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c +%if 0%{?gh_commit:1} +mv %{gh_project}-%{gh_commit} NTS +# Temporary, until released on PECL +%{__php} -r ' + $pkg = simplexml_load_file("NTS/package.xml"); + $pkg->date = "2016-04-12"; + $pkg->version->release = "%{version}"; + $pkg->version->release = "%{version}"; + $pkg->stability->release = "beta"; + $pkg->stability->api = "beta"; + $pkg->asXML("package.xml"); +' +%else mv %{pecl_name}-%{version} NTS +%endif # Don't install/register tests sed -e 's/role="test"/role="src"/' \ @@ -96,7 +116,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -#sed -e /PHP_UOPZ_VERSION/s/2.0.0/%{version}/ -i uopz.h # Sanity check, really often broken extver=$(sed -n '/#define PHP_UOPZ_VERSION/{s/.* "//;s/".*$//;p}' uopz.h) @@ -107,39 +126,14 @@ fi cd .. # Create configuration files -cat << EOF | tee NTS/%{ini_name} +cat << EOF | tee %{ini_name} ; Enable '%{summary}' extension module -%if "%{php_version}" > "5.5" -zend_extension=%{pecl_name}.so -%else -zend_extension=%{php_extdir}/%{pecl_name}.so -%endif - -; Configuration -; http://php.net/manual/en/uopz.configuration.php -;uopz.overloads=0 -;uopz.backup=1 -;uopz.fixup=0 +extension=%{pecl_name}.so EOF %if %{with_zts} # Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS - -cat << EOF | tee ZTS/%{ini_name} -; Enable '%{summary}' extension module -%if "%{php_version}" > "5.5" -zend_extension=%{pecl_name}.so -%else -zend_extension=%{php_ztsextdir}/%{pecl_name}.so -%endif - -; Configuration -; http://php.net/manual/en/uopz.configuration.php -;uopz.overloads=0 -;uopz.backup=1 -;uopz.fixup=0 -EOF %endif @@ -165,14 +159,14 @@ rm -rf %{buildroot} make -C NTS install INSTALL_ROOT=%{buildroot} # install config file -install -D -m 644 NTS/%{ini_name} %{buildroot}%{php_inidir}/%{ini_name} +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} -install -D -m 644 ZTS/%{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation @@ -205,12 +199,12 @@ fi cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d zend_extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php @@ -219,12 +213,12 @@ REPORT_EXIT_STATUS=1 \ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ - --define zend_extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ -TEST_PHP_ARGS="-n -d zend_extension=$PWD/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{_bindir}/zts-php -n run-tests.php @@ -251,6 +245,9 @@ rm -rf %{buildroot} %changelog +* Wed Apr 13 2016 Remi Collet <remi@fedoraproject.org> - 5.0.0-1 +- update to 5.0.0 for PHP 7 + * Tue Mar 8 2016 Remi Collet <remi@fedoraproject.org> - 2.0.7-2 - adapt for F24 diff --git a/php-pecl-uopz.spec b/php-pecl-uopz.spec index 50c4ac2..50732b9 100644 --- a/php-pecl-uopz.spec +++ b/php-pecl-uopz.spec @@ -6,7 +6,14 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-uopz} +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%scl_package php-pecl-uopz +%endif %global with_zts 0%{?__ztsphp:1} %global pecl_name uopz @@ -19,7 +26,7 @@ %endif Summary: User Operations for Zend -Name: %{?scl_prefix}php-pecl-%{pecl_name} +Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 2.0.7 Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP @@ -39,8 +46,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 |