summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMo Zhou <cdluminate@gmail.com>2019-07-22 11:47:17 +0000
committerBenda Xu <heroxbd@gentoo.org>2019-07-24 22:08:13 +0800
commit1026670c08c3b7bbc801565e9f36feb8e15fcc50 (patch)
tree16c714e4335375d730d509b99e622293b9a2fbdf /sci-libs/openblas/openblas-0.3.6.ebuild
parentsci-libs/openblas: remove 0.3.5 version. (diff)
downloadgentoo-1026670c08c3b7bbc801565e9f36feb8e15fcc50.tar.gz
gentoo-1026670c08c3b7bbc801565e9f36feb8e15fcc50.tar.bz2
gentoo-1026670c08c3b7bbc801565e9f36feb8e15fcc50.zip
sci-libs/openblas-0.3.6: add index-64bit support.
Closes: https://github.com/gentoo/gentoo/pull/12475 Signed-off-by: Mo Zhou <cdluminate@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/openblas/openblas-0.3.6.ebuild')
-rw-r--r--sci-libs/openblas/openblas-0.3.6.ebuild18
1 files changed, 15 insertions, 3 deletions
diff --git a/sci-libs/openblas/openblas-0.3.6.ebuild b/sci-libs/openblas/openblas-0.3.6.ebuild
index ba14ee30b531..19c3b79f2584 100644
--- a/sci-libs/openblas/openblas-0.3.6.ebuild
+++ b/sci-libs/openblas/openblas-0.3.6.ebuild
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+inherit toolchain-funcs
DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
@@ -10,7 +11,7 @@ SRC_URI="https://github.com/xianyi/OpenBLAS/tarball/v${PV} -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="dynamic openmp pthread serial static-libs eselect-ldso"
+IUSE="dynamic openmp pthread serial static-libs eselect-ldso index-64bit"
REQUIRED_USE="?? ( openmp pthread serial )"
RDEPEND="
@@ -27,6 +28,7 @@ openblas_flags() {
use dynamic && \
flags+=( DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1 )
if use openmp; then
+ tc-check-openmp
flags+=( USE_THREAD=1 USE_OPENMP=1 )
elif use pthread; then
flags+=( USE_THREAD=1 USE_OPENMP=0 )
@@ -41,13 +43,18 @@ openblas_flags() {
src_unpack () {
default
- find "${WORKDIR}" -maxdepth 1 -type d -name \*OpenBLAS\* && \
- mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
+ mv "${WORKDIR}"/*OpenBLAS* "${S}" || die
+ if use index-64bit; then
+ cp -aL "${S}" "${S}-index-64bit" || die
+ fi
}
src_compile () {
emake $(openblas_flags)
emake -Cinterface shared-blas-lapack $(openblas_flags)
+ if use index-64bit; then
+ emake -C"${S}-index-64bit" $(openblas_flags) INTERFACE64=1 LIBPREFIX=libopenblas64
+ fi
}
src_install () {
@@ -66,6 +73,11 @@ src_install () {
doins interface/liblapack.so.3
dosym liblapack.so.3 usr/$(get_libdir)/lapack/openblas/liblapack.so
fi
+
+ if use index-64bit; then
+ insinto /usr/$(get_libdir)/
+ dolib.so "${S}-index-64bit"/libopenblas64*.so*
+ fi
}
pkg_postinst () {