summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2011-06-01 01:11:06 +0100
committerSébastien Fabbro <bicatali@gentoo.org>2011-06-01 01:11:06 +0100
commitb7b124b0487718ee8fc08542750f53cd5fbcfd35 (patch)
treeb62713ed5e6bee7c599601db7148e24713eca22b
parentfixed linking. static makefile include. eapi4 (diff)
downloadbicatali-b7b124b0487718ee8fc08542750f53cd5fbcfd35.tar.gz
bicatali-b7b124b0487718ee8fc08542750f53cd5fbcfd35.tar.bz2
bicatali-b7b124b0487718ee8fc08542750f53cd5fbcfd35.zip
fixed linking. static makefile include. eapi4
-rw-r--r--sci-libs/mpiblacs/Manifest4
-rw-r--r--sci-libs/mpiblacs/mpiblacs-1.1.ebuild85
2 files changed, 41 insertions, 48 deletions
diff --git a/sci-libs/mpiblacs/Manifest b/sci-libs/mpiblacs/Manifest
index 76eaeaf..1afaaab 100644
--- a/sci-libs/mpiblacs/Manifest
+++ b/sci-libs/mpiblacs/Manifest
@@ -1,6 +1,6 @@
DIST blacstester.tgz 81937 RMD160 bfee4918d04f6577ea021bc466cd16d6d007ac1d SHA1 d85ebb1cb2bad051242609504d27773e54c4ae00 SHA256 7e5a67b703f74f05435055dd314a7196007d9a273e6bb46058a19be71d3ba197
DIST mpiblacs-patch03.tgz 30505 RMD160 582cd4d13bda97edefedc0e67b1ab5d00c7024f2 SHA1 d3f136b07df2b208a11c96fa55e39030e4702b39 SHA256 92dfba8a462a2f23102000a10532c00a9a5203b79ccad5a87f44ce83eb6bc7ed
DIST mpiblacs.tgz 152823 RMD160 bac03b82dc7f1daef632ca6869f077f64c18ad8e SHA1 b9503a2fddd4136a2b7ce3f5a9cd97dd5ec0d6b6 SHA256 88dd7265d412022948debb7a2737226cd53a3bf73b0b62fc55ceb3ccc8a598f7
-EBUILD mpiblacs-1.1.ebuild 3004 RMD160 386ba6a0e7697b9617ef7d633c82f3f87462937c SHA1 f6affe10853343de6e99ad2fc5de75d53be5cad0 SHA256 3c5456dfff4ce2d0e4e5aefc3526e3f2c8b8652f032c2c4d144f8ca1dbeaaf05
-MISC ChangeLog 375 RMD160 16f36586c81cf539e99c809387a1fb5fe5614b23 SHA1 6397b7813ac1564ff429db00d85f268e9909c4bd SHA256 9fdab740424fa27b493f2ee804764c7af18dde2bc3673d50357447988a4d46c2
+EBUILD mpiblacs-1.1.ebuild 3111 RMD160 1e86313347c025c745b1bab1f18208117d030dc6 SHA1 3731771b50dbf1a163c2caa4e3b421baf2aa3c71 SHA256 5be84de191bf21beaef7a48392091f1dc12bc6b044f39c02874febe3fb83ceba
+MISC ChangeLog 537 RMD160 c8ecff2d0248972ae14dae3c472f043d735cd3df SHA1 91f151741fb7751ddb42b5759b9ea5d06da39eae SHA256 d339c62d975583fbb432a48a1a7940541cc970c39f536ab03fab8d2685502b42
MISC metadata.xml 491 RMD160 642fdba0aaec7ab2f26183b0b2c3a9a86dbc826c SHA1 6012e8c37ec9f077437f9dcebc0841e19a2746e6 SHA256 92e3b64a3520d1adfdc948c5fb823c1c5e2d1d8af5b6fce6ab05535de52bbf49
diff --git a/sci-libs/mpiblacs/mpiblacs-1.1.ebuild b/sci-libs/mpiblacs/mpiblacs-1.1.ebuild
index f7959a5..743fa32 100644
--- a/sci-libs/mpiblacs/mpiblacs-1.1.ebuild
+++ b/sci-libs/mpiblacs/mpiblacs-1.1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI="3"
+EAPI=4
inherit eutils toolchain-funcs versionator alternatives-2
DESCRIPTION="Basic Linear Algebra Communication Subprograms with MPI"
@@ -24,65 +24,60 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/BLACS"
make_shared_lib() {
+ local libstatic=${1}
local soname=$(basename "${1%.a}").so.$(get_major_version)
+ shift
einfo "Making ${soname}"
- ${2:-$(tc-getCC)} ${LDFLAGS} \
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
-shared -Wl,-soname="${soname}" \
- -Wl,--whole-archive "${1}" -Wl,--no-whole-archive \
- -o $(dirname "${1}")/"${soname}" || return 1
+ -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \
+ "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed"
}
src_prepare() {
- cp BMAKES/Bmake.MPI-LINUX Bmake.inc || die
- find . -name Makefile -exec sed -i \
- -e 's:make:$(MAKE):g' \
- '{}' \;
-}
+ find . -name Makefile -exec sed -i -e 's:make:$(MAKE):g' '{}' \;
-src_configure() {
- # TODO: INTFACE should be fortran compiler dependent
- # how to do it with mpif77?
- # is TRANSCOMM mpi dependent? other values: -DCSameF77 -DUseMpich
- MAKEFLAGS=(
- "BTOPdir=${S}"
- "MPILIB=-lmpi"
- "MPIINCdir=${EPREFIX}/usr/include"
- "INTFACE=-DAdd_"
- "TRANSCOMM=-DUseMpi2"
- "F77=mpif77"
- "F77NO_OPTFLAGS=-O0"
- "F77FLAGS=${FFLAGS}"
- "F77LOADFLAGS=${LDFLAGS}"
- "CC=mpicc"
- "CCFLAGS=${CFLAGS}"
- "CCLOADFLAGS=${LDFLAGS}"
- "ARCH=$(tc-getAR)"
- "RANLIB=$(tc-getRANLIB)"
- "BLACSFINIT=\$(BLACSdir)/lib${PN}F77init.a"
- "BLACSCINIT=\$(BLACSdir)/lib${PN}Cinit.a"
- "BLACSLIB=\$(BLACSdir)/lib${PN}.a"
- )
+ 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 "${MAKEFLAGS[@]}" \
+ emake \
F77NO_OPTFLAGS="-O0 -fPIC" \
F77FLAGS="${FFLAGS} -fPIC" \
CCFLAGS="${CFLAGS} -fPIC" \
- mpi || die "shared libs failed"
+ mpi
cd LIB
- make_shared_lib lib${PN}.a mpif77 || die
- make_shared_lib lib${PN}Cinit.a mpicc || die
- make_shared_lib lib${PN}F77init.a mpif77 || die
+ 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 "${MAKEFLAGS[@]}" clean -C SRC/MPI && rm -f LIB/*.a
- emake "${MAKEFLAGS[@]}" mpi || die "static libs failed"
+ emake clean -C SRC/MPI && rm -f LIB/*.a
+ emake mpi
fi
}
src_test() {
- emake "${MAKEFLAGS[@]}" tester || die "test compile failed"
+ emake tester
cd TESTING/EXE
local x
# do not die because we are expecting an abort
@@ -94,13 +89,12 @@ src_test() {
src_install() {
cd LIB
+ local l
for l in lib*.so.*; do
- dolib.so "${l}" || die
+ dolib.so "${l}"
dosym "${l}" /usr/$(get_libdir)/"${l%.*}"
done
- if use static-libs; then
- dolib.a lib*.a || die
- fi
+ use static-libs && dolib.a lib*.a
cat <<-EOF > ${PN}.pc
prefix=${EPREFIX}/usr
libdir=\${prefix}/$(get_libdir)
@@ -109,8 +103,7 @@ src_install() {
Description: ${DESCRIPTION}
Version: ${PV}
URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${PN} -l${PN}Cinit -l${PN}F77init
- Private: -lm
+ Libs: -L\${libdir} -l${PN} -l${PN}Cinit -l${PN}F77init -lm
Cflags: -I\${includedir}/${PN}
Requires: blas
EOF