diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-03-08 18:23:33 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-03-08 18:23:33 +0100 |
commit | 7ec5bd55efe8b37e93915e3f1d3777daf8c455de (patch) | |
tree | 3fb19ef6566c42f9eabd9267639ab7e800796cf9 | |
parent | 6a19a81e46bda971bb29a2c3f406d98decf85265 (diff) |
php-pecl-pthreads: rebuild with new sources + PR 249
-rw-r--r-- | php-pecl-pthreads.spec | 16 | ||||
-rw-r--r-- | pthreads.patch | 78 |
2 files changed, 88 insertions, 6 deletions
diff --git a/php-pecl-pthreads.spec b/php-pecl-pthreads.spec index 87f90b9..2ff7542 100644 --- a/php-pecl-pthreads.spec +++ b/php-pecl-pthreads.spec @@ -13,12 +13,15 @@ Summary: Threading API Name: php-pecl-%{pecl_name} Version: 1.0.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} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# https://github.com/krakjoe/pthreads/pull/249 +Patch0: %{pecl_name}.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-zts-devel > 5.3 BuildRequires: php-pear @@ -63,6 +66,7 @@ This extension is only available for PHP in ZTS mode. %setup -q -c cd %{pecl_name}-%{version} +%patch0 -p1 -b .github # Sanity check, really often broken extver=$(sed -n '/#define PHP_PTHREADS_VERSION/{s/.* "//;s/".*$//;p}' php_pthreads.h) @@ -129,11 +133,6 @@ cd %{pecl_name}-%{version} --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if "%{php_version}" < "5.5" -# syntax issue -rm tests/pools.phpt -%endif - : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -156,6 +155,11 @@ rm -rf %{buildroot} %changelog +* Fri Mar 07 2014 Remi Collet <remi@fedoraproject.org> - 1.0.0-2 +- rebuild with new sources :( +- open https://github.com/krakjoe/pthreads/pull/249 + fix test suite for PHP 5.4, and clean build warnings + * Fri Mar 07 2014 Remi Collet <remi@fedoraproject.org> - 1.0.0-1 - Update to 1.0.0 (stable) diff --git a/pthreads.patch b/pthreads.patch new file mode 100644 index 0000000..0c06ff5 --- /dev/null +++ b/pthreads.patch @@ -0,0 +1,78 @@ +From 3495c08966815c9935a84231548199a18c866ada Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Sat, 8 Mar 2014 18:00:07 +0100 +Subject: [PATCH 1/2] Fix test compatibility for PHP 5.4 + +--- + tests/pools.phpt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/pools.phpt b/tests/pools.phpt +index 9fb40d9..7455e36 100644 +--- a/tests/pools.phpt ++++ b/tests/pools.phpt +@@ -47,7 +47,7 @@ class SafeLog extends Stackable { + public function run(){} + } + +-$pool = new Pool(8, \WebWorker::class, array(new SafeLog())); ++$pool = new Pool(8, '\WebWorker', array(new SafeLog())); + + $pool->submit(new WebWork()); + $pool->submit(new WebWork()); +-- +1.8.3.1 + +From d705badced05cd51378ae18303a95c2d5495cd2f Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Sat, 8 Mar 2014 18:04:44 +0100 +Subject: [PATCH 2/2] fix build warnings, unused variables + +--- + classes/pool.h | 7 ------- + src/object.c | 1 - + 2 files changed, 8 deletions(-) + +diff --git a/classes/pool.h b/classes/pool.h +index 53113ce..395d4b9 100644 +--- a/classes/pool.h ++++ b/classes/pool.h +@@ -235,23 +235,16 @@ PHP_METHOD(Pool, submit) { + Will submit the given task to the specified worker */ + PHP_METHOD(Pool, submitTo) { + zval *task = NULL; +- zval *last = NULL; +- zval *size = NULL; + zval *workers = NULL; + long worker = 0; +- zval *clazz = NULL; +- zval *ctor = NULL; + zval *work = NULL; + zval **working = NULL; + zval **selected = NULL; + +- zend_class_entry **ce = NULL; +- + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lO", &worker, &task, pthreads_stackable_entry) != SUCCESS) { + return; + } + +- size = zend_read_property(Z_OBJCE_P(getThis()), getThis(), ZEND_STRL("size"), 1 TSRMLS_CC); + workers = zend_read_property(Z_OBJCE_P(getThis()), getThis(), ZEND_STRL("workers"), 1 TSRMLS_CC); + work = zend_read_property(Z_OBJCE_P(getThis()), getThis(), ZEND_STRL("work"), 1 TSRMLS_CC); + +diff --git a/src/object.c b/src/object.c +index a4deb6a..5a0f50f 100644 +--- a/src/object.c ++++ b/src/object.c +@@ -243,7 +243,6 @@ size_t pthreads_stack_next(PTHREAD thread, zval *this_ptr TSRMLS_DC) { + zend_bool locked; + size_t bubble = 0; + zval *that_ptr; +- zend_function *run; + zend_class_entry *popped; + + burst: +-- +1.8.3.1 + |