summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8065483d469c63b06dd224803529e159518e894a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
pkgname=med3
pkgver=3.3.1
pkgrel=1
pkgdesc="MED stands for Modelisation et Echanges de Donnees, i.e. Data Modelization and Exchanges - MED is code-aster exchange module linked to hdf5"
url="https://www.salome-platform.org/downloads"
license=('LGPL')
depends=('hdf5' 'openmpi' 'swig')
makedepends=('gcc-fortran' 'python2')
optdepends=('tk')
provides=("med=${pkgver}")
conflicts=("med")
arch=('x86_64')
source=("http://files.salome-platform.org/Salome/other/med-${pkgver}.tar.gz"
        "hdf5-1.10-support.patch")
sha256sums=('dd631ef813838bc7413ff0dd6461d7a0d725bcfababdf772ece67610a8d22588'
            '55cf95f1a3b7abf529bb2ded6c9a491459623c830dc16518058ff53ab203291c')

prepare () {
  cd "${srcdir}"/med-${pkgver}_SRC
  # https://salsa.debian.org/science-team/med-fichier/tree/master/debian/patches
  patch -p1 -i "${srcdir}"/hdf5-1.10-support.patch
  autoreconf -i
}

build() {
  cd "${srcdir}"/med-${pkgver}_SRC
  export FFLAGS="-fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -ffixed-line-length-0 ${CFLAGS}"
  export FCFLAGS="-fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -ffixed-line-length-0 ${CFLAGS}"
  export CPPFLAGS="-DHAVE_F77INT64 ${CPPFLAGS}"
  export F77=mpif90
  export FC=mpif90
  export PYTHON=/usr/bin/python2
  ./configure --with-f90=mpif90 --prefix=/usr --datadir=/usr/share/med --with-swig=yes --disable-dependency-tracking
  make
}

package() {
  cd ${srcdir}/med-${pkgver}_SRC
  make DESTDIR="${pkgdir}" install
  rm -r "${pkgdir}"/share/doc/med/
}