summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Niels Ole Salscheider <olesalscheider@exherbo.org> 2016-11-12 09:51:24 +0100
committerAvatar Niels Ole Salscheider <olesalscheider@exherbo.org> 2016-11-12 12:36:05 +0100
commit79a57bd12295b56a169cd128845d5e6e0dcf2e0e (patch)
treee8b5f41c0cf567cd8895022acf0e09b591511e60
parentf60efc2f62c95f3a98be0da6eedee76443d0b196 (diff)
downloadscientific-79a57bd12295b56a169cd128845d5e6e0dcf2e0e.tar.gz
scientific-79a57bd12295b56a169cd128845d5e6e0dcf2e0e.tar.xz
eigen: Bump to 3.3.0
-rw-r--r--packages/sci-libs/eigen/eigen-3.3.0.exheres-0 (renamed from packages/sci-libs/eigen/eigen-3.2.7.exheres-0)2
-rw-r--r--packages/sci-libs/eigen/eigen.exlib18
-rw-r--r--packages/sci-libs/eigen/files/eigen-3.3.0-compile-fix.patch31
3 files changed, 38 insertions, 13 deletions
diff --git a/packages/sci-libs/eigen/eigen-3.2.7.exheres-0 b/packages/sci-libs/eigen/eigen-3.3.0.exheres-0
index 68353ce..c19436e 100644
--- a/packages/sci-libs/eigen/eigen-3.2.7.exheres-0
+++ b/packages/sci-libs/eigen/eigen-3.3.0.exheres-0
@@ -7,6 +7,6 @@ SLOT="3"
PLATFORMS="~amd64 ~x86"
-# Tests issue random behaviour (last tested with eigen-3.2.5).
+# Some tests fail with 3.3.0 because they define EIGEN_RUNTIME_NO_MALLOC but allocate memory
RESTRICT="test"
diff --git a/packages/sci-libs/eigen/eigen.exlib b/packages/sci-libs/eigen/eigen.exlib
index 46e9df3..d8cc363 100644
--- a/packages/sci-libs/eigen/eigen.exlib
+++ b/packages/sci-libs/eigen/eigen.exlib
@@ -3,7 +3,7 @@
require cmake [ api=2 ]
-export_exlib_phases src_configure src_install
+export_exlib_phases src_test src_install
SUMMARY="A C++ template library for linear algebra (vectors, matrices, and related algorithms)"
DESCRIPTION="
@@ -58,13 +58,14 @@ CMAKE_SRC_CONFIGURE_PARAMS+=(
-DEIGEN_TEST_NO_OPENGL:BOOL=TRUE
)
-MY_HGREV="b30b87236a1b"
+MY_HGREV="26667be4f70b"
CMAKE_SOURCE=${WORKBASE}/${PN}-${PN}-${MY_HGREV}
-eigen_src_configure() {
- export PKG_CONFIG_LIBDIR=/usr/$(exhost --target)/lib
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PNV}-compile-fix.patch )
- cmake_src_configure
+eigen_src_test() {
+ # "make test" won't build the test binaries, we have to use "make check"
+ emake check
}
eigen_src_install() {
@@ -72,12 +73,5 @@ eigen_src_install() {
insinto /usr/share/cmake/Modules
doins "${CMAKE_SOURCE}"/cmake/FindEigen3.cmake
-
- edo rm -r "${IMAGE}"/usr/share/doc
-
- # TODO: report upstream, fix pkgconfig file
- edo sed \
- -e "s:-Iinclude:-I/usr/$(exhost --target)/include:g" \
- -i "${IMAGE}"/usr/$(exhost --target)/lib/pkgconfig/eigen3.pc
}
diff --git a/packages/sci-libs/eigen/files/eigen-3.3.0-compile-fix.patch b/packages/sci-libs/eigen/files/eigen-3.3.0-compile-fix.patch
new file mode 100644
index 0000000..96d1d76
--- /dev/null
+++ b/packages/sci-libs/eigen/files/eigen-3.3.0-compile-fix.patch
@@ -0,0 +1,31 @@
+Reason: Fixes a compile error
+Upstream: See https://bitbucket.org/eigen/eigen/pull-requests/248/make-sure-not-to-call-numext-maxi-on/diff
+
+# HG changeset patch
+# User Niels Ole Salscheider <niels_ole@salscheider-online.de>
+# Date 1478949657 -3600
+# Node ID 5f1a3dcc6054289b269b8e38b2e09ee142d20a39
+# Parent 13ee053f74aff786af558e33873ae7cedbf45653
+Make sure not to call numext::maxi on expression templates
+
+diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h
+--- a/Eigen/src/SVD/JacobiSVD.h
++++ b/Eigen/src/SVD/JacobiSVD.h
+@@ -412,7 +412,7 @@
+ }
+
+ // update largest diagonal entry
+- maxDiagEntry = numext::maxi(maxDiagEntry,numext::maxi(abs(work_matrix.coeff(p,p)), abs(work_matrix.coeff(q,q))));
++ maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(abs(work_matrix.coeff(p,p)), abs(work_matrix.coeff(q,q))));
+ // and check whether the 2x2 block is already diagonal
+ RealScalar threshold = numext::maxi<RealScalar>(considerAsZero, precision * maxDiagEntry);
+ return abs(work_matrix.coeff(p,q))>threshold || abs(work_matrix.coeff(q,p)) > threshold;
+@@ -725,7 +725,7 @@
+ if(computeV()) m_matrixV.applyOnTheRight(p,q,j_right);
+
+ // keep track of the largest diagonal coefficient
+- maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi(abs(m_workMatrix.coeff(p,p)), abs(m_workMatrix.coeff(q,q))));
++ maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(abs(m_workMatrix.coeff(p,p)), abs(m_workMatrix.coeff(q,q))));
+ }
+ }
+ }