public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/
Date: Mon, 22 Feb 2016 09:36:00 +0000 (UTC)	[thread overview]
Message-ID: <1456133749.49ac69328112878890edafb2a1b6ce13bff20d44.jlec@gentoo> (raw)

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


             reply	other threads:[~2016-02-22  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22  9:36 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-15 14:49 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/eigen/files/, dev-cpp/eigen/ Michael Palimaka
2019-02-25 15:55 Andreas Sturmlechner
2020-10-12 16:15 Andreas Sturmlechner
2020-12-15 11:54 David Seifert
2024-01-20 13:10 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456133749.49ac69328112878890edafb2a1b6ce13bff20d44.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox