diff options
-rw-r--r-- | 38.patch | 33 | ||||
-rw-r--r-- | PHPINFO | 6 | ||||
-rw-r--r-- | php-pecl-fann.spec | 10 |
3 files changed, 48 insertions, 1 deletions
diff --git a/38.patch b/38.patch new file mode 100644 index 0000000..e6197f2 --- /dev/null +++ b/38.patch @@ -0,0 +1,33 @@ +From a5ca783eb121e2e467d70e576dda75dcba5f8ba7 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 4 Sep 2018 09:52:04 +0200 +Subject: [PATCH] fix libraries link order + +--- + config.m4 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.m4 b/config.m4 +index da00fea..e00bfdb 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -34,16 +34,16 @@ if test "$PHP_FANN" != "no"; then + + LIBNAME=fann + LIBSYMBOL=fann_set_user_data ++ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $FANN_DIR/$PHP_LIBDIR, FANN_SHARED_LIBADD) ++ PHP_ADD_LIBRARY(m) + + PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, + [ +- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $FANN_DIR/$PHP_LIBDIR, FANN_SHARED_LIBADD) +- AC_CHECK_LIB($LIBNAME,[fann_copy],[ AC_DEFINE(HAVE_FANN_2_2,1,[Fann library version 2.2]) ],[],[-lm]) ++ AC_CHECK_LIB($LIBNAME,[fann_copy],[ AC_DEFINE(HAVE_FANN_2_2,1,[Fann library version 2.2]) ],[],[]) + AC_DEFINE(HAVE_FANN,1,[Fann library found]) + ],[ + AC_MSG_ERROR([wrong libfann version (you need at least version 2.1) or lib not found]) + ],[ +- -L$FANN_DIR/$PHP_LIBDIR -lm + ]) + + PHP_SUBST(FANN_SHARED_LIBADD) @@ -0,0 +1,6 @@ + +fann + +FANN support => enabled +FANN version => 1.1.1 +FANN library version => 2.2 diff --git a/php-pecl-fann.spec b/php-pecl-fann.spec index e271006..76e6121 100644 --- a/php-pecl-fann.spec +++ b/php-pecl-fann.spec @@ -27,11 +27,13 @@ Summary: Wrapper for FANN Library Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.1.1 -Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 10%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: PHP URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Patch0: https://patch-diff.githubusercontent.com/raw/bukka/php-fann/pull/38.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: fann-devel > 2.1 BuildRequires: %{?scl_prefix}php-devel > 5.2 @@ -108,6 +110,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr38 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_FANN_VERSION/{s/.* "//;s/".*$//;p}' php_fann.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -238,6 +242,10 @@ fi %changelog +* Tue Sep 4 2018 Remi Collet <remi@remirepo.net> - 1.1.1-10 +- fix libraries load order, using patch from + https://github.com/bukka/php-fann/pull/38 + * Thu Aug 16 2018 Remi Collet <remi@remirepo.net> - 1.1.1-6 - rebuild for 7.3.0beta2 new ABI |