1 |
commit: b0b9477cb91844c912eb316a223556f899b15ae1 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 18:33:28 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 18:33:28 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=b0b9477c |
7 |
|
8 |
sci-libs/cblas-reference: Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.25 |
11 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
12 |
|
13 |
.../cblas-reference-20151113.ebuild | 121 +++++++++++++++++++++ |
14 |
1 file changed, 121 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/cblas-reference/cblas-reference-20151113.ebuild b/sci-libs/cblas-reference/cblas-reference-20151113.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..e3e0436 |
19 |
--- /dev/null |
20 |
+++ b/sci-libs/cblas-reference/cblas-reference-20151113.ebuild |
21 |
@@ -0,0 +1,121 @@ |
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="refcblas" |
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="C wrapper interface to the F77 reference BLAS implementation" |
38 |
+HOMEPAGE="http://www.netlib.org/cblas/" |
39 |
+SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" |
40 |
+ |
41 |
+LICENSE="BSD" |
42 |
+SLOT="0/${LPV}" |
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 |
+MULTILIB_WRAPPED_HEADERS=( |
56 |
+ /usr/include/cblas/cblas.h |
57 |
+) |
58 |
+src_prepare() { |
59 |
+ # rename library to avoid collision with other blas implementations |
60 |
+ # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single |
61 |
+ # quotes in the following seds. They are later set by defining cmake |
62 |
+ # variables with -DPROFNAME etc in src_configure |
63 |
+ sed -i \ |
64 |
+ -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ |
65 |
+ -e '/ALL_TARGETS/s:cblas):${LIBNAME}):' \ |
66 |
+ -e '/_librar/s:cblas:${LIBNAME}:' \ |
67 |
+ CMakeLists.txt \ |
68 |
+ CBLAS/src/CMakeLists.txt || die |
69 |
+ sed -i \ |
70 |
+ -e 's:/CMAKE/:/cmake/:g' \ |
71 |
+ CBLAS/CMakeLists.txt || die |
72 |
+ sed -i \ |
73 |
+ -e '/Name: /s:cblas:${PROFNAME}:' \ |
74 |
+ -e 's:-lcblas:-l${LIBNAME}:g' \ |
75 |
+ CBLAS/cblas.pc.in || die |
76 |
+ sed -i \ |
77 |
+ -e 's:cblas):${LIBNAME}):' \ |
78 |
+ CBLAS/testing/CMakeLists.txt || die |
79 |
+ sed -i \ |
80 |
+ -e 's:BINARY_DIR}/cblas:BINARY_DIR}/${PROFNAME}:' \ |
81 |
+ CBLAS/CMakeLists.txt || die |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ cblas_configure() { |
86 |
+ local FCFLAGS="${FCFLAGS}" |
87 |
+ append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) |
88 |
+ append-fflags $(get_abi_CFLAGS) |
89 |
+ append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) |
90 |
+ |
91 |
+ local blas_profname=$(numeric-int64_get_blas_alternative) |
92 |
+ local profname=$(numeric-int64_get_module_name) |
93 |
+ local libname="${profname//-/_}" |
94 |
+ |
95 |
+ local mycmakeargs=( |
96 |
+ -Wno-dev |
97 |
+ -DCBLAS=ON |
98 |
+ -DPROFNAME="${profname}" |
99 |
+ -DLIBNAME="${libname}" |
100 |
+ -DUSE_OPTIMIZED_BLAS=ON |
101 |
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${blas_profname})" |
102 |
+ -DCMAKE_C_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CFLAGS}" |
103 |
+ -DCMAKE_CXX_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) ${CXXFLAGS}" |
104 |
+ -DCMAKE_Fortran_FLAGS="$($(tc-getPKG_CONFIG) --cflags ${blas_profname}) $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags) ${FCFLAGS}" |
105 |
+ -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" |
106 |
+ $(cmake-utils_use_build test TESTING) |
107 |
+ ) |
108 |
+ if $(numeric-int64_is_static_build); then |
109 |
+ mycmakeargs+=( |
110 |
+ -DBUILD_SHARED_LIBS=OFF |
111 |
+ -DBUILD_STATIC_LIBS=ON |
112 |
+ ) |
113 |
+ else |
114 |
+ mycmakeargs+=( |
115 |
+ -DBUILD_SHARED_LIBS=ON |
116 |
+ -DBUILD_STATIC_LIBS=OFF |
117 |
+ ) |
118 |
+ fi |
119 |
+ cmake-utils_src_configure |
120 |
+ } |
121 |
+ numeric-int64-multibuild_foreach_all_abi_variants cblas_configure |
122 |
+} |
123 |
+ |
124 |
+src_compile() { |
125 |
+ local each target_dirs=( CBLAS ) |
126 |
+ use test && target_dirs+=( testing ) |
127 |
+ for each in ${target_dirs[@]}; do |
128 |
+ numeric-int64-multibuild_foreach_all_abi_variants \ |
129 |
+ cmake-utils_src_compile -C ${each} |
130 |
+ done |
131 |
+ |
132 |
+} |
133 |
+ |
134 |
+src_test() { |
135 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C CBLAS |
140 |
+ numeric-int64-multibuild_install_alternative cblas reference /usr/include/cblas.h cblas/cblas.h |
141 |
+ multilib_install_wrappers |
142 |
+} |