diff options
Diffstat (limited to 'sci-mathematics/fann/files')
10 files changed, 346 insertions, 0 deletions
diff --git a/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch b/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch new file mode 100644 index 000000000000..ec37e9940a63 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch @@ -0,0 +1,49 @@ +diff -Naur fann-2.0.0/benchmarks/Makefile fann-2.0.0-new/benchmarks/Makefile +--- fann-2.0.0/benchmarks/Makefile 2005-11-29 16:33:12.000000000 -0500 ++++ fann-2.0.0-new/benchmarks/Makefile 2006-10-28 09:08:00.000000000 -0400 +@@ -16,7 +16,7 @@ + all: $(TARGETS) + + quality: quality.cc +- $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -llwneuralnet -ljneural -lfl ++ $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -lfl + + quality_fixed: quality_fixed.c + $(GCC) $(CFLAGS) $(LFLAGS) $< -o $@ -lfixedfann +@@ -25,7 +25,7 @@ + $(GCC) -ggdb -lm -DDEBUG -Wall -ansi -I../src/ -I../src/include/ ../src/fixedfann.c $< -o $@ + + performance: performance.cc +- $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -llwneuralnet -ljneural -lfl ++ $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -lfl + + performance_fixed: performance.cc + $(G++) $(CFLAGS) $(LFLAGS) -DFIXEDFANN $< -o $@ -lfixedfann +diff -Naur fann-2.0.0/benchmarks/performance.cc fann-2.0.0-new/benchmarks/performance.cc +--- fann-2.0.0/benchmarks/performance.cc 2005-10-24 16:48:47.000000000 -0400 ++++ fann-2.0.0-new/benchmarks/performance.cc 2006-10-28 09:08:28.000000000 -0400 +@@ -19,8 +19,8 @@ + + //uncomment lines below to benchmark the libraries + +-#define JNEURAL +-#define LWNN ++/*#define JNEURAL ++#define LWNN */ + + #include <stdio.h> + #include <stdlib.h> +diff -Naur fann-2.0.0/benchmarks/quality.cc fann-2.0.0-new/benchmarks/quality.cc +--- fann-2.0.0/benchmarks/quality.cc 2005-11-29 16:33:12.000000000 -0500 ++++ fann-2.0.0-new/benchmarks/quality.cc 2006-10-28 09:08:19.000000000 -0400 +@@ -19,8 +19,8 @@ + + //uncomment lines below to benchmark the libraries + +-#define JNEURAL +-#define LWNN ++/*#define JNEURAL ++#define LWNN */ + + #include <stdio.h> + #include <stdlib.h> diff --git a/sci-mathematics/fann/files/fann-2.0.0-shared-libs-gentoo.patch b/sci-mathematics/fann/files/fann-2.0.0-shared-libs-gentoo.patch new file mode 100644 index 000000000000..2d9782a563a2 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.0.0-shared-libs-gentoo.patch @@ -0,0 +1,23 @@ +diff -Naur fann-2.0.0/python/pyfann/Makefile fann-2.0.0-new/python/pyfann/Makefile +--- fann-2.0.0/python/pyfann/Makefile 2005-12-02 20:22:43.000000000 -0500 ++++ fann-2.0.0-new/python/pyfann/Makefile 2006-10-28 07:36:34.000000000 -0400 +@@ -10,7 +10,7 @@ + all: $(TARGETS) + + _%.so: pyfann_wrap.o fann_helper.o +- gcc $(LIBS) -shared -dll $^ -o $@ ++ gcc $(LIBS) -fPIC -shared -dll $^ -o $@ + + %.o: %.c + gcc -c $< -I/usr/include/$(PYTHON)/ -I$(FANN_DIR)/src/include/ +diff -Naur fann-2.0.0/python/setup.py fann-2.0.0-new/python/setup.py +--- fann-2.0.0/python/setup.py 2006-01-06 16:45:28.000000000 -0500 ++++ fann-2.0.0-new/python/setup.py 2006-10-28 07:36:07.000000000 -0400 +@@ -40,6 +40,6 @@ + url='http://sourceforge.net/projects/fann/',
+ license='GNU LESSER GENERAL PUBLIC LICENSE (LGPL)',
+ py_modules=['pyfann.libfann','pyfann.fann'],
+- ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann.i','pyfann/fann_helper.c'], include_dirs=['../src/include'], extra_objects=['../src/doublefann.o']) ]
++ ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann.i','pyfann/fann_helper.c'], include_dirs=['../src/include'], extra_objects=['../src/.libs/doublefann.o']) ]
+ )
+
diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-asneeded.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-asneeded.patch new file mode 100644 index 000000000000..f68da2d4eccb --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-asneeded.patch @@ -0,0 +1,8 @@ +--- configure.in.orig 2009-09-09 21:18:25.000000000 +0100 ++++ configure.in 2009-09-09 21:18:43.000000000 +0100 +@@ -7,4 +7,5 @@ + AC_C_CONST + AC_HEADER_TIME + AC_CHECK_FUNCS(gettimeofday) ++AC_CHECK_LIB(m, sin) + AC_OUTPUT(Makefile src/Makefile src/include/Makefile fann.pc fann.spec) diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-benchmark.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-benchmark.patch new file mode 100644 index 000000000000..60933e5e361f --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-benchmark.patch @@ -0,0 +1,80 @@ +--- benchmarks/Makefile.orig 2008-04-22 10:16:48.664395478 +0000 ++++ benchmarks/Makefile 2008-04-22 10:59:59.815994915 +0000 +@@ -1,43 +1,35 @@ +-# The jneural library (http://voltar-confed.org/jneural/) and lwneuralnet library (http://sourceforge.net/projects/lwneuralnet/) needs to be installed in order to run the benchmarks +- +-GCC = gcc +-G++ = g++ ++# The jneural library (http://voltar-confed.org/jneural/) and lwneuralnet library (http://sourceforge.net/projects/lwneuralnet/) needs to be installed in order to run the benchmarks with EXTRA_NEURALS + + TARGETS = quality quality_fixed performance performance_fixed shuffle parity two-spirals + +-CFLAGS = -O3 -finline-functions -funroll-loops -Werror +- + LFLAGS = -lm +- +-JNEURALDIR = ../../libraries/jneural/ +- +-LWNNDIR = ../../libraries/lwneuralnet-0.8/source/ ++#EXTRA_NEURALS="-llwneuralnet -ljneural -DJNEURAL" + + all: $(TARGETS) + + quality: quality.cc +- $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -llwneuralnet -ljneural -lfl ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $< -o $@ -lfloatfann -lfl $(EXTRA_NEURALS) + + quality_fixed: quality_fixed.c +- $(GCC) $(CFLAGS) $(LFLAGS) $< -o $@ -lfixedfann ++ $(CC) $(CFLAGS) $(LFLAGS) $< -o $@ -lfixedfann + + quality_fixed_debug: quality_fixed.c +- $(GCC) -ggdb -lm -DDEBUG -Wall -ansi -I../src/ -I../src/include/ ../src/fixedfann.c $< -o $@ ++ $(CC) -ggdb -lm -DDEBUG -Wall -ansi -I../src/ -I../src/include/ ../src/fixedfann.c $< -o $@ + + performance: performance.cc +- $(G++) $(CFLAGS) $(LFLAGS) -I$(JNEURALDIR)include/ -L$(JNEURALDIR) -I$(LWNNDIR) -L$(LWNNDIR) $< -o $@ -lfloatfann -llwneuralnet -ljneural -lfl ++ $(CXX) $(CXXFLAGS) $(LFLAGS) $< -o $@ -lfloatfann -lfl $(EXTRA_NEURALS) + + performance_fixed: performance.cc +- $(G++) $(CFLAGS) $(LFLAGS) -DFIXEDFANN $< -o $@ -lfixedfann ++ $(CXX) $(CXXFLAGS) $(LFLAGS) -DFIXEDFANN $< -o $@ -lfixedfann + + shuffle: shuffle.c +- $(GCC) $(CFLAGS) $(LFLAGS) $< -o $@ -lfloatfann ++ $(CC) $(CFLAGS) $(LFLAGS) $< -o $@ -lfloatfann + + two-spirals: two-spirals.c +- $(GCC) $(CFLAGS) $(LFLAGS) $< -o $@ ++ $(CC) $(CFLAGS) $(LFLAGS) $< -o $@ + + parity: parity.c +- $(GCC) $(CFLAGS) $(LFLAGS) $< -o $@ ++ $(CC) $(CFLAGS) $(LFLAGS) $< -o $@ + + clean: + rm -rf -- $(TARGETS) *~ +--- benchmarks/performance.cc.orig 2008-04-22 10:24:38.604894867 +0000 ++++ benchmarks/performance.cc 2008-04-22 10:26:57.436806446 +0000 +@@ -19,9 +19,6 @@ + + //uncomment lines below to benchmark the libraries + +-#define JNEURAL +-#define LWNN +- + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +--- benchmarks/quality.cc.orig 2008-04-22 10:59:27.814171235 +0000 ++++ benchmarks/quality.cc 2008-04-22 10:59:39.570841209 +0000 +@@ -19,9 +19,6 @@ + + //uncomment lines below to benchmark the libraries + +-#define JNEURAL +-#define LWNN +- + #include <stdio.h> + #include <stdlib.h> + #include <string.h> diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-examples.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-examples.patch new file mode 100644 index 000000000000..45bfdd02b384 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-examples.patch @@ -0,0 +1,23 @@ +--- examples/Makefile.orig 2008-04-22 10:15:42.500625020 +0000 ++++ examples/Makefile 2008-04-22 10:16:40.563933859 +0000 +@@ -1,18 +1,16 @@ + # This makefile is on purpose not made with configure, to show how to use the library + # The make file requires that the fann library is installed (see ../README) + +-GCC=gcc +- + TARGETS = xor_train xor_test xor_test_fixed simple_train steepness_train simple_test robot mushroom cascade_train scaling_test scaling_train + DEBUG_TARGETS = xor_train_debug xor_test_debug xor_test_fixed_debug cascade_train_debug + + all: $(TARGETS) + + %: %.c Makefile +- $(GCC) -O3 $< -o $@ -lm -lfann ++ $(CC) $(CFLAGS) $< -o $@ -lm -lfann + + %_fixed: %.c Makefile +- $(GCC) -O3 -DFIXEDFANN $< -o $@ -lm -lfixedfann ++ $(CC) $(CFLAGS) -DFIXEDFANN $< -o $@ -lm -lfixedfann + + clean: + rm -f $(TARGETS) $(DEBUG_TARGETS) xor_fixed.data *.net *~ *.obj *.exe *.tds noscale.txt withscale.txt scale_test_results.txt diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-python.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-python.patch new file mode 100644 index 000000000000..6c6a68201b59 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-python.patch @@ -0,0 +1,20 @@ +--- python/setup.py.orig 2008-04-22 10:11:05.284827392 +0000 ++++ python/setup.py 2008-04-22 10:13:21.668599460 +0000 +@@ -9,7 +9,7 @@ + import os
+
+ NAME='pyfann'
+-VERSION='2.0.0'
++VERSION='2.1.0'
+
+ LONG_DESCRIPTION="""\
+ Fast Artificial Neural Network Library implements multilayer
+@@ -42,7 +42,7 @@ + py_modules=['pyfann.libfann'],
+ ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann_wrap.cxx'],
+ include_dirs=['../src/include'],
+- extra_objects=['../src/doublefann.o'],
++ extra_objects=['../src/.libs/doublefann.o'],
+ define_macros=[("SWIG_COMPILE",None)]
+ ),
+ ]
diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-pythonlink.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-pythonlink.patch new file mode 100644 index 000000000000..308a21e0bd4a --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-pythonlink.patch @@ -0,0 +1,30 @@ +From: Christian Kastner <debian@kvr.at> +Date: Fri, 4 Jun 2010 23:27:24 +0200 +Subject: [PATCH] Link python-pyfann dynamically instead of statically + +Upstream links the pyfann extension against libfann's static library. This +causes all sorts of troubles on some platforms, most notably amd64, where the +extension FTBFS because the static library isn't compiled with -fPIC. The +Debian-specific solution presented here is to link to the shared library and +let package python-pyfann Depend: on it. + +Forwarded: no +Last-Update: 2010-06-04 +--- + python/setup.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/python/setup.py b/python/setup.py +index 67cef7e..6b2a3dc 100755 +--- a/python/setup.py ++++ b/python/setup.py +@@ -42,7 +42,7 @@ setup( + py_modules=['pyfann.libfann'],
+ ext_modules=[Extension('pyfann._libfann',['pyfann/pyfann_wrap.cxx'],
+ include_dirs=['../src/include'],
+- extra_objects=['../src/doublefann.o'],
++ extra_objects=['../src/.libs/doublefann.o'],
+ define_macros=[("SWIG_COMPILE",None)]
+ ),
+ ]
+-- diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-sizecheck.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-sizecheck.patch new file mode 100644 index 000000000000..885db95b04f6 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-sizecheck.patch @@ -0,0 +1,25 @@ +From: Christian Kastner <debian@kvr.at> +Date: Sun, 6 Feb 2011 17:09:05 +0100 +Subject: [PATCH] Correct a typo in a size comparison + +Origin: http://leenissen.dk/fann/forum/viewtopic.php?f=1&t=626 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/712290 +Last-Update: 2011-02-06 +--- + python/pyfann/pyfann.i | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/python/pyfann/pyfann.i b/python/pyfann/pyfann.i +index 47b17ba..ec55535 100644 +--- a/python/pyfann/pyfann.i ++++ b/python/pyfann/pyfann.i +@@ -108,7 +108,7 @@ + for (j = 0; j< num; j++)
+ {
+ PyObject* o1=PySequence_GetItem($input,j);
+- if ((unsigned int)PySequence_Length(o1) == dim) {
++ if ((unsigned int)PySequence_Length(o1) != dim) {
+ PyErr_SetString(PyExc_ValueError,"Size mismatch. All items must be of the same size");
+ SWIG_fail;
+ }
+-- diff --git a/sci-mathematics/fann/files/fann-2.1.0_beta-valist.patch b/sci-mathematics/fann/files/fann-2.1.0_beta-valist.patch new file mode 100644 index 000000000000..23d130f60650 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.1.0_beta-valist.patch @@ -0,0 +1,65 @@ +From: Christian Kastner <debian@kvr.at> +Date: Thu, 1 Jul 2010 01:02:47 +0200 +Subject: [PATCH] Portable handling for va_list + +The current code wrongly assumes va_list is always implemented as an array. va_list +however is an opaque type, and may also be implemented as a struct, for +example. This patch implements handling of va_list in a platform-independent +way, fixing a FTBFS on alpha and armel. + +Forwarded: no +Last-Update: 2010-07-01 +--- + src/include/fann_cpp.h | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/include/fann_cpp.h b/src/include/fann_cpp.h +index eb647af..bf6e75b 100644 +--- a/src/include/fann_cpp.h ++++ b/src/include/fann_cpp.h +@@ -916,9 +916,12 @@ public: + bool create_standard(unsigned int num_layers, ...)
+ {
+ va_list layers;
++ unsigned int arr[num_layers];
++
+ va_start(layers, num_layers);
+- bool status = create_standard_array(num_layers,
+- reinterpret_cast<const unsigned int *>(layers));
++ for (unsigned int ii = 0; ii < num_layers; ii++)
++ arr[ii] = va_arg(layers, unsigned int);
++ bool status = create_standard_array(num_layers, arr);
+ va_end(layers);
+ return status;
+ }
+@@ -966,9 +969,12 @@ public: + bool create_sparse(float connection_rate, unsigned int num_layers, ...)
+ {
+ va_list layers;
++ unsigned int arr[num_layers];
++
+ va_start(layers, num_layers);
+- bool status = create_sparse_array(connection_rate, num_layers,
+- reinterpret_cast<const unsigned int *>(layers));
++ for (unsigned int ii = 0; ii < num_layers; ii++)
++ arr[ii] = va_arg(layers, unsigned int);
++ bool status = create_sparse_array(connection_rate, num_layers, arr);
+ va_end(layers);
+ return status;
+ }
+@@ -1013,9 +1019,12 @@ public: + bool create_shortcut(unsigned int num_layers, ...)
+ {
+ va_list layers;
++ unsigned int arr[num_layers];
++
+ va_start(layers, num_layers);
+- bool status = create_shortcut_array(num_layers,
+- reinterpret_cast<const unsigned int *>(layers));
++ for (unsigned int ii = 0; ii < num_layers; ii++)
++ arr[ii] = va_arg(layers, unsigned int);
++ bool status = create_shortcut_array(num_layers, arr);
+ va_end(layers);
+ return status;
+ }
+-- diff --git a/sci-mathematics/fann/files/fann-2.2.0-examples.patch b/sci-mathematics/fann/files/fann-2.2.0-examples.patch new file mode 100644 index 000000000000..bfab17022187 --- /dev/null +++ b/sci-mathematics/fann/files/fann-2.2.0-examples.patch @@ -0,0 +1,23 @@ +--- examples/Makefile.orig 2012-01-24 05:31:40.000000000 +0000 ++++ examples/Makefile 2012-05-08 19:00:08.000000000 +0100 +@@ -1,7 +1,6 @@ + # This makefile is on purpose not made with configure, to show how to use the library + # The make file requires that the fann library is installed (see ../README) + +-GCC=gcc + + TARGETS = xor_train xor_test xor_test_fixed simple_train steepness_train simple_test robot mushroom cascade_train scaling_test scaling_train + DEBUG_TARGETS = xor_train_debug xor_test_debug xor_test_fixed_debug cascade_train_debug +@@ -9,10 +8,10 @@ + all: $(TARGETS) + + %: %.c Makefile +- $(GCC) -O3 $< -o $@ -lfann -lm ++ $(CC) $(CFLAGS) $< -lfann -lm -o $@ + + %_fixed: %.c Makefile +- $(GCC) -O3 -DFIXEDFANN $< -o $@ -lfixedfann -lm ++ $(CC) $(CFLAGS) -DFIXEDFANN $< -lfixedfann -lm -o $@ + + clean: + rm -f $(TARGETS) $(DEBUG_TARGETS) xor_fixed.data *.net *~ *.obj *.exe *.tds noscale.txt withscale.txt scale_test_results.txt |