1 # PKGBUILD template to install Gromacs > 4.5
2 # Mantainer: Hector Martinez-Seara Monne <hseara ##[at]## gmail?com>
3 # Contributor: Jed Brown <jed@59A2.org>
7 pkgdesc="An improved implementation of the Message Passing Interface."
8 url="http://www.mcs.anl.gov/research/projects/mpich2/"
11 depends=(python2 gcc44=4.4.4-2 libxml2)
12 makedepends=(libtool make coreutils)
16 install=install.mpich2
17 source=(http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/$pkgver/mpich2-$pkgver.tar.gz
20 md5sums=('cf7f8c12161b0af3f111e33c6d15f5c6'
21 'f1ee1635d72a8eb04ed4d3227fea2e75'
22 '1b8c5c04dfa06607fba5d034b7c97e4c')
26 #fake the system to think gcc44 is the default
27 ln -s /usr/bin/gcc-4.4 /tmp/gcc || true
28 ln -s /usr/bin/cpp-4.4 /tmp/cpp || true
29 ln -s /usr/bin/g++-4.4 /tmp/g++ || true
30 ln -s /usr/bin/gfortran-4.4 /tmp/gfortran || true
31 export PATH=/tmp:$PATH
32 [ "$CARCH" = "x86_64" ] && LIBGCC44=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.4/
33 [ "$CARCH" = "i686" ] && LIBGCC44=/usr/lib/gcc/i686-pc-linux-gnu/4.4.4/
34 export LD_LIBRARY_PATH=$LIBGCC44:$LD_LIBRARY_PATH
36 #starting real compilation
37 cd ${srcdir}/mpich2-${pkgver}
39 unset MAKEFLAGS # -j2 causes trouble, http://trac.mcs.anl.gov/projects/mpich2/ticket/955
41 # CFLAGS etc are normally written into the wrapper compilers. This
42 # gives surprising results, e.g. when the user wants to compile their
43 # program without optimization.
44 export MPICH2LIB_CFLAGS="$CFLAGS"; unset CFLAGS
45 export MPICH2LIB_CXXFLAGS="$CXXFLAGS"; unset CXXFLAGS
46 export MPICH2LIB_FFLAGS="$FFLAGS"; unset FFLAGS
47 export MPICH2LIB_F90FLAGS="$F90FLAGS"; unset F90FLAGS
48 export MPICH2LIB_LDFLAGS="$LDFLAGS"; unset LDFLAGS
52 ../configure --prefix=/opt/$pkgname --enable-shared --enable-sharedlibs=gcc \
53 --enable-error-checking=runtime --enable-error-messages=all \
54 --enable-timer-type=clock_gettime \
55 --with-pm=hydra:gforker:mpd --with-python=python2 \
57 --enable-fc --enable-f77 --enable-cxx
62 cd ${srcdir}/mpich2-${pkgver}/build
63 make DESTDIR=${pkgdir} install
65 ln -sf mpiexec.hydra "${pkgdir}/opt/$pkgname/bin/mpiexec"
66 ln -sf mpiexec "${pkgdir}/opt/$pkgname/bin/mpirun"
67 for pm in hydra mpd gforker; do
68 ln -sf "mpiexec.${pm}" "${pkgdir}/opt/$pkgname/bin/mpirun.${pm}"
70 install -D -m644 ${srcdir}/mpich2-${pkgver}/COPYRIGHT ${pkgdir}/usr/share/licenses/$pkgname/license.txt
71 install -D -m755 ${srcdir}/mpich2-gcc44.bash ${pkgdir}/opt/$pkgname/bin/mpich2-gcc44.bash