59 lines
1.8 KiB
Bash
59 lines
1.8 KiB
Bash
# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
|
|
|
|
_realname=pycairo
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-cairo")
|
|
pkgver=1.27.0
|
|
pkgrel=2
|
|
pkgdesc="Python bindings for the cairo graphics library (mingw-w64)"
|
|
url="https://pycairo.readthedocs.io"
|
|
msys2_repository_url="https://github.com/pygobject/pycairo"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
license=('spdx:LGPL-2.1-only OR MPL-1.1')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-cairo"
|
|
"${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-meson"
|
|
"${MINGW_PACKAGE_PREFIX}-pkgconf"
|
|
"${MINGW_PACKAGE_PREFIX}-ninja")
|
|
provides=("${MINGW_PACKAGE_PREFIX}-python3-cairo")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-cairo")
|
|
replaces=("${MINGW_PACKAGE_PREFIX}-python3-cairo")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=(https://github.com/pygobject/${_realname}/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz)
|
|
sha256sums=('5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430')
|
|
|
|
build() {
|
|
mkdir -p "build-${MSYSTEM}" && cd "build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
meson setup \
|
|
--prefix="${MINGW_PREFIX}" \
|
|
--wrap-mode=nodownload \
|
|
--auto-features=enabled \
|
|
--buildtype=plain \
|
|
../"${_realname}-${pkgver}"
|
|
|
|
meson compile
|
|
}
|
|
|
|
check() {
|
|
cd "build-${MSYSTEM}"
|
|
|
|
meson test
|
|
}
|
|
|
|
package() {
|
|
cd "build-${MSYSTEM}"
|
|
|
|
DESTDIR="${pkgdir}" meson install
|
|
shopt -s globstar
|
|
rm ${pkgdir}${MINGW_PREFIX}/**/*.dll.a
|
|
|
|
MSYS2_ARG_CONV_EXCL="-p" python -m compileall \
|
|
-o 0 -o 1 -q -s"${pkgdir}" -p"/" "${pkgdir}${MINGW_PREFIX}/lib/python"*
|
|
|
|
install -Dm644 "${srcdir}/${_realname}-${pkgver}/"COPYING* -t "${pkgdir}${MINGW_PREFIX}/share/licenses/python-cairo"
|
|
}
|