1 |
commit: 09be48b3fe9d1bd1dc9c45547041e8e56db29bf3 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 20 15:39:08 2016 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 20 15:39:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=09be48b3 |
7 |
|
8 |
dev-cpp/eigen: Version Bump |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=575218 |
11 |
|
12 |
Package-Manager: portage-2.2.27 |
13 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
14 |
|
15 |
dev-cpp/eigen/eigen-3.2.8.ebuild | 114 +++++++++++++++++++++++++++++++++++++++ |
16 |
1 file changed, 114 insertions(+) |
17 |
|
18 |
diff --git a/dev-cpp/eigen/eigen-3.2.8.ebuild b/dev-cpp/eigen/eigen-3.2.8.ebuild |
19 |
new file mode 100644 |
20 |
index 0000000..12b0a5d |
21 |
--- /dev/null |
22 |
+++ b/dev-cpp/eigen/eigen-3.2.8.ebuild |
23 |
@@ -0,0 +1,114 @@ |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+EAPI=5 |
29 |
+ |
30 |
+FORTRAN_NEEDED=fortran |
31 |
+ |
32 |
+inherit alternatives-2 cmake-utils fortran-2 multilib numeric vcs-snapshot |
33 |
+ |
34 |
+DESCRIPTION="C++ template library for linear algebra" |
35 |
+HOMEPAGE="http://eigen.tuxfamily.org/" |
36 |
+SRC_URI=" |
37 |
+ https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2 |
38 |
+ https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch |
39 |
+ " |
40 |
+ |
41 |
+SLOT="3" |
42 |
+LICENSE="MPL-2.0" |
43 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+IUSE="adolc doc fortran fftw gmp metis mkl pastix sparse static-libs test" |
45 |
+ |
46 |
+CDEPEND=" |
47 |
+ adolc? ( sci-libs/adolc[sparse?] ) |
48 |
+ fftw? ( sci-libs/fftw:3.0 ) |
49 |
+ gmp? ( dev-libs/gmp:0 dev-libs/mpfr:0 ) |
50 |
+ metis? ( sci-libs/metis ) |
51 |
+ mkl? ( sci-libs/mkl ) |
52 |
+ pastix? ( sci-libs/pastix ) |
53 |
+ sparse? ( |
54 |
+ dev-cpp/sparsehash |
55 |
+ sci-libs/cholmod[metis?] |
56 |
+ sci-libs/spqr |
57 |
+ sci-libs/superlu |
58 |
+ sci-libs/umfpack )" |
59 |
+DEPEND=" |
60 |
+ doc? ( app-doc/doxygen[dot,latex] ) |
61 |
+ test? ( ${CDEPEND} )" |
62 |
+ |
63 |
+RDEPEND=" |
64 |
+ !dev-cpp/eigen:0 |
65 |
+ ${CDEPEND}" |
66 |
+ |
67 |
+PATCHES=( "${DISTDIR}"/${P}-cmake.patch ) |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ sed -i \ |
71 |
+ -e "s:/usr:${EPREFIX}/usr:g" \ |
72 |
+ -e "s:/bin/bash:${EPREFIX}/bin/bash:g" \ |
73 |
+ cmake/*.cmake || die |
74 |
+ sed -i \ |
75 |
+ -e "/DESTINATION/s:lib:$(get_libdir):g" \ |
76 |
+ {blas,lapack}/CMakeLists.txt || die |
77 |
+ |
78 |
+ # TOFIX: static-libs for blas are always built with PIC |
79 |
+ use static-libs || sed -i \ |
80 |
+ -e "/add_dependencies/s/eigen_[a-z]*_static//g" \ |
81 |
+ -e "/TARGETS/s/eigen_[a-z]*_static//g" \ |
82 |
+ -e "/add_library(eigen_[a-z]*_static/d" \ |
83 |
+ -e "/target_link_libraries(eigen_[a-z]*_static/d" \ |
84 |
+ {blas,lapack}/CMakeLists.txt || die |
85 |
+ |
86 |
+ sed -i -e "/Unknown build type/d" CMakeLists.txt || die |
87 |
+ |
88 |
+ sed \ |
89 |
+ -e '/Cflags/s|:.*|: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}|g' \ |
90 |
+ -i eigen3.pc.in || die |
91 |
+ |
92 |
+ cmake-utils_src_prepare |
93 |
+} |
94 |
+ |
95 |
+src_configure() { |
96 |
+ # TOFIX: is it worth fixing all the automagic given no library is built? |
97 |
+ # cmake has buggy disable_testing feature, so leave it for now |
98 |
+ local mycmakeargs=( |
99 |
+ -DDART_TESTING_TIMEOUT=300 |
100 |
+ -DEIGEN_BUILD_BTL=OFF |
101 |
+ ) |
102 |
+ export VARTEXFONTS="${T}/fonts" |
103 |
+ export PKG_CONFIG_LIBDIR=/usr/$(get_libdir)/ |
104 |
+ |
105 |
+ cmake-utils_src_configure |
106 |
+ # use fortran && FORTRAN_LIBS="blas lapack" not ready |
107 |
+ use fortran && FORTRAN_LIBS="blas" |
108 |
+} |
109 |
+ |
110 |
+src_compile() { |
111 |
+ local targets="${FORTRAN_LIBS}" |
112 |
+ use doc && targets+=" doc" |
113 |
+ use test && targets+=" check" |
114 |
+ cmake-utils_src_compile ${targets} |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ cmake-utils_src_install |
119 |
+ use doc && dohtml -r "${BUILD_DIR}"/doc/html/* |
120 |
+ local x |
121 |
+ for x in ${FORTRAN_LIBS}; do |
122 |
+ local libname="eigen_${x}" |
123 |
+ emake DESTDIR="${D}" -C "${BUILD_DIR}/${x}" install ${libname} |
124 |
+ create_pkgconfig \ |
125 |
+ --description "${DESCRIPTION} ${x^^} implementation" \ |
126 |
+ --libs "-L\${libdir} -l${libname}" \ |
127 |
+ --libs-private "-lm" \ |
128 |
+ $([[ ${x} == lapack ]] && echo "--requires 'blas'") \ |
129 |
+ ${libname} |
130 |
+ alternatives_for ${x} eigen 0 \ |
131 |
+ /usr/$(get_libdir)/pkgconfig/${x}.pc ${libname}.pc |
132 |
+ done |
133 |
+ |
134 |
+ # Debian installs it and some projects started using it. |
135 |
+ insinto /usr/share/cmake/Modules/ |
136 |
+ doins "${S}/cmake/FindEigen3.cmake" |
137 |
+} |