# Maintainer: Alexey Pavlov _realname=audaspace pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.8.0 pkgrel=5 pkgdesc="A high level audio library written in C++ with language bindings for Python (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') url="https://audaspace.github.io/" msys2_repository_url='https://github.com/audaspace/audaspace' license=('spdx:Apache-2.0') depends=("${MINGW_PACKAGE_PREFIX}-ffmpeg" "${MINGW_PACKAGE_PREFIX}-fftw" "${MINGW_PACKAGE_PREFIX}-libsndfile" "${MINGW_PACKAGE_PREFIX}-openal" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python-numpy" "${MINGW_PACKAGE_PREFIX}-SDL2") makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-doxygen" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-python-sphinx" "${MINGW_PACKAGE_PREFIX}-python-setuptools") source=("${_realname}-${pkgver}.tar.gz::https://github.com/audaspace/audaspace/archive/v${pkgver}.tar.gz" 0100-mingw-relocate.patch 0101-mingw-exports.patch 0102-mingw-python.patch) sha256sums=('60fabd54b3f3ca1042a7c9bb4171d06325295a77081a0b07377df79266b67004' '4af497f54c6005145b6df2b40d26914ac3312143f789ced5e75e6ef677ce4c31' '8cf2aefb1973177ec3d75443e47ba95c66ca113076e615af0a8f6c8de1398da0' '16f8833e51b6e97019842297286c713e270bc9fe836950b93d10842d99d8c89c') # Helper macros to help make tasks easier # apply_patch_with_msg() { for _patch in "$@" do msg2 "Applying ${_patch}" patch -Nbp1 -i "${srcdir}/${_patch}" done } prepare() { cd ${_realname}-${pkgver} apply_patch_with_msg \ 0100-mingw-relocate.patch \ 0101-mingw-exports.patch \ 0102-mingw-python.patch } build() { declare -a _btype if check_option "debug" "y"; then _btype=Debug else _btype=Release fi mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM} MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -GNinja \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ -DCMAKE_BUILD_TYPE=${_btype} \ -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \ -DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \ -DPython3_ROOT_DIR=${MINGW_PREFIX} \ -DPython3_FIND_REGISTRY=NEVER \ ../${_realname}-${pkgver} "${MINGW_PREFIX}"/bin/cmake.exe --build . } package() { cd "${srcdir}//build-${MSYSTEM}" DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install . install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" }