summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Jakub KopaƄski <jkopansk@gmail.com> 2015-09-20 15:04:13 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2016-11-23 23:50:13 +0100
commite109035ba2c72930b1a840bc373ed7392831ca6a (patch)
treed78df4ebed84563309c9698e15c7594f54e225ad
parentcaed6f0bb9ae463a9b6c238fb44efe42d215d27f (diff)
downloadscientific-e109035ba2c72930b1a840bc373ed7392831ca6a.tar.gz
scientific-e109035ba2c72930b1a840bc373ed7392831ca6a.tar.xz
hdf5: add mpi option
Change-Id: I8311071d1f1ce733fa264060073a4119677e3e42 Reviewed-on: https://galileo.mailstation.de/gerrit/7636 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Heiko Becker <heirecka@exherbo.org>
-rw-r--r--packages/sci-libs/hdf5/hdf5-1.8.15_p1.exheres-035
1 files changed, 26 insertions, 9 deletions
diff --git a/packages/sci-libs/hdf5/hdf5-1.8.15_p1.exheres-0 b/packages/sci-libs/hdf5/hdf5-1.8.15_p1.exheres-0
index 32341ef..5116d75 100644
--- a/packages/sci-libs/hdf5/hdf5-1.8.15_p1.exheres-0
+++ b/packages/sci-libs/hdf5/hdf5-1.8.15_p1.exheres-0
@@ -15,12 +15,14 @@ SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
fortran [[ description = [ Build fortran libraries ] ]]
+ mpi
"
DEPENDENCIES="
build:
fortran? ( sys-libs/libgfortran:* )
build+run:
+ mpi? ( sys-cluster/openmpi[fortran=] )
sys-libs/zlib
"
@@ -30,14 +32,29 @@ UPSTREAM_RELEASE_NOTES="http://www.hdfgroup.org/ftp/HDF5/current/src/${MY_PNV}-R
DEFAULT_SRC_PREPARE_PATCHES=(
"${FILES}"/0001-build-Respect-datarootdir.patch
)
-DEFAULT_SRC_CONFIGURE_PARAMS=(
- --enable-cxx
- # MPI is incompatible with both shared libraries and C++ bindings
- --disable-parallel
-)
-DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=(
- "fortran fortran2003"
- fortran
-)
+
DEFAULT_SRC_TEST_PARAMS=( TIME=echo )
+src_configure() {
+ # MPI is incompatible with both shared libraries and C++ bindings
+ # however some may still need it
+ local myconf=(
+ $(option_enable fortran)
+ $(option_enable fortran fortran2003)
+ $(option_enable mpi parallel)
+ $(option_enable !mpi cxx)
+ $(option_enable !mpi shared)
+ )
+
+ if option mpi; then
+ CC=mpicc
+ CXX=mpic++
+ FC=mpif77
+ CFLAGS="${CFLAGS} -fPIC"
+ CXXFLAGS="$${CXXFLAGS} -fPIC"
+ FFLAGS="${FFLAGS} -fPIC"
+ fi
+
+ CC="${CC}" CXX="${CXX}" FC="${FC}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" FFLAGS="${FFLAGS}" \
+ econf "${myconf[@]}"
+}