From: "Andrea Arteaga" <andyspiros@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/mpiblacs/
Date: Tue, 21 Feb 2012 01:12:19 +0000 (UTC) [thread overview]
Message-ID: <1329786316.070c5081ca2fe5ab758e0d6c5623999fb6b2cc1c.spiros@gentoo> (raw)
commit: 070c5081ca2fe5ab758e0d6c5623999fb6b2cc1c
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Tue Feb 21 01:05:16 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Tue Feb 21 01:05:16 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=070c5081
[sci-libs/mpiblacs] Install blacs headers.
---
sci-libs/mpiblacs/ChangeLog | 3 +
sci-libs/mpiblacs/mpiblacs-1.1-r1.ebuild | 117 ++++++++++++++++++++++++++++++
2 files changed, 120 insertions(+), 0 deletions(-)
diff --git a/sci-libs/mpiblacs/ChangeLog b/sci-libs/mpiblacs/ChangeLog
index 0d9c790..4d423d3 100644
--- a/sci-libs/mpiblacs/ChangeLog
+++ b/sci-libs/mpiblacs/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 21 Feb 2012; Andrea Arteaga <andyspiros@gmail.com> +mpiblacs-1.1-r1.ebuild
+ Install blacs headers.
+
22 Aug 2011; Sébastien Fabbro <bicatali@gentoo.org> +mpiblacs-1.1.ebuild,
+metadata.xml:
Imported from bicatali overlay
diff --git a/sci-libs/mpiblacs/mpiblacs-1.1-r1.ebuild b/sci-libs/mpiblacs/mpiblacs-1.1-r1.ebuild
new file mode 100644
index 0000000..caa8ace
--- /dev/null
+++ b/sci-libs/mpiblacs/mpiblacs-1.1-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit eutils toolchain-funcs versionator alternatives-2
+
+DESCRIPTION="Basic Linear Algebra Communication Subprograms with MPI"
+HOMEPAGE="http://www.netlib.org/blacs/"
+SRC_URI="${HOMEPAGE}/${PN}.tgz
+ ${HOMEPAGE}/${PN}-patch03.tgz
+ test? ( ${HOMEPAGE}/blacstester.tgz )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RDEPEND="virtual/mpi[fortran]
+ virtual/blas"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+S="${WORKDIR}/BLACS"
+
+make_shared_lib() {
+ local libstatic=${1}
+ local soname=$(basename "${1%.a}").so.$(get_major_version)
+ shift
+ einfo "Making ${soname}"
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname="${soname}" \
+ -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \
+ "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed"
+ ln -s "${soname}" $(dirname "${libstatic}")/"${soname%.*}"
+}
+
+src_prepare() {
+ find . -name Makefile -exec sed -i -e 's:make:$(MAKE):g' '{}' \;
+
+ sed -e "s:\(SHELL\s*=\).*:\1$(type -P sh):" \
+ -e "s:\(BTOPdir\s*=\).*:\1${S}:" \
+ -e "s:\(BLACSFINIT\s*=\).*:\1\$(BLACSdir)/lib${PN}F77init.a:" \
+ -e "s:\(BLACSCINIT\s*=\).*:\1\$(BLACSdir)/lib${PN}Cinit.a:" \
+ -e "s:\(BLACSLIB\s*=\).*:\1\$(BLACSdir)/lib${PN}.a:" \
+ -e "s:\(MPIINCdir\s*=\).*:\1${EPREFIX}/usr/include:" \
+ -e "s:\(MPILIB\s*=\).*:\1:" \
+ -e '/SYSINC.*=/d' \
+ -e 's:\(INTFACE\s*=\).*:\1-DAdd_:' \
+ -e 's:\(TRANSCOMM\s*=\).*:\1-DUseMpi2:' \
+ -e "s:\(F77\s*=\).*:\1mpif77:" \
+ -e "s:\(F77NO_OPTFLAGS\s*=\).*:\1-O0:" \
+ -e "s:\(F77FLAGS\s*=\).*:\1${FFLAGS}:" \
+ -e "s:\(F77LOADFLAGS\s*=\).*:\1${LDFLAGS}:" \
+ -e "s:\(CC\s*=\).*:\1mpicc:" \
+ -e "s:\(CCFLAGS\s*=\).*:\1${CFLAGS}:" \
+ -e "s:\(CCLOADFLAGS\s*=\).*:\1${LDFLAGS}:" \
+ -e "s:\(ARCH\s*=\).*:\1$(tc-getAR):" \
+ -e "s:\(RANLIB\s*=\).*:\1$(tc-getRANLIB):" \
+ BMAKES/Bmake.MPI-LINUX > Bmake.inc || die
+}
+
+src_compile() {
+ emake \
+ F77NO_OPTFLAGS="-O0 -fPIC" \
+ F77FLAGS="${FFLAGS} -fPIC" \
+ CCFLAGS="${CFLAGS} -fPIC" \
+ mpi
+ cd LIB
+ LINK=mpif77 make_shared_lib lib${PN}.a
+ LINK=mpicc make_shared_lib lib${PN}Cinit.a -L. -l${PN}
+ LINK=mpif77 make_shared_lib lib${PN}F77init.a -L. -l${PN}
+ cd "${S}"
+ if use static-libs; then
+ emake clean -C SRC/MPI && rm -f LIB/*.a
+ emake mpi
+ fi
+}
+
+src_test() {
+ emake tester
+ cd TESTING/EXE
+ local x
+ # do not die because we are expecting an abort
+ for x in ./x*; do
+ mpirun -np 4 $x 2>&1 | tee $x.log
+ grep -q "\*\*\*" $x.log && die "$x failed"
+ done
+}
+
+src_install() {
+ pushd LIB
+ dolib.so lib*.so*
+ use static-libs && dolib.a lib*.a
+ cat <<-EOF > ${PN}.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -l${PN} -l${PN}Cinit -l${PN}F77init -lm
+ Cflags: -I\${includedir}/${PN}
+ Requires: blas
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc || die
+ alternatives_for blacs ${PN} 0 \
+ "/usr/$(get_libdir)/pkgconfig/blacs.pc" "${PN}.pc"
+ popd
+
+ pushd SRC/MPI
+ insinto /usr/include/blacs
+ doins Bconfig.h Bdef.h
+ popd
+}
next reply other threads:[~2012-02-21 1:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 1:12 Andrea Arteaga [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-23 19:05 [gentoo-commits] proj/sci:master commit in: sci-libs/mpiblacs/ Sebastien Fabbro
2012-07-12 20:43 Sebastien Fabbro
2015-01-25 16:39 Justin Lecher
2021-01-01 14:33 Aisha Tammy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1329786316.070c5081ca2fe5ab758e0d6c5623999fb6b2cc1c.spiros@gentoo \
--to=andyspiros@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox