diff options
-rw-r--r-- | lua-build.patch | 40 | ||||
-rw-r--r-- | php-pecl-lua.spec | 22 |
2 files changed, 54 insertions, 8 deletions
diff --git a/lua-build.patch b/lua-build.patch index 209102a..fbdcbbb 100644 --- a/lua-build.patch +++ b/lua-build.patch @@ -58,3 +58,43 @@ diff -ru lua-1.1.0.old/tests/006.phpt lua-1.1.0/tests/006.phpt Testing return Array ( +From d893cd58c24ef96c931f68c7060818ed7c7d6124 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Wed, 6 Nov 2013 14:11:45 +0100 +Subject: [PATCH] zval_copy_property_ctor have been added in 5.3.4 (so not in + 5.3.3) + +--- + lua.c | 2 +- + lua_closure.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lua.c b/lua.c +index 9a0c18a..3c9b5ba 100644 +--- a/lua.c ++++ b/lua.c +@@ -212,7 +212,7 @@ static zend_object_value php_lua_create_object(zend_class_entry *ce TSRMLS_DC) { + + #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4) + zend_hash_copy(lua_obj->obj.properties, &ce->default_properties, +-#if (PHP_MINOR_VERSION < 3) ++#if (PHP_MINOR_VERSION < 4) + (copy_ctor_func_t) zval_add_ref, + #else + zval_copy_property_ctor(ce), +diff --git a/lua_closure.c b/lua_closure.c +index ac17206..24346dd 100644 +--- a/lua_closure.c ++++ b/lua_closure.c +@@ -203,7 +203,7 @@ static zend_object_value php_lua_closure_create_object(zend_class_entry *ce TSRM + zend_object_std_init(lua_closure_obj, ce TSRMLS_CC); + #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 4) + zend_hash_copy(lua_closure_obj->properties, &ce->default_properties, +-#if (PHP_MINOR_VERSION < 3) ++#if (PHP_MINOR_VERSION < 4) + (copy_ctor_func_t) zval_add_ref, + #else + zval_copy_property_ctor(ce), +-- +1.8.4 + diff --git a/php-pecl-lua.spec b/php-pecl-lua.spec index a64530d..91d0176 100644 --- a/php-pecl-lua.spec +++ b/php-pecl-lua.spec @@ -6,8 +6,9 @@ # # Please, preserve the changelog entries # -%{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}} -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?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 @@ -15,7 +16,7 @@ Summary: Embedded lua interpreter Name: php-pecl-%{pecl_name} Version: 1.1.0 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} @@ -24,6 +25,7 @@ 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) @@ -153,11 +155,11 @@ php --no-php-ini \ --modules | grep %{pecl_name} # Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_EXECUTABLE=%{__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 +%{__php} -n run-tests.php %if %{with_zts} cd ../ZTS @@ -167,11 +169,11 @@ cd ../ZTS --modules | grep %{pecl_name} # Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ +TEST_PHP_EXECUTABLE=%{__ztsphp} \ 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 +%{__ztsphp} -n run-tests.php %endif @@ -194,6 +196,10 @@ rm -rf %{buildroot} %changelog +* Wed Nov 6 2013 Remi Collet <remi@fedoraproject.org> - 1.1.0-2 +- fix build against PHP 5.3.3 for Copr +- open https://github.com/laruence/php-lua/pull/7 + * Wed Oct 23 2013 Remi Collet <remi@fedoraproject.org> - 1.1.0-1 - initial package, version 1.1.0 (beta) - +- open https://github.com/laruence/php-lua/pull/6 |