1 |
commit: 1b608d75087bbb699a546dbffc63bebb9ad95177 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 14:41:21 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 14:41:21 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=1b608d75 |
7 |
|
8 |
sci-libs/blas-reference: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.25 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
.../blas-reference/blas-reference-20151113.ebuild | 108 +++++++++++++++++++++ |
14 |
1 file changed, 108 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/blas-reference/blas-reference-20151113.ebuild b/sci-libs/blas-reference/blas-reference-20151113.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..bf56016 |
19 |
--- /dev/null |
20 |
+++ b/sci-libs/blas-reference/blas-reference-20151113.ebuild |
21 |
@@ -0,0 +1,108 @@ |
22 |
+# Copyright 1999-2015 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI=5 |
27 |
+ |
28 |
+PYTHON_COMPAT=( python2_7 ) |
29 |
+ |
30 |
+NUMERIC_MODULE_NAME="refblas" |
31 |
+ |
32 |
+inherit alternatives-2 cmake-utils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs |
33 |
+ |
34 |
+LPN=lapack |
35 |
+LPV=3.6.0 |
36 |
+ |
37 |
+DESCRIPTION="Reference implementation of BLAS" |
38 |
+HOMEPAGE="http://www.netlib.org/lapack/" |
39 |
+SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
40 |
+ |
41 |
+LICENSE="BSD" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+IUSE="static-libs test" |
45 |
+ |
46 |
+REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" |
47 |
+ |
48 |
+RDEPEND="" |
49 |
+DEPEND="${RDEPEND} |
50 |
+ test? ( ${PYTHON_DEPS} ) |
51 |
+ virtual/pkgconfig" |
52 |
+ |
53 |
+S="${WORKDIR}/${LPN}-${LPV}" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ # rename library to avoid collision with other blas implementations |
57 |
+ # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single |
58 |
+ # quotes in the following seds. They are later set by defining cmake |
59 |
+ # variables with -DPROFNAME etc in src_configure |
60 |
+ sed -i \ |
61 |
+ -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ |
62 |
+ -e '/PROPERTIES/s:blas:${LIBNAME}:g' \ |
63 |
+ CMakeLists.txt \ |
64 |
+ BLAS/SRC/CMakeLists.txt || die |
65 |
+ sed -i \ |
66 |
+ -e '/Name: /s:blas:${PROFNAME}:' \ |
67 |
+ -e 's:-lblas:-l${LIBNAME}:g' \ |
68 |
+ BLAS/blas.pc.in || die |
69 |
+ sed -i \ |
70 |
+ -e 's:blas):${LIBNAME}):' \ |
71 |
+ BLAS/TESTING/CMakeLists.txt || die |
72 |
+ sed -i \ |
73 |
+ -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \ |
74 |
+ BLAS/CMakeLists.txt || die |
75 |
+} |
76 |
+ |
77 |
+src_configure() { |
78 |
+ blas_configure() { |
79 |
+ local FCFLAGS="${FCFLAGS}" |
80 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) |
81 |
+ append-fflags $(get_abi_CFLAGS) |
82 |
+ append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) |
83 |
+ |
84 |
+ local profname=$(numeric-int64_get_module_name) |
85 |
+ local libname="${profname//-/_}" |
86 |
+ |
87 |
+ local mycmakeargs=( |
88 |
+ -Wno-dev |
89 |
+ -DPROFNAME="${profname}" |
90 |
+ -DLIBNAME="${libname}" |
91 |
+ -DUSE_OPTIMIZED_BLAS=OFF |
92 |
+ -DCMAKE_Fortran_FLAGS="${FCFLAGS}" |
93 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
94 |
+ $(cmake-utils_use_build test TESTING) |
95 |
+ ) |
96 |
+ if $(numeric-int64_is_static_build); then |
97 |
+ mycmakeargs+=( |
98 |
+ -DBUILD_SHARED_LIBS=OFF |
99 |
+ -DBUILD_STATIC_LIBS=ON |
100 |
+ ) |
101 |
+ else |
102 |
+ mycmakeargs+=( |
103 |
+ -DBUILD_SHARED_LIBS=ON |
104 |
+ -DBUILD_STATIC_LIBS=OFF |
105 |
+ ) |
106 |
+ fi |
107 |
+ cmake-utils_src_configure |
108 |
+ } |
109 |
+ numeric-int64-multibuild_foreach_all_abi_variants blas_configure |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ local each target_dirs=( BLAS ) |
114 |
+ use test && target_dirs+=( TESTING ) |
115 |
+ for each in ${target_dirs[@]}; do |
116 |
+ numeric-int64-multibuild_foreach_all_abi_variants \ |
117 |
+ cmake-utils_src_compile -C ${each} |
118 |
+ done |
119 |
+ |
120 |
+} |
121 |
+ |
122 |
+src_test() { |
123 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
124 |
+} |
125 |
+ |
126 |
+src_install() { |
127 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C BLAS |
128 |
+ numeric-int64-multibuild_install_alternative blas reference |
129 |
+} |