blob: daa1d069c9519d111b1518892ed9158d3f5a0e52 (
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
|
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Florian Lindner <florian.lindner@xgm.de>
_base=precice
pkgname=${_base}-git
pkgver=2.3.0.r112.g42437f3d
pkgrel=1
pkgdesc="A Coupling Library for Partitioned Multi-Physics Simulations on Massively Parallel Systems (git version)"
arch=(x86_64)
url="https://${_base}.org"
license=(LGPL3)
depends=(libxml2 petsc eigen jsoncpp)
makedepends=(cmake gcc-fortran doxygen graphviz git)
optdepends=('man-db: manual pages for precice-tools and testprecice'
'git: for Git Revision Info support')
source=(git+https://github.com/${_base}/${_base}.git#branch=develop)
sha512sums=('SKIP')
provides=(${_base})
conflicts=(${_base})
pkgver() {
cd ${_base}
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cmake \
-S ${_base} \
-B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DPRECICE_MPICommunication=ON \
-DPRECICE_PETScMapping=ON \
-DPRECICE_PythonActions=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON \
-DPRECICE_ALWAYS_VALIDATE_LIBS=ON \
-DPRECICE_ENABLE_C=ON \
-DPRECICE_ENABLE_FORTRAN=ON \
-DCMAKE_CXX_STANDARD_REQUIRED=Yes \
-DCMAKE_CXX_EXTENSIONS=No \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-Wno-dev
cmake --build build --target all
cd ${_base}
doxygen
}
check() {
if [ -z "$(ldconfig -p | grep libcuda.so.1)" ]; then
export OMPI_MCA_opal_warn_on_missing_libcuda=0
fi
ctest -E "(${_base}.parallel)" --test-dir build
}
package() {
DESTDIR="${pkgdir}" cmake --build build --target install
install -Dm 644 ${_base}/LICENSE -t ${pkgdir}/usr/share/licenses/${_base}
install -Dm 644 ${_base}/docs/man/man1/test${_base}.1 -t ${pkgdir}/usr/share/man/man1/
mv ${pkgdir}/usr/share/doc/lib${_base}2 ${pkgdir}/usr/share/doc/${_base}
mv ${_base}/docs/source-code-documentation/html/* ${pkgdir}/usr/share/doc/${_base}
cd "${pkgdir}"
rm -r usr/share/lintian
}
|