Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-cpp/eigen/
Date: Mon, 22 Feb 2016 13:26:12
Message-Id: 1456139419.9533a3000f15dd70f312f36705ad78e744fdfc0d.jlec@gentoo
1 commit: 9533a3000f15dd70f312f36705ad78e744fdfc0d
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 22 11:10:19 2016 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 22 11:10:19 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=9533a300
7
8 dev-cpp/eigen: Bump to EAPI=6
9
10 * Drop version dependend code from ebuilds
11 * Fix error handling logic
12 * Propargate cahnges to live ebuild
13
14 Package-Manager: portage-2.2.27
15 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
16
17 dev-cpp/eigen/eigen-3.2.7-r1.ebuild | 45 ++++++++++------------
18 dev-cpp/eigen/eigen-3.2.8.ebuild | 19 ++++++----
19 dev-cpp/eigen/eigen-9999.ebuild | 76 ++++++++++++++++++-------------------
20 3 files changed, 67 insertions(+), 73 deletions(-)
21
22 diff --git a/dev-cpp/eigen/eigen-3.2.7-r1.ebuild b/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
23 index ae40239..0c6777e 100644
24 --- a/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
25 +++ b/dev-cpp/eigen/eigen-3.2.7-r1.ebuild
26 @@ -1,33 +1,23 @@
27 -# Copyright 1999-2015 Gentoo Foundation
28 +# Copyright 1999-2016 Gentoo Foundation
29 # Distributed under the terms of the GNU General Public License v2
30 # $Id$
31
32 -EAPI=5
33 +EAPI=6
34
35 FORTRAN_NEEDED=fortran
36
37 -if [[ ${PV} == "9999" ]] ; then
38 - inherit mercurial
39 - EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
40 - SRC_URI=""
41 - KEYWORDS=""
42 -else
43 - inherit vcs-snapshot
44 - SRC_URI="
45 - https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2
46 - https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
47 - "
48 - PATCHES=( "${DISTDIR}"/${P}-cmake.patch )
49 - KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
50 -fi
51 -
52 -inherit alternatives-2 cmake-utils fortran-2 multilib numeric
53 +inherit alternatives-2 cmake-utils fortran-2 multilib numeric vcs-snapshot
54
55 DESCRIPTION="C++ template library for linear algebra"
56 HOMEPAGE="http://eigen.tuxfamily.org/"
57 +SRC_URI="
58 + https://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2
59 + https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
60 +"
61
62 SLOT="3"
63 LICENSE="MPL-2.0"
64 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
65 IUSE="adolc doc fortran fftw gmp metis mkl pastix sparse static-libs test"
66
67 CDEPEND="
68 @@ -42,7 +32,8 @@ CDEPEND="
69 sci-libs/cholmod[metis?]
70 sci-libs/spqr
71 sci-libs/superlu
72 - sci-libs/umfpack )"
73 + sci-libs/umfpack
74 + )"
75 DEPEND="
76 doc? ( app-doc/doxygen[dot,latex] )
77 test? ( ${CDEPEND} )"
78 @@ -51,6 +42,8 @@ RDEPEND="
79 !dev-cpp/eigen:0
80 ${CDEPEND}"
81
82 +PATCHES=( "${DISTDIR}"/${P}-cmake.patch )
83 +
84 src_prepare() {
85 sed -i \
86 -e "s:/usr:${EPREFIX}/usr:g" \
87 @@ -61,12 +54,14 @@ src_prepare() {
88 {blas,lapack}/CMakeLists.txt || die
89
90 # TOFIX: static-libs for blas are always built with PIC
91 - use static-libs || sed -i \
92 - -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
93 - -e "/TARGETS/s/eigen_[a-z]*_static//g" \
94 - -e "/add_library(eigen_[a-z]*_static/d" \
95 - -e "/target_link_libraries(eigen_[a-z]*_static/d" \
96 - {blas,lapack}/CMakeLists.txt || die
97 + if ! use static-libs; then
98 + sed \
99 + -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
100 + -e "/TARGETS/s/eigen_[a-z]*_static//g" \
101 + -e "/add_library(eigen_[a-z]*_static/d" \
102 + -e "/target_link_libraries(eigen_[a-z]*_static/d" \
103 + -i {blas,lapack}/CMakeLists.txt || die
104 + fi
105
106 sed -i -e "/Unknown build type/d" CMakeLists.txt || die
107
108
109 diff --git a/dev-cpp/eigen/eigen-3.2.8.ebuild b/dev-cpp/eigen/eigen-3.2.8.ebuild
110 index 12b0a5d..1da50f4 100644
111 --- a/dev-cpp/eigen/eigen-3.2.8.ebuild
112 +++ b/dev-cpp/eigen/eigen-3.2.8.ebuild
113 @@ -2,7 +2,7 @@
114 # Distributed under the terms of the GNU General Public License v2
115 # $Id$
116
117 -EAPI=5
118 +EAPI=6
119
120 FORTRAN_NEEDED=fortran
121
122 @@ -32,7 +32,8 @@ CDEPEND="
123 sci-libs/cholmod[metis?]
124 sci-libs/spqr
125 sci-libs/superlu
126 - sci-libs/umfpack )"
127 + sci-libs/umfpack
128 + )"
129 DEPEND="
130 doc? ( app-doc/doxygen[dot,latex] )
131 test? ( ${CDEPEND} )"
132 @@ -53,12 +54,14 @@ src_prepare() {
133 {blas,lapack}/CMakeLists.txt || die
134
135 # TOFIX: static-libs for blas are always built with PIC
136 - use static-libs || sed -i \
137 - -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
138 - -e "/TARGETS/s/eigen_[a-z]*_static//g" \
139 - -e "/add_library(eigen_[a-z]*_static/d" \
140 - -e "/target_link_libraries(eigen_[a-z]*_static/d" \
141 - {blas,lapack}/CMakeLists.txt || die
142 + if ! use static-libs; then
143 + sed \
144 + -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
145 + -e "/TARGETS/s/eigen_[a-z]*_static//g" \
146 + -e "/add_library(eigen_[a-z]*_static/d" \
147 + -e "/target_link_libraries(eigen_[a-z]*_static/d" \
148 + -i {blas,lapack}/CMakeLists.txt || die
149 + fi
150
151 sed -i -e "/Unknown build type/d" CMakeLists.txt || die
152
153
154 diff --git a/dev-cpp/eigen/eigen-9999.ebuild b/dev-cpp/eigen/eigen-9999.ebuild
155 index 64caa71..5c7c661 100644
156 --- a/dev-cpp/eigen/eigen-9999.ebuild
157 +++ b/dev-cpp/eigen/eigen-9999.ebuild
158 @@ -1,33 +1,21 @@
159 -# Copyright 1999-2015 Gentoo Foundation
160 +# Copyright 1999-2016 Gentoo Foundation
161 # Distributed under the terms of the GNU General Public License v2
162 # $Id$
163
164 -EAPI=5
165 +EAPI=6
166
167 FORTRAN_NEEDED=fortran
168
169 -if [[ ${PV} == "9999" ]] ; then
170 - inherit mercurial
171 - EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
172 - SRC_URI=""
173 - KEYWORDS=""
174 -else
175 - inherit vcs-snapshot
176 - SRC_URI="
177 - http://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2 -> ${P}.tar.bz2
178 - https://bitbucket.org/eigen/eigen/commits/1d71b1341c03a7c485289be2c8bd906a259c0487/raw/ -> ${P}-cmake.patch
179 - "
180 - PATCHES=( "${DISTDIR}"/${P}-cmake.patch )
181 - KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
182 -fi
183 -
184 -inherit alternatives-2 cmake-utils fortran-2 multilib
185 +inherit alternatives-2 cmake-utils fortran-2 mercurial multilib
186
187 DESCRIPTION="C++ template library for linear algebra"
188 HOMEPAGE="http://eigen.tuxfamily.org/"
189 +SRC_URI=""
190 +EHG_REPO_URI="https://bitbucket.org/eigen/eigen"
191
192 SLOT="3"
193 LICENSE="MPL-2.0"
194 +KEYWORDS=""
195 IUSE="adolc doc fortran fftw gmp metis mkl pastix sparse static-libs test"
196
197 CDEPEND="
198 @@ -42,7 +30,8 @@ CDEPEND="
199 sci-libs/cholmod[metis?]
200 sci-libs/spqr
201 sci-libs/superlu
202 - sci-libs/umfpack )"
203 + sci-libs/umfpack
204 + )"
205 DEPEND="
206 doc? ( app-doc/doxygen[dot,latex] )
207 test? ( ${CDEPEND} )"
208 @@ -61,12 +50,21 @@ src_prepare() {
209 {blas,lapack}/CMakeLists.txt || die
210
211 # TOFIX: static-libs for blas are always built with PIC
212 - use static-libs || sed -i \
213 - -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
214 - -e "/TARGETS/s/eigen_[a-z]*_static//g" \
215 - -e "/add_library(eigen_[a-z]*_static/d" \
216 - -e "/target_link_libraries(eigen_[a-z]*_static/d" \
217 - {blas,lapack}/CMakeLists.txt || die
218 + if ! use static-libs; then
219 + sed \
220 + -e "/add_dependencies/s/eigen_[a-z]*_static//g" \
221 + -e "/TARGETS/s/eigen_[a-z]*_static//g" \
222 + -e "/add_library(eigen_[a-z]*_static/d" \
223 + -e "/target_link_libraries(eigen_[a-z]*_static/d" \
224 + -i {blas,lapack}/CMakeLists.txt || die
225 + fi
226 +
227 + sed -i -e "/Unknown build type/d" CMakeLists.txt || die
228 +
229 + sed \
230 + -e '/Cflags/s|:.*|: -I${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}|g' \
231 + -i eigen3.pc.in || die
232 +
233 cmake-utils_src_prepare
234 }
235
236 @@ -78,7 +76,9 @@ src_configure() {
237 -DEIGEN_BUILD_BTL=OFF
238 )
239 export VARTEXFONTS="${T}/fonts"
240 - CMAKE_BUILD_TYPE="release" cmake-utils_src_configure
241 + export PKG_CONFIG_LIBDIR=/usr/$(get_libdir)/
242 +
243 + cmake-utils_src_configure
244 # use fortran && FORTRAN_LIBS="blas lapack" not ready
245 use fortran && FORTRAN_LIBS="blas"
246 }
247 @@ -97,21 +97,17 @@ src_install() {
248 for x in ${FORTRAN_LIBS}; do
249 local libname="eigen_${x}"
250 emake DESTDIR="${D}" -C "${BUILD_DIR}/${x}" install ${libname}
251 - cat > ${libname}.pc <<-EOF
252 - prefix=${EPREFIX}/usr
253 - libdir=\${prefix}/$(get_libdir)
254 - includedir=\${prefix}/include
255 - Name: ${PN}
256 - Description: ${DESCRIPTION} ${x^^} implementation
257 - Version: ${PV}
258 - URL: ${HOMEPAGE}
259 - Libs: -L\${libdir} -l${libname}
260 - Libs.private: -lm
261 - $([[ ${x} == lapack ]] && echo "Requires: blas")
262 - EOF
263 + create_pkgconfig \
264 + --description "${DESCRIPTION} ${x^^} implementation" \
265 + --libs "-L\${libdir} -l${libname}" \
266 + --libs-private "-lm" \
267 + $([[ ${x} == lapack ]] && echo "--requires 'blas'") \
268 + ${libname}
269 alternatives_for ${x} eigen 0 \
270 /usr/$(get_libdir)/pkgconfig/${x}.pc ${libname}.pc
271 - insinto /usr/$(get_libdir)/pkgconfig
272 - doins ${libname}.pc
273 done
274 +
275 + # Debian installs it and some projects started using it.
276 + insinto /usr/share/cmake/Modules/
277 + doins "${S}/cmake/FindEigen3.cmake"
278 }