1 |
commit: bcda4e0253c1993c78d3fc3891216720fd04abcd |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 10 11:33:50 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 10 11:36:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcda4e02 |
7 |
|
8 |
dev-cpp/eigen: Fix prototype |
9 |
|
10 |
Closes: https://bugs.gentoo.org/665488 |
11 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
12 |
|
13 |
dev-cpp/eigen/eigen-3.3.5-r1.ebuild | 101 +++++++++++++++++++++ |
14 |
.../eigen/files/eigen-3.3.5-fix-prototype.patch | 19 ++++ |
15 |
2 files changed, 120 insertions(+) |
16 |
|
17 |
diff --git a/dev-cpp/eigen/eigen-3.3.5-r1.ebuild b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..2e8c6f919e8 |
20 |
--- /dev/null |
21 |
+++ b/dev-cpp/eigen/eigen-3.3.5-r1.ebuild |
22 |
@@ -0,0 +1,101 @@ |
23 |
+# Copyright 1999-2018 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+FORTRAN_NEEDED="test" |
29 |
+inherit cmake-utils cuda fortran-2 |
30 |
+ |
31 |
+DESCRIPTION="C++ template library for linear algebra" |
32 |
+HOMEPAGE="http://eigen.tuxfamily.org/" |
33 |
+SRC_URI="https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2" |
34 |
+ |
35 |
+LICENSE="MPL-2.0" |
36 |
+SLOT="3" |
37 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
38 |
+IUSE="altivec c++11 cuda debug doc neon openmp test" #zvector vsx |
39 |
+RESTRICT="!test? ( test )" |
40 |
+ |
41 |
+RDEPEND="!dev-cpp/eigen:0" |
42 |
+DEPEND=" |
43 |
+ doc? ( app-doc/doxygen[dot,latex] ) |
44 |
+ test? ( |
45 |
+ dev-libs/gmp:0 |
46 |
+ dev-libs/mpfr:0 |
47 |
+ media-libs/freeglut |
48 |
+ media-libs/glew |
49 |
+ sci-libs/adolc[sparse] |
50 |
+ sci-libs/cholmod |
51 |
+ sci-libs/fftw:3.0 |
52 |
+ sci-libs/pastix |
53 |
+ sci-libs/umfpack |
54 |
+ sci-libs/scotch |
55 |
+ sci-libs/spqr |
56 |
+ sci-libs/superlu |
57 |
+ virtual/opengl |
58 |
+ virtual/pkgconfig |
59 |
+ cuda? ( dev-util/nvidia-cuda-toolkit ) |
60 |
+ ) |
61 |
+" |
62 |
+# Missing: |
63 |
+# METIS-5 |
64 |
+# GOOGLEHASH |
65 |
+ |
66 |
+PATCHES=( "${FILESDIR}/${P}-fix-prototype.patch" ) |
67 |
+ |
68 |
+src_unpack() { |
69 |
+ default |
70 |
+ mv ${PN}* ${P} || die |
71 |
+} |
72 |
+ |
73 |
+src_prepare() { |
74 |
+ cmake-utils_src_prepare |
75 |
+ |
76 |
+ sed -e 's:-g2::g' \ |
77 |
+ -i cmake/EigenConfigureTesting.cmake || die |
78 |
+ |
79 |
+ sed -e "/add_subdirectory(demos/d" \ |
80 |
+ -i CMakeLists.txt || die |
81 |
+ |
82 |
+ if ! use test; then |
83 |
+ sed -e "/add_subdirectory(test/d" \ |
84 |
+ -i CMakeLists.txt || die |
85 |
+ |
86 |
+ sed -e "/add_subdirectory(blas/d" \ |
87 |
+ -e "/add_subdirectory(lapack/d" \ |
88 |
+ -i CMakeLists.txt || die |
89 |
+ fi |
90 |
+ sed -e "/Unknown build type/d" \ |
91 |
+ -i CMakeLists.txt || die |
92 |
+ |
93 |
+ use cuda && cuda_src_prepare |
94 |
+} |
95 |
+ |
96 |
+src_compile() { |
97 |
+ cmake-utils_src_compile |
98 |
+ use doc && cmake-utils_src_compile doc |
99 |
+} |
100 |
+ |
101 |
+src_test() { |
102 |
+ local mycmakeargs=( |
103 |
+ -DEIGEN_TEST_NOQT=ON |
104 |
+ -DEIGEN_TEST_ALTIVEC="$(usex altivec)" |
105 |
+ -DEIGEN_TEST_CXX11="$(usex c++11)" |
106 |
+ -DEIGEN_TEST_CUDA="$(usex cuda)" |
107 |
+ -DEIGEN_TEST_OPENMP="$(usex openmp)" |
108 |
+ -DEIGEN_TEST_NEON64="$(usex neon)" |
109 |
+ ) |
110 |
+ cmake-utils_src_configure |
111 |
+ cmake-utils_src_compile blas |
112 |
+ cmake-utils_src_compile buildtests |
113 |
+ cmake-utils_src_test |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ use doc && local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) |
118 |
+ cmake-utils_src_install |
119 |
+ |
120 |
+ # Debian installs it and some projects started using it. |
121 |
+ insinto /usr/share/cmake/Modules/ |
122 |
+ doins "${S}/cmake/FindEigen3.cmake" |
123 |
+} |
124 |
|
125 |
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 |
126 |
new file mode 100644 |
127 |
index 00000000000..e4d128f502e |
128 |
--- /dev/null |
129 |
+++ b/dev-cpp/eigen/files/eigen-3.3.5-fix-prototype.patch |
130 |
@@ -0,0 +1,19 @@ |
131 |
+# HG changeset patch |
132 |
+# User Gael Guennebaud <g.gael@××××.fr> |
133 |
+# Date 1528444561 -7200 |
134 |
+# Node ID 27cac8430247a65739fcd0b83ef984d0a9c010c7 |
135 |
+# Parent d4cbff8d06baf95045869ed7d0c012d641c88fcf |
136 |
+fix prototype |
137 |
+ |
138 |
+diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h |
139 |
+--- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h |
140 |
++++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h |
141 |
+@@ -173,7 +173,7 @@ |
142 |
+ /** |
143 |
+ * Set the restart value (default is 30) |
144 |
+ */ |
145 |
+- Index set_restart(const Index restart) { m_restart=restart; } |
146 |
++ void set_restart(const Index restart) { m_restart=restart; } |
147 |
+ |
148 |
+ /** |
149 |
+ * Set the number of eigenvalues to deflate at each restart |
150 |
\ No newline at end of file |