Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/blas-reference/, sci-libs/blas-reference/files/
Date: Sat, 24 Sep 2016 21:26:05
Message-Id: 1474751936.fe1e2971466edea7c748fa927b3db28a9c6b6785.tamiko@gentoo
1 commit: fe1e2971466edea7c748fa927b3db28a9c6b6785
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 21:01:39 2016 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 24 21:18:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe1e2971
7
8 sci-libs/blas-reference: version bump to 20151113 (upstream version 3.6.0)
9
10 Package-Manager: portage-2.2.28
11
12 sci-libs/blas-reference/Manifest | 1 +
13 .../blas-reference/blas-reference-20151113.ebuild | 93 ++++++++++++++++++++++
14 .../files/lapack-fix-build-system.patch | 92 +++++++++++++++++++++
15 3 files changed, 186 insertions(+)
16
17 diff --git a/sci-libs/blas-reference/Manifest b/sci-libs/blas-reference/Manifest
18 index d8ee8dc..097cdbd 100644
19 --- a/sci-libs/blas-reference/Manifest
20 +++ b/sci-libs/blas-reference/Manifest
21 @@ -1 +1,2 @@
22 +DIST lapack-3.6.0.tgz 6792324 SHA256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 SHA512 bc50441d415ef8896dd7626d77c6104184b996e758704366288089f03d4c99d068e33153b0d13305310886017e5d2e716130f812a95cfcad36ef37fe20417ab8 WHIRLPOOL 5576d0a81b2645fe95ef7011cc398f31142b8dcd01cdf5945e3db0e73ae1768766ea54254b40f4c6a581a6fb77b911595fccd597be0536833118af5877bb0c64
23 DIST lapack-lite-3.1.1.tgz 5332509 SHA256 505a13272d0d71c45ea52be2de74b0562b234ea3ccf5160665c7a2ee74a58437 SHA512 492b932ef313339ce6b4e63ac8f778489e6870b0eb85f7b086f3c844e75f98e7f85382c7556dfa368ab8320b6f02d1df8ccfcb40b5c0b7c2d74518b7c309e75c WHIRLPOOL 11145043d16b8c2972229e17a24e92e62987c08e84d91b81a7f4767b80f13844faffb2a2798b321a78c7127d849a0fd60cbb1605f03e150b4eaa6c230f0e7fdd
24
25 diff --git a/sci-libs/blas-reference/blas-reference-20151113.ebuild b/sci-libs/blas-reference/blas-reference-20151113.ebuild
26 new file mode 100644
27 index 00000000..38ded6a
28 --- /dev/null
29 +++ b/sci-libs/blas-reference/blas-reference-20151113.ebuild
30 @@ -0,0 +1,93 @@
31 +# Copyright 1999-2015 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=6
36 +
37 +inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs
38 +
39 +LPN=lapack
40 +LPV=3.6.0
41 +
42 +DESCRIPTION="Basic Linear Algebra Subprograms F77 reference implementations"
43 +HOMEPAGE="http://www.netlib.org/blas/"
44 +SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
45 +
46 +LICENSE="BSD"
47 +SLOT="0"
48 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos"
49 +IUSE="doc"
50 +
51 +DEPEND="app-eselect/eselect-blas"
52 +RDEPEND="${DEPEND}
53 + doc? ( app-doc/blas-docs )
54 + virtual/pkgconfig"
55 +
56 +S="${WORKDIR}/${LPN}-${LPV}"
57 +PATCHES=( "${FILESDIR}/lapack-fix-build-system.patch" )
58 +
59 +src_prepare() {
60 + epatch "${PATCHES[@]}"
61 +
62 + eapply_user
63 +
64 + ESELECT_PROF=reference
65 +
66 + cp "${FILESDIR}"/eselect.blas.reference "${T}"/eselect.blas.reference || die
67 + sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.blas.reference || die
68 + if [[ ${CHOST} == *-darwin* ]] ; then
69 + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
70 + "${T}"/eselect.blas.reference || die
71 + fi
72 +}
73 +
74 +src_configure() {
75 + local FCFLAGS="${FCFLAGS}"
76 + append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname})
77 + append-fflags $(get_abi_CFLAGS)
78 + append-fflags $(numeric-int64_get_fortran_int64_abi_fflags)
79 +
80 + local mycmakeargs=(
81 + -Wno-dev
82 + -DUSE_OPTIMIZED_BLAS=OFF
83 + -DCMAKE_Fortran_FLAGS="${FCFLAGS}"
84 + -DBUILD_SHARED_LIBS=ON
85 + -DBUILD_STATIC_LIBS=ON
86 + )
87 +
88 + cmake-utils_src_configure
89 +}
90 +
91 +src_compile() {
92 + local each target_dirs=( BLAS )
93 + for each in ${target_dirs[@]}; do
94 + cmake-utils_src_compile -C ${each}
95 + done
96 +}
97 +
98 +src_install() {
99 + cmake-utils_src_install -C BLAS
100 +
101 + mkdir -p "${ED}/usr/$(get_libdir)/blas/reference" || die
102 + mv "${ED}/usr/$(get_libdir)"/lib* "${ED}/usr/$(get_libdir)/pkgconfig"/* \
103 + "${ED}/usr/$(get_libdir)/blas/reference" || die
104 + rmdir "${ED}/usr/$(get_libdir)/pkgconfig" || die
105 +
106 + eselect blas add $(get_libdir) "${T}"/eselect.blas.reference ${ESELECT_PROF}
107 +}
108 +
109 +pkg_postinst() {
110 + local p=blas
111 + local current_lib=$(eselect ${p} show | cut -d' ' -f2)
112 + if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
113 + # work around eselect bug #189942
114 + local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
115 + [[ -e ${configfile} ]] && rm -f ${configfile}
116 + eselect ${p} set ${ESELECT_PROF}
117 + elog "${p} has been eselected to ${ESELECT_PROF}"
118 + else
119 + elog "Current eselected ${p} is ${current_lib}"
120 + elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
121 + elog "\t eselect ${p} set ${ESELECT_PROF}"
122 + fi
123 +}
124
125 diff --git a/sci-libs/blas-reference/files/lapack-fix-build-system.patch b/sci-libs/blas-reference/files/lapack-fix-build-system.patch
126 new file mode 100644
127 index 00000000..8661709
128 --- /dev/null
129 +++ b/sci-libs/blas-reference/files/lapack-fix-build-system.patch
130 @@ -0,0 +1,92 @@
131 +--- lapack-3.6.0/BLAS/blas.pc.in
132 ++++ lapack-3.6.0/BLAS/blas.pc.in
133 +@@ -1,5 +1,7 @@
134 +-prefix=@prefix@
135 +-libdir=@libdir@
136 ++prefix=@CMAKE_INSTALL_PREFIX@
137 ++exec_prefix=${prefix}
138 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
139 ++includedir=${prefix}/include
140 +
141 + Name: blas
142 + Description: Basic Linear Algebra Subprograms F77 reference implementations
143 +--- lapack-3.6.0/BLAS/CMakeLists.txt
144 ++++ lapack-3.6.0/BLAS/CMakeLists.txt
145 +@@ -2,7 +2,7 @@
146 + if(BUILD_TESTING)
147 + add_subdirectory(TESTING)
148 + endif(BUILD_TESTING)
149 +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc)
150 ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
151 + install(FILES
152 + ${CMAKE_CURRENT_BINARY_DIR}/blas.pc
153 + DESTINATION ${PKG_CONFIG_DIR}
154 +--- lapack-3.6.0/CBLAS/cblas.pc.in
155 ++++ lapack-3.6.0/CBLAS/cblas.pc.in
156 +@@ -1,5 +1,7 @@
157 +-prefix=@prefix@
158 +-libdir=@libdir@
159 ++prefix=@CMAKE_INSTALL_PREFIX@
160 ++exec_prefix=${prefix}
161 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
162 ++includedir=${prefix}/include
163 +
164 + Name: lapacke
165 + Description: C Standard Interface to BLAS Linear Algebra PACKage
166 +--- lapack-3.6.0/CBLAS/CMakeLists.txt
167 ++++ lapack-3.6.0/CBLAS/CMakeLists.txt
168 +@@ -71,7 +71,7 @@
169 + ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY)
170 +
171 +
172 +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc)
173 ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cblas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc @ONLY)
174 + install(FILES
175 + ${CMAKE_CURRENT_BINARY_DIR}/cblas.pc
176 + DESTINATION ${PKG_CONFIG_DIR}
177 +--- lapack-3.6.0/CMakeLists.txt
178 ++++ lapack-3.6.0/CMakeLists.txt
179 +@@ -333,7 +333,7 @@
180 + ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
181 +
182 +
183 +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc)
184 ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc @ONLY)
185 + install(FILES
186 + ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc
187 + DESTINATION ${PKG_CONFIG_DIR}
188 +--- lapack-3.6.0/LAPACKE/CMakeLists.txt
189 ++++ lapack-3.6.0/LAPACKE/CMakeLists.txt
190 +@@ -65,7 +65,7 @@
191 + endif(BUILD_TESTING)
192 +
193 +
194 +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc)
195 ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY)
196 + install(FILES
197 + ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
198 + DESTINATION ${PKG_CONFIG_DIR}
199 +--- lapack-3.6.0/LAPACKE/lapacke.pc.in
200 ++++ lapack-3.6.0/LAPACKE/lapacke.pc.in
201 +@@ -1,5 +1,7 @@
202 +-prefix=@prefix@
203 +-libdir=@libdir@
204 ++prefix=@CMAKE_INSTALL_PREFIX@
205 ++exec_prefix=${prefix}
206 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
207 ++includedir=${prefix}/include
208 +
209 + Name: lapacke
210 + Description: C Standard Interface to LAPACK Linear Algebra PACKage
211 +--- lapack-3.6.0/lapack.pc.in
212 ++++ lapack-3.6.0/lapack.pc.in
213 +@@ -1,5 +1,7 @@
214 +-prefix=@prefix@
215 +-libdir=@libdir@
216 ++prefix=@CMAKE_INSTALL_PREFIX@
217 ++exec_prefix=${prefix}
218 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
219 ++includedir=${prefix}/include
220 +
221 + Name: lapack
222 + Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage