blob: 77372863a781090155b1c44e422401c898db5174 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Maintainer: Martin Diehl <aur@martin-diehl.net>
# Contributor: Andreas Bilke <abilke at cosy dot sbg dot ac dot at>
# Contributor: Myles English <myles at rockhead dot biz>
# Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com>
pkgver=3.24.3
pkgrel=1
pkgname=petsc
pkgdesc="Portable, extensible toolkit for scientific computation"
arch=('i686' 'x86_64')
url="https://petsc.org"
license=('BSD-2-Clause')
options=(staticlibs)
depends=('openmpi' 'lapack' 'bison' 'fftw-openmpi' 'gsl' 'hdf5-openmpi' 'hwloc' 'libjpeg-turbo' 'libyaml'
'pastix' 'scotch' 'suitesparse' 'superlu' 'superlu_dist' 'zfp' 'zlib'
'python-numpy' 'python-mpi4py')
makedepends=('gcc' 'gcc-fortran' 'cmake' 'cython' 'python-setuptools')
provides=('petsc4py')
optdepends=(
'hypre: support for HYPRE'
'kokkos: support Kokkos'
'metis: support for METIS'
'mumps: support for MUMPS'
'parmetis: support for ParMETIS'
'scalapack: support for ScaLAPACK'
'triangle: support for Triangle'
'zoltan: support for zoltan'
)
install=petsc.install
source=(http://web.cels.anl.gov/projects/petsc/download/release-snapshots/${pkgname}-${pkgver}.tar.gz
test_optdepends.sh)
sha512sums=('b4c47889d8a0e4cbc8d23752d1bfde20623a5c3153059976abb65630502d08ebdd0362f47ac5ed12c774f89cae7a73f968dfa1d09115e3a2c96ab13934b79dd9'
'4dc58de1393c2920de6ca08dcab71af0b13d21391d6b46f4a48aab122f087a3f4e4deae7b72b15fde5c7d344bcf12f5b766ff7c0ba4d816b074f94091a00cb97')
PETSC_ARCH=linux-c-opt
_install_dir=/opt/petsc/${PETSC_ARCH}
build() {
cd ${pkgname}-${pkgver}
export PETSC_DIR=${PWD}
export PETSC_ARCH=${PETSC_ARCH}
CONFOPTS="--with-shared-libraries=1 \
--with-petsc4py=1 \
--with-mpi-f90module-visibility=0 \
--with-cmake=0 \
--with-mpi-dir=/usr \
--with-fftw=1 \
--with-gsl=1 \
--with-hdf5=1 --with-hdf5-fortran-bindings=1 \
--with-hwloc=1 \
--with-libjpeg=1 \
--with-pastix=1 \
--with-ptscotch=1 --with-bison=1 --with-ptscotch-lib=[libesmumps.so,libptscotch.so,libptscotcherr.so,libscotch.so,libscotcherr.so] --with-ptscotch-include=/usr/include \
--with-suitesparse=1 \
--with-superlu-lib=-lsuperlu --with-superlu-include=/usr/include/superlu \
--with-superlu_dist-lib=-lsuperlu_dist --with-superlu_dist-include=/usr/include/superlu_dist \
--with-yaml=1 \
--with-zfp=1 \
$(sh ${srcdir}/test_optdepends.sh)"
echo './configure' ${CONFOPTS}
echo 'CFLAGS='${CFLAGS}
echo 'CXXFLAGS='${CXXFLAGS}
echo 'FFLAGS='${FFLAGS}
echo 'LDFLAGS='${LDFLAGS}
echo 'MAKEFLAGS='${MAKEFLAGS}
./configure --prefix=${_install_dir} ${CONFOPTS} \
"CFLAGS+=$CFLAGS" \
"CXXFLAGS+=$CXXFLAGS" \
"FFLAGS+=$FFLAGS" \
"LDFLAGS+=$LDFLAGS -lstdc++" \
"MAKEFLAGS+=$MAKEFLAGS"
make all
}
package() {
cd ${pkgname}-${pkgver}
export PETSC_DIR=${PWD}
export PETSC_ARCH=${PETSC_ARCH}
make DESTDIR=${pkgdir} install
install -Dm 644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
mkdir -p ${pkgdir}/etc/profile.d
echo export PETSC_DIR=${_install_dir} > ${pkgdir}/etc/profile.d/petsc.sh
echo export PYTHONPATH=${_install_dir}/lib:'${PYTHONPATH}' >> ${pkgdir}/etc/profile.d/petsc.sh
chmod 644 ${pkgdir}/etc/profile.d/petsc.sh
# show where the shared libraries are
install -dm 755 ${pkgdir}/etc/ld.so.conf.d/
echo ${_install_dir}/lib > ${pkgdir}/etc/ld.so.conf.d/petsc.conf
# install pkgconfig settings
install -Dm 644 ${PETSC_ARCH}/lib/pkgconfig/PETSc.pc ${pkgdir}/usr/share/pkgconfig/PETSc.pc
}
|