summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2017-01-15 12:04:25 +0100
committerPacho Ramos <pacho@gentoo.org>2017-01-15 12:20:06 +0100
commitaf4e7fd09da76558bdc8f3a56a2e2b636f110f34 (patch)
tree313906dece5ea6e54d4e420cef23734b0a1206c0 /sci-mathematics/fann
parentsci-libs/mmtk: Drop old (diff)
downloadgentoo-af4e7fd09da76558bdc8f3a56a2e2b636f110f34.tar.gz
gentoo-af4e7fd09da76558bdc8f3a56a2e2b636f110f34.tar.bz2
gentoo-af4e7fd09da76558bdc8f3a56a2e2b636f110f34.zip
sci-mathematics/fann: Drop old
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sci-mathematics/fann')
-rw-r--r--sci-mathematics/fann/Manifest1
-rw-r--r--sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild99
-rw-r--r--sci-mathematics/fann/files/fann-2.0.0-benchmark.patch49
-rw-r--r--sci-mathematics/fann/files/fann-2.0.0-shared-libs-gentoo.patch23
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-asneeded.patch8
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-benchmark.patch80
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-examples.patch23
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-python.patch20
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-pythonlink.patch30
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-sizecheck.patch25
-rw-r--r--sci-mathematics/fann/files/fann-2.1.0_beta-valist.patch65
11 files changed, 0 insertions, 423 deletions
diff --git a/sci-mathematics/fann/Manifest b/sci-mathematics/fann/Manifest
index a5b061d757da..c1ac009f1965 100644
--- a/sci-mathematics/fann/Manifest
+++ b/sci-mathematics/fann/Manifest
@@ -1,2 +1 @@
DIST FANN-2.2.0-Source.zip 2285087 SHA256 434b85fce60701c4e0066c442d60110d8e649f278e4edb814f0c0e7a1e0929fd SHA512 c486694aac53cf91a83f8b68d9020fc74ca2bea9416c9d06b6dc8f53d30a2261bd00212e3d439adef9fbdd82532056f7c1afed793f5574c2d6191d84d26fb5c2 WHIRLPOOL 12f6ccaa425bfcd495d47e5a20ad6549a53dba984a9f8f3f0baec078b420a56c8cced6926702604142e543a8920cb30dc57cfa80888c14cfc86a534d6f8cd6a3
-DIST fann-2.1.0beta.zip 4033198 SHA256 c24171b5b9c87946bd2f50045cc8dbd0121629fe426615501db14e6043e4a141 SHA512 57c4456f8059a1276d4315171a9eb8fcccf8be698059e8d58905045cde5a6ce486bb0eb26b6da446e18b0034e7486b35d35652532ffcf88f7d6e33ec5cb568c6 WHIRLPOOL 5a20d94482fc07d39bcc7ae70084ca3e83fc8f621a352bb8b1d841ab8f3773f7f05cede697ce53d0be72580b1f4c68a75fad5b5f716e72ad26a4b5185c28ce37
diff --git a/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild b/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild
deleted file mode 100644
index dab9cb87eb9a..000000000000
--- a/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=2
-
-PYTHON_DEPEND="python? 2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython"
-
-inherit eutils python autotools
-
-MY_P=${P/_/}
-
-DESCRIPTION="Fast Artificial Neural Network Library"
-HOMEPAGE="http://leenissen.dk/fann/"
-SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="doc python static-libs"
-
-RDEPEND=""
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- app-arch/unzip"
-
-S="${WORKDIR}/${P/_beta/}"
-
-pkg_setup() {
- use python && python_pkg_setup
-}
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-python.patch \
- "${FILESDIR}"/${P}-benchmark.patch \
- "${FILESDIR}"/${P}-examples.patch \
- "${FILESDIR}"/${P}-asneeded.patch \
- "${FILESDIR}"/${P}-valist.patch \
- "${FILESDIR}"/${P}-sizecheck.patch
- eautoreconf
- use python && python_copy_sources python
-}
-
-src_configure() {
- econf $(use_enable static-libs static)
-}
-
-src_compile() {
- emake || die "emake failed"
- compilation() {
- emake PYTHON_VERSION="$(python_get_version)" || die "emake python failed"
- }
- use python && python_execute_function -s --source-dir python compilation
-}
-
-src_test() {
- cd "${S}"/examples
- emake CFLAGS="${CFLAGS} -I../src/include -L../src/.libs" \
- || die "emake examples failed"
- LD_LIBRARY_PATH="../src/.libs" emake runtest || die "tests failed"
- emake clean
- testing() {
- emake test || die "failed tests for python wrappers"
- }
- use python && python_execute_function -s --source-dir python testing
-}
-
-src_install() {
- emake install DESTDIR="${D}" || die "emake install failed"
- dodoc AUTHORS ChangeLog NEWS README TODO || die
-
- if use doc; then
- dodoc doc/*.txt
- insinto /usr/share/doc/${PF}
- doins doc/fann_en.pdf || die "failed to install reference manual"
- doins -r examples || die "failed to install examples"
- doins -r benchmarks || die "failed to install benchmarks"
- fi
-
- installation() {
- emake install ROOT="${D}" || die "failed to install python wrappers"
- if use doc; then
- insinto /usr/share/doc/${PF}/examples/python
- doins -r examples || die "failed to install python examples"
- fi
- }
- use python && python_execute_function -s --source-dir python installation
-}
-
-pkg_postinst() {
- use python && python_mod_optimize py${PN}
-}
-
-pkg_postrm() {
- use python && python_mod_cleanup py${PN}
-}
diff --git a/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch b/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch
deleted file mode 100644
index ec37e9940a63..000000000000
--- a/sci-mathematics/fann/files/fann-2.0.0-benchmark.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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
deleted file mode 100644
index 2d9782a563a2..000000000000
--- a/sci-mathematics/fann/files/fann-2.0.0-shared-libs-gentoo.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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
deleted file mode 100644
index f68da2d4eccb..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-asneeded.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- 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
deleted file mode 100644
index 60933e5e361f..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-benchmark.patch
+++ /dev/null
@@ -1,80 +0,0 @@
---- 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
deleted file mode 100644
index 45bfdd02b384..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-examples.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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
deleted file mode 100644
index 6c6a68201b59..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-python.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 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
deleted file mode 100644
index 308a21e0bd4a..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-pythonlink.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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
deleted file mode 100644
index 885db95b04f6..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-sizecheck.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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
deleted file mode 100644
index 23d130f60650..000000000000
--- a/sci-mathematics/fann/files/fann-2.1.0_beta-valist.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-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;
- }
---