summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/fann
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/fann')
-rw-r--r--sci-mathematics/fann/Manifest2
-rw-r--r--sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild99
-rw-r--r--sci-mathematics/fann/fann-2.2.0.ebuild41
-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
-rw-r--r--sci-mathematics/fann/files/fann-2.2.0-examples.patch23
-rw-r--r--sci-mathematics/fann/metadata.xml16
14 files changed, 504 insertions, 0 deletions
diff --git a/sci-mathematics/fann/Manifest b/sci-mathematics/fann/Manifest
new file mode 100644
index 000000000000..ea4816c0e5d7
--- /dev/null
+++ b/sci-mathematics/fann/Manifest
@@ -0,0 +1,2 @@
+DIST FANN-2.2.0-Source.zip 2285087 SHA256 434b85fce60701c4e0066c442d60110d8e649f278e4edb814f0c0e7a1e0929fd
+DIST fann-2.1.0beta.zip 4033198 SHA256 c24171b5b9c87946bd2f50045cc8dbd0121629fe426615501db14e6043e4a141
diff --git a/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild b/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild
new file mode 100644
index 000000000000..dab9cb87eb9a
--- /dev/null
+++ b/sci-mathematics/fann/fann-2.1.0_beta-r1.ebuild
@@ -0,0 +1,99 @@
+# 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/fann-2.2.0.ebuild b/sci-mathematics/fann/fann-2.2.0.ebuild
new file mode 100644
index 000000000000..4ba0a43afb76
--- /dev/null
+++ b/sci-mathematics/fann/fann-2.2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit cmake-utils
+
+MYP=FANN-${PV}-Source
+
+DESCRIPTION="Fast Artificial Neural Network Library"
+HOMEPAGE="http://leenissen.dk/fann/"
+SRC_URI="mirror://sourceforge/${PN}/${MYP}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/${MYP}"
+
+PATCHES=( "${FILESDIR}"/${P}-examples.patch )
+
+src_test() {
+ cd examples
+ emake CFLAGS="${CFLAGS} -I../src/include -L${BUILD_DIR}/src"
+ LD_LIBRARY_PATH="${BUILD_DIR}/src" emake runtest
+ emake clean
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
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
diff --git a/sci-mathematics/fann/metadata.xml b/sci-mathematics/fann/metadata.xml
new file mode 100644
index 000000000000..dd80fbec92e6
--- /dev/null
+++ b/sci-mathematics/fann/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-mathematics</herd>
+ <longdescription lang="en">
+ Fast Artificial Neural Network Library implements multilayer artificial
+ neural networks in C with support for both fully connected and sparsely
+ connected networks. Cross-platform execution in both fixed and floating
+ point are supported. It includes a framework for easy handling of
+ training data sets. It is easy to use, versatile, well documented, and
+ fast. Delphi, PHP, Python and other bindings are available.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">fann</remote-id>
+ </upstream>
+</pkgmetadata>