diff options
author | George Eleftheriou | 2018-06-11 01:40:28 +0200 |
---|---|---|
committer | George Eleftheriou | 2018-06-11 01:40:28 +0200 |
commit | cd762a0f53a366e5ad1ec0e30323800d9b275139 (patch) | |
tree | 9adf7ec55b0bc2f034b62e625ec1a7ecf9f3ae30 | |
download | aur-cd762a0f53a366e5ad1ec0e30323800d9b275139.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 87 | ||||
-rw-r--r-- | mpi.patch | 18 |
3 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..48ee5979ed32 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = hdf5-mpich + pkgdesc = General purpose library and file format for storing scientific data (mpich version) (full version including its Java Native Interfaces) + pkgver = 1.10.2 + pkgrel = 1 + url = https://www.hdfgroup.org/HDF5/ + arch = x86_64 + license = custom + makedepends = time + makedepends = gcc-fortran + makedepends = java-environment + depends = zlib + depends = libaec + depends = mpich + provides = hdf5 + provides = hdf5-openmpi + provides = hdf5-openmpi-java + conflicts = hdf5 + conflicts = hdf5-openmpi + conflicts = hdf5-openmpi-java + source = https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.2/src/hdf5-1.10.2.tar.bz2 + source = mpi.patch + md5sums = 41fb9347801b546fba323523a1c1af51 + md5sums = dfa8dd50b8a7ebb3ad7249c627156cf9 + +pkgname = hdf5-mpich + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..379b12140d14 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,87 @@ +# $Id$ +# Maintainer : George Eleftheriou <eleftg> +# Contributor: Ronald van Haren <ronald.archlinux.org> +# Contributor: Bruno Pagani (a.k.a. ArchangeGabriel) <archange@archlinux.org> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Contributor: damir <damir@archlinux.org> +# Contributor: Tom K <tomk@runbox.com> +# Contributor: Jed Brown <jed@59A2.org> +# Contributor: Simone Pezzuto <junki.gnu@gmail.com> + +_pkgname=hdf5 +_mpi=mpich +pkgname=${_pkgname}-${_mpi} +pkgver=1.10.2 +pkgrel=1 +pkgdesc="General purpose library and file format for storing scientific data (${_mpi} version) (full version including its Java Native Interfaces)" +arch=('x86_64') +url="https://www.hdfgroup.org/HDF5/" +license=('custom') +depends=('zlib' 'libaec' "${_mpi}") +makedepends=('time' 'gcc-fortran' 'java-environment') +provides=('hdf5' 'hdf5-openmpi' 'hdf5-openmpi-java') +conflicts=('hdf5' 'hdf5-openmpi' 'hdf5-openmpi-java') +source=("https://support.hdfgroup.org/ftp/HDF5/releases/${_pkgname}-${pkgver:0:4}/${_pkgname}-${pkgver/_/-}/src/${_pkgname}-${pkgver/_/-}.tar.bz2" + 'mpi.patch') +md5sums=('41fb9347801b546fba323523a1c1af51' + 'dfa8dd50b8a7ebb3ad7249c627156cf9') + +prepare() { + cd ${_pkgname}-${pkgver/_/-} + + # Fix building with GCC 8.1 + sed 's/\(.*\)(void) HDF_NO_UBSAN/HDF_NO_UBSAN \1(void)/' -i src/H5detect.c + + # FS#33343 + patch -p1 -i ../mpi.patch +} + +build() { + cd ${_pkgname}-${pkgver/_/-} + ./configure \ + CXX="/opt/mpich/bin/mpicxx" \ + CC="/opt/mpich/bin/mpicc" \ + FC="/opt/mpich/bin/mpif90" \ + F9X="/opt/mpich/bin/mpif90" \ + RUNPARALLEL="/opt/mpich/bin/mpirun" \ + --prefix=/usr \ + --disable-static \ + --disable-sharedlib-rpath \ + --enable-build-mode=production \ + --enable-hl \ + --enable-cxx \ + --enable-fortran \ + --enable-java \ + --enable-parallel \ + --enable-unsupported \ + --with-pic \ + --with-zlib \ + --with-szlib + make +} + +check() { + cd ${_pkgname}-${pkgver/_/-} + # Without exporting LD_LIBRARY_PATH, tests fail being unable to + # locate the newly built (not installed yet) hdf5 runtime + export LD_LIBRARY_PATH="${srcdir}"/${pkgname}-${pkgver/_/-}/src/.libs/ + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/c++/src/.libs/ + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/fortran/src/.libs/ + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/src/.libs/ + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/c++/src/.libs/ + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"${srcdir}"/${pkgname}-${pkgver/_/-}/hl/fortran/src/.libs/ + # This is a parallel build, there will always be some MPI bugs, + # so skip failures and don't kill the entire packaging process + make check || warning "Some tests failed" +} + +package() { + cd ${_pkgname}-${pkgver/_/-} + + make -j1 DESTDIR="${pkgdir}" install + + install -dm755 "${pkgdir}"/usr/share/doc/${_pkgname} + mv "${pkgdir}"/usr/share/{hdf5_examples,doc/${_pkgname}/examples} + + install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${_pkgname}/LICENSE +} diff --git a/mpi.patch b/mpi.patch new file mode 100644 index 000000000000..4fadc13e26ab --- /dev/null +++ b/mpi.patch @@ -0,0 +1,18 @@ +Prevent accidental inclusion of mpi c++ headers +when hdf5.h is included third party library + +https://bugs.gentoo.org/show_bug.cgi?id=420777 +https://bugs.archlinux.org/task/33343 + +--- a/src/H5public.h ++++ b/src/H5public.h +@@ -58,6 +58,8 @@ + # include <stddef.h> + #endif + #ifdef H5_HAVE_PARALLEL ++# define OMPI_SKIP_MPICXX /* Make sure that cxx specific headers are not included */ ++# define MPICH_SKIP_MPICXX + # include <mpi.h> + #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ + # include <mpio.h> + |