summaryrefslogtreecommitdiff
path: root/sci-libs/scalapack/scalapack-2.0.2-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-22 11:09:47 +0100
commit64e107b9b6058580ff0432107eb37cefb0b2a7d8 (patch)
tree9a44e603e2ae365e2b1fe35ac37f73e830cdee1d /sci-libs/scalapack/scalapack-2.0.2-r1.ebuild
parent957235cf19a691360c720f7913672adda4258ed0 (diff)
gentoo resync : 22.10.2018
Diffstat (limited to 'sci-libs/scalapack/scalapack-2.0.2-r1.ebuild')
-rw-r--r--sci-libs/scalapack/scalapack-2.0.2-r1.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/sci-libs/scalapack/scalapack-2.0.2-r1.ebuild b/sci-libs/scalapack/scalapack-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..3e60e55da8f2
--- /dev/null
+++ b/sci-libs/scalapack/scalapack-2.0.2-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils fortran-2
+
+DESCRIPTION="Subset of LAPACK routines redesigned for heterogenous (MPI) computing"
+HOMEPAGE="https://www.netlib.org/scalapack/"
+SRC_URI="${HOMEPAGE}/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs test"
+
+RDEPEND="
+ virtual/lapack
+ virtual/mpi"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-libdir.patch" )
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ if use static-libs; then
+ mkdir "${WORKDIR}/${PN}_static" || die
+ fi
+ # mpi does not have a pc file
+ sed -i -e 's/mpi//' scalapack.pc.in || die
+}
+
+src_configure() {
+ scalapack_configure() {
+ local mycmakeargs=(
+ -DUSE_OPTIMIZED_LAPACK_BLAS=ON
+ -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
+ -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)"
+ -DBUILD_TESTING=$(usex test)
+ $@
+ )
+ cmake-utils_src_configure
+ }
+
+ scalapack_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" scalapack_configure \
+ -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ use static-libs && \
+ CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" cmake-utils_src_install
+
+ insinto /usr/include/blacs
+ doins BLACS/SRC/*.h
+
+ insinto /usr/include/scalapack
+ doins PBLAS/SRC/*.h
+}