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: Fri, 03 Feb 2017 03:02:35
Message-Id: 1486090891.1fff8f414ebbec1f386c9346d968a2aaccce648d.tamiko@gentoo
1 commit: 1fff8f414ebbec1f386c9346d968a2aaccce648d
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 3 02:09:43 2017 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 3 03:01:31 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fff8f41
7
8 sci-libs/blas-reference: version bump to 20161223 (3.7.0)
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sci-libs/blas-reference/Manifest | 1 +
13 .../blas-reference/blas-reference-20161223.ebuild | 85 ++++++++++++++++++++++
14 .../lapack-reference-3.7.0-fix-build-system.patch | 56 ++++++++++++++
15 3 files changed, 142 insertions(+)
16
17 diff --git a/sci-libs/blas-reference/Manifest b/sci-libs/blas-reference/Manifest
18 index 097cdbd..050b39b 100644
19 --- a/sci-libs/blas-reference/Manifest
20 +++ b/sci-libs/blas-reference/Manifest
21 @@ -1,2 +1,3 @@
22 DIST lapack-3.6.0.tgz 6792324 SHA256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 SHA512 bc50441d415ef8896dd7626d77c6104184b996e758704366288089f03d4c99d068e33153b0d13305310886017e5d2e716130f812a95cfcad36ef37fe20417ab8 WHIRLPOOL 5576d0a81b2645fe95ef7011cc398f31142b8dcd01cdf5945e3db0e73ae1768766ea54254b40f4c6a581a6fb77b911595fccd597be0536833118af5877bb0c64
23 +DIST lapack-3.7.0.tgz 7359812 SHA256 ed967e4307e986474ab02eb810eed1d1adc73f5e1e3bc78fb009f6fe766db3be SHA512 e4f4c7d0ba8a096eeb813160c6dbcdd535647df6b2ad5beac9181908158956b31d1a9554ec9b9836fd44fe7404c1f377b297cbb20d744f20d70e357fd246c91b WHIRLPOOL d536508015e081395bda83b84bf4e5b1d6e8e517ea38f6afcaf40e96d892b26b8b1034954d5cd79cce5033d6653e178b5d27a46deecfa7466cd0bdaafcf9f18f
24 DIST lapack-lite-3.1.1.tgz 5332509 SHA256 505a13272d0d71c45ea52be2de74b0562b234ea3ccf5160665c7a2ee74a58437 SHA512 492b932ef313339ce6b4e63ac8f778489e6870b0eb85f7b086f3c844e75f98e7f85382c7556dfa368ab8320b6f02d1df8ccfcb40b5c0b7c2d74518b7c309e75c WHIRLPOOL 11145043d16b8c2972229e17a24e92e62987c08e84d91b81a7f4767b80f13844faffb2a2798b321a78c7127d849a0fd60cbb1605f03e150b4eaa6c230f0e7fdd
25
26 diff --git a/sci-libs/blas-reference/blas-reference-20161223.ebuild b/sci-libs/blas-reference/blas-reference-20161223.ebuild
27 new file mode 100644
28 index 00000000..8bd6afdf
29 --- /dev/null
30 +++ b/sci-libs/blas-reference/blas-reference-20161223.ebuild
31 @@ -0,0 +1,85 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +
38 +inherit eutils fortran-2 cmake-utils multilib flag-o-matic toolchain-funcs
39 +
40 +LPN=lapack
41 +LPV=3.7.0
42 +
43 +DESCRIPTION="Basic Linear Algebra Subprograms F77 reference implementations"
44 +HOMEPAGE="http://www.netlib.org/blas/"
45 +SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz"
46 +
47 +LICENSE="BSD"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
50 +IUSE="doc"
51 +
52 +DEPEND="app-eselect/eselect-blas"
53 +RDEPEND="${DEPEND}
54 + doc? ( app-doc/blas-docs )
55 + virtual/pkgconfig"
56 +
57 +S="${WORKDIR}/${LPN}-${LPV}"
58 +PATCHES=( "${FILESDIR}/lapack-reference-${LPV}-fix-build-system.patch" )
59 +
60 +src_prepare() {
61 + epatch "${PATCHES[@]}"
62 +
63 + eapply_user
64 +
65 + ESELECT_PROF=reference
66 +
67 + cp "${FILESDIR}"/eselect.blas.reference-r1 "${T}"/eselect.blas.reference || die
68 + sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.blas.reference || die
69 + if [[ ${CHOST} == *-darwin* ]] ; then
70 + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
71 + "${T}"/eselect.blas.reference || die
72 + fi
73 +}
74 +
75 +src_configure() {
76 + local mycmakeargs=(
77 + -Wno-dev
78 + -DUSE_OPTIMIZED_BLAS=OFF
79 + -DCMAKE_Fortran_FLAGS="$(get_abi_CFLAGS) ${FCFLAGS}"
80 + -DBUILD_SHARED_LIBS=ON
81 + -DBUILD_STATIC_LIBS=ON
82 + )
83 +
84 + cmake-utils_src_configure
85 +}
86 +
87 +src_compile() {
88 + cmake-utils_src_compile -C BLAS
89 +}
90 +
91 +src_install() {
92 + cmake-utils_src_install -C BLAS
93 +
94 + mkdir -p "${ED}/usr/$(get_libdir)/blas/reference" || die
95 + mv "${ED}/usr/$(get_libdir)"/lib* "${ED}/usr/$(get_libdir)/pkgconfig"/* \
96 + "${ED}/usr/$(get_libdir)/blas/reference" || die
97 + rmdir "${ED}/usr/$(get_libdir)/pkgconfig" || die
98 +
99 + eselect blas add $(get_libdir) "${T}"/eselect.blas.reference ${ESELECT_PROF}
100 +}
101 +
102 +pkg_postinst() {
103 + local p=blas
104 + local current_lib=$(eselect ${p} show | cut -d' ' -f2)
105 + if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
106 + # work around eselect bug #189942
107 + local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
108 + [[ -e ${configfile} ]] && rm -f ${configfile}
109 + eselect ${p} set ${ESELECT_PROF}
110 + elog "${p} has been eselected to ${ESELECT_PROF}"
111 + else
112 + elog "Current eselected ${p} is ${current_lib}"
113 + elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
114 + elog "\t eselect ${p} set ${ESELECT_PROF}"
115 + fi
116 +}
117
118 diff --git a/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch b/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch
119 new file mode 100644
120 index 00000000..70f7cb0
121 --- /dev/null
122 +++ b/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch
123 @@ -0,0 +1,56 @@
124 +diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in
125 +index 7fd6f1e..e52f3ad 100644
126 +--- a/BLAS/blas.pc.in
127 ++++ b/BLAS/blas.pc.in
128 +@@ -1,5 +1,7 @@
129 +-prefix=@prefix@
130 +-libdir=@libdir@
131 ++prefix=@CMAKE_INSTALL_PREFIX@
132 ++exec_prefix=${prefix}
133 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
134 ++includedir=${prefix}/include
135 +
136 + Name: BLAS
137 + Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
138 +diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in
139 +index 4a938fe..311aed9 100644
140 +--- a/CBLAS/cblas.pc.in
141 ++++ b/CBLAS/cblas.pc.in
142 +@@ -1,5 +1,7 @@
143 +-prefix=@prefix@
144 +-libdir=@libdir@
145 ++prefix=@CMAKE_INSTALL_PREFIX@
146 ++exec_prefix=${prefix}
147 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
148 ++includedir=${prefix}/include
149 +
150 + Name: CBLAS
151 + Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms
152 +diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in
153 +index 028f8da..dc092b1 100644
154 +--- a/LAPACKE/lapacke.pc.in
155 ++++ b/LAPACKE/lapacke.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 LAPACK Linear Algebra PACKage
166 +diff --git a/lapack.pc.in b/lapack.pc.in
167 +index 878efc2..2cca4c2 100644
168 +--- a/lapack.pc.in
169 ++++ b/lapack.pc.in
170 +@@ -1,5 +1,7 @@
171 +-prefix=@prefix@
172 +-libdir=@libdir@
173 ++prefix=@CMAKE_INSTALL_PREFIX@
174 ++exec_prefix=${prefix}
175 ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
176 ++includedir=${prefix}/include
177 +
178 + Name: LAPACK
179 + Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage