summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-08-10 18:24:28 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-08-10 18:24:28 +0000
commit1e74b9abd09631f5388f60851fae38827e022c11 (patch)
tree0dbb8cf3f4680933a96322c8997782f060a684ca /sci-libs/itpp
parentMarking samba-3.0.37-r1 ppc64 for bug 323785 (diff)
downloadgentoo-2-1e74b9abd09631f5388f60851fae38827e022c11.tar.gz
gentoo-2-1e74b9abd09631f5388f60851fae38827e022c11.tar.bz2
gentoo-2-1e74b9abd09631f5388f60851fae38827e022c11.zip
Added patch for FastICA, thanks Gert Wollny (bug #327527). Added static-libs flag, switch to EAPI3, added missing pkgconfig dependency, simplified ebuild, removed the strip restricting (leaving out to user), and added longdescription.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/itpp')
-rw-r--r--sci-libs/itpp/ChangeLog12
-rw-r--r--sci-libs/itpp/files/itpp-4.0.7-fastica-fix-endless-loop.patch93
-rw-r--r--sci-libs/itpp/itpp-4.0.7-r1.ebuild56
-rw-r--r--sci-libs/itpp/metadata.xml18
4 files changed, 173 insertions, 6 deletions
diff --git a/sci-libs/itpp/ChangeLog b/sci-libs/itpp/ChangeLog
index 1d805bcda2ec..358c623aafeb 100644
--- a/sci-libs/itpp/ChangeLog
+++ b/sci-libs/itpp/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sci-libs/itpp
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/itpp/ChangeLog,v 1.94 2010/03/14 09:56:12 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/itpp/ChangeLog,v 1.95 2010/08/10 18:24:27 bicatali Exp $
+
+*itpp-4.0.7-r1 (10 Aug 2010)
+
+ 10 Aug 2010; Sébastien Fabbro <bicatali@gentoo.org>
+ +itpp-4.0.7-r1.ebuild, +files/itpp-4.0.7-fastica-fix-endless-loop.patch,
+ metadata.xml:
+ Added patch for FastICA, thanks Gert Wollny (bug #327527). Added
+ static-libs flag, switch to EAPI3, added missing pkgconfig dependency,
+ simplified ebuild, removed the strip restricting (leaving out to user),
+ and added longdescription.
14 Mar 2010; Markos Chandras <hwoarang@gentoo.org> itpp-4.0.6.ebuild:
Stable on amd64 wrt bug #300279
diff --git a/sci-libs/itpp/files/itpp-4.0.7-fastica-fix-endless-loop.patch b/sci-libs/itpp/files/itpp-4.0.7-fastica-fix-endless-loop.patch
new file mode 100644
index 000000000000..8d232a421d64
--- /dev/null
+++ b/sci-libs/itpp/files/itpp-4.0.7-fastica-fix-endless-loop.patch
@@ -0,0 +1,93 @@
+diff -ru libitpp-4.0.7/itpp/signal/fastica.cpp libitpp-4.0.7.patched/itpp/signal/fastica.cpp
+--- libitpp-4.0.7/itpp/signal/fastica.cpp 2009-12-27 01:38:47.000000000 +0100
++++ libitpp-4.0.7.patched/itpp/signal/fastica.cpp 2010-07-08 16:32:04.000000000 +0200
+@@ -90,7 +90,7 @@
+ static mat mpower(const mat A, const double y);
+ static ivec getSamples(const int max, const double percentage);
+ static vec sumcol(const mat A);
+-static void fpica(const mat X, const mat whiteningMatrix, const mat dewhiteningMatrix, const int approach, const int numOfIC, const int g, const int finetune, const double a1, const double a2, double myy, const int stabilization, const double epsilon, const int maxNumIterations, const int maxFinetune, const int initState, mat guess, double sampleSize, mat & A, mat & W);
++static bool fpica(const mat X, const mat whiteningMatrix, const mat dewhiteningMatrix, const int approach, const int numOfIC, const int g, const int finetune, const double a1, const double a2, double myy, const int stabilization, const double epsilon, const int maxNumIterations, const int maxFinetune, const int initState, mat guess, double sampleSize, mat & A, mat & W);
+ /*! @} */
+
+ namespace itpp
+@@ -124,7 +124,7 @@
+ }
+
+ // Call main function
+-void Fast_ICA::separate(void)
++bool Fast_ICA::separate(void)
+ {
+
+ int Dim = numOfIC;
+@@ -159,13 +159,14 @@
+
+ }
+
++ bool result = true;
+ if (PCAonly == false) {
+
+ Dim = whitesig.rows();
+
+ if (numOfIC > Dim) numOfIC = Dim;
+
+- fpica(whitesig, whiteningMatrix, dewhiteningMatrix, approach, numOfIC, g, finetune, a1, a2, mu, stabilization, epsilon, maxNumIterations, maxFineTune, initState, guess, sampleSize, A, W);
++ result = fpica(whitesig, whiteningMatrix, dewhiteningMatrix, approach, numOfIC, g, finetune, a1, a2, mu, stabilization, epsilon, maxNumIterations, maxFineTune, initState, guess, sampleSize, A, W);
+
+ icasig = W * mixedSig;
+
+@@ -174,6 +175,7 @@
+ else { // PCA only : returns E as IcaSig
+ icasig = VecPr;
+ }
++ return result;
+ }
+
+ void Fast_ICA::set_approach(int in_approach) { approach = in_approach; if (approach == FICA_APPROACH_DEFL) finetune = true; }
+@@ -437,7 +439,7 @@
+
+ }
+
+-static void fpica(const mat X, const mat whiteningMatrix, const mat dewhiteningMatrix, const int approach, const int numOfIC, const int g, const int finetune, const double a1, const double a2, double myy, const int stabilization, const double epsilon, const int maxNumIterations, const int maxFinetune, const int initState, mat guess, double sampleSize, mat & A, mat & W)
++static bool fpica(const mat X, const mat whiteningMatrix, const mat dewhiteningMatrix, const int approach, const int numOfIC, const int g, const int finetune, const double a1, const double a2, double myy, const int stabilization, const double epsilon, const int maxNumIterations, const int maxFinetune, const int initState, mat guess, double sampleSize, mat & A, mat & W)
+ {
+
+ int vectorSize = X.rows();
+@@ -511,7 +513,7 @@
+ A = dewhiteningMatrix * B;
+ W = transpose(B) * whiteningMatrix;
+
+- return;
++ return false;
+ }
+
+ B = B * mpower(transpose(B) * B , -0.5);
+@@ -769,7 +771,7 @@
+
+ } // IF round
+
+- break;
++ return false;
+
+ } // IF numFailures > failureLimit
+
+@@ -990,5 +992,5 @@
+ } // While round <= numOfIC
+
+ } // ELSE Deflation
+-
++ return true;
+ } // FPICA
+diff -ru libitpp-4.0.7/itpp/signal/fastica.h libitpp-4.0.7.patched/itpp/signal/fastica.h
+--- libitpp-4.0.7/itpp/signal/fastica.h 2009-12-27 01:38:47.000000000 +0100
++++ libitpp-4.0.7.patched/itpp/signal/fastica.h 2010-07-08 16:24:37.000000000 +0200
+@@ -134,8 +134,9 @@
+ \brief Explicit launch of main FastICA function
+
+ Explicit launch of the Fast_ICA algorithm.
++ \returns true if algorithm converged and false otherwise
+ */
+- void separate(void);
++ bool separate(void);
+
+ /*!
+ \brief Set approach : FICA_APPROACH_DEFL or FICA_APPROACH_SYMM (default)
diff --git a/sci-libs/itpp/itpp-4.0.7-r1.ebuild b/sci-libs/itpp/itpp-4.0.7-r1.ebuild
new file mode 100644
index 000000000000..522a2e34334d
--- /dev/null
+++ b/sci-libs/itpp/itpp-4.0.7-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/itpp/itpp-4.0.7-r1.ebuild,v 1.1 2010/08/10 18:24:27 bicatali Exp $
+
+EAPI=3
+inherit flag-o-matic
+
+DESCRIPTION="C++ library of mathematical, signal processing and communication classes and functions"
+LICENSE="GPL-2"
+HOMEPAGE="http://itpp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="blas debug doc fftw lapack minimal static-libs"
+
+RDEPEND="!minimal? ( fftw? ( >=sci-libs/fftw-3 ) )
+ blas? ( virtual/blas lapack? ( virtual/lapack ) )"
+DEPEND="${RDEPEND}
+ blas? ( dev-util/pkgconfig )
+ lapack? ( dev-util/pkgconfig )
+ doc? ( app-doc/doxygen virtual/latex-base )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fastica-fix-endless-loop.patch
+}
+
+src_configure() {
+ # turn off performance critical debug code
+ use debug || append-flags -DNDEBUG
+ local blasconf="no"
+ use blas && blasconf="$(pkg-config --libs blas)"
+ local lapackconf="no"
+ use lapack && lapackconf="$(pkg-config --libs blas lapack)"
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --enable-shared \
+ $(use_enable doc html-doc) \
+ $(use_enable debug) \
+ $(use_enable !minimal comm) \
+ $(use_enable !minimal fixed) \
+ $(use_enable !minimal optim) \
+ $(use_enable !minimal protocol) \
+ $(use_enable !minimal signal) \
+ $(use_enable !minimal srccode) \
+ $(use_enable static-libs static) \
+ $(use_with fftw fft) \
+ --with-blas="${blasconf}" \
+ --with-lapack="${lapackconf}"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc AUTHORS ChangeLog ChangeLog-2007 ChangeLog-2006 \
+ ChangeLog-2005 INSTALL NEWS NEWS-3.10 NEWS-3.99 README TODO
+}
diff --git a/sci-libs/itpp/metadata.xml b/sci-libs/itpp/metadata.xml
index a3ced4f52edf..ef6afa8cce47 100644
--- a/sci-libs/itpp/metadata.xml
+++ b/sci-libs/itpp/metadata.xml
@@ -1,9 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer>
- <email>markusle@gentoo.org</email>
- <name>Markus Dittrich</name>
- </maintainer>
- <herd>sci</herd>
+<maintainer>
+ <email>markusle@gentoo.org</email>
+ <name>Markus Dittrich</name>
+</maintainer>
+<herd>sci</herd>
+<longdescription lang='en'>
+ IT++ is a C++ library of mathematical, signal processing and
+ communication classes and functions. Its main use is in simulation
+ of communication systems and for performing research in the area of
+ communications. The kernel of the library consists of generic vector
+ and matrix classes, and a set of accompanying routines. Such a
+ kernel makes IT++ similar to MATLAB or GNU Octave .
+</longdescription>
</pkgmetadata>