From 93dc27cbc5a8617d1af233e960e57cd4248c230e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Apr 2016 08:10:51 +0200 Subject: php-pecl-lua: 2.0.1 (php 7, beta) --- REFLECTION-PHP7 | 188 +++++++++++++++++++++++++++++++++++++++++++++++++ php-pecl-lua-php7.spec | 57 ++++++--------- php-pecl-lua.spec | 22 +++--- 3 files changed, 225 insertions(+), 42 deletions(-) create mode 100644 REFLECTION-PHP7 diff --git a/REFLECTION-PHP7 b/REFLECTION-PHP7 new file mode 100644 index 0000000..6dc713a --- /dev/null +++ b/REFLECTION-PHP7 @@ -0,0 +1,188 @@ +Extension [ extension #65 lua version 2.0.1 ] { + + - Constants [8] { + Constant [ integer LUA_OK ] { 0 } + Constant [ integer LUA_YIELD ] { 1 } + Constant [ integer LUA_ERRRUN ] { 2 } + Constant [ integer LUA_ERRSYNTAX ] { 3 } + Constant [ integer LUA_ERRMEM ] { 4 } + Constant [ integer LUA_ERRGCMM ] { 5 } + Constant [ integer LUA_ERRERR ] { 6 } + Constant [ integer LUA_ERRFILE ] { 7 } + } + + - Classes [3] { + Class [ final class Lua ] { + + - Constants [1] { + Constant [ string LUA_VERSION ] { Lua 5.3.2 } + } + + - Static properties [1] { + Property [ private static $_callbacks ] + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [8] { + Method [ public method __construct ] { + } + + Method [ public method eval ] { + + - Parameters [1] { + Parameter #0 [ $statements ] + } + } + + Method [ public method include ] { + + - Parameters [1] { + Parameter #0 [ $file ] + } + } + + Method [ public method call ] { + + - Parameters [2] { + Parameter #0 [ $method ] + Parameter #1 [ $args ] + } + } + + Method [ public method assign ] { + + - Parameters [2] { + Parameter #0 [ $name ] + Parameter #1 [ $value ] + } + } + + Method [ public method getVersion ] { + } + + Method [ public method registerCallback ] { + + - Parameters [2] { + Parameter #0 [ $name ] + Parameter #1 [ $function ] + } + } + + Method [ public method __call ] { + + - Parameters [2] { + Parameter #0 [ $method ] + Parameter #1 [ $args ] + } + } + } + } + + Class [ final class LuaClosure ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [2] { + Property [ private $_closure ] + Property [ private $_lua_object ] + } + + - Methods [5] { + Method [ private method __construct ] { + } + + Method [ public method __destruct ] { + } + + Method [ private method __clone ] { + } + + Method [ public method invoke ] { + + - Parameters [2] { + Parameter #0 [ $arg ] + Parameter #1 [ $... ] + } + } + + Method [ public method __invoke ] { + + - Parameters [2] { + Parameter #0 [ $arg ] + Parameter #1 [ $... ] + } + } + } + } + + Class [ class LuaException extends Exception implements Throwable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [4] { + Property [ protected $message ] + Property [ protected $code ] + Property [ protected $file ] + Property [ protected $line ] + } + + - Methods [10] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ $message ] + Parameter #1 [ $code ] + Parameter #2 [ $previous ] + } + } + + Method [ public method __wakeup ] { + } + + Method [ final public method getMessage ] { + } + + Method [ final public method getCode ] { + } + + Method [ final public method getFile ] { + } + + Method [ final public method getLine ] { + } + + Method [ final public method getTrace ] { + } + + Method [ final public method getPrevious ] { + } + + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { + } + } + } + } +} + diff --git a/php-pecl-lua-php7.spec b/php-pecl-lua-php7.spec index 3edc056..a0effeb 100644 --- a/php-pecl-lua-php7.spec +++ b/php-pecl-lua-php7.spec @@ -6,38 +6,27 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-lua} -%{!?scl: %global _root_prefix %{_prefix}} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} - -%global with_zts 0%{?__ztsphp:1} -%global pecl_name lua -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-pecl-lua %else -%global ini_name 40-%{pecl_name}.ini +%global _root_prefix %{_prefix} %endif +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name lua +%global ini_name 40-%{pecl_name}.ini Summary: Embedded lua interpreter -Name: %{?scl_prefix}php-pecl-%{pecl_name} -Version: 1.1.0 -Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: 2.0.1 +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} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# https://bugs.php.net/62621 config.m4 -# https://bugs.php.net/65953 LUA 5.1 -# https://github.com/laruence/php-lua/pull/6 -# https://github.com/laruence/php-lua/pull/7 -Patch0: %{pecl_name}-build.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: lua-devel -BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -48,8 +37,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 @@ -65,6 +56,10 @@ Obsoletes: php55w-pecl-%{pecl_name} Obsoletes: php56u-pecl-%{pecl_name} Obsoletes: php56w-pecl-%{pecl_name} %endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-pecl-%{pecl_name} +Obsoletes: php70w-pecl-%{pecl_name} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -88,15 +83,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - -e '/CREDITS/s/role="src"/role="doc"/' \ - -e '/LICENSE/s/role="src"/role="doc"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ - package2.xml >package.xml + -i package.xml mv %{pecl_name}-%{version} NTS cd NTS -%patch0 -p1 -b .fixbuild # Sanity check, really often broken extver=$(sed -n '/#define PHP_LUA_VERSION/{s/.* "//;s/".*$//;p}' php_lua.h) @@ -139,8 +131,6 @@ make %{?_smp_mflags} %install -rm -rf %{buildroot} - make -C NTS \ install INSTALL_ROOT=%{buildroot} @@ -216,15 +206,11 @@ REPORT_EXIT_STATUS=1 \ %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml + %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -235,7 +221,10 @@ rm -rf %{buildroot} %changelog -* Tue Mar 8 2016 Remi Collet - - 1.1.0-6 +* Tue Apr 12 2016 Remi Collet - 2.0.1-1 +- update to 2.0.1 for PHP 7 + +* Tue Mar 8 2016 Remi Collet - 1.1.0-6 - adapt for F24 - drop runtime dependency on pear, new scriptlets - fix license management diff --git a/php-pecl-lua.spec b/php-pecl-lua.spec index 3edc056..45e8e69 100644 --- a/php-pecl-lua.spec +++ b/php-pecl-lua.spec @@ -6,12 +6,16 @@ # # Please, preserve the changelog entries # -%{?scl: %scl_package php-pecl-lua} -%{!?scl: %global _root_prefix %{_prefix}} -%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} -%{!?__pecl: %global __pecl %{_bindir}/pecl} -%{!?__php: %global __php %{_bindir}/php} - +%if 0%{?scl:1} +%if "%{scl}" == "rh-php56" +%global sub_prefix more-php56- +%else +%global sub_prefix %{scl_prefix} +%endif +%scl_package php-pecl-lua +%else +%global _root_prefix %{_prefix} +%endif %global with_zts 0%{?__ztsphp:1} %global pecl_name lua %if "%{php_version}" < "5.6" @@ -21,7 +25,7 @@ %endif Summary: Embedded lua interpreter -Name: %{?scl_prefix}php-pecl-%{pecl_name} +Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.1.0 Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP @@ -48,8 +52,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 @@ -235,7 +241,7 @@ rm -rf %{buildroot} %changelog -* Tue Mar 8 2016 Remi Collet - - 1.1.0-6 +* Tue Mar 8 2016 Remi Collet - 1.1.0-6 - adapt for F24 - drop runtime dependency on pear, new scriptlets - fix license management -- cgit