1 |
commit: 8c5d860c05a1e7738ab50d2311fef03351790bb4 |
2 |
Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 22 16:48:22 2013 +0000 |
4 |
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 22 16:48:22 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8c5d860c |
7 |
|
8 |
sci-libs/blas-reference: Switch to EAPI5, merge live ebuild |
9 |
|
10 |
Package-Manager: portage-2.2.01.21938-prefix |
11 |
|
12 |
--- |
13 |
sci-libs/blas-reference/ChangeLog | 4 + |
14 |
.../blas-reference/blas-reference-99999999.ebuild | 68 ++++--- |
15 |
.../blas-reference/files/lapack-3.4.1-cmake.patch | 208 -------------------- |
16 |
sci-libs/blas-reference/metadata.xml | 4 +- |
17 |
4 files changed, 42 insertions(+), 242 deletions(-) |
18 |
|
19 |
diff --git a/sci-libs/blas-reference/ChangeLog b/sci-libs/blas-reference/ChangeLog |
20 |
index a844ad9..8af0f4d 100644 |
21 |
--- a/sci-libs/blas-reference/ChangeLog |
22 |
+++ b/sci-libs/blas-reference/ChangeLog |
23 |
@@ -2,6 +2,10 @@ |
24 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
25 |
# $Header: $ |
26 |
|
27 |
+ 22 May 2013; Sébastien Fabbro <bicatali@g.o> |
28 |
+ -files/lapack-3.4.1-cmake.patch, blas-reference-99999999.ebuild, metadata.xml: |
29 |
+ sci-libs/blas-reference: Switch to EAPI5, merge live ebuild |
30 |
+ |
31 |
03 Mar 2013; Justin Lecher <jlec@g.o> blas-reference-20120925.ebuild, |
32 |
blas-reference-99999999.ebuild, metadata.xml: |
33 |
Cleaned deps |
34 |
|
35 |
diff --git a/sci-libs/blas-reference/blas-reference-99999999.ebuild b/sci-libs/blas-reference/blas-reference-99999999.ebuild |
36 |
index f8bcd6a..e5f8f5f 100644 |
37 |
--- a/sci-libs/blas-reference/blas-reference-99999999.ebuild |
38 |
+++ b/sci-libs/blas-reference/blas-reference-99999999.ebuild |
39 |
@@ -2,58 +2,64 @@ |
40 |
# Distributed under the terms of the GNU General Public License v2 |
41 |
# $Header: $ |
42 |
|
43 |
-EAPI=4 |
44 |
+EAPI=5 |
45 |
|
46 |
-inherit eutils toolchain-funcs cmake-utils alternatives-2 subversion |
47 |
+inherit fortran-2 cmake-utils alternatives-2 |
48 |
+ |
49 |
+LPN=lapack |
50 |
+LPV=3.4.2 |
51 |
+ |
52 |
+if [[ ${PV} == "9999" ]] ; then |
53 |
+ ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" |
54 |
+ inherit subversion |
55 |
+ KEYWORDS="" |
56 |
+else |
57 |
+ SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
58 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
59 |
+fi |
60 |
|
61 |
DESCRIPTION="Reference implementation of BLAS" |
62 |
HOMEPAGE="http://www.netlib.org/lapack/" |
63 |
-ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk" |
64 |
|
65 |
LICENSE="BSD" |
66 |
SLOT="0" |
67 |
-KEYWORDS="" |
68 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
69 |
IUSE="static-libs test" |
70 |
|
71 |
-DOCS=( README ) |
72 |
- |
73 |
-S="${WORKDIR}/${MYP}" |
74 |
+S="${WORKDIR}/${LPN}-${LPV}" |
75 |
|
76 |
src_prepare() { |
77 |
- # avoid collision with other blas |
78 |
+ # rename library to avoid collision with other blas implementations |
79 |
sed -i \ |
80 |
-e 's:blas:refblas:g' \ |
81 |
- CMakeLists.txt BLAS/blas.pc.in BLAS/{SRC,TESTING}/CMakeLists.txt || die |
82 |
+ CMakeLists.txt BLAS/blas.pc.in \ |
83 |
+ BLAS/{SRC,TESTING}/CMakeLists.txt || die |
84 |
sed -i \ |
85 |
-e 's:BINARY_DIR}/blas:BINARY_DIR}/refblas:' \ |
86 |
BLAS/CMakeLists.txt || die |
87 |
- export FC=$(tc-getFC) F77=$(tc-getF77) |
88 |
use static-libs && mkdir "${WORKDIR}/${PN}_static" |
89 |
} |
90 |
|
91 |
-lapack_configure() { |
92 |
- mycmakeargs+=( |
93 |
- -DUSE_OPTIMIZED_BLAS=OFF |
94 |
- $(cmake-utils_use_build test TESTING) |
95 |
- ) |
96 |
- cmake-utils_src_configure |
97 |
-} |
98 |
- |
99 |
src_configure() { |
100 |
- mycmakeargs=( -DBUILD_SHARED_LIBS=ON ) |
101 |
- lapack_configure |
102 |
- if use static-libs; then |
103 |
- mycmakeargs=( -DBUILD_SHARED_LIBS=OFF ) |
104 |
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" lapack_configure |
105 |
- fi |
106 |
+ blas_configure() { |
107 |
+ local mycmakeargs=( |
108 |
+ -DUSE_OPTIMIZED_BLAS=OFF |
109 |
+ $(cmake-utils_use_build test TESTING) |
110 |
+ $@ |
111 |
+ ) |
112 |
+ cmake-utils_src_configure |
113 |
+ } |
114 |
+ |
115 |
+ blas_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF |
116 |
+ use static-libs && \ |
117 |
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" blas_configure \ |
118 |
+ -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON |
119 |
} |
120 |
|
121 |
src_compile() { |
122 |
cmake-utils_src_compile -C BLAS |
123 |
- if use static-libs; then |
124 |
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
125 |
- cmake-utils_src_compile -C BLAS |
126 |
- fi |
127 |
+ use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
128 |
+ cmake-utils_src_compile -C BLAS |
129 |
} |
130 |
|
131 |
src_test() { |
132 |
@@ -66,10 +72,8 @@ src_test() { |
133 |
|
134 |
src_install() { |
135 |
cmake-utils_src_install -C BLAS |
136 |
- if use static-libs; then |
137 |
- CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
138 |
+ use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ |
139 |
cmake-utils_src_install -C BLAS |
140 |
- fi |
141 |
alternatives_for blas reference 0 \ |
142 |
- "/usr/$(get_libdir)/pkgconfig/blas.pc" "refblas.pc" |
143 |
+ /usr/$(get_libdir)/pkgconfig/blas.pc refblas.pc |
144 |
} |
145 |
|
146 |
diff --git a/sci-libs/blas-reference/files/lapack-3.4.1-cmake.patch b/sci-libs/blas-reference/files/lapack-3.4.1-cmake.patch |
147 |
deleted file mode 100644 |
148 |
index 78dece8..0000000 |
149 |
--- a/sci-libs/blas-reference/files/lapack-3.4.1-cmake.patch |
150 |
+++ /dev/null |
151 |
@@ -1,208 +0,0 @@ |
152 |
-Index: CMakeLists.txt |
153 |
-=================================================================== |
154 |
---- CMakeLists.txt (revision 1294) |
155 |
-+++ CMakeLists.txt (working copy) |
156 |
-@@ -94,10 +94,6 @@ |
157 |
- # Precision to build |
158 |
- # By default all precisions are generated |
159 |
- |
160 |
--option(BUILD_SINGLE "Build LAPACK Single Precision" ON) |
161 |
--option(BUILD_DOUBLE "Build LAPACK Double Precision" ON) |
162 |
--option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON) |
163 |
--option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON) |
164 |
- |
165 |
- # -------------------------------------------------- |
166 |
- # Subdirectories that need to be processed |
167 |
-@@ -147,7 +143,49 @@ |
168 |
- find_library(XBLAS_LIBRARY NAMES xblas) |
169 |
- endif(USE_XBLAS) |
170 |
- |
171 |
--add_subdirectory(SRC) |
172 |
-+option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF) |
173 |
-+ |
174 |
-+# Check the usage of the user provided LAPACK libraries |
175 |
-+if(LAPACK_LIBRARIES) |
176 |
-+ include(CheckFortranFunctionExists) |
177 |
-+ set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES}) |
178 |
-+ CHECK_FORTRAN_FUNCTION_EXISTS("dpotrf" LAPACK_FOUND) |
179 |
-+ unset( CMAKE_REQUIRED_LIBRARIES ) |
180 |
-+ if(LAPACK_FOUND) |
181 |
-+ message(STATUS "--> LAPACK supplied by user is WORKING, will use ${LAPACK_LIBRARIES}.") |
182 |
-+ else(LAPACK_FOUND) |
183 |
-+ message(ERROR "--> LAPACK supplied by user is not WORKING, CANNOT USE $LAPACK_LIBRARIES}.") |
184 |
-+ message(ERROR "--> Will use REFERENCE LAPACK (by default)") |
185 |
-+ message(ERROR "--> Or Correct your LAPACK_LIBRARIES entry ") |
186 |
-+ message(ERROR "--> Or Consider checking USE_OPTIMIZED_LAPACK") |
187 |
-+ endif(LAPACK_FOUND) |
188 |
-+ |
189 |
-+ # User did not provide a LAPACK Library but specified to search for one |
190 |
-+elseif( USE_OPTIMIZED_LAPACK ) |
191 |
-+ find_package( LAPACK ) |
192 |
-+endif (LAPACK_LIBRARIES) |
193 |
-+ |
194 |
-+# Neither user specified or optimized LAPACK libraries can be used |
195 |
-+if(NOT LAPACK_FOUND) |
196 |
-+ message(STATUS "Using supplied NETLIB LAPACK implementation") |
197 |
-+ set( LAPACK_LIBRARIES lapack ) |
198 |
-+ option(BUILD_SINGLE "Build LAPACK Single Precision" ON) |
199 |
-+ option(BUILD_DOUBLE "Build LAPACK Double Precision" ON) |
200 |
-+ option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON) |
201 |
-+ option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON) |
202 |
-+ add_subdirectory(SRC) |
203 |
-+else() |
204 |
-+ set( CMAKE_EXE_LINKER_FLAGS |
205 |
-+ "${CMAKE_EXE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}" |
206 |
-+ CACHE STRING "Linker flags for executables" FORCE) |
207 |
-+ set( CMAKE_MODULE_LINKER_FLAGS |
208 |
-+ "${CMAKE_MODULE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}" |
209 |
-+ CACHE STRING "Linker flags for modules" FORCE) |
210 |
-+ set( CMAKE_SHARED_LINKER_FLAGS |
211 |
-+ "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}" |
212 |
-+ CACHE STRING "Linker flags for shared libs" FORCE) |
213 |
-+endif( NOT LAPACK_FOUND ) |
214 |
-+ |
215 |
- if(BUILD_TESTING) |
216 |
- add_subdirectory(TESTING) |
217 |
- endif(BUILD_TESTING) |
218 |
-@@ -155,6 +193,10 @@ |
219 |
- # -------------------------------------------------- |
220 |
- # LAPACKE |
221 |
- option(LAPACKE "Build LAPACKE" OFF) |
222 |
-+if(LAPACKE) |
223 |
-+ add_subdirectory(lapacke) |
224 |
-+endif(LAPACKE) |
225 |
-+ |
226 |
- # LAPACKE has also the interface to some routines from tmglib, |
227 |
- # if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE |
228 |
- option(LAPACKE_WITH_TMG "Build LAPACKE with tmglib routines" OFF) |
229 |
-@@ -162,9 +204,6 @@ |
230 |
- option(LAPACKE "Build LAPACKE" ON) |
231 |
- endif(LAPACKE_WITH_TMG) |
232 |
- |
233 |
--if(LAPACKE) |
234 |
-- add_subdirectory(lapacke) |
235 |
--endif(LAPACKE) |
236 |
- |
237 |
- # -------------------------------------------------- |
238 |
- # CPACK Packaging |
239 |
-@@ -202,20 +241,24 @@ |
240 |
- OPTION(BUILD_STATIC_LIBS "Build static libraries" ON ) |
241 |
- #OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON ) |
242 |
- |
243 |
--if( NOT BLAS_FOUND ) |
244 |
-- if(LAPACKE) |
245 |
-- export(TARGETS blas lapack tmglib lapacke FILE lapack-targets.cmake) |
246 |
-- else (LAPACKE) |
247 |
-- export(TARGETS blas lapack tmglib FILE lapack-targets.cmake) |
248 |
-- endif(LAPACKE) |
249 |
--else( NOT BLAS_FOUND ) |
250 |
-- if(LAPACKE) |
251 |
-- export(TARGETS lapack tmglib lapacke FILE lapack-targets.cmake) |
252 |
-- else (LAPACKE) |
253 |
-- export(TARGETS lapack tmglib FILE lapack-targets.cmake) |
254 |
-- endif(LAPACKE) |
255 |
--endif( NOT BLAS_FOUND ) |
256 |
-+if(NOT BLAS_FOUND) |
257 |
-+ set(ALL_TARGETS ${ALL_TARGETS} blas) |
258 |
-+endif(NOT BLAS_FOUND) |
259 |
- |
260 |
-+if(NOT LAPACK_FOUND) |
261 |
-+ set(ALL_TARGETS ${ALL_TARGETS} lapack) |
262 |
-+endif(NOT LAPACK_FOUND) |
263 |
-+ |
264 |
-+if(BUILD_TESTING OR LAPACKE_WITH_TMG) |
265 |
-+ set(ALL_TARGETS ${ALL_TARGETS} tmglib) |
266 |
-+endif(BUILD_TESTING OR LAPACKE_WITH_TMG) |
267 |
-+ |
268 |
-+if(LAPACKE) |
269 |
-+ set(ALL_TARGETS ${ALL_TARGETS} lapacke) |
270 |
-+endif(LAPACKE) |
271 |
-+ |
272 |
-+export(TARGETS ${ALL_TARGETS} FILE lapack-targets.cmake) |
273 |
-+ |
274 |
- configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-version.cmake.in |
275 |
- ${LAPACK_BINARY_DIR}/lapack-config-version.cmake @ONLY) |
276 |
- configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in |
277 |
-Index: lapacke/example/CMakeLists.txt |
278 |
-=================================================================== |
279 |
---- lapacke/example/CMakeLists.txt (revision 1294) |
280 |
-+++ lapacke/example/CMakeLists.txt (working copy) |
281 |
-@@ -1,8 +1,8 @@ |
282 |
- add_executable(xexample_DGESV_rowmajor example_DGESV_rowmajor.c) |
283 |
- add_executable(xexample_ZGESV_rowmajor example_ZGESV_rowmajor.c) |
284 |
- |
285 |
--target_link_libraries(xexample_DGESV_rowmajor lapacke lapack ${BLAS_LIBRARIES}) |
286 |
--target_link_libraries(xexample_ZGESV_rowmajor lapacke lapack ${BLAS_LIBRARIES}) |
287 |
-+target_link_libraries(xexample_DGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) |
288 |
-+target_link_libraries(xexample_ZGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) |
289 |
- |
290 |
- add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor) |
291 |
- add_test(example_ZGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_ZGESV_rowmajor) |
292 |
-Index: lapacke/CMakeLists.txt |
293 |
-=================================================================== |
294 |
---- lapacke/CMakeLists.txt (revision 1294) |
295 |
-+++ lapacke/CMakeLists.txt (working copy) |
296 |
-@@ -45,14 +45,14 @@ |
297 |
- |
298 |
- if (USE_XBLAS) |
299 |
- add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ}) |
300 |
-- target_link_libraries(lapacke lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) |
301 |
-+ target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) |
302 |
- else (USE_XBLAS) |
303 |
- if (LAPACKE_WITH_TMG) |
304 |
- add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ}) |
305 |
-- target_link_libraries(lapacke tmglib lapack ${BLAS_LIBRARIES} ) |
306 |
-+ target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) |
307 |
- else (LAPACKE_WITH_TMG) |
308 |
- add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ}) |
309 |
-- target_link_libraries(lapacke lapack ${BLAS_LIBRARIES} ) |
310 |
-+ target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) |
311 |
- endif(LAPACKE_WITH_TMG) |
312 |
- endif(USE_XBLAS) |
313 |
- |
314 |
-Index: TESTING/LIN/CMakeLists.txt |
315 |
-=================================================================== |
316 |
---- TESTING/LIN/CMakeLists.txt (revision 1294) |
317 |
-+++ TESTING/LIN/CMakeLists.txt (working copy) |
318 |
-@@ -193,7 +193,7 @@ |
319 |
- |
320 |
- macro(add_lin_executable name ) |
321 |
- add_executable(${name} ${ARGN}) |
322 |
-- target_link_libraries(${name} tmglib lapack) |
323 |
-+ target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) |
324 |
- endmacro(add_lin_executable) |
325 |
- |
326 |
- IF(BUILD_SINGLE) |
327 |
-Index: TESTING/EIG/CMakeLists.txt |
328 |
-=================================================================== |
329 |
---- TESTING/EIG/CMakeLists.txt (revision 1294) |
330 |
-+++ TESTING/EIG/CMakeLists.txt (working copy) |
331 |
-@@ -119,7 +119,7 @@ |
332 |
- |
333 |
- macro(add_eig_executable name ) |
334 |
- add_executable(${name} ${ARGN}) |
335 |
-- target_link_libraries(${name} tmglib lapack ) |
336 |
-+ target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) |
337 |
- endmacro(add_eig_executable) |
338 |
- |
339 |
- if (BUILD_SINGLE) |
340 |
-Index: TESTING/MATGEN/CMakeLists.txt |
341 |
-=================================================================== |
342 |
---- TESTING/MATGEN/CMakeLists.txt (revision 1294) |
343 |
-+++ TESTING/MATGEN/CMakeLists.txt (working copy) |
344 |
-@@ -64,12 +64,12 @@ |
345 |
- set(ALLOBJ ${ALLOBJ} ${ZMATGEN} ${DZATGEN}) |
346 |
- endif() |
347 |
- |
348 |
--list(REMOVE_DUPLICATES ALLOBJ) |
349 |
-- |
350 |
- if (NOT ALLOBJ) |
351 |
- set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN} |
352 |
- ${DZATGEN}) |
353 |
-+else() |
354 |
-+ list(REMOVE_DUPLICATES ALLOBJ) |
355 |
- endif() |
356 |
- add_library(tmglib ${ALLOBJ} ) |
357 |
--target_link_libraries(tmglib lapack) |
358 |
-+target_link_libraries(tmglib ${LAPACK_LIBRARIES}) |
359 |
- lapack_install_library(tmglib) |
360 |
|
361 |
diff --git a/sci-libs/blas-reference/metadata.xml b/sci-libs/blas-reference/metadata.xml |
362 |
index fc66d96..43c339b 100644 |
363 |
--- a/sci-libs/blas-reference/metadata.xml |
364 |
+++ b/sci-libs/blas-reference/metadata.xml |
365 |
@@ -1,8 +1,8 @@ |
366 |
<?xml version="1.0" encoding="UTF-8"?> |
367 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
368 |
<pkgmetadata> |
369 |
- <herd>sci</herd> |
370 |
- <longdescription lang="en"> |
371 |
+<herd>sci</herd> |
372 |
+<longdescription lang="en"> |
373 |
The BLAS (Basic Linear Algebra Subprograms) are high quality "building |
374 |
block" routines for performing basic vector and matrix operations. Level 1 |
375 |
BLAS do vector-vector operations, Level 2 BLAS do matrix-vector operations, |