diff --git a/mingw-w64-highfive/PKGBUILD b/mingw-w64-highfive/PKGBUILD index b3ab0508f350c..7547a88b5a75e 100644 --- a/mingw-w64-highfive/PKGBUILD +++ b/mingw-w64-highfive/PKGBUILD @@ -4,7 +4,7 @@ _realname=highfive pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=2.10.0 -pkgrel=1 +pkgrel=2 pkgdesc='Modern header-only C++11 friendly interface for libhdf5 (mingw-w64)' arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -29,7 +29,12 @@ source=("https://github.com/BlueBrain/HighFive/archive/v${pkgver}/${_realname}-$ sha256sums=('c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38') build() { - mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi # HIGHFIVE_* options only affect tests (at package-build time), # not what is installed @@ -39,7 +44,7 @@ build() { ${MINGW_PREFIX}/bin/cmake \ -GNinja \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=Release \ + "{extra_config[@]}" \ -DHIGHFIVE_USE_BOOST=ON \ -DHIGHFIVE_USE_EIGEN=ON \ -DHIGHFIVE_USE_XTENSOR=OFF \ @@ -48,22 +53,25 @@ build() { -DHIGHFIVE_PARALLEL_HDF5=OFF \ -DHIGHFIVE_BUILD_DOCS=OFF \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="${srcdir}/build-${MSYSTEM}" \ - -S ../HighFive-${pkgver} -B . + -DBoost_NO_BOOST_CMAKE=OFF \ + -S HighFive-${pkgver} \ + -B build-${MSYSTEM} - ${MINGW_PREFIX}/bin/cmake --build . + ${MINGW_PREFIX}/bin/cmake --build build-${MSYSTEM} } check() { - cd "${srcdir}/build-${MSYSTEM}" + cd "${srcdir}"/build-${MSYSTEM} # run unit tests ${MINGW_PREFIX}/bin/ctest } package() { - cd "${srcdir}/build-${MSYSTEM}" + cd "${srcdir}"/build-${MSYSTEM} DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . - install -Dm644 "${srcdir}/HighFive-${pkgver}/LICENSE" -t "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/" + install -Dm644 "${srcdir}"/HighFive-${pkgver}/LICENSE \ + -t "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/ }