From d84130dafd97e0cdde6ad93f8a7915812fd245b6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Oct 2013 07:13:55 +0200 Subject: php-pecl-fann: 1.0.3 --- fann-types.patch | 72 ------------------------------------------------------ php-pecl-fann.spec | 24 +++++++----------- 2 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 fann-types.patch diff --git a/fann-types.patch b/fann-types.patch deleted file mode 100644 index ac580c7..0000000 --- a/fann-types.patch +++ /dev/null @@ -1,72 +0,0 @@ -From e970176ca84cbb07ee37e677c37bcd33266e2f05 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 27 Sep 2013 16:27:37 +0200 -Subject: [PATCH] Fix zend_parse_parameters call() in php_fann_create_array() - -d must be a double -l must be a long - -This cause segfaults on 32bits build. -Using temp storage to avoid to review all call to php_fann_create_array() ---- - fann.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/fann.c b/fann.c -index 17dbb2f..7ba52a8 100644 ---- a/fann.c -+++ b/fann.c -@@ -1340,16 +1340,21 @@ static int php_fann_create_array(int num_args, float *conn_rate, - zval *array, **ppdata; - HashPosition pos; - int i = 0; -+ unsigned long tmpnum; -+ double tmprate; - - if (conn_rate) { -- if (zend_parse_parameters(num_args TSRMLS_CC, "dla", conn_rate, num_layers, &array) == FAILURE) { -+ if (zend_parse_parameters(num_args TSRMLS_CC, "dla", &tmprate, &tmpnum, &array) == FAILURE) { - return FAILURE; - } -+ *conn_rate = (float)tmprate; -+ *num_layers = (uint)tmpnum; - } - else { -- if (zend_parse_parameters(num_args TSRMLS_CC, "la", num_layers, &array) == FAILURE) { -+ if (zend_parse_parameters(num_args TSRMLS_CC, "la", &tmpnum, &array) == FAILURE) { - return FAILURE; - } -+ *num_layers = (uint)tmpnum; - } - - if (php_fann_check_num_layers( --- -1.8.4 - -From afd86efef734d598493a2e3806164f54df021402 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 27 Sep 2013 16:30:22 +0200 -Subject: [PATCH] Fix fann.c:1199:3: warning: passing argument 2 of - 'php_stream_locate_url_wrapper' from incompatible pointer type [enabled by - default] - ---- - fann.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fann.c b/fann.c -index 7ba52a8..833f556 100644 ---- a/fann.c -+++ b/fann.c -@@ -1196,7 +1196,7 @@ static char *php_fann_get_path_for_open(char *path, int path_len, int read TSRML - path_for_open = NULL; - } - else -- php_stream_locate_url_wrapper((const char *) path, (const char **) &path_for_open, 0 TSRMLS_CC); -+ php_stream_locate_url_wrapper(path, &path_for_open, 0 TSRMLS_CC); - return path_for_open; - } - /* }}} */ --- -1.8.4 - diff --git a/php-pecl-fann.spec b/php-pecl-fann.spec index 32fc0a8..521b587 100644 --- a/php-pecl-fann.spec +++ b/php-pecl-fann.spec @@ -7,7 +7,6 @@ # Please, preserve the changelog entries # %{!?php_inidir: %{expand: %%global php_inidir %{_sysconfdir}/php.d}} -%{!?php_incldir: %{expand: %%global php_incldir %{_includedir}/php}} %{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} %global with_zts 0%{?__ztsphp:1} @@ -15,18 +14,12 @@ Summary: Wrapper for FANN Library Name: php-pecl-%{pecl_name} -Version: 1.0.2 -Release: 1%{?dist}.1 +Version: 1.0.3 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# Github archive for test suite -# https://github.com/bukka/php-fann/issues/4 -Source1: https://github.com/bukka/php-fann/archive/%{version}.tar.gz - -# https://github.com/bukka/php-fann/pull/5 -Patch0: fann-types.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: fann-devel > 2.1 @@ -47,20 +40,16 @@ Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} + %description This package provides a PHP binding for FANN (Fast Artificial Neural Network) Library. %prep -%setup -q -c -a 1 -mv php-fann-%{version}/tests %{pecl_name}-%{version}/tests +%setup -q -c mv %{pecl_name}-%{version} NTS -cd NTS -%patch0 -p 1 -cd .. - %if %{with_zts} # Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS @@ -167,6 +156,11 @@ rm -rf %{buildroot} %changelog +* Mon Oct 07 2013 Remi Collet - 1.0.3-1 +- Update to 1.0.3 (stable) +- drop merged pacth + * Fri Sep 27 2013 Remi Collet - 1.0.2-1 - initial package - open https://github.com/bukka/php-fann/pull/5 +- open https://github.com/bukka/php-fann/issues/4 -- cgit