diff --git a/HDF5/netcdf/4.6/variants b/HDF5/netcdf/4.6/variants index e36f00c..111bb4b 100644 --- a/HDF5/netcdf/4.6/variants +++ b/HDF5/netcdf/4.6/variants @@ -1,2 +1,3 @@ netcdf/4.6.1 unstable gcc/7.3.0 openmpi/1.10.7 hdf5/1.10.1 parallel-netcdf/1.9.0 netcdf/4.6.1 unstable gcc/7.3.0 openmpi/3.0.1 hdf5/1.10.1 parallel-netcdf/1.9.0 +netcdf/4.6.1 unstable pgi/18.5 pgi-mpi/18.5 hdf5/1.10.1 parallel-netcdf/1.9.0 diff --git a/HDF5/netcdf/build b/HDF5/netcdf/build index 9b92961..f0cb214 100755 --- a/HDF5/netcdf/build +++ b/HDF5/netcdf/build @@ -2,20 +2,44 @@ pbuild::set_download_url "https://www.unidata.ucar.edu/downloads/$P/ftp/$P-$V.tar.gz" -pbuild::configure() { - CC=$MPICC - CXX=$MPICXX - F77=$MPIF77 - F90=$MPIF90 - FC=$MPIFC - FORTRAN=$MPIFORTRAN - "${SRC_DIR}"/configure \ - --prefix="${PREFIX}" \ - --enable-netcdf-4 \ - --with-pic \ - --enable-pnetcdf \ - --enable-remote-fortran-bootstrap \ - || exit 1 +pbuild::pre_configure() { + pbuild::add_configure_args "CXX=${MPICXX}" + pbuild::add_configure_args "CC=$MPICC" + pbuild::add_configure_args "CXX=$MPICXX" + pbuild::add_configure_args "F77=$MPIF77" + pbuild::add_configure_args "F90=$MPIF90" + pbuild::add_configure_args "FC=$MPIFC" + pbuild::add_configure_args "FORTRAN=$MPIFORTRAN" + pbuild::add_configure_args "--enable-netcdf-4" + pbuild::add_configure_args "--with-pic" + pbuild::add_configure_args "--enable-pnetcdf" + pbuild::add_configure_args "--enable-remote-fortran-bootstrap" + #pbuild::add_configure_args "--disable-shared" + case "${COMPILER}" in + pgi ) + # PGI uses GCC's include files, some object files and + # the STL implementation! + # The PGI C pre-processor is broken and doesn't work + # for HDF5. We use the pre-processor of the underlying + # GCC... + # This is a bit hackish! + # + # The following eval sets GCCDIR! Which is something + # like: + # /opt/psi/Programming/gcc/7.3.0/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0 + # + eval $(pgcc -show 2>/dev/null | \ + awk '/^GCCDIR[[:space:]]*=/{gsub(/[[:space:]]/,""); print $0}') + pbuild::add_configure_args "CPP=${GCCDIR%%/..*}/cpp" + pbuild::add_configure_args "CFLAGS=-fPIC" + pbuild::add_configure_args "CXXFLAGS=-fPIC" + pbuild::add_configure_args "FCFLAGS=-fPIC" + pbuild::add_configure_args "CC=${MPICC} -fPIC" + ;; + * ) + pbuild::add_configure_args "CC=${MPICC}" + ;; + esac } pbuild::compile() { @@ -34,6 +58,6 @@ pbuild::install() { } pbuild::add_to_group 'HDF5' -pbuild::set_docfiles 'COPYRIGHT' 'README.md' 'RELEASE_NOTES.md' +pbuild::install_docfiles 'COPYRIGHT' 'README.md' 'RELEASE_NOTES.md' pbuild::make_all