summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-09-10 13:33:50 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-09-10 13:36:17 +0200
commitbcda4e0253c1993c78d3fc3891216720fd04abcd (patch)
treeeaf988af413169c23b2e4bedae3b902b9726ab31
parentkde-apps/kitinerary: Add missing DEPEND (diff)
downloadgentoo-bcda4e0253c1993c78d3fc3891216720fd04abcd.tar.gz
gentoo-bcda4e0253c1993c78d3fc3891216720fd04abcd.tar.bz2
gentoo-bcda4e0253c1993c78d3fc3891216720fd04abcd.zip
dev-cpp/eigen: Fix prototype
Closes: https://bugs.gentoo.org/665488 Package-Manager: Portage-2.3.48, Repoman-2.3.10
-rw-r--r--dev-cpp/eigen/eigen-3.3.5-r1.ebuild101
-rw-r--r--dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch19
2 files changed, 120 insertions, 0 deletions
diff --git a/dev-cpp/eigen/eigen-3.3.5-r1.ebuild b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
new file mode 100644
index 000000000000..2e8c6f919e8d
--- /dev/null
+++ b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild
@@ -0,0 +1,101 @@
+# 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.3.5-fix-prototype.patch b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
new file mode 100644
index 000000000000..e4d128f502e3
--- /dev/null
+++ b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch
@@ -0,0 +1,19 @@
+# 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