* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2016-02-22 9:36 Justin Lecher
0 siblings, 0 replies; 6+ messages in thread
From: Justin Lecher @ 2016-02-22 9:36 UTC (permalink / raw
To: gentoo-commits
commit: 49ac69328112878890edafb2a1b6ce13bff20d44
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 22 09:33:04 2016 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 09:35:49 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49ac6932
dev-cpp/eigen: Drop -g2 from build flags
* Bump to EAPI=6
* Add missing test deps
* Add missing USE
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=575354
Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-cpp/eigen/eigen-3.2.7.ebuild | 67 +++++++++++++++++++---
.../eigen/files/eigen-3.2.8-adaolc-backport.patch | 40 +++++++++++++
.../files/eigen-3.2.8-pastix-5.2-backport.patch | 42 ++++++++++++++
3 files changed, 141 insertions(+), 8 deletions(-)
diff --git a/dev-cpp/eigen/eigen-3.2.7.ebuild b/dev-cpp/eigen/eigen-3.2.7.ebuild
index be503c9..f0cc3dd 100644
--- a/dev-cpp/eigen/eigen-3.2.7.ebuild
+++ b/dev-cpp/eigen/eigen-3.2.7.ebuild
@@ -2,9 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-inherit cmake-utils
+FORTRAN_NEEDED="test"
+
+inherit cmake-utils fortran-2
DESCRIPTION="C++ template library for linear algebra"
HOMEPAGE="http://eigen.tuxfamily.org/"
@@ -13,10 +15,43 @@ SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="LGPL-2 GPL-3"
SLOT="3"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug doc"
+IUSE="altivec debug doc openmp test"
+IUSE+=" cpu_flags_x86_sse2"
+IUSE+=" cpu_flags_x86_sse3"
+IUSE+=" cpu_flags_x86_sse4_1"
+IUSE+=" cpu_flags_x86_sse4_2"
+IUSE+=" cpu_flags_x86_ssse3"
+#IUSE+=" cpu_flags_x86_x87"
-DEPEND="doc? ( app-doc/doxygen[dot,latex] )"
RDEPEND="!dev-cpp/eigen:0"
+DEPEND="
+ doc? ( app-doc/doxygen[dot,latex] )
+ test? (
+ dev-libs/gmp:0
+ dev-libs/mpfr:0
+ media-libs/freeglut
+ media-libs/glew
+ sci-libs/adolc
+ sci-libs/cholmod
+ sci-libs/fftw:3.0
+ sci-libs/pastix
+ sci-libs/umfpack
+ sci-libs/scotch
+ sci-libs/spqr
+ sci-libs/superlu
+ dev-qt/qtcore:4
+ virtual/opengl
+ virtual/pkgconfig
+ )
+ "
+# Missing:
+# METIS-5
+# GOOGLEHASH
+
+PATCHES=(
+ "${FILESDIR}"/${P}-pastix-5.2-backport.patch
+ "${FILESDIR}"/${P}-adaolc-backport.patch
+)
src_unpack() {
default
@@ -24,12 +59,21 @@ src_unpack() {
}
src_prepare() {
+ sed \
+ -e 's:-g2::g' \
+ -i cmake/EigenConfigureTesting.cmake || die
+
sed -i CMakeLists.txt \
-e "/add_subdirectory(demos/d" \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
|| die "sed disable unused bundles failed"
+ if ! use test; then
+ sed -i CMakeLists.txt \
+ -e "/add_subdirectory(blas/d" \
+ -e "/add_subdirectory(lapack/d" \
+ || die "sed disable unused bundles failed"
+ fi
+
sed -i -e "/Unknown build type/d" CMakeLists.txt || die
sed \
@@ -47,10 +91,17 @@ src_compile() {
src_test() {
local mycmakeargs=(
-DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_NO_FORTRAN=ON
- -DEIGEN_TEST_NO_OPENGL=ON
+ -DEIGEN_TEST_ALTIVEC="$(usex altivec)"
+ -DEIGEN_TEST_OPENMP="$(usex openmp)"
+ -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+ -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+ -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+ -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+ -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+# -DEIGEN_TEST_X87="$(usex cpu_flags_x86_x87)"
)
cmake-utils_src_configure
+ cmake-utils_src_compile blas
cmake-utils_src_compile buildtests
cmake-utils_src_test
}
diff --git a/dev-cpp/eigen/files/eigen-3.2.8-adaolc-backport.patch b/dev-cpp/eigen/files/eigen-3.2.8-adaolc-backport.patch
new file mode 100644
index 0000000..82547e1
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.2.8-adaolc-backport.patch
@@ -0,0 +1,40 @@
+# HG changeset patch
+# User Gael Guennebaud <g.gael@free.fr>
+# Date 1448895622 -3600
+# Node ID e515e2706d00294a5749db7832d10ea366b9389f
+# Parent eb4bf011a2ea5fc4ddb0aa5332d6e616198ed886
+Update ADOL-C support.
+
+diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward
+--- a/unsupported/Eigen/AdolcForward
++++ b/unsupported/Eigen/AdolcForward
+@@ -25,7 +25,7 @@
+ #ifndef NUMBER_DIRECTIONS
+ # define NUMBER_DIRECTIONS 2
+ #endif
+-#include <adolc/adouble.h>
++#include <adolc/adtl.h>
+
+ // adolc defines some very stupid macros:
+ #if defined(malloc)
+diff --git a/unsupported/test/forward_adolc.cpp b/unsupported/test/forward_adolc.cpp
+--- a/unsupported/test/forward_adolc.cpp
++++ b/unsupported/test/forward_adolc.cpp
+@@ -13,8 +13,6 @@
+ #define NUMBER_DIRECTIONS 16
+ #include <unsupported/Eigen/AdolcForward>
+
+-int adtl::ADOLC_numDir;
+-
+ template<typename Vector>
+ EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)
+ {
+@@ -123,7 +121,7 @@
+
+ void test_forward_adolc()
+ {
+- adtl::ADOLC_numDir = NUMBER_DIRECTIONS;
++ adtl::setNumDir(NUMBER_DIRECTIONS);
+
+ for(int i = 0; i < g_repeat; i++) {
+ CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,2>()) ));
diff --git a/dev-cpp/eigen/files/eigen-3.2.8-pastix-5.2-backport.patch b/dev-cpp/eigen/files/eigen-3.2.8-pastix-5.2-backport.patch
new file mode 100644
index 0000000..fafaf3a
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.2.8-pastix-5.2-backport.patch
@@ -0,0 +1,42 @@
+# HG changeset patch
+# User Gael Guennebaud <g.gael@free.fr>
+# Date 1393589499 -3600
+# Node ID b88efb384b160880131ad17e39bb690719112bfa
+# Parent 576120ad694efe29b70999576964d3816288fb4e
+Fix PaStiX support for Pastix 5.2
+
+diff --git a/Eigen/src/PaStiXSupport/PaStiXSupport.h b/Eigen/src/PaStiXSupport/PaStiXSupport.h
+--- a/Eigen/src/PaStiXSupport/PaStiXSupport.h
++++ b/Eigen/src/PaStiXSupport/PaStiXSupport.h
+@@ -12,6 +12,14 @@
+
+ namespace Eigen {
+
++#if defined(DCOMPLEX)
++ #define PASTIX_COMPLEX COMPLEX
++ #define PASTIX_DCOMPLEX DCOMPLEX
++#else
++ #define PASTIX_COMPLEX std::complex<float>
++ #define PASTIX_DCOMPLEX std::complex<double>
++#endif
++
+ /** \ingroup PaStiXSupport_Module
+ * \brief Interface to the PaStix solver
+ *
+@@ -74,14 +82,14 @@
+ {
+ if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
+ if (nbrhs == 0) {x = NULL; nbrhs=1;}
+- c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<COMPLEX*>(vals), perm, invp, reinterpret_cast<COMPLEX*>(x), nbrhs, iparm, dparm);
++ c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_COMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_COMPLEX*>(x), nbrhs, iparm, dparm);
+ }
+
+ void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex<double> *vals, int *perm, int * invp, std::complex<double> *x, int nbrhs, int *iparm, double *dparm)
+ {
+ if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
+ if (nbrhs == 0) {x = NULL; nbrhs=1;}
+- z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<DCOMPLEX*>(vals), perm, invp, reinterpret_cast<DCOMPLEX*>(x), nbrhs, iparm, dparm);
++ z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_DCOMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_DCOMPLEX*>(x), nbrhs, iparm, dparm);
+ }
+
+ // Convert the matrix to Fortran-style Numbering
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2016-09-15 14:49 Michael Palimaka
0 siblings, 0 replies; 6+ messages in thread
From: Michael Palimaka @ 2016-09-15 14:49 UTC (permalink / raw
To: gentoo-commits
commit: a1b17feb0492edd4b2de27ca0815eb769a0c290b
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 15 12:06:29 2016 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Sep 15 14:49:31 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b17feb
dev-cpp/eigen: remove old
Package-Manager: portage-2.3.0
dev-cpp/eigen/Manifest | 4 -
dev-cpp/eigen/eigen-3.1.3.ebuild | 70 -----------------
dev-cpp/eigen/eigen-3.2.5.ebuild | 69 -----------------
dev-cpp/eigen/eigen-3.2.6.ebuild | 65 ----------------
dev-cpp/eigen/eigen-3.2.7.ebuild | 116 ----------------------------
dev-cpp/eigen/files/eigen-3.0.0-gcc46.patch | 16 ----
6 files changed, 340 deletions(-)
diff --git a/dev-cpp/eigen/Manifest b/dev-cpp/eigen/Manifest
index 3f1c5ee..4a02d3f 100644
--- a/dev-cpp/eigen/Manifest
+++ b/dev-cpp/eigen/Manifest
@@ -1,6 +1,2 @@
DIST eigen-2.0.17.tar.bz2 367890 SHA256 7255e856ed367ce6e6e2d4153b0e4e753c8b8d36918bf440dd34ad56aff09960 SHA512 8fa0e4507864f61c30de14e3b29d963eb8b777d1a6bb04192d53e1f4c9db323b9fab2ddcedb63bf2af243fe0e26dcd717e97eb72216b6a1d444e455520192c72 WHIRLPOOL d80f12b378e23b758e4dbd173b87bed93bc42a97f2541b653b4373ea6ce0803bd712de00cf5a014a72cd439bb3ad10fd24b2ef8982975e044ff4d7bb2b63f585
-DIST eigen-3.1.3.tar.bz2 1052724 SHA256 1a443145f321dd47a5ca11f176e7319056198a6124a7577723d92e3c3cd59ece SHA512 7b6b816416570c9592ed9ca09e61970346f02bed492df7073fed3e657ded0c2bb736fb024554f92064ee783cbf1180952ccb87ed724899fa353f34c6a49210a4 WHIRLPOOL 53c667def19d882bff0e6a7b8476028a211ca2b4617d579b8555738c726ed1d4f3d4aed0e87b39c00a941484505f2a54fb82dba19444cc04f7f438fa1fc22c45
-DIST eigen-3.2.5.tar.bz2 1151510 SHA256 5f6e6cb88188e34185f43cb819d7dab9b48ef493774ff834e568f4805d3dc2f9 SHA512 5a90a312c3503bb91293aa9ed69258f36c6a3a06a64ff851c8b57a4df01bd467e22e5ba95221bce97a8cf2d3fb9f0ad1c1c40116a3c9c9b1f80d7fc7b0a96c7a WHIRLPOOL 21333e30f77b4712d21eb4bed6159c0e0bfb769ed65d01d4cf5cfeb1a9105f2a3c2ccbc41d251fc09399ee8ad8a50d2eb9d1ea5d38d98ca1df12f8972b24a630
-DIST eigen-3.2.6.tar.bz2 1152805 SHA256 8a3352f9a5361fe90e451a7305fb1896fc7f771dc16cc0edd8e6b157f52c343e SHA512 a1abcef36d774ab29418961143174e460e11c05f40d493844e4d4e8024e0b60c453cb007e96ed05d786eec3214d72f15ead0ac49ed84762d3037db90f11c935a WHIRLPOOL e15f917ad6b8aeda2e11c6af186073921d78c3b96c922f1068989b64a2ec7c3d58df280ce809be877b6e93a691c0d511afa601cb806bf4d9f29e9133c62e280c
-DIST eigen-3.2.7.tar.bz2 1155162 SHA256 e58e1a11b23cf2754e32b3c5990f318a8461a3613c7acbf6035870daa45c2f3e SHA512 6e9beb4fdd69d96a1bb305ea9463547c19cac0072ce908c19bf952d2b7a254c0d674d19a7797a3ba5e8617e1c1bca74dfb7c01971301cb152e467f13eaaed6cc WHIRLPOOL ff42ff72757736dceab759e6d12a6430e5d41b8119890eaf0f1158af1f6f5f25267e830e8cd5c7dbc71f5e1c27b0a9880420c1a3acd9369387489183b199d9ce
DIST eigen-3.2.8.tar.bz2 1161201 SHA256 722a63d672b70f39c271c5e2a4a43ba14d12015674331790414fcb167c357e55 SHA512 53c27ba530c985dfef52188e03273eeef33abbc67e3f150cacd3371c8b9ddbd399228730595821c4c56c061d109cf509266c1dab2b8a7c730902cbd6fb18c100 WHIRLPOOL 75e54f5620299f49a540483b0b4163e3cf6c48695f30f5e258343925cb488c3915588862a3fbe2341b5dbe17ea20756409265000f19ea2f45e7706837cb2488a
diff --git a/dev-cpp/eigen/eigen-3.1.3.ebuild b/dev-cpp/eigen/eigen-3.1.3.ebuild
deleted file mode 100644
index 842fb40..00000000
--- a/dev-cpp/eigen/eigen-3.1.3.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-inherit cmake-utils
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="LGPL-2 GPL-3"
-KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-SLOT="3"
-IUSE="debug doc"
-
-DEPEND="doc? ( app-doc/doxygen[dot,latex] )"
-RDEPEND="!dev-cpp/eigen:0"
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.0.0-gcc46.patch
-
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(demos/d" \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- || die "sed disable unused bundles failed"
-}
-
-src_configure() {
- # benchmarks (BTL) brings up damn load of external deps including fortran
- # compiler
- CMAKE_BUILD_TYPE="release"
- mycmakeargs=(
- -DEIGEN_BUILD_BTL=OFF
- )
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
- if use doc; then
- cmake-utils_src_compile doc
- fi
-}
-
-src_test() {
- mycmakeargs=(
- -DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_NO_FORTRAN=ON
- -DEIGEN_TEST_NO_OPENGL=ON
- )
- cmake-utils_src_configure
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
- if use doc; then
- cd "${CMAKE_BUILD_DIR}"/doc
- dohtml -r html/*
- fi
-}
diff --git a/dev-cpp/eigen/eigen-3.2.5.ebuild b/dev-cpp/eigen/eigen-3.2.5.ebuild
deleted file mode 100644
index 373ac60..00000000
--- a/dev-cpp/eigen/eigen-3.2.5.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="LGPL-2 GPL-3"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug doc"
-
-DEPEND="doc? ( app-doc/doxygen[dot,latex] )"
-RDEPEND="!dev-cpp/eigen:0"
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(demos/d" \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- || die "sed disable unused bundles failed"
-
- cmake-utils_src_prepare
-}
-
-src_configure() {
- CMAKE_BUILD_TYPE="release"
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
- if use doc; then
- cmake-utils_src_compile doc
- fi
-}
-
-src_test() {
- local mycmakeargs=(
- -DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_NO_FORTRAN=ON
- -DEIGEN_TEST_NO_OPENGL=ON
- )
- cmake-utils_src_configure
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
- if use doc; then
- cd "${BUILD_DIR}"/doc
- dohtml -r html/*
- fi
-
- # Debian installs it and some projects started using it.
- insinto /usr/share/cmake/Modules/
- doins "${S}/cmake/FindEigen3.cmake"
-}
diff --git a/dev-cpp/eigen/eigen-3.2.6.ebuild b/dev-cpp/eigen/eigen-3.2.6.ebuild
deleted file mode 100644
index 8ee6857..00000000
--- a/dev-cpp/eigen/eigen-3.2.6.ebuild
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit cmake-utils
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="LGPL-2 GPL-3"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug doc"
-
-DEPEND="doc? ( app-doc/doxygen[dot,latex] )"
-RDEPEND="!dev-cpp/eigen:0"
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(demos/d" \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- || die "sed disable unused bundles failed"
-
- sed -i -e "/Unknown build type/d" CMakeLists.txt || die
-
- cmake-utils_src_prepare
-}
-
-src_compile() {
- cmake-utils_src_compile
- if use doc; then
- cmake-utils_src_compile doc
- fi
-}
-
-src_test() {
- local mycmakeargs=(
- -DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_NO_FORTRAN=ON
- -DEIGEN_TEST_NO_OPENGL=ON
- )
- cmake-utils_src_configure
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
- if use doc; then
- dohtml -r "${BUILD_DIR}"/doc/html/*
- fi
-
- # Debian installs it and some projects started using it.
- insinto /usr/share/cmake/Modules/
- doins "${S}/cmake/FindEigen3.cmake"
-}
diff --git a/dev-cpp/eigen/eigen-3.2.7.ebuild b/dev-cpp/eigen/eigen-3.2.7.ebuild
deleted file mode 100644
index 2004683..00000000
--- a/dev-cpp/eigen/eigen-3.2.7.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-FORTRAN_NEEDED="test"
-
-inherit cmake-utils fortran-2
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="LGPL-2 GPL-3"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="altivec debug doc openmp test"
-IUSE+=" cpu_flags_x86_sse2"
-IUSE+=" cpu_flags_x86_sse3"
-IUSE+=" cpu_flags_x86_sse4_1"
-IUSE+=" cpu_flags_x86_sse4_2"
-IUSE+=" cpu_flags_x86_ssse3"
-#IUSE+=" cpu_flags_x86_x87"
-
-RDEPEND="!dev-cpp/eigen:0"
-DEPEND="
- doc? ( app-doc/doxygen[dot,latex] )
- test? (
- dev-libs/gmp:0
- dev-libs/mpfr:0
- media-libs/freeglut
- media-libs/glew
- sci-libs/adolc
- sci-libs/cholmod
- sci-libs/fftw:3.0
- sci-libs/pastix
- sci-libs/umfpack
- sci-libs/scotch
- sci-libs/spqr
- sci-libs/superlu
- dev-qt/qtcore:4
- virtual/opengl
- virtual/pkgconfig
- )
- "
-# Missing:
-# METIS-5
-# GOOGLEHASH
-
-PATCHES=(
- "${FILESDIR}"/${P}-pastix-5.2-backport.patch
- "${FILESDIR}"/${P}-adaolc-backport.patch
-)
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- sed \
- -e 's:-g2::g' \
- -i cmake/EigenConfigureTesting.cmake || die
-
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(demos/d" \
- || die "sed disable unused bundles failed"
-
- if ! use test; then
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- || die "sed disable unused bundles failed"
- fi
-
- sed -i -e "/Unknown build type/d" CMakeLists.txt || die
-
- sed \
- -e '/Cflags/s|:.*|: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}|g' \
- -i eigen3.pc.in || die
-
- cmake-utils_src_prepare
-}
-
-src_compile() {
- cmake-utils_src_compile
- use doc && cmake-utils_src_compile doc
-}
-
-src_test() {
- local mycmakeargs=(
- -DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_ALTIVEC="$(usex altivec)"
- -DEIGEN_TEST_OPENMP="$(usex openmp)"
- -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
- -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
- -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
- -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
- -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
-# -DEIGEN_TEST_X87="$(usex cpu_flags_x86_x87)"
- )
- cmake-utils_src_configure
- cmake-utils_src_compile blas
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
- use doc && dodoc -r "${BUILD_DIR}"/doc/html
-
- # Debian installs it and some projects started using it.
- insinto /usr/share/cmake/Modules/
- doins "${S}/cmake/FindEigen3.cmake"
-}
diff --git a/dev-cpp/eigen/files/eigen-3.0.0-gcc46.patch b/dev-cpp/eigen/files/eigen-3.0.0-gcc46.patch
deleted file mode 100644
index ca4410b..00000000
--- a/dev-cpp/eigen/files/eigen-3.0.0-gcc46.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- Eigen/src/StlSupport/details.h | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/Eigen/src/StlSupport/details.h b/Eigen/src/StlSupport/details.h
-index 397c8ef..c1ac745 100644
---- a/Eigen/src/StlSupport/details.h
-+++ b/Eigen/src/StlSupport/details.h
-@@ -30,6 +30,8 @@
- #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator
- #endif
-
-+#include <cstddef>
-+
- namespace Eigen {
-
- // This one is needed to prevent reimplementing the whole std::vector.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2019-02-25 15:55 Andreas Sturmlechner
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2019-02-25 15:55 UTC (permalink / raw
To: gentoo-commits
commit: 26ef084df3e43be1b257bfc99772ce75b7eea38c
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 15:51:09 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Feb 25 15:55:29 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26ef084d
dev-cpp/eigen: Drop old
Closes: https://bugs.gentoo.org/577262
Closes: https://bugs.gentoo.org/466360
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
dev-cpp/eigen/Manifest | 2 -
dev-cpp/eigen/eigen-3.2.8-r2.ebuild | 112 ---------------------
dev-cpp/eigen/eigen-3.3.5-r1.ebuild | 101 -------------------
.../eigen/files/eigen-3.2.7-adaolc-backport.patch | 40 --------
.../files/eigen-3.2.7-pastix-5.2-backport.patch | 42 --------
.../eigen/files/eigen-3.3.5-fix-prototype.patch | 19 ----
6 files changed, 316 deletions(-)
diff --git a/dev-cpp/eigen/Manifest b/dev-cpp/eigen/Manifest
index 7f25631de66..81084cf0e54 100644
--- a/dev-cpp/eigen/Manifest
+++ b/dev-cpp/eigen/Manifest
@@ -1,3 +1 @@
-DIST eigen-3.2.8.tar.bz2 1161201 BLAKE2B 35bace5138f601e73d56412e87bf591ef2f96778050b0a2a4fc8f1e75f02498fb4eb80bf79988dd4bd6b985945a122d44581ccedd925f398f7d282790da06385 SHA512 53c27ba530c985dfef52188e03273eeef33abbc67e3f150cacd3371c8b9ddbd399228730595821c4c56c061d109cf509266c1dab2b8a7c730902cbd6fb18c100
-DIST eigen-3.3.5.tar.bz2 1663467 BLAKE2B 7f4b6339f8cea815004057361734e53129b5bde45c9c310eab87f0aa20da90e46dd67359e669f8b36477339df7bd7c8bd8eb18baaf0f1a779372ec3623c50aca SHA512 740ed41862c1e422a751b205513754e9c7bd04cc8ad4e3b08e2ccd1c1d30dea43a90896bc8eecd0cb4253b4adf803a814ddd48d6166fb5a53f507cf3e6940a38
DIST eigen-3.3.7.tar.bz2 1665168 BLAKE2B 544d35d1c7a4125affa094c6aa372c2aeca4e99bc60c496ff393d538c1c467b454491a772121450e3a1a43a582d073b4b7584918354d0b9175121fde88947c4b SHA512 c12bfd034d0a1112bf2df3f773ad98f36b2b53fbbfceac5f143ee1793322746fb8a6546d7db7da2a1000da6a535bd8cea0c4125b549afc90a6570743b02dcf3d
diff --git a/dev-cpp/eigen/eigen-3.2.8-r2.ebuild b/dev-cpp/eigen/eigen-3.2.8-r2.ebuild
deleted file mode 100644
index 91ae1429ee0..00000000000
--- a/dev-cpp/eigen/eigen-3.2.8-r2.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-FORTRAN_NEEDED="test"
-
-inherit cmake-utils fortran-2
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="LGPL-2 GPL-3"
-SLOT="3"
-KEYWORDS="~alpha amd64 ~arm ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
-IUSE="altivec debug doc openmp test"
-IUSE+=" cpu_flags_x86_sse2"
-IUSE+=" cpu_flags_x86_sse3"
-IUSE+=" cpu_flags_x86_sse4_1"
-IUSE+=" cpu_flags_x86_sse4_2"
-IUSE+=" cpu_flags_x86_ssse3"
-#IUSE+=" cpu_flags_x86_x87"
-RESTRICT="!test? ( test )"
-
-RDEPEND="!dev-cpp/eigen:0"
-DEPEND="
- doc? ( app-doc/doxygen[dot,latex] )
- test? (
- dev-libs/gmp:0
- dev-libs/mpfr:0
- media-libs/freeglut
- media-libs/glew
- sci-libs/adolc
- sci-libs/cholmod
- sci-libs/fftw:3.0
- sci-libs/pastix
- sci-libs/umfpack
- sci-libs/scotch
- sci-libs/spqr
- sci-libs/superlu
- virtual/opengl
- virtual/pkgconfig
- )
- "
-# Missing:
-# METIS-5
-# GOOGLEHASH
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.2.7-pastix-5.2-backport.patch
- "${FILESDIR}"/${PN}-3.2.7-adaolc-backport.patch
-)
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- sed \
- -e 's:-g2::g' \
- -i cmake/EigenConfigureTesting.cmake || die
-
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(demos/d" \
- || die "sed disable unused bundles failed"
-
- if ! use test; then
- sed -i CMakeLists.txt \
- -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- || die "sed disable unused bundles failed"
- fi
-
- sed -i -e "/Unknown build type/d" CMakeLists.txt || die
-
- cmake-utils_src_prepare
-}
-
-src_compile() {
- cmake-utils_src_compile
- use doc && cmake-utils_src_compile doc
-}
-
-src_test() {
- local mycmakeargs=(
- -DEIGEN_BUILD_TESTS=ON
- -DEIGEN_TEST_NOQT=ON
- -DEIGEN_TEST_ALTIVEC="$(usex altivec)"
- -DEIGEN_TEST_OPENMP="$(usex openmp)"
- -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
- -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
- -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
- -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
- -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
-# -DEIGEN_TEST_X87="$(usex cpu_flags_x86_x87)"
- )
- cmake-utils_src_configure
- cmake-utils_src_compile blas
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- cmake-utils_src_install
- use doc && dodoc -r "${BUILD_DIR}"/doc/html
-
- # Debian installs it and some projects started using it.
- insinto /usr/share/cmake/Modules/
- doins "${S}/cmake/FindEigen3.cmake"
-}
diff --git a/dev-cpp/eigen/eigen-3.3.5-r1.ebuild b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
deleted file mode 100644
index 2e8c6f919e8..00000000000
--- a/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-FORTRAN_NEEDED="test"
-inherit cmake-utils cuda fortran-2
-
-DESCRIPTION="C++ template library for linear algebra"
-HOMEPAGE="http://eigen.tuxfamily.org/"
-SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="MPL-2.0"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="altivec c++11 cuda debug doc neon openmp test" #zvector vsx
-RESTRICT="!test? ( test )"
-
-RDEPEND="!dev-cpp/eigen:0"
-DEPEND="
- doc? ( app-doc/doxygen[dot,latex] )
- test? (
- dev-libs/gmp:0
- dev-libs/mpfr:0
- media-libs/freeglut
- media-libs/glew
- sci-libs/adolc[sparse]
- sci-libs/cholmod
- sci-libs/fftw:3.0
- sci-libs/pastix
- sci-libs/umfpack
- sci-libs/scotch
- sci-libs/spqr
- sci-libs/superlu
- virtual/opengl
- virtual/pkgconfig
- cuda? ( dev-util/nvidia-cuda-toolkit )
- )
-"
-# Missing:
-# METIS-5
-# GOOGLEHASH
-
-PATCHES=( "${FILESDIR}/${P}-fix-prototype.patch" )
-
-src_unpack() {
- default
- mv ${PN}* ${P} || die
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- sed -e 's:-g2::g' \
- -i cmake/EigenConfigureTesting.cmake || die
-
- sed -e "/add_subdirectory(demos/d" \
- -i CMakeLists.txt || die
-
- if ! use test; then
- sed -e "/add_subdirectory(test/d" \
- -i CMakeLists.txt || die
-
- sed -e "/add_subdirectory(blas/d" \
- -e "/add_subdirectory(lapack/d" \
- -i CMakeLists.txt || die
- fi
- sed -e "/Unknown build type/d" \
- -i CMakeLists.txt || die
-
- use cuda && cuda_src_prepare
-}
-
-src_compile() {
- cmake-utils_src_compile
- use doc && cmake-utils_src_compile doc
-}
-
-src_test() {
- local mycmakeargs=(
- -DEIGEN_TEST_NOQT=ON
- -DEIGEN_TEST_ALTIVEC="$(usex altivec)"
- -DEIGEN_TEST_CXX11="$(usex c++11)"
- -DEIGEN_TEST_CUDA="$(usex cuda)"
- -DEIGEN_TEST_OPENMP="$(usex openmp)"
- -DEIGEN_TEST_NEON64="$(usex neon)"
- )
- cmake-utils_src_configure
- cmake-utils_src_compile blas
- cmake-utils_src_compile buildtests
- cmake-utils_src_test
-}
-
-src_install() {
- use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
- cmake-utils_src_install
-
- # Debian installs it and some projects started using it.
- insinto /usr/share/cmake/Modules/
- doins "${S}/cmake/FindEigen3.cmake"
-}
diff --git a/dev-cpp/eigen/files/eigen-3.2.7-adaolc-backport.patch b/dev-cpp/eigen/files/eigen-3.2.7-adaolc-backport.patch
deleted file mode 100644
index 82547e11951..00000000000
--- a/dev-cpp/eigen/files/eigen-3.2.7-adaolc-backport.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-# HG changeset patch
-# User Gael Guennebaud <g.gael@free.fr>
-# Date 1448895622 -3600
-# Node ID e515e2706d00294a5749db7832d10ea366b9389f
-# Parent eb4bf011a2ea5fc4ddb0aa5332d6e616198ed886
-Update ADOL-C support.
-
-diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward
---- a/unsupported/Eigen/AdolcForward
-+++ b/unsupported/Eigen/AdolcForward
-@@ -25,7 +25,7 @@
- #ifndef NUMBER_DIRECTIONS
- # define NUMBER_DIRECTIONS 2
- #endif
--#include <adolc/adouble.h>
-+#include <adolc/adtl.h>
-
- // adolc defines some very stupid macros:
- #if defined(malloc)
-diff --git a/unsupported/test/forward_adolc.cpp b/unsupported/test/forward_adolc.cpp
---- a/unsupported/test/forward_adolc.cpp
-+++ b/unsupported/test/forward_adolc.cpp
-@@ -13,8 +13,6 @@
- #define NUMBER_DIRECTIONS 16
- #include <unsupported/Eigen/AdolcForward>
-
--int adtl::ADOLC_numDir;
--
- template<typename Vector>
- EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)
- {
-@@ -123,7 +121,7 @@
-
- void test_forward_adolc()
- {
-- adtl::ADOLC_numDir = NUMBER_DIRECTIONS;
-+ adtl::setNumDir(NUMBER_DIRECTIONS);
-
- for(int i = 0; i < g_repeat; i++) {
- CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,2>()) ));
diff --git a/dev-cpp/eigen/files/eigen-3.2.7-pastix-5.2-backport.patch b/dev-cpp/eigen/files/eigen-3.2.7-pastix-5.2-backport.patch
deleted file mode 100644
index fafaf3a6862..00000000000
--- a/dev-cpp/eigen/files/eigen-3.2.7-pastix-5.2-backport.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-# HG changeset patch
-# User Gael Guennebaud <g.gael@free.fr>
-# Date 1393589499 -3600
-# Node ID b88efb384b160880131ad17e39bb690719112bfa
-# Parent 576120ad694efe29b70999576964d3816288fb4e
-Fix PaStiX support for Pastix 5.2
-
-diff --git a/Eigen/src/PaStiXSupport/PaStiXSupport.h b/Eigen/src/PaStiXSupport/PaStiXSupport.h
---- a/Eigen/src/PaStiXSupport/PaStiXSupport.h
-+++ b/Eigen/src/PaStiXSupport/PaStiXSupport.h
-@@ -12,6 +12,14 @@
-
- namespace Eigen {
-
-+#if defined(DCOMPLEX)
-+ #define PASTIX_COMPLEX COMPLEX
-+ #define PASTIX_DCOMPLEX DCOMPLEX
-+#else
-+ #define PASTIX_COMPLEX std::complex<float>
-+ #define PASTIX_DCOMPLEX std::complex<double>
-+#endif
-+
- /** \ingroup PaStiXSupport_Module
- * \brief Interface to the PaStix solver
- *
-@@ -74,14 +82,14 @@
- {
- if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
- if (nbrhs == 0) {x = NULL; nbrhs=1;}
-- c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<COMPLEX*>(vals), perm, invp, reinterpret_cast<COMPLEX*>(x), nbrhs, iparm, dparm);
-+ c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_COMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_COMPLEX*>(x), nbrhs, iparm, dparm);
- }
-
- void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex<double> *vals, int *perm, int * invp, std::complex<double> *x, int nbrhs, int *iparm, double *dparm)
- {
- if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }
- if (nbrhs == 0) {x = NULL; nbrhs=1;}
-- z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<DCOMPLEX*>(vals), perm, invp, reinterpret_cast<DCOMPLEX*>(x), nbrhs, iparm, dparm);
-+ z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast<PASTIX_DCOMPLEX*>(vals), perm, invp, reinterpret_cast<PASTIX_DCOMPLEX*>(x), nbrhs, iparm, dparm);
- }
-
- // Convert the matrix to Fortran-style Numbering
diff --git a/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
deleted file mode 100644
index e4d128f502e..00000000000
--- a/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# HG changeset patch
-# User Gael Guennebaud <g.gael@free.fr>
-# Date 1528444561 -7200
-# Node ID 27cac8430247a65739fcd0b83ef984d0a9c010c7
-# Parent d4cbff8d06baf95045869ed7d0c012d641c88fcf
-fix prototype
-
-diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
---- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
-+++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h
-@@ -173,7 +173,7 @@
- /**
- * Set the restart value (default is 30)
- */
-- Index set_restart(const Index restart) { m_restart=restart; }
-+ void set_restart(const Index restart) { m_restart=restart; }
-
- /**
- * Set the number of eigenvalues to deflate at each restart
\ No newline at end of file
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2020-10-12 16:15 Andreas Sturmlechner
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Sturmlechner @ 2020-10-12 16:15 UTC (permalink / raw
To: gentoo-commits
commit: 2a69391373153bcb32284be0a12d38493b24bddd
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 15:53:09 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 16:15:20 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a693913
dev-cpp/eigen: Backport fix for revdeps build failures
Reported-by: Anton Kochkov <anton.kochkov <AT> gmail.com>
Thanks-to: Sam James <sam <AT> gentoo.org>
Closes: https://bugs.gentoo.org/747949
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../{eigen-3.3.8.ebuild => eigen-3.3.8-r1.ebuild} | 5 +-
...error-counting-in-openmp-parallelize_gemm.patch | 64 ++++++++++++++++++++++
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/dev-cpp/eigen/eigen-3.3.8.ebuild b/dev-cpp/eigen/eigen-3.3.8-r1.ebuild
similarity index 94%
rename from dev-cpp/eigen/eigen-3.3.8.ebuild
rename to dev-cpp/eigen/eigen-3.3.8-r1.ebuild
index fbc5c610b0e..bddd6bddf84 100644
--- a/dev-cpp/eigen/eigen-3.3.8.ebuild
+++ b/dev-cpp/eigen/eigen-3.3.8-r1.ebuild
@@ -50,7 +50,10 @@ DEPEND="
# METIS-5
# GOOGLEHASH
-PATCHES=( "${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch
+ "${FILESDIR}"/${P}-no-error-counting-in-openmp-parallelize_gemm.patch
+)
src_prepare() {
cmake_src_prepare
diff --git a/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch b/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch
new file mode 100644
index 00000000000..556474e8b31
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch
@@ -0,0 +1,64 @@
+From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001
+From: Luke Peterson <hazelnusse@gmail.com>
+Date: Thu, 8 Oct 2020 12:16:53 -0700
+Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm
+
+This resolves a compilation error associated with
+Eigen::eigen_assert_exception. It also eliminates the counting of
+exceptions that may occur in the OpenMP parallel section. If an
+unhandled exception occurs in this section, the behavior is non-conforming
+according to the OpenMP specification.
+---
+ Eigen/src/Core/products/Parallelizer.h | 14 +++++---------
+ test/CMakeLists.txt | 2 +-
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
+index 67b2442b5..a3cc05b77 100644
+--- a/Eigen/src/Core/products/Parallelizer.h
++++ b/Eigen/src/Core/products/Parallelizer.h
+@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
+
+ ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);
+
+- int errorCount = 0;
+- #pragma omp parallel num_threads(threads) reduction(+: errorCount)
++ #pragma omp parallel num_threads(threads)
+ {
+ Index i = omp_get_thread_num();
+ // Note that the actual number of threads might be lower than the number of request ones.
+@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
+ info[i].lhs_start = r0;
+ info[i].lhs_length = actualBlockRows;
+
+- EIGEN_TRY {
+- if(transpose) func(c0, actualBlockCols, 0, rows, info);
+- else func(0, rows, c0, actualBlockCols, info);
+- } EIGEN_CATCH(...) {
+- ++errorCount;
+- }
++ if(transpose)
++ func(c0, actualBlockCols, 0, rows, info);
++ else
++ func(0, rows, c0, actualBlockCols, info);
+ }
+- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
+ #endif
+ }
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 0747aa6cb..b02577780 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -163,7 +163,7 @@ ei_add_test(constructor)
+ ei_add_test(linearstructure)
+ ei_add_test(integer_types)
+ ei_add_test(unalignedcount)
+-if(NOT EIGEN_TEST_NO_EXCEPTIONS)
++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP)
+ ei_add_test(exceptions)
+ endif()
+ ei_add_test(redux)
+--
+GitLab
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2020-12-15 11:54 David Seifert
0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2020-12-15 11:54 UTC (permalink / raw
To: gentoo-commits
commit: 3183337d51ba55a6cd0eaeeb3fff7b13055844a8
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 11:53:40 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 11:53:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3183337d
dev-cpp/eigen: Disable cholmod tests through cmake.eclass
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-cpp/eigen/eigen-3.3.9.ebuild | 4 ++--
.../files/eigen-3.3.9-disable-cholmod_support.patch | 20 --------------------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/dev-cpp/eigen/eigen-3.3.9.ebuild b/dev-cpp/eigen/eigen-3.3.9.ebuild
index 27c31cc3550..58854ef77aa 100644
--- a/dev-cpp/eigen/eigen-3.3.9.ebuild
+++ b/dev-cpp/eigen/eigen-3.3.9.ebuild
@@ -53,8 +53,6 @@ DEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch
"${FILESDIR}"/${PN}-3.3.9-max-macro.patch
- # disable the cholmod tests, they always fail
- "${FILESDIR}"/${PN}-3.3.9-disable-cholmod_support.patch
)
src_prepare() {
@@ -79,6 +77,8 @@ src_configure() {
use test && mycmakeargs+=(
# the OpenGL testsuite is extremely brittle, bug #712808
-DEIGEN_TEST_NO_OPENGL=ON
+ # the cholmod tests are broken and always fail
+ -DCMAKE_DISABLE_FIND_PACKAGE_Cholmod=ON
-DEIGEN_TEST_CXX11=ON
-DEIGEN_TEST_NOQT=ON
-DEIGEN_TEST_ALTIVEC=$(usex cpu_flags_ppc_altivec)
diff --git a/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch b/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch
deleted file mode 100644
index e3b9db5a170..00000000000
--- a/dev-cpp/eigen/files/eigen-3.3.9-disable-cholmod_support.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/test/CMakeLists.txt
-+++ b/test/CMakeLists.txt
-@@ -46,16 +46,7 @@
-
- set(SPARSE_LIBS " ")
-
--find_package(Cholmod)
--if(CHOLMOD_FOUND)
-- add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
-- include_directories(${CHOLMOD_INCLUDES})
-- set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
-- set(CHOLMOD_ALL_LIBS ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
-- ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
--else()
-- ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
--endif()
-+ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
-
- find_package(Umfpack)
- if(UMFPACK_FOUND)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
@ 2024-01-20 13:10 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2024-01-20 13:10 UTC (permalink / raw
To: gentoo-commits
commit: b450729745055e29dd0a75346cf209a4a2e17a0b
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sun Dec 10 13:30:23 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 13:02:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4507297
dev-cpp/eigen: add 3.4.0-r2, 3.4.9999, 9999 with fixed cuda tests
Automatically detects working compiler.
Automatically detects host CUDA arch, can be overriden by setting CUDAARCHS env var.
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34547
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-cpp/eigen/Manifest | 2 +
dev-cpp/eigen/eigen-3.4.0-r2.ebuild | 432 +++++++++++++++++++++
dev-cpp/eigen/eigen-3.4.9999.ebuild | 409 +++++++++++++++++++
dev-cpp/eigen/eigen-9999.ebuild | 405 +++++++++++++++++++
dev-cpp/eigen/files/eigen-3.4.0-buildstring.patch | 27 ++
dev-cpp/eigen/files/eigen-3.4.0-cxxstandard.patch | 108 ++++++
dev-cpp/eigen/files/eigen-3.4.0-noansi.patch | 18 +
...-please_protect_your_min_with_parentheses.patch | 54 +++
dev-cpp/eigen/metadata.xml | 17 +
9 files changed, 1472 insertions(+)
diff --git a/dev-cpp/eigen/Manifest b/dev-cpp/eigen/Manifest
index 3955c4711b20..02571f1672eb 100644
--- a/dev-cpp/eigen/Manifest
+++ b/dev-cpp/eigen/Manifest
@@ -1 +1,3 @@
+DIST eigen-3.4.0.tar.bz2 2143091 BLAKE2B a32aac13cbab68cfaaa252d8a406e6a36ecfd1239361412b1f9baa08284a94467479c08ffae10cb847e9916472b46b1c1af4efbf81f957c8200a4379acd42c42 SHA512 cc488eb111e0e248744d2bc4475b345b5fb82361dff226a5b73a33bd0388de8c219cff8cffcf8f476b672fc0e223f339e8c6a1cfb6293840a4a6abf232438a89
DIST eigen-3.4.0.tar.gz 2705005 BLAKE2B ae5f774a6ed36f52cf9fc3206e50796abacbba69fd0f67cd5759b4e04d847aa656861d5e06e6cd0d798a17f2b06abdb70b16f795a626bdd29edcc872c33821f8 SHA512 ba75ecb760e32acf4ceaf27115468e65d4f77c44f8d519b5a13e7940af2c03a304ad433368cb6d55431f307c5c39e2666ab41d34442db3cf441638e51f5c3b6a
+DIST eigen-lapack_addons-3.4.1.tgz 6215074 BLAKE2B 564c3398de1f4ea249b58957a482cda0b5eb99e5021e1f18abf3b4d2893fed48912bfa8386681fcae03dd933eea91644f7429d47a53684d64462209a6ae76f30 SHA512 5a827d0befb521cb430f0d63f5000e7955359bc637cdb7292d942712e98c0702570a5b650a72fc609bf5b43633661c0e51de7761ae892df6ff0aab667f436edf
diff --git a/dev-cpp/eigen/eigen-3.4.0-r2.ebuild b/dev-cpp/eigen/eigen-3.4.0-r2.ebuild
new file mode 100644
index 000000000000..a8b79d254d1b
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.4.0-r2.ebuild
@@ -0,0 +1,432 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2 llvm toolchain-funcs
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="https://eigen.tuxfamily.org/index.php?title=Main_Page"
+
+if [[ ${PV} = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/lib${PN}/${PN}.git"
+ if [[ ${PV} = 3.4.9999* ]] ; then
+ EGIT_COMMIT="3.4"
+ fi
+else
+ SRC_URI="
+ https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2
+ test? ( lapack? ( https://downloads.tuxfamily.org/${PN}/lapack_addons_3.4.1.tgz -> ${PN}-lapack_addons-3.4.1.tgz ) )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+LICENSE="MPL-2.0"
+SLOT="3"
+
+# The following lines are shamelessly stolen from ffmpeg-9999.ebuild with modifications
+ARM_CPU_FEATURES=(
+ neon:NEON
+)
+PPC_CPU_FEATURES=(
+ altivec:ALTIVEC
+ vsx:VSX
+)
+X86_CPU_FEATURES=(
+ avx:AVX
+ avx2:AVX2
+ avx512f:AVX512
+ avx512dq:AVX512DQ
+ f16c:FP16C
+ fma3:FMA
+ popcnt:POPCNT
+ sse:SSE
+ sse2:SSE2
+ sse3:SSE3
+ ssse3:SSSE3
+ sse4_1:SSE4_1
+ sse4_2:SSE4_2
+)
+# MIPS_CPU_FEATURES=(
+# msa:MSA
+# )
+# S390_CPU_FEATURES=(
+# z13:Z13
+# z14:Z14
+# )
+
+CPU_FEATURES_MAP=(
+ ${ARM_CPU_FEATURES[@]/#/cpu_flags_arm_}
+ ${PPC_CPU_FEATURES[@]/#/cpu_flags_ppc_}
+ ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_}
+ # ${MIPS_CPU_FEATURES[@]/#/cpu_flags_mips_}
+ # ${S390_CPU_FEATURES[@]/#/cpu_flags_s390_}
+)
+
+IUSE_TEST_BACKENDS=(
+ "adolc"
+ "boost"
+ "cholmod"
+ "fftw"
+ "klu"
+ "opengl"
+ "openmp"
+ "pastix"
+ "sparsehash"
+ "spqr"
+ "superlu"
+ "umfpack"
+)
+
+IUSE="${CPU_FEATURES_MAP[*]%:*} clang cuda hip debug doc lapack test ${IUSE_TEST_BACKENDS[*]}" #zvector
+
+# Tests failing again because of compiler issues
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-doc/doxygen[dot]
+ dev-texlive/texlive-bibtexextra
+ dev-texlive/texlive-fontsextra
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ test? ( virtual/pkgconfig )
+"
+
+# METIS
+# MPREAL
+# dev-libs/mpfr:0
+# dev-libs/gmp:0
+
+TEST_BACKENDS="
+ boost? ( dev-libs/boost )
+ adolc? ( sci-libs/adolc[sparse] )
+ cholmod? ( sci-libs/cholmod:= )
+ fftw? ( sci-libs/fftw )
+ spqr? ( sci-libs/spqr )
+ klu? ( sci-libs/klu )
+ opengl? (
+ media-libs/freeglut
+ media-libs/glew
+ media-libs/libglvnd
+ )
+ pastix? ( sci-libs/pastix[-mpi] )
+ sparsehash? (
+ amd64? ( dev-cpp/sparsehash )
+ arm64? ( dev-cpp/sparsehash )
+ ppc64? ( dev-cpp/sparsehash )
+ x86? ( dev-cpp/sparsehash )
+ )
+ superlu? ( sci-libs/superlu )
+ umfpack? ( sci-libs/umfpack )
+"
+DEPEND="
+ test? (
+ cuda? (
+ !clang? (
+ dev-util/nvidia-cuda-toolkit
+ )
+ clang? (
+ sys-devel/clang[llvm_targets_NVPTX]
+ openmp? ( sys-libs/libomp[llvm_targets_NVPTX,offload] )
+ )
+ )
+ hip? ( dev-util/hip )
+ lapack? ( virtual/lapacke )
+ ${TEST_BACKENDS}
+ )
+"
+
+REQUIRED_USE="
+ test? ( !lapack )
+ || ( ${IUSE_TEST_BACKENDS[*]} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.3.9-max-macro.patch"
+ "${FILESDIR}/${PN}-3.4.0-doc-nocompress.patch" # bug 830064
+ "${FILESDIR}/${PN}-3.4.0-buildstring.patch"
+ "${FILESDIR}/${PN}-3.4.0-noansi.patch"
+ "${FILESDIR}/${PN}-3.4.0-cxxstandard.patch"
+)
+
+# TODO should be in cuda.eclass
+cuda_set_CUDAHOSTCXX() {
+ local compiler
+ tc-is-gcc && compiler="gcc"
+ tc-is-clang && compiler="clang"
+ [[ -z "$compiler" ]] && die "no compiler specified"
+
+ local package="sys-devel/${compiler}"
+ local version="${package}"
+ local CUDAHOSTCXX_test
+ while
+ CUDAHOSTCXX="${CUDAHOSTCXX_test}"
+ version=$(best_version "${version}")
+ if [[ -z "${version}" ]]; then
+ if [[ -z "${CUDAHOSTCXX}" ]]; then
+ die "could not find supported version of ${package}"
+ fi
+ break
+ fi
+ CUDAHOSTCXX_test="$(
+ dirname "$(
+ realpath "$(
+ which "${compiler}-$(echo "${version}" | grep -oP "(?<=${package}-)[0-9]*")"
+ )"
+ )"
+ )"
+ version="<${version}"
+ do ! echo "int main(){}" | nvcc "-ccbin ${CUDAHOSTCXX_test}" - -x cu &>/dev/null; done
+
+ export CUDAHOSTCXX
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.bz2"
+
+ if use test && use lapack; then
+ cd "${S}/lapack" || die
+ unpack "${PN}-lapack_addons-3.4.1.tgz"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ cmake_comment_add_subdirectory demos
+
+ if ! use test; then
+ sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+ -i CMakeLists.txt || die
+ fi
+
+}
+
+src_configure() {
+ if use test; then
+ mycmakeargs+=(
+ # the OpenGL testsuite is extremely brittle, bug #712808
+ -DOpenGL_GL_PREFERENCE="GLVND"
+ -DEIGEN_TEST_OPENGL="$(usex opengl)" # Enable OpenGL support in unit tests
+ -DEIGEN_TEST_OPENMP="$(usex openmp)" # Enable/Disable OpenMP in tests/examples
+
+ # needs Qt4
+ -DEIGEN_TEST_NOQT=yes # Disable Qt support in unit tests
+
+ -DCMAKE_DISABLE_FIND_PACKAGE_MPREAL=ON
+
+ -DEIGEN_TEST_CXX11=yes
+
+ # -DEIGEN_TEST_CUSTOM_CXX_FLAGS= # Additional compiler flags when compiling unit tests.
+ # -DEIGEN_TEST_CUSTOM_LINKER_FLAGS= # Additional linker flags when linking unit tests.
+ # -DEIGEN_TEST_BUILD_FLAGS= # Options passed to the build command of unit tests
+
+ # -DEIGEN_BUILD_BTL=yes # Build benchmark suite
+
+ # -DEIGEN_INTERNAL_DOCUMENTATION=no # Build internal documentation
+ # -DEIGEN_BUILD_DOC=yes # Enable creation of Eigen documentation
+ # -DEIGEN_BUILD_PKGCONFIG=yes # Build pkg-config .pc file for Eigen
+ # -DEIGEN_DOC_USE_MATHJAX=yes # Use MathJax for rendering math in HTML docs
+
+ -DEIGEN_TEST_BUILD_DOCUMENTATION="$(usex doc)" # Test building the doxygen documentation
+
+ # -DEIGEN_COVERAGE_TESTING=no # Enable/disable gcov
+ # -DEIGEN_CTEST_ERROR_EXCEPTION= # Regular expression for build error messages to be filtered out
+ # -DEIGEN_DEBUG_ASSERTS=no # Enable advanced debugging of assertions
+ # -DEIGEN_NO_ASSERTION_CHECKING=no # Disable checking of assertions using exceptions
+ # -DEIGEN_TEST_NO_EXCEPTIONS=no # Disables C++ exceptions
+ # -DEIGEN_TEST_NO_EXPLICIT_ALIGNMENT=no # Disable explicit alignment (hence vectorization) in tests/examples
+ # -DEIGEN_TEST_NO_EXPLICIT_VECTORIZATION=no # Disable explicit vectorization in tests/examples
+
+ # -DEIGEN_DASHBOARD_BUILD_TARGET=buildtests # Target to be built in dashboard mode, default is buildtests
+
+ # -DEIGEN_DEFAULT_TO_ROW_MAJOR=no # Use row-major as default matrix storage order
+
+ # -DEIGEN_TEST_MATRIX_DIR=yes # Enable testing of realword sparse matrices contained in the specified path
+ # -DEIGEN_TEST_MAX_SIZE=320 # Maximal matrix/vector size, default is 320
+ # -DEIGEN_SPLIT_LARGE_TESTS=no # Split large tests into smaller executables
+ )
+
+ use !adolc && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Adolc="TRUE" )
+ use !boost && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Boost="TRUE" )
+ use !cholmod && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_CHOLMOD="TRUE" )
+ use !fftw && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_FFTW="TRUE" )
+ use !sparsehash && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_GoogleHash="TRUE" )
+ use !klu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KLU="TRUE" )
+ use !opengl && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL="TRUE" )
+ use !openmp && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP="TRUE" )
+ use !pastix && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_PASTIX="TRUE" )
+ use !spqr && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SPQR="TRUE" )
+ use !superlu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU="TRUE" )
+ use !umfpack && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_UMFPACK="TRUE" )
+
+ if use lapack; then
+ mycmakeargs+=(
+ -DEIGEN_ENABLE_LAPACK_TESTS=yes
+ -DEIGEN_TEST_EXTERNAL_BLAS=yes # Use external BLAS library for testsuite
+ -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON
+ )
+ fi
+
+ if use arm; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use arm64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON64="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use ppc || use ppc64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_ALTIVEC="$(usex cpu_flags_ppc_altivec)"
+ -DEIGEN_TEST_VSX="$(usex cpu_flags_ppc_vsx)"
+ )
+ fi
+
+ if use amd64 || use x86; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_32BIT=no # Force generating 32bit code.
+ # -DEIGEN_TEST_X87=no # Force using X87 instructions. Implies no vectorization.
+ -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+ -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+ -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+ -DEIGEN_TEST_FMA="$(usex cpu_flags_x86_fma3)"
+ -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+ -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+ -DEIGEN_TEST_AVX="$(usex cpu_flags_x86_avx)"
+ -DEIGEN_TEST_F16C="$(usex cpu_flags_x86_f16c)"
+ -DEIGEN_TEST_AVX2="$(usex cpu_flags_x86_avx2)"
+ -DEIGEN_TEST_AVX512="$(usex cpu_flags_x86_avx512f)"
+ -DEIGEN_TEST_AVX512DQ="$(usex cpu_flags_x86_avx512dq)"
+ )
+ fi
+
+ if use mips; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_MSA=no # Enable/Disable MSA in tests/examples
+ )
+ fi
+
+ if use s390; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_Z13=no # Enable/Disable S390X(zEC13) ZVECTOR in tests/examples
+ # -DEIGEN_TEST_Z14=no # Enable/Disable S390X(zEC14) ZVECTOR in tests/examples
+ )
+ fi
+
+ mycmakeargs+=(
+ -DEIGEN_TEST_CUDA="$(usex cuda)" # Enable CUDA support in unit tests
+ -DEIGEN_TEST_CUDA_CLANG="$(usex cuda "$(usex clang)")" # Use clang instead of nvcc to compile the CUDA tests
+
+ -DEIGEN_TEST_HIP="$(usex hip)" # Add HIP support.
+
+ # -DEIGEN_TEST_SYCL=no # Add Sycl support.
+ # -DEIGEN_SYCL_TRISYCL=no # Use the triSYCL Sycl implementation (ComputeCPP by default).
+ )
+
+ if use cuda; then
+ cuda_add_sandbox -w
+ export CUDAFLAGS="${NVCCFLAGS}"
+ if use clang; then
+ local llvm_prefix
+ llvm_prefix="$(get_llvm_prefix -b)"
+ export CC="${llvm_prefix}/bin/clang"
+ export CXX="${llvm_prefix}/bin/clang++"
+ else
+ cuda_set_CUDAHOSTCXX
+ mycmakeargs+=(
+ -DCUDA_HOST_COMPILER="${CUDAHOSTCXX}"
+ )
+ fi
+ if [[ "${CUDA_VERBOSE}" == true ]]; then
+ mycmakeargs+=(
+ -DCUDA_VERBOSE_BUILD=yes
+ )
+ NVCCFLAGS+=" -v"
+ fi
+
+ [[ -z "${CUDAARCHS}" ]] && einfo "trying to determine host CUDAARCHS"
+ : "${CUDAARCHS:=$(__nvcc_device_query)}"
+ export CUDAARCHS
+
+ mycmakeargs+=(
+ -DEIGEN_CUDA_COMPUTE_ARCH="${CUDAARCHS}"
+ )
+ fi
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local targets=()
+ if use doc; then
+ targets+=( doc )
+ HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+ fi
+ if use test; then
+ targets+=( buildtests )
+ if ! use lapack; then
+ targets+=( blas )
+ fi
+ # tests generate random data, which
+ # obviously fails for some seeds
+ export EIGEN_SEED=712808
+ fi
+
+ if use doc || use test; then
+ cmake_src_compile "${targets[@]}"
+ fi
+}
+
+src_test() {
+ CMAKE_SKIP_TESTS=(
+ product_small_32 # 143 (Subprocess aborted)
+ product_small_33 # 144 (Subprocess aborted)
+
+ eigensolver_selfadjoint_13 # 452 (Subprocess aborted)
+
+ cholmod_support_21 # 726 (Subprocess aborted)
+ cholmod_support_22 # 727 (Subprocess aborted)
+
+ NonLinearOptimization # 930 (Subprocess aborted)
+ openglsupport # 990 (Failed)
+ levenberg_marquardt # 1020 (Subprocess aborted)
+ )
+
+ if use cuda ; then
+ cuda_add_sandbox -w
+
+ CMAKE_SKIP_TESTS+=(
+ cxx11_tensor_cast_float16_gpu
+ cxx11_tensor_gpu_5
+ )
+ fi
+
+ if use lapack ; then
+ CMAKE_SKIP_TESTS+=(
+ "^LAPACK-.*$"
+ )
+ fi
+
+ local myctestargs=(
+ -j1 # otherwise breaks due to cmake reruns
+ )
+
+ cmake_src_test
+}
diff --git a/dev-cpp/eigen/eigen-3.4.9999.ebuild b/dev-cpp/eigen/eigen-3.4.9999.ebuild
new file mode 100644
index 000000000000..d58e3b110010
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.4.9999.ebuild
@@ -0,0 +1,409 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2 llvm toolchain-funcs
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="https://eigen.tuxfamily.org/index.php?title=Main_Page"
+
+if [[ ${PV} = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/lib${PN}/${PN}.git"
+ if [[ ${PV} = 3.4.9999* ]] ; then
+ EGIT_COMMIT="3.4"
+ fi
+else
+ SRC_URI="
+ https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2
+ test? ( lapack? ( https://downloads.tuxfamily.org/${PN}/lapack_addons_3.4.1.tgz -> ${PN}-lapack_addons-3.4.1.tgz ) )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+LICENSE="MPL-2.0"
+SLOT="3"
+
+# The following lines are shamelessly stolen from ffmpeg-9999.ebuild with modifications
+ARM_CPU_FEATURES=(
+ neon:NEON
+)
+PPC_CPU_FEATURES=(
+ altivec:ALTIVEC
+ vsx:VSX
+)
+X86_CPU_FEATURES=(
+ avx:AVX
+ avx2:AVX2
+ avx512f:AVX512
+ avx512dq:AVX512DQ
+ f16c:FP16C
+ fma3:FMA
+ popcnt:POPCNT
+ sse:SSE
+ sse2:SSE2
+ sse3:SSE3
+ ssse3:SSSE3
+ sse4_1:SSE4_1
+ sse4_2:SSE4_2
+)
+# MIPS_CPU_FEATURES=(
+# msa:MSA
+# )
+# S390_CPU_FEATURES=(
+# z13:Z13
+# z14:Z14
+# )
+
+CPU_FEATURES_MAP=(
+ ${ARM_CPU_FEATURES[@]/#/cpu_flags_arm_}
+ ${PPC_CPU_FEATURES[@]/#/cpu_flags_ppc_}
+ ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_}
+ # ${MIPS_CPU_FEATURES[@]/#/cpu_flags_mips_}
+ # ${S390_CPU_FEATURES[@]/#/cpu_flags_s390_}
+)
+
+IUSE_TEST_BACKENDS=(
+ "adolc"
+ "boost"
+ "cholmod"
+ "fftw"
+ "klu"
+ "opengl"
+ "openmp"
+ "pastix"
+ "sparsehash"
+ "spqr"
+ "superlu"
+ "umfpack"
+)
+
+IUSE="benchmark ${CPU_FEATURES_MAP[*]%:*} clang cuda hip debug doc lapack test ${IUSE_TEST_BACKENDS[*]}" #zvector
+
+# Tests failing again because of compiler issues
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-doc/doxygen[dot]
+ dev-texlive/texlive-bibtexextra
+ dev-texlive/texlive-fontsextra
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ test? ( virtual/pkgconfig )
+"
+
+# METIS
+# MPREAL
+# dev-libs/mpfr:0
+# dev-libs/gmp:0
+
+TEST_BACKENDS="
+ boost? ( dev-libs/boost )
+ adolc? ( sci-libs/adolc[sparse] )
+ cholmod? ( sci-libs/cholmod:= )
+ fftw? ( sci-libs/fftw )
+ spqr? ( sci-libs/spqr )
+ klu? ( sci-libs/klu )
+ opengl? (
+ media-libs/freeglut
+ media-libs/glew
+ media-libs/libglvnd
+ )
+ pastix? ( sci-libs/pastix[-mpi] )
+ sparsehash? (
+ amd64? ( dev-cpp/sparsehash )
+ arm64? ( dev-cpp/sparsehash )
+ ppc64? ( dev-cpp/sparsehash )
+ x86? ( dev-cpp/sparsehash )
+ )
+ superlu? ( sci-libs/superlu )
+ umfpack? ( sci-libs/umfpack )
+"
+DEPEND="
+ test? (
+ cuda? (
+ !clang? (
+ dev-util/nvidia-cuda-toolkit
+ )
+ clang? (
+ sys-devel/clang[llvm_targets_NVPTX]
+ openmp? ( sys-libs/libomp[llvm_targets_NVPTX,offload] )
+ )
+ )
+ hip? ( dev-util/hip )
+ lapack? ( virtual/lapacke )
+ ${TEST_BACKENDS}
+ )
+"
+
+REQUIRED_USE="
+ || ( ${IUSE_TEST_BACKENDS[*]} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.3.9-max-macro.patch"
+ "${FILESDIR}/${PN}-3.4.0-doc-nocompress.patch" # bug 830064
+ "${FILESDIR}/${PN}-3.4.0-buildstring.patch"
+ "${FILESDIR}/${PN}-3.4.0-noansi.patch"
+ "${FILESDIR}/${PN}-3.4.0-cxxstandard.patch"
+)
+
+# TODO should be in cuda.eclass
+cuda_set_CUDAHOSTCXX() {
+ local compiler
+ tc-is-gcc && compiler="gcc"
+ tc-is-clang && compiler="clang"
+ [[ -z "$compiler" ]] && die "no compiler specified"
+
+ local package="sys-devel/${compiler}"
+ local version="${package}"
+ local CUDAHOSTCXX_test
+ while
+ CUDAHOSTCXX="${CUDAHOSTCXX_test}"
+ version=$(best_version "${version}")
+ if [[ -z "${version}" ]]; then
+ if [[ -z "${CUDAHOSTCXX}" ]]; then
+ die "could not find supported version of ${package}"
+ fi
+ break
+ fi
+ CUDAHOSTCXX_test="$(
+ dirname "$(
+ realpath "$(
+ which "${compiler}-$(echo "${version}" | grep -oP "(?<=${package}-)[0-9]*")"
+ )"
+ )"
+ )"
+ version="<${version}"
+ do ! echo "int main(){}" | nvcc "-ccbin ${CUDAHOSTCXX_test}" - -x cu &>/dev/null; done
+
+ export CUDAHOSTCXX
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.bz2"
+
+ if use test && use lapack; then
+ cd "${S}/lapack" || die
+ unpack "${PN}-lapack_addons-3.4.1.tgz"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ cmake_comment_add_subdirectory demos
+
+ if ! use test; then
+ sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+ -i CMakeLists.txt || die
+ fi
+
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DEIGEN_BUILD_BTL="$(usex benchmark)"
+ )
+ if use test; then
+ mycmakeargs+=(
+ # the OpenGL testsuite is extremely brittle, bug #712808
+ -DOpenGL_GL_PREFERENCE="GLVND"
+ -DEIGEN_TEST_OPENGL="$(usex opengl)" # Enable OpenGL support in unit tests
+ -DEIGEN_TEST_OPENMP="$(usex openmp)" # Enable/Disable OpenMP in tests/examples
+
+ # needs Qt4
+ -DEIGEN_TEST_NOQT=yes # Disable Qt support in unit tests
+
+ -DCMAKE_DISABLE_FIND_PACKAGE_MPREAL=ON
+
+ -DEIGEN_TEST_CXX11=yes
+
+ # -DEIGEN_TEST_CUSTOM_CXX_FLAGS= # Additional compiler flags when compiling unit tests.
+ # -DEIGEN_TEST_CUSTOM_LINKER_FLAGS= # Additional linker flags when linking unit tests.
+ # -DEIGEN_TEST_BUILD_FLAGS= # Options passed to the build command of unit tests
+
+ # -DEIGEN_BUILD_BTL=yes # Build benchmark suite
+
+ # -DEIGEN_INTERNAL_DOCUMENTATION=no # Build internal documentation
+ # -DEIGEN_BUILD_DOC=yes # Enable creation of Eigen documentation
+ # -DEIGEN_BUILD_PKGCONFIG=yes # Build pkg-config .pc file for Eigen
+ # -DEIGEN_DOC_USE_MATHJAX=yes # Use MathJax for rendering math in HTML docs
+
+ -DEIGEN_TEST_BUILD_DOCUMENTATION="$(usex doc)" # Test building the doxygen documentation
+
+ # -DEIGEN_COVERAGE_TESTING=no # Enable/disable gcov
+ # -DEIGEN_CTEST_ERROR_EXCEPTION= # Regular expression for build error messages to be filtered out
+ # -DEIGEN_DEBUG_ASSERTS=no # Enable advanced debugging of assertions
+ # -DEIGEN_NO_ASSERTION_CHECKING=no # Disable checking of assertions using exceptions
+ # -DEIGEN_TEST_NO_EXCEPTIONS=no # Disables C++ exceptions
+ # -DEIGEN_TEST_NO_EXPLICIT_ALIGNMENT=no # Disable explicit alignment (hence vectorization) in tests/examples
+ # -DEIGEN_TEST_NO_EXPLICIT_VECTORIZATION=no # Disable explicit vectorization in tests/examples
+
+ # -DEIGEN_DASHBOARD_BUILD_TARGET=buildtests # Target to be built in dashboard mode, default is buildtests
+
+ # -DEIGEN_DEFAULT_TO_ROW_MAJOR=no # Use row-major as default matrix storage order
+
+ # -DEIGEN_TEST_MATRIX_DIR=yes # Enable testing of realword sparse matrices contained in the specified path
+ # -DEIGEN_TEST_MAX_SIZE=320 # Maximal matrix/vector size, default is 320
+ # -DEIGEN_SPLIT_LARGE_TESTS=no # Split large tests into smaller executables
+ )
+
+ use !adolc && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Adolc="TRUE" )
+ use !boost && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Boost="TRUE" )
+ use !cholmod && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_CHOLMOD="TRUE" )
+ use !fftw && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_FFTW="TRUE" )
+ use !sparsehash && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_GoogleHash="TRUE" )
+ use !klu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KLU="TRUE" )
+ use !opengl && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL="TRUE" )
+ use !openmp && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP="TRUE" )
+ use !pastix && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_PASTIX="TRUE" )
+ use !spqr && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SPQR="TRUE" )
+ use !superlu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU="TRUE" )
+ use !umfpack && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_UMFPACK="TRUE" )
+
+ if use lapack; then
+ mycmakeargs+=(
+ -DEIGEN_ENABLE_LAPACK_TESTS=yes
+ -DEIGEN_TEST_EXTERNAL_BLAS=yes # Use external BLAS library for testsuite
+ -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON
+ )
+ fi
+
+ if use arm; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use arm64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON64="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use ppc || use ppc64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_ALTIVEC="$(usex cpu_flags_ppc_altivec)"
+ -DEIGEN_TEST_VSX="$(usex cpu_flags_ppc_vsx)"
+ )
+ fi
+
+ if use amd64 || use x86; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_32BIT=no # Force generating 32bit code.
+ # -DEIGEN_TEST_X87=no # Force using X87 instructions. Implies no vectorization.
+ -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+ -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+ -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+ -DEIGEN_TEST_FMA="$(usex cpu_flags_x86_fma3)"
+ -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+ -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+ -DEIGEN_TEST_AVX="$(usex cpu_flags_x86_avx)"
+ -DEIGEN_TEST_F16C="$(usex cpu_flags_x86_f16c)"
+ -DEIGEN_TEST_AVX2="$(usex cpu_flags_x86_avx2)"
+ -DEIGEN_TEST_AVX512="$(usex cpu_flags_x86_avx512f)"
+ -DEIGEN_TEST_AVX512DQ="$(usex cpu_flags_x86_avx512dq)"
+ )
+ fi
+
+ if use mips; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_MSA=no # Enable/Disable MSA in tests/examples
+ )
+ fi
+
+ if use s390; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_Z13=no # Enable/Disable S390X(zEC13) ZVECTOR in tests/examples
+ # -DEIGEN_TEST_Z14=no # Enable/Disable S390X(zEC14) ZVECTOR in tests/examples
+ )
+ fi
+
+ mycmakeargs+=(
+ -DEIGEN_TEST_CUDA="$(usex cuda)" # Enable CUDA support in unit tests
+ -DEIGEN_TEST_CUDA_CLANG="$(usex cuda "$(usex clang)")" # Use clang instead of nvcc to compile the CUDA tests
+
+ -DEIGEN_TEST_HIP="$(usex hip)" # Add HIP support.
+
+ # -DEIGEN_TEST_SYCL=no # Add Sycl support.
+ # -DEIGEN_SYCL_TRISYCL=no # Use the triSYCL Sycl implementation (ComputeCPP by default).
+ )
+
+ if use cuda; then
+ cuda_add_sandbox -w
+ export CUDAFLAGS="${NVCCFLAGS}"
+ if use clang; then
+ local llvm_prefix
+ llvm_prefix="$(get_llvm_prefix -b)"
+ export CC="${llvm_prefix}/bin/clang"
+ export CXX="${llvm_prefix}/bin/clang++"
+ else
+ cuda_set_CUDAHOSTCXX
+ mycmakeargs+=(
+ -DCUDA_HOST_COMPILER="${CUDAHOSTCXX}"
+ )
+ fi
+ if [[ "${CUDA_VERBOSE}" == true ]]; then
+ mycmakeargs+=(
+ -DCUDA_VERBOSE_BUILD=yes
+ )
+ NVCCFLAGS+=" -v"
+ fi
+
+ [[ -z "${CUDAARCHS}" ]] && einfo "trying to determine host CUDAARCHS"
+ : "${CUDAARCHS:=$(__nvcc_device_query)}"
+ export CUDAARCHS
+
+ mycmakeargs+=(
+ -DEIGEN_CUDA_COMPUTE_ARCH="${CUDAARCHS}"
+ )
+ fi
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local targets=()
+ if use doc; then
+ targets+=( doc )
+ HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+ fi
+ if use test; then
+ targets+=( buildtests )
+ if ! use lapack; then
+ targets+=( blas )
+ fi
+ # tests generate random data, which
+ # obviously fails for some seeds
+ export EIGEN_SEED=712808
+ fi
+
+ if use doc || use test; then
+ cmake_src_compile "${targets[@]}"
+ fi
+}
+
+src_test() {
+ if use cuda ; then
+ cuda_add_sandbox -w
+ fi
+
+ local myctestargs=(
+ -j1 # otherwise breaks due to cmake reruns
+ )
+
+ cmake_src_test
+}
diff --git a/dev-cpp/eigen/eigen-9999.ebuild b/dev-cpp/eigen/eigen-9999.ebuild
new file mode 100644
index 000000000000..c622dd3a94bf
--- /dev/null
+++ b/dev-cpp/eigen/eigen-9999.ebuild
@@ -0,0 +1,405 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED="test"
+inherit cmake cuda fortran-2 llvm toolchain-funcs
+
+DESCRIPTION="C++ template library for linear algebra"
+HOMEPAGE="https://eigen.tuxfamily.org/index.php?title=Main_Page"
+
+if [[ ${PV} = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://gitlab.com/lib${PN}/${PN}.git"
+ if [[ ${PV} = 3.4.9999* ]] ; then
+ EGIT_COMMIT="3.4"
+ fi
+else
+ SRC_URI="
+ https://gitlab.com/lib${PN}/${PN}/-/archive/${PV}/${P}.tar.bz2
+ test? ( lapack? ( https://downloads.tuxfamily.org/${PN}/lapack_addons_3.4.1.tgz -> ${PN}-lapack_addons-3.4.1.tgz ) )
+ "
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+fi
+
+LICENSE="MPL-2.0"
+SLOT="3"
+
+# The following lines are shamelessly stolen from ffmpeg-9999.ebuild with modifications
+ARM_CPU_FEATURES=(
+ neon:NEON
+)
+PPC_CPU_FEATURES=(
+ altivec:ALTIVEC
+ vsx:VSX
+)
+X86_CPU_FEATURES=(
+ avx:AVX
+ avx2:AVX2
+ avx512f:AVX512
+ avx512dq:AVX512DQ
+ f16c:FP16C
+ fma3:FMA
+ popcnt:POPCNT
+ sse:SSE
+ sse2:SSE2
+ sse3:SSE3
+ ssse3:SSSE3
+ sse4_1:SSE4_1
+ sse4_2:SSE4_2
+)
+# MIPS_CPU_FEATURES=(
+# msa:MSA
+# )
+# S390_CPU_FEATURES=(
+# z13:Z13
+# z14:Z14
+# )
+
+CPU_FEATURES_MAP=(
+ ${ARM_CPU_FEATURES[@]/#/cpu_flags_arm_}
+ ${PPC_CPU_FEATURES[@]/#/cpu_flags_ppc_}
+ ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_}
+ # ${MIPS_CPU_FEATURES[@]/#/cpu_flags_mips_}
+ # ${S390_CPU_FEATURES[@]/#/cpu_flags_s390_}
+)
+
+IUSE_TEST_BACKENDS=(
+ "adolc"
+ "boost"
+ "cholmod"
+ "fftw"
+ "klu"
+ "opengl"
+ "openmp"
+ "pastix"
+ "sparsehash"
+ "spqr"
+ "superlu"
+ "umfpack"
+)
+
+IUSE="benchmark ${CPU_FEATURES_MAP[*]%:*} clang cuda hip debug doc lapack test ${IUSE_TEST_BACKENDS[*]}" #zvector
+
+# Tests failing again because of compiler issues
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ doc? (
+ app-doc/doxygen[dot]
+ dev-texlive/texlive-bibtexextra
+ dev-texlive/texlive-fontsextra
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )
+ test? ( virtual/pkgconfig )
+"
+
+# METIS
+# MPREAL
+# dev-libs/mpfr:0
+# dev-libs/gmp:0
+
+TEST_BACKENDS="
+ boost? ( dev-libs/boost )
+ adolc? ( sci-libs/adolc[sparse] )
+ cholmod? ( sci-libs/cholmod:= )
+ fftw? ( sci-libs/fftw )
+ spqr? ( sci-libs/spqr )
+ klu? ( sci-libs/klu )
+ opengl? (
+ media-libs/freeglut
+ media-libs/glew
+ media-libs/libglvnd
+ )
+ pastix? ( sci-libs/pastix[-mpi] )
+ sparsehash? (
+ amd64? ( dev-cpp/sparsehash )
+ arm64? ( dev-cpp/sparsehash )
+ ppc64? ( dev-cpp/sparsehash )
+ x86? ( dev-cpp/sparsehash )
+ )
+ superlu? ( sci-libs/superlu )
+ umfpack? ( sci-libs/umfpack )
+"
+DEPEND="
+ test? (
+ cuda? (
+ !clang? (
+ dev-util/nvidia-cuda-toolkit
+ )
+ clang? (
+ sys-devel/clang[llvm_targets_NVPTX]
+ openmp? ( sys-libs/libomp[llvm_targets_NVPTX,offload] )
+ )
+ )
+ hip? ( dev-util/hip )
+ lapack? ( virtual/lapacke )
+ ${TEST_BACKENDS}
+ )
+"
+
+REQUIRED_USE="
+ || ( ${IUSE_TEST_BACKENDS[*]} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-doc-nocompress.patch" # bug 830064
+ "${FILESDIR}/${PN}-3.4.0-buildstring.patch"
+ "${FILESDIR}/${PN}-9999-please_protect_your_min_with_parentheses.patch"
+)
+
+# TODO should be in cuda.eclass
+cuda_set_CUDAHOSTCXX() {
+ local compiler
+ tc-is-gcc && compiler="gcc"
+ tc-is-clang && compiler="clang"
+ [[ -z "$compiler" ]] && die "no compiler specified"
+
+ local package="sys-devel/${compiler}"
+ local version="${package}"
+ local CUDAHOSTCXX_test
+ while
+ CUDAHOSTCXX="${CUDAHOSTCXX_test}"
+ version=$(best_version "${version}")
+ if [[ -z "${version}" ]]; then
+ if [[ -z "${CUDAHOSTCXX}" ]]; then
+ die "could not find supported version of ${package}"
+ fi
+ break
+ fi
+ CUDAHOSTCXX_test="$(
+ dirname "$(
+ realpath "$(
+ which "${compiler}-$(echo "${version}" | grep -oP "(?<=${package}-)[0-9]*")"
+ )"
+ )"
+ )"
+ version="<${version}"
+ do ! echo "int main(){}" | nvcc "-ccbin ${CUDAHOSTCXX_test}" - -x cu &>/dev/null; done
+
+ export CUDAHOSTCXX
+}
+
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ git-r3_src_unpack
+ else
+ unpack "${P}.tar.bz2"
+
+ if use test && use lapack; then
+ cd "${S}/lapack" || die
+ unpack "${PN}-lapack_addons-3.4.1.tgz"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ cmake_comment_add_subdirectory demos
+
+ if ! use test; then
+ sed -e "/add_subdirectory(test/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(blas/s/^/#DONOTCOMPILE /g" \
+ -e "/add_subdirectory(lapack/s/^/#DONOTCOMPILE /g" \
+ -i CMakeLists.txt || die
+ fi
+
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DEIGEN_BUILD_BTL="$(usex benchmark)"
+ )
+ if use test; then
+ mycmakeargs+=(
+ # the OpenGL testsuite is extremely brittle, bug #712808
+ -DOpenGL_GL_PREFERENCE="GLVND"
+ -DEIGEN_TEST_OPENGL="$(usex opengl)" # Enable OpenGL support in unit tests
+ -DEIGEN_TEST_OPENMP="$(usex openmp)" # Enable/Disable OpenMP in tests/examples
+
+ # needs Qt4
+ -DEIGEN_TEST_NOQT=yes # Disable Qt support in unit tests
+
+ -DCMAKE_DISABLE_FIND_PACKAGE_MPREAL=ON
+
+ # -DEIGEN_TEST_CUSTOM_CXX_FLAGS= # Additional compiler flags when compiling unit tests.
+ # -DEIGEN_TEST_CUSTOM_LINKER_FLAGS= # Additional linker flags when linking unit tests.
+ # -DEIGEN_TEST_BUILD_FLAGS= # Options passed to the build command of unit tests
+
+ # -DEIGEN_BUILD_BTL=yes # Build benchmark suite
+
+ # -DEIGEN_INTERNAL_DOCUMENTATION=no # Build internal documentation
+ # -DEIGEN_BUILD_DOC=yes # Enable creation of Eigen documentation
+ # -DEIGEN_BUILD_PKGCONFIG=yes # Build pkg-config .pc file for Eigen
+ # -DEIGEN_DOC_USE_MATHJAX=yes # Use MathJax for rendering math in HTML docs
+
+ -DEIGEN_TEST_BUILD_DOCUMENTATION="$(usex doc)" # Test building the doxygen documentation
+
+ # -DEIGEN_COVERAGE_TESTING=no # Enable/disable gcov
+ # -DEIGEN_CTEST_ERROR_EXCEPTION= # Regular expression for build error messages to be filtered out
+ # -DEIGEN_DEBUG_ASSERTS=no # Enable advanced debugging of assertions
+ # -DEIGEN_NO_ASSERTION_CHECKING=no # Disable checking of assertions using exceptions
+ # -DEIGEN_TEST_NO_EXCEPTIONS=no # Disables C++ exceptions
+ # -DEIGEN_TEST_NO_EXPLICIT_ALIGNMENT=no # Disable explicit alignment (hence vectorization) in tests/examples
+ # -DEIGEN_TEST_NO_EXPLICIT_VECTORIZATION=no # Disable explicit vectorization in tests/examples
+
+ # -DEIGEN_DASHBOARD_BUILD_TARGET=buildtests # Target to be built in dashboard mode, default is buildtests
+
+ # -DEIGEN_DEFAULT_TO_ROW_MAJOR=no # Use row-major as default matrix storage order
+
+ # -DEIGEN_TEST_MATRIX_DIR=yes # Enable testing of realword sparse matrices contained in the specified path
+ # -DEIGEN_TEST_MAX_SIZE=320 # Maximal matrix/vector size, default is 320
+ # -DEIGEN_SPLIT_LARGE_TESTS=no # Split large tests into smaller executables
+ )
+
+ use !adolc && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Adolc="TRUE" )
+ use !boost && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Boost="TRUE" )
+ use !cholmod && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_CHOLMOD="TRUE" )
+ use !fftw && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_FFTW="TRUE" )
+ use !sparsehash && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_GoogleHash="TRUE" )
+ use !klu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KLU="TRUE" )
+ use !opengl && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL="TRUE" )
+ use !openmp && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP="TRUE" )
+ use !pastix && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_PASTIX="TRUE" )
+ use !spqr && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SPQR="TRUE" )
+ use !superlu && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU="TRUE" )
+ use !umfpack && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_UMFPACK="TRUE" )
+
+ if use lapack; then
+ mycmakeargs+=(
+ -DEIGEN_ENABLE_LAPACK_TESTS=yes
+ -DEIGEN_TEST_EXTERNAL_BLAS=yes # Use external BLAS library for testsuite
+ -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON
+ )
+ fi
+
+ if use arm; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use arm64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_NEON64="$(usex cpu_flags_arm_neon)"
+ )
+ fi
+
+ if use ppc || use ppc64; then
+ mycmakeargs+=(
+ -DEIGEN_TEST_ALTIVEC="$(usex cpu_flags_ppc_altivec)"
+ -DEIGEN_TEST_VSX="$(usex cpu_flags_ppc_vsx)"
+ )
+ fi
+
+ if use amd64 || use x86; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_32BIT=no # Force generating 32bit code.
+ # -DEIGEN_TEST_X87=no # Force using X87 instructions. Implies no vectorization.
+ -DEIGEN_TEST_SSE2="$(usex cpu_flags_x86_sse2)"
+ -DEIGEN_TEST_SSE3="$(usex cpu_flags_x86_sse3)"
+ -DEIGEN_TEST_SSSE3="$(usex cpu_flags_x86_ssse3)"
+ -DEIGEN_TEST_FMA="$(usex cpu_flags_x86_fma3)"
+ -DEIGEN_TEST_SSE4_1="$(usex cpu_flags_x86_sse4_1)"
+ -DEIGEN_TEST_SSE4_2="$(usex cpu_flags_x86_sse4_2)"
+ -DEIGEN_TEST_AVX="$(usex cpu_flags_x86_avx)"
+ -DEIGEN_TEST_F16C="$(usex cpu_flags_x86_f16c)"
+ -DEIGEN_TEST_AVX2="$(usex cpu_flags_x86_avx2)"
+ -DEIGEN_TEST_AVX512="$(usex cpu_flags_x86_avx512f)"
+ -DEIGEN_TEST_AVX512DQ="$(usex cpu_flags_x86_avx512dq)"
+ )
+ fi
+
+ if use mips; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_MSA=no # Enable/Disable MSA in tests/examples
+ )
+ fi
+
+ if use s390; then
+ mycmakeargs+=(
+ # -DEIGEN_TEST_Z13=no # Enable/Disable S390X(zEC13) ZVECTOR in tests/examples
+ # -DEIGEN_TEST_Z14=no # Enable/Disable S390X(zEC14) ZVECTOR in tests/examples
+ )
+ fi
+
+ mycmakeargs+=(
+ -DEIGEN_TEST_CUDA="$(usex cuda)" # Enable CUDA support in unit tests
+ -DEIGEN_TEST_CUDA_CLANG="$(usex cuda "$(usex clang)")" # Use clang instead of nvcc to compile the CUDA tests
+
+ -DEIGEN_TEST_HIP="$(usex hip)" # Add HIP support.
+
+ # -DEIGEN_TEST_SYCL=no # Add Sycl support.
+ # -DEIGEN_SYCL_TRISYCL=no # Use the triSYCL Sycl implementation (ComputeCPP by default).
+ )
+
+ if use cuda; then
+ cuda_add_sandbox -w
+ export CUDAFLAGS="${NVCCFLAGS}"
+ if use clang; then
+ local llvm_prefix
+ llvm_prefix="$(get_llvm_prefix -b)"
+ export CC="${llvm_prefix}/bin/clang"
+ export CXX="${llvm_prefix}/bin/clang++"
+ else
+ cuda_set_CUDAHOSTCXX
+ mycmakeargs+=(
+ -DCUDA_HOST_COMPILER="${CUDAHOSTCXX}"
+ )
+ fi
+ if [[ "${CUDA_VERBOSE}" == true ]]; then
+ mycmakeargs+=(
+ -DCUDA_VERBOSE_BUILD=yes
+ )
+ NVCCFLAGS+=" -v"
+ fi
+
+ [[ -z "${CUDAARCHS}" ]] && einfo "trying to determine host CUDAARCHS"
+ : "${CUDAARCHS:=$(__nvcc_device_query)}"
+ export CUDAARCHS
+
+ mycmakeargs+=(
+ -DEIGEN_CUDA_COMPUTE_ARCH="${CUDAARCHS}"
+ )
+ fi
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ local targets=()
+ if use doc; then
+ targets+=( doc )
+ HTML_DOCS=( "${BUILD_DIR}"/doc/html/. )
+ fi
+ if use test; then
+ targets+=( buildtests )
+ # if ! use lapack; then
+ # targets+=( blas )
+ # fi
+ # tests generate random data, which
+ # obviously fails for some seeds
+ export EIGEN_SEED=712808
+ fi
+
+ if use doc || use test; then
+ cmake_src_compile "${targets[@]}"
+ fi
+}
+
+src_test() {
+ if use cuda ; then
+ cuda_add_sandbox -w
+ fi
+
+ local myctestargs=(
+ -j1 # otherwise breaks due to cmake reruns
+ )
+
+ cmake_src_test
+}
diff --git a/dev-cpp/eigen/files/eigen-3.4.0-buildstring.patch b/dev-cpp/eigen/files/eigen-3.4.0-buildstring.patch
new file mode 100644
index 000000000000..cb3671dc0100
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.4.0-buildstring.patch
@@ -0,0 +1,27 @@
+--- a/cmake/EigenTesting.cmake
++++ b/cmake/EigenTesting.cmake
+@@ -559,14 +559,22 @@ macro(ei_get_cxxflags VAR)
+ set(${VAR} VSX)
+ elseif(EIGEN_TEST_ALTIVEC)
+ set(${VAR} ALVEC)
+- elseif(EIGEN_TEST_FMA)
+- set(${VAR} FMA)
++ elseif(EIGEN_TEST_AVX512DQ)
++ set(${VAR} AVX512DQ)
++ elseif(EIGEN_TEST_AVX512)
++ set(${VAR} AVX512)
++ elseif(EIGEN_TEST_AVX2)
++ set(${VAR} AVX2)
++ elseif(EIGEN_TEST_F16C)
++ set(${VAR} F16C)
+ elseif(EIGEN_TEST_AVX)
+ set(${VAR} AVX)
+ elseif(EIGEN_TEST_SSE4_2)
+ set(${VAR} SSE42)
+ elseif(EIGEN_TEST_SSE4_1)
+ set(${VAR} SSE41)
++ elseif(EIGEN_TEST_FMA)
++ set(${VAR} FMA)
+ elseif(EIGEN_TEST_SSSE3)
+ set(${VAR} SSSE3)
+ elseif(EIGEN_TEST_SSE3)
diff --git a/dev-cpp/eigen/files/eigen-3.4.0-cxxstandard.patch b/dev-cpp/eigen/files/eigen-3.4.0-cxxstandard.patch
new file mode 100644
index 000000000000..826aa78d05aa
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.4.0-cxxstandard.patch
@@ -0,0 +1,108 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -74,19 +74,9 @@ macro(ei_add_cxx_compiler_flag FLAG)
+ endif()
+ endmacro()
+
+-check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CPP11)
+-
+-if(EIGEN_TEST_CXX11)
+- set(CMAKE_CXX_STANDARD 11)
+- set(CMAKE_CXX_EXTENSIONS OFF)
+- if(EIGEN_COMPILER_SUPPORT_CPP11)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+- endif()
+-else()
+- #set(CMAKE_CXX_STANDARD 03)
+- #set(CMAKE_CXX_EXTENSIONS OFF)
+- ei_add_cxx_compiler_flag("-std=c++03")
+-endif()
++set(CMAKE_CXX_STANDARD 14)
++set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
++set(CMAKE_CXX_EXTENSIONS OFF)
+
+ # Determine if we should build shared libraries on this platform.
+ get_cmake_property(EIGEN_BUILD_SHARED_LIBS TARGET_SUPPORTS_SHARED_LIBS)
+@@ -157,7 +157,6 @@ if(NOT MSVC)
+ ei_add_cxx_compiler_flag("-Wshorten-64-to-32")
+ ei_add_cxx_compiler_flag("-Wlogical-op")
+ ei_add_cxx_compiler_flag("-Wenum-conversion")
+- ei_add_cxx_compiler_flag("-Wc++11-extensions")
+ ei_add_cxx_compiler_flag("-Wdouble-promotion")
+ # ei_add_cxx_compiler_flag("-Wconversion")
+
+--- a/Eigen/src/Core/util/Macros.h
++++ b/Eigen/src/Core/util/Macros.h
+@@ -37,7 +37,7 @@
+ // Expected values are 03, 11, 14, 17, etc.
+ // By default, let's use an arbitrarily large C++ version.
+ #ifndef EIGEN_MAX_CPP_VER
+-#define EIGEN_MAX_CPP_VER 99
++#define EIGEN_MAX_CPP_VER 14
+ #endif
+
+ /** Allows to disable some optimizations which might affect the accuracy of the result.
+--- a/doc/examples/CMakeLists.txt
++++ b/doc/examples/CMakeLists.txt
+@@ -14,7 +14,3 @@ foreach(example_src ${examples_SRCS})
+ )
+ add_dependencies(all_examples ${example})
+ endforeach()
+-
+-if(EIGEN_COMPILER_SUPPORT_CPP11)
+-ei_add_target_property(nullary_indexing COMPILE_FLAGS "-std=c++11")
+-endif()
+\ No newline at end of file
+diff --git a/doc/snippets/CMakeLists.txt b/doc/snippets/CMakeLists.txt
+index 65f195a..4cb18c8 100644
+--- a/doc/snippets/CMakeLists.txt
++++ b/doc/snippets/CMakeLists.txt
+@@ -15,9 +15,6 @@ foreach(snippet_src ${snippets_SRCS})
+ if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
+ target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
+ endif()
+- if(${snippet_src} MATCHES "cxx11")
+- set_target_properties(${compile_snippet_target} PROPERTIES COMPILE_FLAGS "-std=c++11")
+- endif()
+ if(${snippet_src} MATCHES "deprecated")
+ set_target_properties(${compile_snippet_target} PROPERTIES COMPILE_FLAGS "-DEIGEN_NO_DEPRECATED_WARNING")
+ endif()
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -399,7 +399,6 @@ if(CUDA_FOUND)
+ set(CUDA_NVCC_FLAGS "-ccbin ${CMAKE_C_COMPILER}" CACHE STRING "nvcc flags" FORCE)
+ endif()
+ if(EIGEN_TEST_CUDA_CLANG)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
+ foreach(GPU IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
+ string(APPEND CMAKE_CXX_FLAGS " --cuda-gpu-arch=sm_${GPU}")
+--- a/unsupported/test/CMakeLists.txt
++++ b/unsupported/test/CMakeLists.txt
+@@ -59,7 +59,7 @@ find_package(MPREAL)
+ if(MPREAL_FOUND AND EIGEN_COMPILER_SUPPORT_CPP11)
+ ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
+ include_directories(${MPREAL_INCLUDES})
+- ei_add_test(mpreal_support "-std=c++11" "${MPREAL_LIBRARIES}" )
++ ei_add_test(mpreal_support "-std=c++14" "${MPREAL_LIBRARIES}" )
+ else()
+ ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
+ endif()
+@@ -308,7 +308,6 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA)
+ set(CUDA_NVCC_FLAGS "-ccbin ${CMAKE_C_COMPILER}" CACHE STRING "nvcc flags" FORCE)
+ endif()
+ if(EIGEN_TEST_CUDA_CLANG)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
+ foreach(ARCH IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
+ string(APPEND CMAKE_CXX_FLAGS " --cuda-gpu-arch=sm_${ARCH}")
+--- a/doc/special_examples/CMakeLists.txt
++++ b/doc/special_examples/CMakeLists.txt
+@@ -23,7 +23,6 @@ if(EIGEN_COMPILER_SUPPORT_CPP11)
+ add_executable(random_cpp11 random_cpp11.cpp)
+ target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
+ add_dependencies(all_examples random_cpp11)
+- ei_add_target_property(random_cpp11 COMPILE_FLAGS "-std=c++11")
+
+ add_custom_command(
+ TARGET random_cpp11
diff --git a/dev-cpp/eigen/files/eigen-3.4.0-noansi.patch b/dev-cpp/eigen/files/eigen-3.4.0-noansi.patch
new file mode 100644
index 000000000000..c0ce44445c1d
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.4.0-noansi.patch
@@ -0,0 +1,18 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -184,6 +184,7 @@ if(NOT MSVC)
+ ei_add_cxx_compiler_flag("-wd2304") # disable ICC's "warning #2304: non-explicit constructor with single argument may cause implicit type conversion" produced by -Wnon-virtual-dtor
+
+
++ if(NOT EIGEN_TEST_CXX11)
+ # The -ansi flag must be added last, otherwise it is also used as a linker flag by check_cxx_compiler_flag making it fails
+ # Moreover we should not set both -strict-ansi and -ansi
+ check_cxx_compiler_flag("-strict-ansi" COMPILER_SUPPORT_STRICTANSI)
+@@ -194,6 +195,7 @@ if(NOT MSVC)
+ else()
+ ei_add_cxx_compiler_flag("-ansi")
+ endif()
++ endif()
+
+ if(ANDROID_NDK)
+ ei_add_cxx_compiler_flag("-pie")
diff --git a/dev-cpp/eigen/files/eigen-9999-please_protect_your_min_with_parentheses.patch b/dev-cpp/eigen/files/eigen-9999-please_protect_your_min_with_parentheses.patch
new file mode 100644
index 000000000000..0453fd33a8ae
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-9999-please_protect_your_min_with_parentheses.patch
@@ -0,0 +1,54 @@
+diff --git a/test/main.h b/test/main.h
+index 771725f06..df22e12f6 100644
+--- a/test/main.h
++++ b/test/main.h
+@@ -86,32 +86,6 @@
+ #define EIGEN_DEFAULT_DENSE_INDEX_TYPE int
+ #endif
+
+-// To test that all calls from Eigen code to std::min() and std::max() are
+-// protected by parenthesis against macro expansion, the min()/max() macros
+-// are defined here and any not-parenthesized min/max call will cause a
+-// compiler error.
+-#if !defined(__HIPCC__) && !defined(EIGEN_USE_SYCL) && !defined(EIGEN_POCKETFFT_DEFAULT)
+-//
+-// HIP header files include the following files
+-// <thread>
+-// <regex>
+-// <unordered_map>
+-// which seem to contain not-parenthesized calls to "max"/"min", triggering the following check and causing the compile
+-// to fail
+-//
+-// Including those header files before the following macro definition for "min" / "max", only partially resolves the
+-// issue This is because other HIP header files also define "isnan" / "isinf" / "isfinite" functions, which are needed
+-// in other headers.
+-//
+-// So instead choosing to simply disable this check for HIP
+-//
+-#define min(A, B) please_protect_your_min_with_parentheses
+-#define max(A, B) please_protect_your_max_with_parentheses
+-#define isnan(X) please_protect_your_isnan_with_parentheses
+-#define isinf(X) please_protect_your_isinf_with_parentheses
+-#define isfinite(X) please_protect_your_isfinite_with_parentheses
+-#endif
+-
+ // test possible conflicts
+ struct real {};
+ struct imag {};
+diff --git a/test/main.h b/test/main.h
+index df22e12f6..5ca40424e 100644
+--- a/test/main.h
++++ b/test/main.h
+@@ -95,12 +95,6 @@ struct imag {};
+ #endif
+ #define M_PI please_use_EIGEN_PI_instead_of_M_PI
+
+-#define FORBIDDEN_IDENTIFIER \
+- (this_identifier_is_forbidden_to_avoid_clashes) this_identifier_is_forbidden_to_avoid_clashes
+-// B0 is defined in POSIX header termios.h
+-#define B0 FORBIDDEN_IDENTIFIER
+-#define I FORBIDDEN_IDENTIFIER
+-
+ // _res is defined by resolv.h
+ #define _res FORBIDDEN_IDENTIFIER
+
diff --git a/dev-cpp/eigen/metadata.xml b/dev-cpp/eigen/metadata.xml
index 65119626c2f1..57571f41d055 100644
--- a/dev-cpp/eigen/metadata.xml
+++ b/dev-cpp/eigen/metadata.xml
@@ -16,6 +16,23 @@
OpenGL apps, spreadsheets and other office apps, etc. Eigen is dedicated to
providing optimal speed with GCC.
</longdescription>
+ <use>
+ <flag name="benchmark">Build benchmark suite</flag>
+ <flag name="clang">Use clang for cuda units compilation</flag>
+ <flag name="hip">Enable HIP GPU computing support</flag>
+ <flag name="adolc">Add test support for Adolc (<pkg>sci-libs/adolc</pkg>)</flag>
+ <flag name="boost">Add test support for Boost.Multiprecision (<pkg>dev-libs/boost</pkg>)</flag>
+ <flag name="cholmod">Add test support for CHOLMOD (<pkg>sci-libs/cholmod</pkg>)</flag>
+ <flag name="fftw">Add test support for fftw (<pkg>sci-libs/fftw</pkg>)</flag>
+ <flag name="klu">Add test support for KLU (<pkg>sci-libs/klu</pkg>)</flag>
+ <flag name="opengl">Add test support for OpenGL</flag>
+ <flag name="openmp">Add test support for the OpenMP (support parallel computing)</flag>
+ <flag name="pastix">Add test support for PaStiX (<pkg>sci-libs/pastix</pkg>)</flag>
+ <flag name="sparsehash">Add test support for GoogleHash (<pkg>dev-cpp/sparsehash</pkg>)</flag>
+ <flag name="spqr">Add test support for SPQR (<pkg>sci-libs/spqr</pkg>)</flag>
+ <flag name="superlu">Add test support for SuperLU (<pkg>sci-libs/superlu</pkg>)</flag>
+ <flag name="umfpack">Add test support for UMFPACK (<pkg>sci-libs/umfpack</pkg>)</flag>
+ </use>
<upstream>
<remote-id type="gitlab">libeigen/eigen</remote-id>
</upstream>
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-20 13:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 15:55 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2024-01-20 13:10 Sam James
2020-12-15 11:54 David Seifert
2020-10-12 16:15 Andreas Sturmlechner
2016-09-15 14:49 Michael Palimaka
2016-02-22 9:36 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox