-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathPKGBUILD
54 lines (48 loc) · 1.73 KB
/
PKGBUILD
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
# Maintainer: Philip Top <top1@llnl.gov>
_realname=helics
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.6.0
pkgrel=1
pkgdesc="Hierarchical Engine for Large-scale Infrastructure Co-Simulation (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
url="https://github.com/GMLC-TDC/HELICS"
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-zeromq"
"${MINGW_PACKAGE_PREFIX}-fmt")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-boost")
options=('!strip')
source=("https://github.com/GMLC-TDC/HELICS/releases/download/v${pkgver}/HELICS-v${pkgver}-source.tar.gz")
sha256sums=('e111ac5d92e808f27e330afd1f8b8ca4d86adf6ccd74e3280f2d40fb3e0e2ce9')
build() {
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-G"Ninja" \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_CXX_STANDARD=20 \
-DBUILD_SHARED_LIBS=ON \
-DHELICS_ENABLE_IPC_CORE=OFF \
-DHELICS_DISABLE_GIT_OPERATIONS=ON \
-DHELICS_DISABLE_VCPKG=ON \
-DHELICS_DISABLE_ASIO=$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] && echo "OFF" || echo "ON") \
-DHELICS_USE_EXTERNAL_FMT=ON \
${extra_config} \
..
${MINGW_PREFIX}/bin/cmake --build .
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
rm -f "${pkgdir}"${MINGW_PREFIX}/bin/libzmq.dll.a
}