* [gentoo-commits] dev/dev-zero:master commit in: sci-libs/itl/, sci-libs/ietl/, sci-libs/mtl/files/, sci-libs/mtl/, ...
@ 2014-03-12 8:34 Tiziano Müller
0 siblings, 0 replies; only message in thread
From: Tiziano Müller @ 2014-03-12 8:34 UTC (permalink / raw
To: gentoo-commits
commit: 498456b8fc37e7cfd0c5b8f7755df16fb2442cf0
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 12 08:33:44 2014 +0000
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Wed Mar 12 08:33:44 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git;a=commit;h=498456b8
Initial commit of some scientific libs
---
sci-libs/ietl/Manifest | 4 +
.../ietl/files/ietl-2.2-fix-includes-et-al.patch | 42 +++
sci-libs/ietl/files/ietl-2.2-respect-destdir.patch | 150 ++++++++++
sci-libs/ietl/ietl-2.2.ebuild | 41 +++
sci-libs/itl/Manifest | 7 +
.../itl-4.0.0_p1-Autoconf-automake-fixes.patch | 220 ++++++++++++++
...y-SSOR-Preconditioner-produce-wrong-decom.patch | 310 +++++++++++++++++++
...anges-for-stricter-compilers-like-gcc-4.0.patch | 98 ++++++
.../itl-4.0.0_p1-linalg_traits-of-std-vector.patch | 60 ++++
.../files/itl-4.0.0_p1-more-modern-c-fixes.patch | 328 +++++++++++++++++++++
sci-libs/itl/itl-4.0.0_p1.ebuild | 63 ++++
sci-libs/mtl/Manifest | 5 +
.../files/mtl-2.1.2_p23-add-missing-typedef.patch | 24 ++
.../files/mtl-2.1.2_p23-fix-includes-et-al.patch | 54 ++++
sci-libs/mtl/files/mtl-2.1.2_p23-fix-tests.patch | 89 ++++++
sci-libs/mtl/mtl-2.1.2_p23.ebuild | 51 ++++
16 files changed, 1546 insertions(+)
diff --git a/sci-libs/ietl/Manifest b/sci-libs/ietl/Manifest
new file mode 100644
index 0000000..9bb8e6a
--- /dev/null
+++ b/sci-libs/ietl/Manifest
@@ -0,0 +1,4 @@
+AUX ietl-2.2-fix-includes-et-al.patch 1146 SHA256 5c9d98990fbd9693775deec645c07ed146788c762949ffc6e588757018d30e19 SHA512 8eb2d778d7596eb37b1540836314d343f0abda9a99391539b0c5b31e28bc033114d6cb8578b37db92e9d8da53280a21c22dfb8b0ce4a5c835aa5bc8660384ae3 WHIRLPOOL 4c5a10b76df2a7eec86bdfb3c884750cdd19373a1ba35bc25284137a6eb4d54978d5efe73e774e4c7ce9c77dc4efde8be869e7c5d711d870518073aa6b525309
+AUX ietl-2.2-respect-destdir.patch 6334 SHA256 f22da459712ead063c610687cf42b44b1ccc2dbaab5bca630927d9406a66073f SHA512 441b599d8da1ab5612dd8bd4c73fb1329135c5df7ed74d4d6cf0767bb716224de9f20ef86d53d3596838df36253ac029ceb242bb24f2c6f551b83bcd425c8deb WHIRLPOOL 1fd32373c09a2044d66157aa5429af5c18b67334769c8607859dcf993efeec2c2b98de8df71e0b15418ccc2013ca9a0d884b849f6afcf7078e260e631cd64cad
+DIST ietl-2.2.tar.gz 85373 SHA256 a361fc113243718f2087cb417d9b631437dc9c82d778f35aaa1d11ed872f58dd SHA512 799d2c70f3a44224b32f8376e743d70a24e64f7c1ec10c3ef599b318f27ceb1c27f65ccea2dc143a1ec6812ff426bd6ddd07c4ea87dab94a1afc692ec6b6a280 WHIRLPOOL 516740aa324cbec084e46bcb27d318a80e34b316b4ccc1ff542a68fa72f250a87dd82f4c3f9d101c3b336104acc84d3208d0ea2dc3cdb30ff3d46f196aafa888
+EBUILD ietl-2.2.ebuild 879 SHA256 c0419bf7388b474e8c11a24d3416e58dbca82b5586b5ef1a0a6fe1463a77ca0c SHA512 c8631c5cff24176ea525843c95e389722858b14f82dc38248e5eaaa9280289e954fbeb2cbcdfd749cddac802661cba79b742697b93a6205a1c147a4f8160a955 WHIRLPOOL 40ec949957b4c261d95459ad84241d77bd0c71a5065f762732ab6a67637b3c4d4880d145c38603444c0548a08823da77e831635f0bbe8593fa1d20e65b134a63
diff --git a/sci-libs/ietl/files/ietl-2.2-fix-includes-et-al.patch b/sci-libs/ietl/files/ietl-2.2-fix-includes-et-al.patch
new file mode 100644
index 0000000..27907a9
--- /dev/null
+++ b/sci-libs/ietl/files/ietl-2.2-fix-includes-et-al.patch
@@ -0,0 +1,42 @@
+diff --git a/ietl/lanczos.h b/ietl/lanczos.h
+index d650a4d..f1329ed 100644
+--- a/ietl/lanczos.h
++++ b/ietl/lanczos.h
+@@ -20,6 +20,7 @@
+ #ifndef IETL_LANCZOS_H
+ #define IETL_LANCZOS_H
+
++#include <ietl/vectorspace.h>
+ #include <ietl/ietl2lapack.h>
+ #include <ietl/fmatrix.h>
+ #include <ietl/complex.h>
+@@ -331,7 +332,7 @@ private:
+
+ if(super_type::alpha.size() == 0) {
+ a_and_b = make_first_step(gen_);
+- push_back(a_and_b); // member of T-matrix class.
++ this->push_back(a_and_b); // member of T-matrix class.
+ n=1;
+ }
+
+@@ -351,7 +352,7 @@ private:
+ while(!iter.finished(*this)) {
+ a_and_b = make_step(n,vec3);
+ if (n==super_type::alpha.size())
+- push_back(a_and_b); // member of T-matrix class
++ this->push_back(a_and_b); // member of T-matrix class
+ ++iter;
+ ++n;
+ }
+diff --git a/ietl/tmatrix.h b/ietl/tmatrix.h
+index cb5d94a..0772887 100644
+--- a/ietl/tmatrix.h
++++ b/ietl/tmatrix.h
+@@ -21,6 +21,7 @@
+ #define IETL_TMATRIX_H
+ #include <ietl/vectorspace.h>
+ #include <stdexcept>
++#include <limits>
+
+ namespace ietl {
+ template <class VS>
diff --git a/sci-libs/ietl/files/ietl-2.2-respect-destdir.patch b/sci-libs/ietl/files/ietl-2.2-respect-destdir.patch
new file mode 100644
index 0000000..9a4a195
--- /dev/null
+++ b/sci-libs/ietl/files/ietl-2.2-respect-destdir.patch
@@ -0,0 +1,150 @@
+diff --git a/config/rules.mk b/config/rules.mk
+index f9ed2e2..678c685 100644
+--- a/config/rules.mk
++++ b/config/rules.mk
+@@ -90,97 +90,97 @@ $(TEST) : $(LIB)
+
+ install : $(LIB) $(PROGRAM)
+ @list='$(HEADER_CONFIG) $(HEADER)'; for p in $$list; do \
+- if test -d $(pkgincludedir); then :; else \
+- echo "$(mkinstalldirs) $(pkgincludedir)"; \
+- $(mkinstalldirs) $(pkgincludedir); \
++ if test -d $(DESTDIR)$(pkgincludedir); then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(pkgincludedir); \
+ fi; \
+ sd=`dirname $$p`; \
+ if test "$$sd" != "."; then \
+- if test -d "$(pkgincludedir)/$$sd"; then :; else \
+- echo "$(mkinstalldirs) $(pkgincludedir)/$$sd"; \
+- $(mkinstalldirs) $(pkgincludedir)/$$sd; \
++ if test -d "$(DESTDIR)$(pkgincludedir)/$$sd"; then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)/$$sd"; \
++ $(mkinstalldirs) $(DESTDIR)$(pkgincludedir)/$$sd; \
+ fi; \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_HEADER) $$d$$p $(pkgincludedir)/$$p"; \
+- $(INSTALL_HEADER) $$d$$p $(pkgincludedir)/$$p; \
++ echo "$(INSTALL_HEADER) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p"; \
++ $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p; \
+ done
+ @list='$(LIB)'; for p in $$list; do \
+- if test -d $(libdir); then :; else \
+- echo "$(mkinstalldirs) $(libdir)"; \
+- $(mkinstalldirs) $(libdir); \
++ if test -d $(DESTDIR)$(libdir); then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(libdir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_LIB) $$d$$p $(libdir)/$$p"; \
+- $(INSTALL_LIB) $$d$$p $(libdir)/$$p; \
+- echo "$(RANLIB) $(libdir)/$$p"; \
+- $(RANLIB) $(libdir)/$$p; \
++ echo "$(INSTALL_LIB) $$d$$p $(DESTDIR)$(libdir)/$$p"; \
++ $(INSTALL_LIB) $$d$$p $(DESTDIR)$(libdir)/$$p; \
++ echo "$(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
++ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ done
+ @list='$(XMLLIB)'; for p in $$list; do \
+- if test -d $(libdir)/xml ; then :; else \
+- echo "$(mkinstalldirs) $(libdir)/xml "; \
+- $(mkinstalldirs) $(libdir)/xml ; \
++ if test -d $(DESTDIR)$(libdir)/xml ; then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(libdir)/xml "; \
++ $(mkinstalldirs) $(DESTDIR)$(libdir)/xml ; \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_LIB) $$d$$p $(libdir)/xml/$$p"; \
+- $(INSTALL_LIB) $$d$$p $(libdir)/xml/$$p; \
++ echo "$(INSTALL_LIB) $$d$$p $(DESTDIR)$(libdir)/xml/$$p"; \
++ $(INSTALL_LIB) $$d$$p $(DESTDIR)$(libdir)/xml/$$p; \
+ done
+ @list='$(PROGRAM)'; for p in $$list; do \
+- if test -d $(bindir); then :; else \
+- echo "$(mkinstalldirs) $(bindir)"; \
+- $(mkinstalldirs) $(bindir); \
++ if test -d $(DESTDIR)$(bindir); then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(bindir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(bindir); \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_PROGRAM) $$d$$p $(bindir)/$$p"; \
+- $(INSTALL_PROGRAM) $$d$$p $(bindir)/$$p; \
++ echo "$(INSTALL_PROGRAM) $$d$$p $(DESTDIR)$(bindir)/$$p"; \
++ $(INSTALL_PROGRAM) $$d$$p $(DESTDIR)$(bindir)/$$p; \
+ done
+ @list='$(SCRIPT_CONFIG) $(SCRIPT)'; for p in $$list; do \
+- if test -d $(bindir); then :; else \
+- echo "$(mkinstalldirs) $(bindir)"; \
+- $(mkinstalldirs) $(bindir); \
++ if test -d $(DESTDIR)$(bindir); then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(bindir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(bindir); \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_SCRIPT) $$d$$p $(bindir)/$$p"; \
+- $(INSTALL_SCRIPT) $$d$$p $(bindir)/$$p; \
++ echo "$(INSTALL_SCRIPT) $$d$$p $(DESTDIR)$(bindir)/$$p"; \
++ $(INSTALL_SCRIPT) $$d$$p $(DESTDIR)$(bindir)/$$p; \
+ done
+ @list='$(DATA_CONFIG) $(DATA)'; for p in $$list; do \
+ if test -d $(datadir); then :; else \
+- echo "$(mkinstalldirs) $(datadir)"; \
+- $(mkinstalldirs) $(datadir); \
++ echo "$(mkinstalldirs) $(DESTDIR)$(datadir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(datadir); \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_DATA) $$d$$p $(datadir)/$$p"; \
+- $(INSTALL_DATA) $$d$$p $(datadir)/$$p; \
++ echo "$(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$p"; \
++ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$p; \
+ done
+ @list='$(PKGDATA_CONFIG) $(PKGDATA)'; for p in $$list; do \
+- if test -d $(pkgdatadir); then :; else \
+- echo "$(mkinstalldirs) $(pkgdatadir)"; \
+- $(mkinstalldirs) $(pkgdatadir); \
++ if test -d $(DESTDIR)$(pkgdatadir); then :; else \
++ echo "$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)"; \
++ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \
+ fi; \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$(INSTALL_DATA) $$d$$p $(pkgdatadir)/$$p"; \
+- $(INSTALL_DATA) $$d$$p $(pkgdatadir)/$$p; \
++ echo "$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$p"; \
++ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$p; \
+ done
+ uninstall :
+ @list='$(HEADER_CONFIG) $(HEADER)'; for p in $$list; do \
+- echo "rm -f $(pkgincludedir)/$$p"; \
++ echo "rm -f $(DESTDIR)$(pkgincludedir)/$$p"; \
+ rm -f $(pkgincludedir)/$$p; \
+ done
+ @list='$(LIB)'; for p in $$list; do \
+- echo "rm -f $(libdir)/$$p"; \
+- rm -f $(libdir)/$$p; \
++ echo "rm -f $(DESTDIR)$(libdir)/$$p"; \
++ rm -f $(DESTDIR)$(libdir)/$$p; \
+ done
+ @list='$(PROGRAM) $(SCRIPT_CONFIG) $(SCRIPT)'; for p in $$list; do \
+- echo "rm -f $(bindir)/$$p"; \
+- rm -f $(bindir)/$$p; \
++ echo "rm -f $(DESTDIR)$(bindir)/$$p"; \
++ rm -f $(DESTDIR)$(bindir)/$$p; \
+ done
+ @list='$(DATA_CONFIG) $(DATA)'; for p in $$list; do \
+- echo "rm -f $(datadir)/$$p"; \
+- rm -f $(datadir)/$$p; \
++ echo "rm -f $(DESTDIR)$(datadir)/$$p"; \
++ rm -f $(DESTDIR)$(datadir)/$$p; \
+ done
+ @list='$(PKGDATA_CONFIG) $(PKGDATA)'; for p in $$list; do \
+- echo "rm -f $(pkgdatadir)/$$p"; \
+- rm -f $(pkgdatadir)/$$p; \
++ echo "rm -f $(DESTDIR)$(pkgdatadir)/$$p"; \
++ rm -f $(DESTDIR)$(pkgdatadir)/$$p; \
+ done
+
+ # clean & distclean
diff --git a/sci-libs/ietl/ietl-2.2.ebuild b/sci-libs/ietl/ietl-2.2.ebuild
new file mode 100644
index 0000000..75ac260
--- /dev/null
+++ b/sci-libs/ietl/ietl-2.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Iterative Eigensolver Template Library"
+HOMEPAGE="http://www.comp-phys.org/software/ietl/"
+SRC_URI="http://www.comp-phys.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc examples"
+
+DEPEND="dev-libs/boost"
+RDEPEND="${DEPEND}"
+
+# TODO:
+# * the package does some detection (blitz++, lapack, atlas)
+# ... figure out whether this is in any way important because
+# the defines do not get used in the library itself
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-respect-destdir.patch" \
+ "${FILESDIR}/${P}-fix-includes-et-al.patch"
+}
+
+src_install() {
+ default
+
+ use doc && dohtml doc/*
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.{cpp,h}
+ fi
+}
diff --git a/sci-libs/itl/Manifest b/sci-libs/itl/Manifest
new file mode 100644
index 0000000..c2fdb17
--- /dev/null
+++ b/sci-libs/itl/Manifest
@@ -0,0 +1,7 @@
+AUX itl-4.0.0_p1-Autoconf-automake-fixes.patch 5625 SHA256 05d35e068c0fce4715ecf684d3ba0f7370d9abe09766fd3dddb1ce9d36de1c99 SHA512 bcf7191d98b718c17dfaa1d848ddf5c186f70ca4287dd1c8729bc9fe129fd6a9c6d9d19113257712778ac637c79516bccfa1333fa2e9c6ae1541a28a14a8a5cc WHIRLPOOL a2fd4ec6d6a43035ea0e0dd8eb6a120c58c4a0ecc5a813655d3dee28200ec3189bfd5c9da0b9b4a842c5b6e6cfb51060e36007dd2f3fe690b7285bc27b766b46
+AUX itl-4.0.0_p1-ILU-Cholesky-SSOR-Preconditioner-produce-wrong-decom.patch 9635 SHA256 fa2f805aeb70f2834eb1d95a279892cafb31696b04b8e6080e677690005333a3 SHA512 be8c67bad927cda655d3e73e480aedfbeac30385479447fa03162e406efd097ff9c33a4b491727a946d9ee9c7e8e81fe200cb9d9993b5fabd7f1f8dc1f04514f WHIRLPOOL cb1d93a3bd3fe878e8662a51ace4ad26e1ef889b2474cce5cfc1a79712a2a1e21d5ce2e2a456e1ef9096eb364112fb2cf4ccf4cc18fec3e70c762159d3765252
+AUX itl-4.0.0_p1-Some-changes-for-stricter-compilers-like-gcc-4.0.patch 2918 SHA256 c7e99bb8e198fd198f284259e2f7baa71c2d75c531351935456a2fc7e34a79dd SHA512 c647f9745e51bda55d880967a6aa36509a7b1bebdde0bbc53e18e2d5e9e23f9a976c631bc81524f99a586faf89d93ef2dba61004bbe4ed6ca79337ea1b8bfc34 WHIRLPOOL 0ea39d11baead2ce793dac58478f03a01137ef53536805ec95f7473650e4cdf1bb10f6b8868e605d426e9e1ee78c42c0d07f87493af03388971d0481a146f65f
+AUX itl-4.0.0_p1-linalg_traits-of-std-vector.patch 1676 SHA256 b866908b1fcc5b1700c555754789abd6c7bfa4cb221df52961de4a4d65564331 SHA512 840f4211c04d7d55a49f7a5f695e901fd2b35b2d64a03c681e8b72c7f291ff582feb0658054795b078cde115a300bd7129b79534626fbd6315940504331125ea WHIRLPOOL 45381c4269613ddaed00f92033766cf219df252f788fd16de4913b442824e7ed67f76a12730f05b22c37dc352afcf3fc767bcb0f7ab3081f4eec84f62e7b9561
+AUX itl-4.0.0_p1-more-modern-c-fixes.patch 10591 SHA256 264f58b8b870d39e65cc762cb580c4b86400abae073f7db7bdb4889267f1cece SHA512 b3e9f78044fd9efe3c6150a293800986b70d98de436d20041ef9bd70147242d3ae1cfa297627152d032291edadaa618f5f9429cbaca640a1b85e96a63591795e WHIRLPOOL bdce0a8d67e8301f2f5003cb48619c9bdb6a45e68c96776dac6353680770227a1099e65ffb4993dad24bfeefb369d829dd32533112fe2b1e926e23dd19714dc2
+DIST itl-4.0.0-1.tar.gz 1265862 SHA256 2f99f3909c1e8ef167a4e0a8e4e13f4feb56dd8e7101b5876bc84ed37ebd5839 SHA512 45f8d231d891f79c66cf835de0b54819b1071b6892092ba1fe0d56c298e86dfa5ad5d14234aff460530ceae7a001ce8ad98820897b418047616a8c7d4ad28f0f WHIRLPOOL 8ac028b33a5ebba1ec0dab4ef7db4b468b359ac5da6d366d330ae150dbf842e5941cd156c808b01fcdf2d2c0045671e3046f622c5ca5594ce23f45a10ca8dd2a
+EBUILD itl-4.0.0_p1.ebuild 1541 SHA256 dfca4e157022b448024fed269cf5d7db4c25b20f0af3d299c24a6dcb19ad2d13 SHA512 27542a76fd9b4468b747f3d3eb748d787612c4890814301ccc2357e575bd1fa561ed6f89a36e801b7d1ffdcb8304ca18b76f01c5377f669c50019a73639f4e2a WHIRLPOOL 377da916eb1e89ad07b85179119fc2c016e1639ca20056b15e70c47674936e97e7c73cd1fe053ea4927487d8f343e00cbe4a4ff2bee26dcffc3412b83fab88d6
diff --git a/sci-libs/itl/files/itl-4.0.0_p1-Autoconf-automake-fixes.patch b/sci-libs/itl/files/itl-4.0.0_p1-Autoconf-automake-fixes.patch
new file mode 100644
index 0000000..1b62413
--- /dev/null
+++ b/sci-libs/itl/files/itl-4.0.0_p1-Autoconf-automake-fixes.patch
@@ -0,0 +1,220 @@
+From d92c9081b27c513cad9c41bfc431c16fe552f473 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Sat, 7 Dec 2013 10:47:29 +0100
+Subject: [PATCH 5/5] Autoconf/automake fixes
+
+---
+ acinclude.m4 | 69 +++++++++++++++++++++++++-----------------------------------
+ configure.in | 13 ++++++++----
+ 2 files changed, 38 insertions(+), 44 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 21de6f9..a1a68ce 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1,21 +1,9 @@
+ dnl -*- shell-script -*-
+
+
+-AC_DEFUN(AC_ITL_TRY_COMPILE,
+-[cat > conftest.cpp <<EOF
+-ifelse(AC_LANG, [FORTRAN77],
+-[ program main
+-[$2]
+- end],
+-[dnl This sometimes fails to find confdefs.h, for some reason.
+-dnl [#]line __oline__ "[$]0"
+-[#]line __oline__ "configure"
+-[$1]
+-int main() {
+-[$2]
+-; return 0; }
+-])EOF
+-ac_mtl_compile='${CXX} -c $CFLAGS conftest.cpp 1>&5'
++AC_DEFUN([AC_ITL_TRY_COMPILE], [
++AC_LANG_CONFTEST( [AC_LANG_PROGRAM([[$1]], [[$2]])] )
++ac_mtl_compile='${CXX} -c $CFLAGS conftest.$ac_ext 1>&5'
+ if AC_TRY_EVAL(ac_mtl_compile); then
+ ifelse([$3], , :, [rm -rf conftest*
+ $3])
+@@ -32,6 +20,7 @@ dnl
+
+ define([AC_ITL_NO_SSTREAM],[
+ AC_MSG_CHECKING([if compiler has standard sstream])
++AH_TEMPLATE([ITL_NO_SSTREAM], [])
+ cat > conftest.cc <<EOF
+ #include <sstream>
+
+@@ -306,91 +295,91 @@ CXXFLAGS=$SAVE_CXXFLAGS
+ #
+ # Several macro for various compilers
+ #
+-AC_DEFUN(AC_PROG_CXX_MWERKS,
+-[AC_CACHE_CHECK(whether we are using Metrowerks Codewarrior C++, MWERKS_CXX,
++AC_DEFUN([AC_PROG_CXX_MWERKS],
++[AC_CACHE_CHECK(whether we are using Metrowerks Codewarrior C++, mwerks_cv_cxx,
+ [cat > conftest.c <<EOF
+ #ifdef __MWERKS__
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- MWERKS_CXX=yes
++ mwerks_cv_cxx=yes
+ compiler=mwerks
+ else
+- MWERKS_CXX=no
++ mwerks_cv_cxx=no
+ fi])])
+
+
+-AC_DEFUN(AC_PROG_CXX_MSVCPP,
+-[AC_CACHE_CHECK(whether we are using Visual C++, MSVCPP_CXX,
++AC_DEFUN([AC_PROG_CXX_MSVCPP],
++[AC_CACHE_CHECK(whether we are using Visual C++, msvcpp_cv_cxx,
+ [cat > conftest.c <<EOF
+ #if defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__ICL)
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- MSVCPP_CXX=yes
++ msvcpp_cv_cxx=yes
+ compiler=msvcpp
+ else
+- MSVCPP_CXX=no
++ msvcpp_cv_cxx=no
+ fi])])
+
+-AC_DEFUN(AC_PROG_CXX_SGICC,
+-[AC_CACHE_CHECK(whether we are using SGI MIPSpro C++, SGI_CXX,
++AC_DEFUN([AC_PROG_CXX_SGICC],
++[AC_CACHE_CHECK(whether we are using SGI MIPSpro C++, sgi_cv_cxx,
+ [cat > conftest.c <<EOF
+ # if defined(__sgi) && !defined(__GNUC__)
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- SGI_CXX=yes
++ sgi_cv_cxx=yes
+ compiler=sgicc
+ else
+- SGI_CXX=no
++ sgi_cv_cxx=no
+ fi])])
+
+
+-AC_DEFUN(AC_PROG_CXX_SUNCC,
+-[AC_CACHE_CHECK(whether we are using Sun C++, SUN_CXX,
++AC_DEFUN([AC_PROG_CXX_SUNCC],
++[AC_CACHE_CHECK(whether we are using Sun C++, sun_cv_cxx,
+ [cat > conftest.c <<EOF
+ # if defined(__SUNPRO_CC)
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- SUN_CXX=yes
++ sun_cv_cxx=yes
+ compiler=suncc
+ else
+- SUN_CXX=no
++ sun_cv_cxx=no
+ fi])])
+
+
+-AC_DEFUN(AC_PROG_CXX_INTELCC,
+-[AC_CACHE_CHECK(whether we are using Intel C++, INTEL_CXX,
++AC_DEFUN([AC_PROG_CXX_INTELCC],
++[AC_CACHE_CHECK(whether we are using Intel C++, intel_cv_cxx,
+ [cat > conftest.c <<EOF
+ # if defined(__ICL)
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- INTEL_CXX=yes
++ intel_cv_cxx=yes
+ compiler=intelcc
+ else
+- INTEL_CXX=no
++ intel_cv_cxx=no
+ fi])])
+
+-AC_DEFUN(AC_PROG_CXX_KAICC,
+-[AC_CACHE_CHECK(whether we are using KAI C++, KAI_CXX,
++AC_DEFUN([AC_PROG_CXX_KAICC],
++[AC_CACHE_CHECK(whether we are using KAI C++, kai_cv_cxx,
+ [cat > conftest.c <<EOF
+ # if defined(__KCC)
+ yes;
+ #endif
+ EOF
+ if AC_TRY_COMMAND(${CXX} -E conftest.c) | egrep yes >/dev/null 2>&1; then
+- KAI_CXX=yes
++ kai_cv_cxx=yes
+ compiler=kaicc
+ else
+- KAI_CXX=no
++ kai_cv_cxx=no
+ fi])])
+
+
+@@ -399,7 +388,7 @@ fi])])
+ # Don't know if it is a good idea to overwrite CXXFLAGS
+ #
+
+-AC_DEFUN(AC_BZ_SET_COMPILER,
++AC_DEFUN([AC_BZ_SET_COMPILER],
+ [cxxwith=`echo $1 | sed -e 's/ /@/'`
+ case "$cxxwith" in
+ *:*@*) # Full initialization syntax
+diff --git a/configure.in b/configure.in
+index edbae6e..81b6fc2 100644
+--- a/configure.in
++++ b/configure.in
+@@ -4,7 +4,7 @@ dnl Disable caching.
+ define([AC_CACHE_LOAD], )dnl
+ define([AC_CACHE_SAVE], )dnl
+
+-AC_INIT(itl/itl.h)
++AC_INIT([itl], [4.0.0-1], [], [], [])
+
+ AC_CANONICAL_SYSTEM
+ AC_MSG_RESULT([Configure Iterative Template Library for $target])
+@@ -15,9 +15,8 @@ AC_MSG_RESULT([Configure Iterative Template Library for $target])
+ sinclude([VERSION])
+ ################################################################
+
+-AM_INIT_AUTOMAKE(itl, $ITLVERSION-$ITLRELEASE, 'no')
+-
+-AM_CONFIG_HEADER(itl/itl_config.h)
++AM_INIT_AUTOMAKE()
++AC_CONFIG_HEADERS([itl/build_config.h itl/itl_config.h])
+
+ AC_PROG_INSTALL
+
+@@ -213,6 +212,10 @@ dnl Checks for header files.
+
+
+ AC_MSG_CHECKING(for std::abs)
++
++AH_TEMPLATE([ITL_HAVE_CMATH],[])
++AH_TEMPLATE([ITL_NO_STD_ABS],[])
++AH_TEMPLATE([ITL_NO_STD_SQRT],[])
+
+ AC_ITL_TRY_COMPILE([#include <cmath>],
+ [ double d = std::abs(-3.0); ],
+@@ -236,6 +239,8 @@ AC_ITL_TRY_COMPILE([#include <cmath>],
+
+ AC_MSG_CHECKING(for <limits> header)
+
++AH_TEMPLATE([ITL_NO_LIMITS],[])
++
+ AC_ITL_TRY_COMPILE([#include <limits>],
+ [ double d = std::numeric_limits<double>::max(); ],
+ [ has_limits=yes
+--
+1.8.2.1
+
diff --git a/sci-libs/itl/files/itl-4.0.0_p1-ILU-Cholesky-SSOR-Preconditioner-produce-wrong-decom.patch b/sci-libs/itl/files/itl-4.0.0_p1-ILU-Cholesky-SSOR-Preconditioner-produce-wrong-decom.patch
new file mode 100644
index 0000000..272355b
--- /dev/null
+++ b/sci-libs/itl/files/itl-4.0.0_p1-ILU-Cholesky-SSOR-Preconditioner-produce-wrong-decom.patch
@@ -0,0 +1,310 @@
+From 3306f5221f87c4b1b5da6d8f4f78c4d875b3ad81 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Sat, 7 Dec 2013 09:48:06 +0100
+Subject: [PATCH 1/5] ILU, Cholesky, SSOR Preconditioner produce wrong
+ decomposition for MTL index_from_one matrices
+
+---
+ itl/preconditioner/cholesky.h | 35 ++++++++++------
+ itl/preconditioner/ilu.h | 82 ++++++++++++++++++--------------------
+ itl/preconditioner/ssor.h | 92 ++++++++++++++-----------------------------
+ 3 files changed, 90 insertions(+), 119 deletions(-)
+
+diff --git a/itl/preconditioner/cholesky.h b/itl/preconditioner/cholesky.h
+index 7c57b12..86847b9 100644
+--- a/itl/preconditioner/cholesky.h
++++ b/itl/preconditioner/cholesky.h
+@@ -42,16 +42,23 @@
+ namespace itl {
+
+ /* VC++ work around for ambiguous function */
+- inline void check_symm(mtl::symmetric_tag) { }
+-
+- template < class Shape >
+- inline void check_symm(Shape)
+- {
+- std::cout << "Matrix is not symmetric. Abort." << std::endl;
+- assert(0);
++ inline void check_symm(mtl::symmetric_tag) { }
++
++ template < class Shape >
++ inline void check_symm(Shape)
++ {
++ std::cout << "Matrix is not symmetric. Abort." << std::endl;
++ assert(0);
++ }
++
++ template <class IterI, class IterO>
++ void index_copy(IterI first, IterI last, IterO out) {
++ while ( first != last ) {
++ *out = first.index();
++ ++first;
+ }
+-
+-
++ }
++
+ //: Incomplete Cholesky Preconditioner.
+ // For use with symmetric matrices.
+ //
+@@ -125,8 +132,9 @@ namespace itl {
+ int i=A_i.index();
+
+ std::copy(A_row.begin(), A_row.end(), Tri_val.begin()+Tri_loc);
+- std::copy(A_row.nz_struct().begin(), A_row.nz_struct().end(),
+- Tri_ind.begin()+Tri_loc);
++ //std::copy(A_row.nz_struct().begin(), A_row.nz_struct().end(),
++ //Tri_ind.begin()+Tri_loc);
++ index_copy(A_row.begin(), A_row.end(), Tri_ind.begin()+Tri_loc);
+
+ Tri_loc += A_row.nnz();
+ Tri_ptr[i+1] = Tri_loc;
+@@ -184,8 +192,9 @@ namespace itl {
+ int i=A_i.index();
+
+ std::copy(A_row.begin(), A_row.end(), Tri_val.begin()+Tri_loc);
+- std::copy(A_row.nz_struct().begin(), A_row.nz_struct().end(),
+- Tri_ind.begin()+Tri_loc);
++ //std::copy(A_row.nz_struct().begin(), A_row.nz_struct().end(),
++ // Tri_ind.begin()+Tri_loc);
++ index_copy(A_row.begin(), A_row.end(), Tri_ind.begin()+Tri_loc);
+
+ Tri_loc += A_row.nnz();
+ Tri_ptr[i+1] = Tri_loc;
+diff --git a/itl/preconditioner/ilu.h b/itl/preconditioner/ilu.h
+index 96f4a39..d568ccc 100644
+--- a/itl/preconditioner/ilu.h
++++ b/itl/preconditioner/ilu.h
+@@ -98,29 +98,27 @@ namespace itl {
+
+ typename Matrix::const_iterator A_i = A_.begin();
+ if (mtl::not_at(A_i,A_.end())) do {
+- typename Matrix::OneD A_row = *A_i;
+- sizeT i = A_i.index();
+- typename Matrix::OneD::IndexArray::const_iterator diag_location =
+- std::upper_bound(A_row.nz_struct().begin(),
+- A_row.nz_struct().end(), i);
+-
+- int d = diag_location - A_row.nz_struct().begin();
+-
+- std::copy(A_row.begin(), A_row.begin()+d, U_val.begin()+U_loc);
+- std::copy(A_row.nz_struct().begin(), A_row.nz_struct().begin()+d,
+- U_ind.begin()+U_loc);
+-
+- U_loc += d;
+- U_ptr[i+1] = U_loc;
+-
+- std::copy(A_row.begin()+d, A_row.end(), L_val.begin()+L_loc);
+- std::copy(A_row.nz_struct().begin()+d, A_row.nz_struct().end(),
+- L_ind.begin()+L_loc);
+-
+- L_loc += A_row.nnz() - d;
++ typename Matrix::size_type i = A_i.index();
++
++ typename Matrix::OneD::const_iterator A_ij = (*A_i).begin();
++ if (mtl::not_at(A_ij,(*A_i).end())) do {
++ typename Matrix::size_type j = A_ij.index();
++ if ( j > i ) { //row > column
++ L_val[L_loc] = *A_ij;
++ L_ind[L_loc] = j;
++ ++L_loc;
++ } else {
++ U_val[U_loc] = *A_ij;
++ U_ind[U_loc] = j;
++ ++U_loc;
++ }
++ ++A_ij;
++ } while (mtl::not_at(A_ij, (*A_i).end()));
++
++ U_ptr[i+1] = U_loc;
+ L_ptr[i+1] = L_loc;
+
+- ++A_i;
++ ++A_i;
+ } while (mtl::not_at(A_i,A_.end()));
+
+ L_val.resize(L_loc);
+@@ -171,33 +169,29 @@ namespace itl {
+ sizeT L_loc=0, U_loc=0;
+ L_ptr[0] = 0;
+ U_ptr[0] = 0;
+-
+ typename Matrix::const_iterator A_i = A_.begin();
+ if (mtl::not_at(A_i,A_.end())) do {
+- typename Matrix::OneD A_row = *A_i;
+- typedef typename Matrix::OneD::IndexArray::value_type IA_T;
+- IA_T i = A_i.index();
+- typename Matrix::OneD::IndexArray::const_iterator diag_location =
+- std::lower_bound(A_row.nz_struct().begin(),
+- A_row.nz_struct().end(), i);
+-
+- int d = diag_location - A_row.nz_struct().begin();
+-
+- std::copy(A_row.begin(), A_row.begin()+d, L_val.begin()+L_loc);
+- std::copy(A_row.nz_struct().begin(), A_row.nz_struct().begin()+d,
+- L_ind.begin()+L_loc);
+-
+- L_loc += d;
+- L_ptr[i+1] = L_loc;
+-
+- std::copy(A_row.begin()+d, A_row.end(), U_val.begin()+U_loc);
+- std::copy(A_row.nz_struct().begin()+d, A_row.nz_struct().end(),
+- U_ind.begin()+U_loc);
+-
+- U_loc += A_row.nnz() - d;
++ typename Matrix::size_type i = A_i.index();
++
++ typename Matrix::OneD::const_iterator A_ij = (*A_i).begin();
++ if (mtl::not_at(A_ij,(*A_i).end())) do {
++ typename Matrix::size_type j = A_ij.index();
++ if ( i > j ) { // row > column
++ L_val[L_loc] = *A_ij;
++ L_ind[L_loc] = j;
++ ++L_loc;
++ } else {
++ U_val[U_loc] = *A_ij;
++ U_ind[U_loc] = j;
++ ++U_loc;
++ }
++ ++A_ij;
++ } while (mtl::not_at(A_ij, (*A_i).end()));
++
+ U_ptr[i+1] = U_loc;
++ L_ptr[i+1] = L_loc;
+
+- ++A_i;
++ ++A_i;
+ } while (mtl::not_at(A_i,A_.end()));
+
+ L_val.resize(L_loc);
+diff --git a/itl/preconditioner/ssor.h b/itl/preconditioner/ssor.h
+index 8ad9d4e..497ae38 100644
+--- a/itl/preconditioner/ssor.h
++++ b/itl/preconditioner/ssor.h
+@@ -123,40 +123,6 @@ namespace itl {
+ int L_loc=0, U_loc=0;
+ L_ptr[0] = 0;
+ U_ptr[0] = 0;
+-#if 1
+- typename Matrix::const_iterator A_i = A.begin();
+- if (mtl::not_at(A_i,A.end())) do {
+- typename Matrix::OneD A_row = *A_i;
+- typedef typename Matrix::OneD::IndexArray::value_type IA_T;
+- IA_T i=A_i.index();
+- typename Matrix::OneD::IndexArray::const_iterator
+- diag_location =
+- upper_bound(A_row.nz_struct().begin(), A_row.nz_struct().end(), i);
+-
+- int d = diag_location - A_row.nz_struct().begin();
+-
+- std::copy(A_row.begin(), A_row.begin()+d, L_val.begin()+L_loc);
+- std::copy(A_row.nz_struct().begin(), A_row.nz_struct().begin()+d,
+- L_ind.begin()+L_loc);
+-
+- L_loc += d;
+- L_ptr[i+1] = L_loc;
+-
+- T A_ii = *(A_row.begin()+d-1);
+- A_ii = T(1)/A_ii;
+-
+- transform(A_row.begin()+d, A_row.end(), U_val.begin()+U_loc,
+- bind2nd(multiplies<T>(), A_ii));
+-
+- std::copy(A_row.nz_struct().begin()+d, A_row.nz_struct().end(),
+- U_ind.begin()+U_loc);
+-
+- U_loc += A_row.nnz() - d;
+- U_ptr[i+1] = U_loc;
+-
+- ++A_i;
+- } while (mtl::not_at(A_i,A.end()));
+-#else
+ //This is better way in term of general, however, It need to
+ // measure and compare the performance
+ typename Matrix::const_iterator A_i = A.begin();
+@@ -190,7 +156,7 @@ namespace itl {
+
+ ++A_i;
+ } while (mtl::not_at(A_i,A.end()));
+-#endif
++
+ L_val.resize(L_loc);
+ U_val.resize(U_loc);
+ L_ind.resize(L_loc);
+@@ -215,37 +181,34 @@ namespace itl {
+ int L_loc=0, U_loc=0;
+ L_ptr[0] = 0;
+ U_ptr[0] = 0;
+-
+ typename Matrix::const_iterator A_i = A.begin();
+ if (mtl::not_at(A_i,A.end())) do {
+- const typename Matrix::OneD& A_col = *A_i;
+-
+- int i=A_i.index();
+-
+- typedef typename Matrix::OneD::IndexArray::const_iterator index_iter;
+-
+- index_iter diag_location =
+- upper_bound(A_col.nz_struct().begin(), A_col.nz_struct().end(), i);
+-
+- int d = diag_location - A_col.nz_struct().begin();
+-
+- std::copy(A_col.begin(), A_col.begin()+d, U_val.begin()+U_loc);
+- std::copy(A_col.nz_struct().begin(), A_col.nz_struct().begin()+d,
+- U_ind.begin()+U_loc);
+-
+- U_loc += d;
+- U_ptr[i+1] = U_loc;
+- T A_ii = *(A_col.begin()+d-1);
+- A_ii = 1./A_ii;
+-
+- transform(A_col.begin()+d, A_col.end(), L_val.begin()+L_loc,
+- bind2nd(multiplies<T>(), A_ii));
++ typename Matrix::size_type i = A_i.index();
+
+- std::copy(A_col.nz_struct().begin()+d, A_col.nz_struct().end(),
+- L_ind.begin()+L_loc);
++ T A_ii;
++
++ typename Matrix::OneD::const_iterator A_ij = (*A_i).begin();
++ if (mtl::not_at(A_ij,(*A_i).end())) do {
++ typename Matrix::size_type j = A_ij.index();
++ if ( j > i ) {
++ L_val[L_loc] = *A_ij;
++ L_ind[L_loc] = j;
++ ++L_loc;
++ } else {
++ U_val[U_loc] = *A_ij;
++ U_ind[U_loc] = j;
++ ++U_loc;
++ if ( i == j ) A_ii = T(1) / *A_ij;
++ }
++ ++A_ij;
++ } while (mtl::not_at(A_ij, (*A_i).end()));
++
++ U_ptr[i+1] = U_loc;
++ L_ptr[i+1] = L_loc;
+
+- L_loc += A_col.nnz() - d;
+- L_ptr[i+1] = L_loc;
++ //scale lower parts
++ transform(L_val.begin()+L_ptr[i], L_val.begin()+L_loc,
++ L_val.begin()+L_ptr[i], bind2nd(multiplies<T>(), A_ii));
+
+ ++A_i;
+ } while (mtl::not_at(A_i,A.end()));
+@@ -273,6 +236,11 @@ namespace itl {
+ //: return the Right part of a Split Preconditioner
+ Right right() { return Right(L, U); }
+
++
++ void print() {
++ print_all_matrix(L);
++ print_all_matrix(U);
++ }
+ private:
+
+ LUMatrix L, U;
+--
+1.8.2.1
+
diff --git a/sci-libs/itl/files/itl-4.0.0_p1-Some-changes-for-stricter-compilers-like-gcc-4.0.patch b/sci-libs/itl/files/itl-4.0.0_p1-Some-changes-for-stricter-compilers-like-gcc-4.0.patch
new file mode 100644
index 0000000..1d59d8d
--- /dev/null
+++ b/sci-libs/itl/files/itl-4.0.0_p1-Some-changes-for-stricter-compilers-like-gcc-4.0.patch
@@ -0,0 +1,98 @@
+From 0819fe617778942d4b0503cf90613058a2662cd7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Sat, 7 Dec 2013 09:48:45 +0100
+Subject: [PATCH 2/5] Some changes for stricter compilers like gcc 4.0
+
+---
+ itl/itl.h | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/itl/itl.h b/itl/itl.h
+index db5d632..1735005 100644
+--- a/itl/itl.h
++++ b/itl/itl.h
+@@ -161,10 +161,12 @@ namespace itl {
+ }
+
+ inline bool converged(const Real& r) {
++ if (normb_ == 0)
++ return r < atol_; // ignore relative tolerance if |b| is zero
+ resid_ = r / normb_;
+- return (resid_ <= rtol_ || r < atol_); //relative or absolute tolerance.
++ return (resid_ <= rtol_ || r < atol_); // relative or absolute tolerance.
+ }
+-
++
+ inline void operator++() { ++i; }
+
+ inline bool first() { return i == 0; }
+@@ -218,13 +220,14 @@ namespace itl {
+ bool ret;
+ if (converged(normr_))
+ ret = true;
+- else if (i < max_iter)
++ else if (this->i < this->max_iter)
+ ret = false;
+ else {
+ error = 1;
+ ret = true;
+ }
+- cout << "iteration " << i << ": resid " << resid()
++ cout << "iteration " << this->i << ": resid "
++ << this->resid()
+ << endl;
+ return ret;
+ }
+@@ -237,13 +240,14 @@ namespace itl {
+ bool ret;
+ if (converged(r))
+ ret = true;
+- else if (i < max_iter)
++ else if (this->i < this->max_iter)
+ ret = false;
+ else {
+ error = 1;
+ ret = true;
+ }
+- cout << "iteration " << i << ": resid " << resid()
++ cout << "iteration " << this->i << ": resid "
++ << this->resid()
+ << endl;
+ return ret;
+ }
+@@ -256,13 +260,14 @@ namespace itl {
+ bool ret;
+ if (converged(std::abs(r)))
+ ret = true;
+- else if (i < max_iter)
++ else if (this->ii < this->imax_iter)
+ ret = false;
+ else {
+ error = 1;
+ ret = true;
+ }
+- cout << "iteration " << i << ": resid " << resid() << endl;
++ cout << "iteration " << this->i << ": resid "
++ << this->resid() << endl;
+ return ret;
+ }
+
+@@ -271,11 +276,11 @@ namespace itl {
+ using std::endl;
+
+ cout << "finished! error code = " << error << endl;
+- cout << iterations() << " iterations" << endl;
+- cout << resid() << " is actual final residual. " << endl
+- << resid()/normb() << " is actual relative tolerance achieved. "
++ cout << this->iterations() << " iterations" << endl;
++ cout << this->resid() << " is actual final residual. " << endl
++ << this->resid()/this->normb() << " is actual relative tolerance achieved. "
+ << endl;
+- cout << "Relative tol: " << rtol_ << " Absolute tol: " << atol_ << endl;
++ cout << "Relative tol: " << this->rtol_ << " Absolute tol: " << this->atol_ << endl;
+ return error;
+ }
+
+--
+1.8.2.1
+
diff --git a/sci-libs/itl/files/itl-4.0.0_p1-linalg_traits-of-std-vector.patch b/sci-libs/itl/files/itl-4.0.0_p1-linalg_traits-of-std-vector.patch
new file mode 100644
index 0000000..1e3a94b
--- /dev/null
+++ b/sci-libs/itl/files/itl-4.0.0_p1-linalg_traits-of-std-vector.patch
@@ -0,0 +1,60 @@
+From 9f9680d69d4892610655aa4bf74de1fedde0906c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Sat, 7 Dec 2013 10:06:40 +0100
+Subject: [PATCH 3/5] linalg_traits of std::vector
+
+---
+ itl/interface/detail/mtl_amend.h | 22 ++++++++++++++++++++++
+ itl/interface/detail/mtl_classical_gram_schmidt.h | 1 +
+ 2 files changed, 23 insertions(+)
+
+diff --git a/itl/interface/detail/mtl_amend.h b/itl/interface/detail/mtl_amend.h
+index e8695d1..fb5305f 100644
+--- a/itl/interface/detail/mtl_amend.h
++++ b/itl/interface/detail/mtl_amend.h
+@@ -1,3 +1,13 @@
++
++#ifndef ITL_MTL_AMEND_H
++#define ITL_MTL_AMEND_H
++
++#include <vector>
++
++template <class T>
++class pointer_vector;
++
++
+ namespace mtl {
+
+ template <class T>
+@@ -9,4 +19,16 @@ namespace mtl {
+ magnitude_type;
+ };
+
++ template <class T>
++ struct linalg_traits<std::vector<T> > {
++ typedef oned_tag dimension;
++ typedef dense_tag sparsity;
++ typedef T value_type;
++ typedef typename number_traits<value_type>::magnitude_type
++ magnitude_type;
++ };
++
++
+ }
++
++#endif // ITL_MTL_AMEND_H
+diff --git a/itl/interface/detail/mtl_classical_gram_schmidt.h b/itl/interface/detail/mtl_classical_gram_schmidt.h
+index 0de9103..a16e223 100644
+--- a/itl/interface/detail/mtl_classical_gram_schmidt.h
++++ b/itl/interface/detail/mtl_classical_gram_schmidt.h
+@@ -69,6 +69,7 @@
+ #include <itl/itl.h>
+ #include <itl/itl_tags.h>
+ #include <mtl/matrix.h>
++#include <itl/interface/detail/mtl_amend.h> //for linalg_traits of std::vector
+
+ namespace itl {
+ //in parallel envirnment, this is an all-reduce operation
+--
+1.8.2.1
+
diff --git a/sci-libs/itl/files/itl-4.0.0_p1-more-modern-c-fixes.patch b/sci-libs/itl/files/itl-4.0.0_p1-more-modern-c-fixes.patch
new file mode 100644
index 0000000..c92d134
--- /dev/null
+++ b/sci-libs/itl/files/itl-4.0.0_p1-more-modern-c-fixes.patch
@@ -0,0 +1,328 @@
+From f1e54481837326250c12aea5590296ad293fc82d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Sat, 7 Dec 2013 10:07:05 +0100
+Subject: [PATCH 4/5] more modern c++ fixes
+
+---
+ itl/itl.h | 34 +++++++++++++++---------------
+ itl/preconditioner/approximate_inverse.h | 16 +++++++-------
+ itl/preconditioner/ilut.h | 36 ++++++++++++++++----------------
+ itl/preconditioner/modified_cholesky.h | 2 +-
+ 4 files changed, 44 insertions(+), 44 deletions(-)
+
+diff --git a/itl/itl.h b/itl/itl.h
+index 1735005..719f8d7 100644
+--- a/itl/itl.h
++++ b/itl/itl.h
+@@ -126,36 +126,36 @@ namespace itl {
+ template <class Vector>
+ bool finished(const Vector& r) {
+ Real normr_ = std::abs(itl::two_norm(r));
+- if (converged(normr_))
++ if (this->converged(normr_))
+ return true;
+ else if (i < max_iter)
+ return false;
+ else {
+- error = 1;
++ this->error = 1;
+ return true;
+ }
+ }
+
+
+ bool finished(const Real& r) {
+- if (converged(r))
++ if (this->converged(r))
+ return true;
+ else if (i < max_iter)
+ return false;
+ else {
+- error = 1;
++ this->error = 1;
+ return true;
+ }
+ }
+
+ template <typename T>
+ bool finished(const std::complex<T>& r) {
+- if (converged(std::abs(r)))
++ if (this->converged(std::abs(r)))
+ return true;
+ else if (i < max_iter)
+ return false;
+ else {
+- error = 1;
++ this->error = 1;
+ return true;
+ }
+ }
+@@ -171,7 +171,7 @@ namespace itl {
+
+ inline bool first() { return i == 0; }
+
+- inline int error_code() { return error; }
++ inline int error_code() { return this->error; }
+
+ inline int iterations() { return i; }
+
+@@ -182,10 +182,10 @@ namespace itl {
+ inline Real tol() { return rtol_; }
+ inline Real atol() { return atol_; }
+
+- inline void fail(int err_code) { error = err_code; }
++ inline void fail(int err_code) { this->error = err_code; }
+
+ inline void fail(int err_code, const std::string& msg)
+- { error = err_code; err_msg = msg; }
++ { this->error = err_code; err_msg = msg; }
+
+ inline void set(Real v) { normb_ = v; }
+
+@@ -218,12 +218,12 @@ namespace itl {
+
+ Real normr_ = std::abs(itl::two_norm(r));
+ bool ret;
+- if (converged(normr_))
++ if (this->converged(normr_))
+ ret = true;
+ else if (this->i < this->max_iter)
+ ret = false;
+ else {
+- error = 1;
++ this->error = 1;
+ ret = true;
+ }
+ cout << "iteration " << this->i << ": resid "
+@@ -238,12 +238,12 @@ namespace itl {
+ using std::endl;
+
+ bool ret;
+- if (converged(r))
++ if (this->converged(r))
+ ret = true;
+ else if (this->i < this->max_iter)
+ ret = false;
+ else {
+- error = 1;
++ this->error = 1;
+ ret = true;
+ }
+ cout << "iteration " << this->i << ": resid "
+@@ -258,12 +258,12 @@ namespace itl {
+ using std::endl;
+
+ bool ret;
+- if (converged(std::abs(r)))
++ if (this->converged(std::abs(r)))
+ ret = true;
+ else if (this->ii < this->imax_iter)
+ ret = false;
+ else {
+- error = 1;
++ this->error = 1;
+ ret = true;
+ }
+ cout << "iteration " << this->i << ": resid "
+@@ -275,13 +275,13 @@ namespace itl {
+ using std::cout;
+ using std::endl;
+
+- cout << "finished! error code = " << error << endl;
++ cout << "finished! error code = " << this->error << endl;
+ cout << this->iterations() << " iterations" << endl;
+ cout << this->resid() << " is actual final residual. " << endl
+ << this->resid()/this->normb() << " is actual relative tolerance achieved. "
+ << endl;
+ cout << "Relative tol: " << this->rtol_ << " Absolute tol: " << this->atol_ << endl;
+- return error;
++ return this->error;
+ }
+
+ };
+diff --git a/itl/preconditioner/approximate_inverse.h b/itl/preconditioner/approximate_inverse.h
+index dbb29c2..92c1453 100644
+--- a/itl/preconditioner/approximate_inverse.h
++++ b/itl/preconditioner/approximate_inverse.h
+@@ -17,14 +17,6 @@ namespace itl {
+
+ */
+ template <class Matrix, class SparseVectorX, class SparseVectorY>
+- inline void sparse_mult(const Matrix& A, const SparseVectorX& x,
+- const SparseVectorY& yy) {
+- SparseVectorY& y = const_cast<SparseVectorY&>(yy);
+- typedef typename mtl::matrix_traits<Matrix>::orientation Orien;
+- sparse_mult_matrix_orien(A, x, y, Orien());
+- }
+-
+- template <class Matrix, class SparseVectorX, class SparseVectorY>
+ inline void sparse_mult_matrix_orien(const Matrix& A, const SparseVectorX& x,
+ SparseVectorY& y, mtl::row_tag) {
+ assert(false);
+@@ -47,6 +39,14 @@ namespace itl {
+ }
+
+
++ template <class Matrix, class SparseVectorX, class SparseVectorY>
++ inline void sparse_mult(const Matrix& A, const SparseVectorX& x,
++ const SparseVectorY& yy) {
++ SparseVectorY& y = const_cast<SparseVectorY&>(yy);
++ typedef typename mtl::matrix_traits<Matrix>::orientation Orien;
++ sparse_mult_matrix_orien(A, x, y, Orien());
++ }
++
+ template <class Matrix>
+ struct AI_precond {
+ AI_precond(const Matrix& _M) : M(_M) {}
+diff --git a/itl/preconditioner/ilut.h b/itl/preconditioner/ilut.h
+index bd27927..254ad7e 100644
+--- a/itl/preconditioner/ilut.h
++++ b/itl/preconditioner/ilut.h
+@@ -182,8 +182,8 @@ namespace itl {
+
+ norm_row = 1./norm_row;
+
+- entry_vec::iterator wk= w->begin();
+- entry_vec::iterator wkend = w->end();
++ typename entry_vec::iterator wk= w->begin();
++ typename entry_vec::iterator wkend = w->end();
+ entry_vec tmp_w;
+ int krow = 0;
+ while( wk != wkend ) {
+@@ -212,8 +212,8 @@ namespace itl {
+ } while (mtl::not_at(U_kj, U_kend));
+
+ wswap->resize(w->size() + tmp_w.size());
+- entry_vec::iterator wj = w->begin();
+- entry_vec::iterator tmp_wj = tmp_w.begin();
++ typename entry_vec::iterator wj = w->begin();
++ typename entry_vec::iterator tmp_wj = tmp_w.begin();
+ int j = 0;
+ while ( 1 ) {
+ if ( wj == w->end() ) {
+@@ -262,7 +262,7 @@ namespace itl {
+ }
+
+ if (i) {
+- entry_vec::iterator wi = w->begin();
++ typename entry_vec::iterator wi = w->begin();
+ int jj = 0;
+ while( wi != w->end() ) {
+ if ( (*wi).index != i)
+@@ -275,14 +275,14 @@ namespace itl {
+ wi = w->begin() + jj;
+ }
+
+- entry_vec::iterator diag =
++ typename entry_vec::iterator diag =
+ std::find(w->begin(), w->end(), mtl::entry1<T>(i));
+ int m = diag-w->begin();
+ std::make_heap(w->begin(), diag, entry1_value_less());
+ int jmax = MTL_MIN(nL+K, m);
+ if (jmax != m) dropped += m-jmax;
+ for ( int j=m; j>m-jmax; j-- ) {
+- entry_vec::iterator first = w->begin();
++ typename entry_vec::iterator first = w->begin();
+
+ L(i, (*first).index) = (*first).value;
+
+@@ -298,7 +298,7 @@ namespace itl {
+ std::make_heap(diag+1, w->end(), entry1_value_less());
+
+ for ( int j=m; j>m-jmax; j-- ) {
+- entry_vec::iterator first = diag+1;
++ typename entry_vec::iterator first = diag+1;
+
+ U(i, (*first).index) = (*first).value;
+
+@@ -306,7 +306,7 @@ namespace itl {
+ }
+ }
+ } else {
+- for (entry_vec::iterator wj= w->begin();
++ for (typename entry_vec::iterator wj= w->begin();
+ wj != w->end(); ++wj)
+ U(i, (*wj).index) = (*wj).value;
+ }
+@@ -368,8 +368,8 @@ namespace itl {
+
+ norm_row = 1./norm_row;
+
+- entry_vec::iterator wk= w->begin();
+- entry_vec::iterator wkend = w->end();
++ typename entry_vec::iterator wk= w->begin();
++ typename entry_vec::iterator wkend = w->end();
+ entry_vec tmp_w;
+ int krow = 0;
+ while( wk != wkend ) {
+@@ -398,8 +398,8 @@ namespace itl {
+ } while (mtl::not_at(U_kj, U_kend));
+
+ wswap->resize(w->size() + tmp_w.size());
+- entry_vec::iterator wj = w->begin();
+- entry_vec::iterator tmp_wj = tmp_w.begin();
++ typename entry_vec::iterator wj = w->begin();
++ typename entry_vec::iterator tmp_wj = tmp_w.begin();
+ int j = 0;
+ while ( 1 ) {
+ if ( wj == w->end() ) {
+@@ -448,7 +448,7 @@ namespace itl {
+ }
+
+ if (i) {
+- entry_vec::iterator wi = w->begin();
++ typename entry_vec::iterator wi = w->begin();
+ int jj = 0;
+ while (wi != w->end()) {
+ if ( (*wi).index != i)
+@@ -461,14 +461,14 @@ namespace itl {
+ wi = w->begin() + jj;
+ }
+
+- entry_vec::iterator diag =
++ typename entry_vec::iterator diag =
+ std::find(w->begin(), w->end(), mtl::entry1<T>(i));
+ int m = diag - w->begin();
+ std::make_heap(w->begin(), diag, entry1_value_less());
+ int jmax = MTL_MIN(nL+K, m);
+ if (jmax != m) dropped += m-jmax;
+ for (int j = m; j > m - jmax; j-- ) {
+- entry_vec::iterator first = w->begin();
++ typename entry_vec::iterator first = w->begin();
+
+ LA(i, (*first).index) = (*first).value;
+
+@@ -484,7 +484,7 @@ namespace itl {
+ std::make_heap(diag+1, w->end(), entry1_value_less());
+
+ for ( int j=m; j>m-jmax; j-- ) {
+- entry_vec::iterator first = diag+1;
++ typename entry_vec::iterator first = diag+1;
+
+ UA(i, (*first).index) = (*first).value;
+
+@@ -492,7 +492,7 @@ namespace itl {
+ }
+ }
+ } else {
+- for (entry_vec::iterator wj= w->begin();
++ for (typename entry_vec::iterator wj= w->begin();
+ wj != w->end(); ++wj)
+ UA(i, (*wj).index) = (*wj).value;
+ }
+diff --git a/itl/preconditioner/modified_cholesky.h b/itl/preconditioner/modified_cholesky.h
+index a67c737..5ee4756 100644
+--- a/itl/preconditioner/modified_cholesky.h
++++ b/itl/preconditioner/modified_cholesky.h
+@@ -47,7 +47,7 @@ namespace itl {
+ template < class Shape >
+ inline void check_symm(Shape)
+ {
+- cout << "Matrix is not symmetric. Abort." << endl;
++ std::cout << "Matrix is not symmetric. Abort." << std::endl;
+ assert(0);
+ }
+
+--
+1.8.2.1
+
diff --git a/sci-libs/itl/itl-4.0.0_p1.ebuild b/sci-libs/itl/itl-4.0.0_p1.ebuild
new file mode 100644
index 0000000..d39b432
--- /dev/null
+++ b/sci-libs/itl/itl-4.0.0_p1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+MY_P="${P/_p/-}"
+
+inherit autotools eutils
+
+DESCRIPTION="Generic component library that provides iterative methods for solving linear systems."
+HOMEPAGE="http://osl.iu.edu/research/itl/"
+SRC_URI="http://www.osl.iu.edu/download/research/${PN}/${MY_P}.tar.gz"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sci-libs/mtl"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # cleanup sources
+ find -iname CVS -print0 | xargs -0 rm -rf
+ find -iname "*~" -print0 | xargs -0 rm -rf
+ find -iname "#*#" -print0 | xargs -0 rm -rf
+
+ # The first 3 patches are from
+ # http://www.osl.iu.edu/research/itl/bug_fixes.php3, although from the
+ # linalg_traits patch was only a part taken since the other part has merge
+ # conflicts and introduces BLAS in MTL functions which breaks horribly.
+ epatch \
+ "${FILESDIR}/${P}-ILU-Cholesky-SSOR-Preconditioner-produce-wrong-decom.patch" \
+ "${FILESDIR}/${P}-Some-changes-for-stricter-compilers-like-gcc-4.0.patch" \
+ "${FILESDIR}/${P}-linalg_traits-of-std-vector.patch" \
+ "${FILESDIR}/${P}-more-modern-c-fixes.patch" \
+ "${FILESDIR}/${P}-Autoconf-automake-fixes.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-mtl="${EPREFIX}/usr/include"
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ insinto /usr/include/itl
+ doins -r itl/*.h itl/{krylov,interface,preconditioner}
+ dodoc README
+}
+
+src_test() {
+ # compile-tests only for now
+ emake -C test
+}
diff --git a/sci-libs/mtl/Manifest b/sci-libs/mtl/Manifest
new file mode 100644
index 0000000..0627c1f
--- /dev/null
+++ b/sci-libs/mtl/Manifest
@@ -0,0 +1,5 @@
+AUX mtl-2.1.2_p23-add-missing-typedef.patch 684 SHA256 bad51998e93da78c64a4fdcf4613ca4b38b70d305ebc9d05799e00dc370dd20d SHA512 76d75478bdf28a20e90e5577a1364902d80ea874815d63bb2073b7b2c5f105d546ff04bac015dbeb86f29f8b51b5bcc9bab431f346f97473cb337f4ccb4a6a6b WHIRLPOOL b4aa51df1aed581edec7a2b98545dff75f40064b2f3ab1e47de37bddd7df2f8181977b1cbff5d4be1630b86707ddcec833145eb0078924cbfbba030cbea7a9d8
+AUX mtl-2.1.2_p23-fix-includes-et-al.patch 1378 SHA256 6a80ffbc566366ffb8f233bf56b89359104a1269927098ca9b502dd1b7916837 SHA512 1ba4712aba58904230566b0e2d7f96b045bd8f20b1c125f032da2d1d585177dff3f356a7e8afc803b5878257418b709e39407d824a25dfdc530983b6b67e4601 WHIRLPOOL 95ac731e7ebcb326fe3258869c76e42e22e1c671d2d0bdc3754e97b18735829a09343543155a1a0619021d5e0f847cc883d3041b366332531b0275834d0a4ec5
+AUX mtl-2.1.2_p23-fix-tests.patch 2417 SHA256 21417a193fbcf83b5e8b3e3e7565279c49b8874749fb623ede1366bab5e2dc96 SHA512 5b53a26138fc8887ca77ce157752eb440e1698faf3a48d0b96c0ca6255b0d2f9f0c1031bbfb13149da839d2cd5455efe9aef50616675437c2a0a8920a6fa36e4 WHIRLPOOL cfb334a29e07143bf7247e0c206d8d1da49e0c22b047460af14a5f20d1dae98070d2c21496823d4cde00b971772dae0cc6f6a1aef84db5db64e399a0d6705b10
+DIST mtl-2.1.2-23.tentative.tar.gz 330538 SHA256 351bb9692639df74d8258bc973e98460203a7db1c9c49387558c51838b498193 SHA512 242fedb36f511f0919e869eb6cc742fc95cc6514b5a63c50d66125171a6a0932a1dd706f2a54f4a17dd5749be957644c83c19d32174637dc38d5e48485b9d243 WHIRLPOOL b393839e673bf1962400882bda9a735c5b6868eff3610359ecfb3d9e8e1e3b34eb82b9536cf904a6c32c9aa7ab10ee9ea5d2ec29996b7b4903c972be8e4cb54e
+EBUILD mtl-2.1.2_p23.ebuild 1051 SHA256 b2dcb2cefa0b738869aef802e92fbbe736409532f94ff4a355e5868eaef2a0d0 SHA512 6994a8cbc174bdc475a5db90cc1f65274fabf8c5a0a29015c6b44a5d7d66941bd2952d5bb20f8d7697c297361290572a0666153c9ff3cd172fc08a7c71d6cbc1 WHIRLPOOL f348f11a6f9c794bd28e0b3d4eef9b58c9d99b2e90cf2a2297c5e2de42f48744ebfd9ea09d5fe6915953b6f44bf6f4f1182f51feb16231711f4cc77acb7204e6
diff --git a/sci-libs/mtl/files/mtl-2.1.2_p23-add-missing-typedef.patch b/sci-libs/mtl/files/mtl-2.1.2_p23-add-missing-typedef.patch
new file mode 100644
index 0000000..e85c624
--- /dev/null
+++ b/sci-libs/mtl/files/mtl-2.1.2_p23-add-missing-typedef.patch
@@ -0,0 +1,24 @@
+From 642a59a0301b5926137537e8f888f4e75aa1b2bd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Fri, 6 Dec 2013 09:08:40 +0100
+Subject: [PATCH 3/3] Add missing typedef
+
+---
+ mtl/linalg_vec.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mtl/linalg_vec.h b/mtl/linalg_vec.h
+index 42020eb..0bbd1d4 100644
+--- a/mtl/linalg_vec.h
++++ b/mtl/linalg_vec.h
+@@ -113,6 +113,7 @@ public:
+ typedef linalg_vec<RepType, RepPtr, NN> Vec;
+
+ typedef size_type Vec_size_type;
++ typedef rep_type Vec_value_type;
+ typedef difference_type Vec_difference_type;
+ typedef iterator Vec_iterator;
+ typedef const_iterator Vec_const_iterator;
+--
+1.8.2.1
+
diff --git a/sci-libs/mtl/files/mtl-2.1.2_p23-fix-includes-et-al.patch b/sci-libs/mtl/files/mtl-2.1.2_p23-fix-includes-et-al.patch
new file mode 100644
index 0000000..278579c
--- /dev/null
+++ b/sci-libs/mtl/files/mtl-2.1.2_p23-fix-includes-et-al.patch
@@ -0,0 +1,54 @@
+From da191bc79c9205fbf97e6eac67f9b2b188f54d30 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Thu, 5 Dec 2013 08:23:57 +0100
+Subject: [PATCH 1/3] Fix includes et al
+
+---
+ mtl/envelope2D.h | 2 +-
+ mtl/external_vector.h | 2 ++
+ mtl/light1D.h | 3 ++-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/mtl/envelope2D.h b/mtl/envelope2D.h
+index e66d07a..4377895 100644
+--- a/mtl/envelope2D.h
++++ b/mtl/envelope2D.h
+@@ -64,7 +64,7 @@ public:
+ typedef dense1D<size_type> ptr_t;
+
+ //: A pair type for the dimensions of the container
+- typedef dimension<size_type> dim_type;
++ typedef mtl::dimension<size_type> dim_type;
+ enum { M = 0, N = 0 };
+ //: This container uses internal storage
+ typedef internal_tag storage_loc;
+diff --git a/mtl/external_vector.h b/mtl/external_vector.h
+index 4b8380b..e7ec3bd 100644
+--- a/mtl/external_vector.h
++++ b/mtl/external_vector.h
+@@ -4,6 +4,8 @@
+ #include "mtl/mtl_iterator.h"
+ #include "mtl/mtl_exception.h"
+
++#include <cstddef>
++
+ namespace mtl {
+
+
+diff --git a/mtl/light1D.h b/mtl/light1D.h
+index 9a9f5f5..462e6ef 100644
+--- a/mtl/light1D.h
++++ b/mtl/light1D.h
+@@ -19,7 +19,8 @@
+ #include "mtl/reverse_iter.h"
+ #include "mtl/matrix_traits.h"
+ #include "mtl/scaled1D.h"
+-#include <stdlib.h>
++#include <cstdlib>
++#include <cstddef>
+
+ namespace mtl {
+
+--
+1.8.2.1
+
diff --git a/sci-libs/mtl/files/mtl-2.1.2_p23-fix-tests.patch b/sci-libs/mtl/files/mtl-2.1.2_p23-fix-tests.patch
new file mode 100644
index 0000000..49bb14b
--- /dev/null
+++ b/sci-libs/mtl/files/mtl-2.1.2_p23-fix-tests.patch
@@ -0,0 +1,89 @@
+From c7b2ddf866920a738c76de225754d3edd3e35e21 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
+Date: Fri, 6 Dec 2013 09:06:23 +0100
+Subject: [PATCH 2/3] Fix tests
+
+---
+ test/src/algo_test.h | 44 ++++++++++++++++++++++----------------------
+ test/src/matrix_test.h | 3 +++
+ 2 files changed, 25 insertions(+), 22 deletions(-)
+
+diff --git a/test/src/algo_test.h b/test/src/algo_test.h
+index 8e67d7f..eeccd13 100644
+--- a/test/src/algo_test.h
++++ b/test/src/algo_test.h
+@@ -8,6 +8,28 @@
+ using mtl::dense1D;
+
+ template <class Matrix>
++void
++set_diagonal_test(std::string test_name, Matrix& A, bool& success)
++{
++ if (A.is_unit()) {
++ std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
++ return;
++ }
++ typedef typename mtl::matrix_traits<Matrix>::value_type T;
++ typedef typename mtl::matrix_traits<Matrix>::size_type Int;
++ // set_diagnal
++ Int i;
++ mtl::set_diagonal(A, T(1));
++
++ for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
++ if (A(i,i) != T(1)) {
++ std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
++ success = false;
++ break;
++ }
++}
++
++template <class Matrix>
+ bool
+ mat_algo_test(Matrix& A, std::string test_name)
+ {
+@@ -110,28 +132,6 @@ mat_algo_test(Matrix& A, std::string test_name)
+ return success;
+ }
+
+-template <class Matrix>
+-void
+-set_diagonal_test(std::string test_name, Matrix& A, bool& success)
+-{
+- if (A.is_unit()) {
+- std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
+- return;
+- }
+- typedef typename mtl::matrix_traits<Matrix>::value_type T;
+- typedef typename mtl::matrix_traits<Matrix>::size_type Int;
+- // set_diagnal
+- Int i;
+- mtl::set_diagonal(A, T(1));
+-
+- for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
+- if (A(i,i) != T(1)) {
+- std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
+- success = false;
+- break;
+- }
+-}
+-
+ template <class Mat>
+ inline void
+ fill_matrix(Mat& A, int /*sub*/, int /*super*/, mtl::rectangle_tag)
+diff --git a/test/src/matrix_test.h b/test/src/matrix_test.h
+index c5f084a..e210956 100644
+--- a/test/src/matrix_test.h
++++ b/test/src/matrix_test.h
+@@ -52,6 +52,9 @@ using mtl::not_strideable;
+
+ #include "fill_matrix.h"
+
++template <class Matrix>
++void
++do_test(Matrix& A, std::string test_name);
+
+ template <class Matrix>
+ void
+--
+1.8.2.1
+
diff --git a/sci-libs/mtl/mtl-2.1.2_p23.ebuild b/sci-libs/mtl/mtl-2.1.2_p23.ebuild
new file mode 100644
index 0000000..65f8f55
--- /dev/null
+++ b/sci-libs/mtl/mtl-2.1.2_p23.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+MY_P="${P/_p/-}"
+
+inherit eutils
+
+DESCRIPTION="The Matrix Template Library 2 (MTL2) is a high-performance generic component library that provides comprehensive linear algebra functionality for a wide variety of matrix formats."
+HOMEPAGE="http://osl.iu.edu/research/mtl/mtl2.php3"
+SRC_URI="http://www.osl.iu.edu/download/research/${PN}/${MY_P}.tentative.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="2"
+KEYWORDS="~amd64"
+IUSE="exceptions"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-fix-includes-et-al.patch" \
+ "${FILESDIR}/${P}-fix-tests.patch" \
+ "${FILESDIR}/${P}-add-missing-typedef.patch"
+}
+
+src_configure() {
+ local myconf
+ use exceptions && myconf+=" --enable-exceptions"
+ econf ${myconf}
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ insinto /usr/include/mtl
+ doins mtl/*.h
+ dodoc README
+}
+
+src_test() {
+ # currently compile-test only since tests take 12h to complete
+ emake
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-12 8:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 8:34 [gentoo-commits] dev/dev-zero:master commit in: sci-libs/itl/, sci-libs/ietl/, sci-libs/mtl/files/, sci-libs/mtl/, Tiziano Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox