summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-12 10:37:59 +0200
committerErich Eckner <git@eckner.net>2020-06-12 10:37:59 +0200
commit091162b8f6da4283cb803fd400b55e9b6010c575 (patch)
treece679689f382d9bcff51bf612017194ebd383181
parente0d353dae91ad86ce1aa656e271ab1e8d89715a1 (diff)
downloadarchlinuxewe-091162b8f6da4283cb803fd400b55e9b6010c575.tar.xz
mpich neu
-rw-r--r--mpich/PKGBUILD71
-rw-r--r--mpich/mpich.install13
-rw-r--r--mpich/mpich.profile3
3 files changed, 87 insertions, 0 deletions
diff --git a/mpich/PKGBUILD b/mpich/PKGBUILD
new file mode 100644
index 000000000..ead9fd5e1
--- /dev/null
+++ b/mpich/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Jed Brown <jed@59A2.org>
+# Contributor: George Eleftheriou <eleftg>
+
+pkgname=mpich
+pkgver=3.4a2
+pkgrel=1
+pkgdesc="An improved implementation of the Message Passing Interface."
+url="https://mpich.org"
+arch=('i686' 'pentium4' 'x86_64')
+license=("custom")
+replaces=(mpich2)
+depends=('gcc-fortran' 'libxml2' 'openssh' 'numactl' 'pciutils')
+makedepends=('texlive-core' 'sowing')
+optdepends=("java-environment")
+install="${pkgname}.install"
+source=("http://www.mpich.org/static/downloads/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "mpich.profile")
+sha256sums=('ca9b9a6d4d858f3f94d2ea1ed0b851fccbc6f2976eb08dfc3379be8c6278aa12'
+ 'b9716439a544511bf88618edeb40c3eb80f1b5d0d9369c30d750251feed02284')
+options=('!libtool')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # CFLAGS etc are normally written into the wrapper compilers. This
+ # gives surprising results, e.g. when the user wants to compile their
+ # program without optimization.
+ export MPICHLIB_CFLAGS="${CFLAGS}"; unset CFLAGS
+ export MPICHLIB_CXXFLAGS="${CXXFLAGS}"; unset CXXFLAGS
+ export MPICHLIB_CPPFLAGS="${CPPFLAGS}"; unset CPPFLAGS
+ export MPICHLIB_FFLAGS="${FFLAGS}"; unset FFLAGS
+ export MPICHLIB_FCFLAGS="${FCFLAGS}"; unset FCFLAGS
+ export MPICHLIB_LDFLAGS="${LDFLAGS}"; unset LDFLAGS
+
+ mkdir -p build
+ cd build
+
+ ../configure --prefix=/usr \
+ --with-device=ch3:nemesis \
+ --enable-error-checking=runtime \
+ --enable-error-messages=all \
+ --enable-g=meminit \
+ CC=gcc CXX=g++ FC=gfortran \
+ FFLAGS=-fallow-argument-mismatch \
+ FCFLAGS=-fallow-argument-mismatch
+
+ make
+ make mandoc
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}/build
+
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+
+ ln -sf mpiexec.hydra "${pkgdir}/usr/bin/mpiexec"
+ ln -sf mpiexec "${pkgdir}/usr/bin/mpirun"
+ ln -sf mpiexec.hydra "${pkgdir}/usr/bin/mpirun.hydra"
+
+ install -D -m644 "${srcdir}/${pkgname}-${pkgver}/COPYRIGHT" "${pkgdir}/usr/share/licenses/mpich/license.txt"
+ install -D -m755 "${srcdir}/${pkgname}.profile" "${pkgdir}/etc/profile.d/mpich.sh"
+
+ mkdir -p "${pkgdir}/etc/ld.so.conf.d"
+ echo /opt/mpich/lib > "${pkgdir}/etc/ld.so.conf.d/mpich.conf"
+}
diff --git a/mpich/mpich.install b/mpich/mpich.install
new file mode 100644
index 000000000..fda817101
--- /dev/null
+++ b/mpich/mpich.install
@@ -0,0 +1,13 @@
+# arg 1: the new package version
+post_install() {
+ echo " *** Documentation installed at /opt/mpich/share/doc/mpich/install.pdf"
+ echo " *** /opt/mpich/bin is appended to PATH, see /etc/profile.d/mpich.sh"
+ echo " *** Some binary names match those of OpenMPI located in /usr (if installed)"
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
diff --git a/mpich/mpich.profile b/mpich/mpich.profile
new file mode 100644
index 000000000..9cbd6f9ed
--- /dev/null
+++ b/mpich/mpich.profile
@@ -0,0 +1,3 @@
+export PATH=$PATH:/opt/mpich/bin
+export MANPATH=$MANPATH:/opt/mpich/share/man
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/mpich/lib/pkgconfig