summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2019-08-04 21:12:33 +0800
committerBenda Xu <heroxbd@gentoo.org>2019-08-04 21:12:57 +0800
commitda91e23c3cb3a5acd9998912990981b9df7921d9 (patch)
treeb612e9824b19283aa5e71fcd5849d646e7ba7b61 /sci-libs/openblas
parentsys-apps/apparmor: version bump 2.13.3 (diff)
downloadgentoo-da91e23c3cb3a5acd9998912990981b9df7921d9.tar.gz
gentoo-da91e23c3cb3a5acd9998912990981b9df7921d9.tar.bz2
gentoo-da91e23c3cb3a5acd9998912990981b9df7921d9.zip
sci-libs/openblas: Allow custom CFLAGS and add fortran checks.
Drop unused USE flags. Suggested-By: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Closes: https://github.com/gentoo/gentoo/pull/12576 Package-Manager: Portage-2.3.69, Repoman-2.3.12 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/openblas')
-rw-r--r--sci-libs/openblas/metadata.xml3
-rw-r--r--sci-libs/openblas/openblas-0.3.6.ebuild29
2 files changed, 23 insertions, 9 deletions
diff --git a/sci-libs/openblas/metadata.xml b/sci-libs/openblas/metadata.xml
index 95b34d1ccda3..fa16b081f106 100644
--- a/sci-libs/openblas/metadata.xml
+++ b/sci-libs/openblas/metadata.xml
@@ -14,10 +14,9 @@
</longdescription>
<use>
<flag name="dynamic">Build dynamic architecture detection at run time (for multi targets)</flag>
- <flag name="pthread">Build with pthread threadding model</flag>
- <flag name="serial">Build without multi-thraedding</flag>
<flag name="eselect-ldso">Enable BLAS/LAPACK runtime switching</flag>
<flag name="index-64bit">Compile a separate INTERFACE64 OpenBLAS</flag>
+ <flag name="pthread">Build with pthread threading model</flag>
</use>
<upstream>
<remote-id type="github">xianyi/OpenBLAS</remote-id>
diff --git a/sci-libs/openblas/openblas-0.3.6.ebuild b/sci-libs/openblas/openblas-0.3.6.ebuild
index 19c3b79f2584..3a91ce44fc14 100644
--- a/sci-libs/openblas/openblas-0.3.6.ebuild
+++ b/sci-libs/openblas/openblas-0.3.6.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs
+inherit fortran-2 toolchain-funcs
DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
@@ -11,18 +11,28 @@ 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 index-64bit"
-REQUIRED_USE="?? ( openmp pthread serial )"
+IUSE="dynamic eselect-ldso index-64bit openmp pthread"
+REQUIRED_USE="?? ( openmp pthread )"
RDEPEND="
-eselect-ldso? ( >=app-eselect/eselect-blas-0.2
- !app-eselect/eselect-cblas
- >=app-eselect/eselect-lapack-0.2 )
-"
+ eselect-ldso? ( >=app-eselect/eselect-blas-0.2
+ !app-eselect/eselect-cblas
+ >=app-eselect/eselect-lapack-0.2 )"
+
DEPEND="virtual/pkgconfig"
PATCHES=( "${FILESDIR}/shared-blas-lapack.patch" )
+src_prepare() {
+ default
+ # Set compiler and common CFLAGS.
+ sed \
+ -e "/^#\s*CC/cCC=$(tc-getCC)" \
+ -e "/^#\s*FC/cFC=$(tc-getFC)" \
+ -e "/^#\s*COMMON_OPT/cCOMMON_OPT=${CFLAGS}" \
+ -i "${S}"/Makefile.rule || die
+}
+
openblas_flags() {
local flags=()
use dynamic && \
@@ -57,8 +67,13 @@ src_compile () {
fi
}
+src_test() {
+ emake tests $(openblas_flags)
+}
+
src_install () {
emake install $(openblas_flags)
+ dodoc GotoBLAS_*.txt *.md Changelog.txt
if use eselect-ldso; then
dodir /usr/$(get_libdir)/blas/openblas/