60 lines
2.5 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
pkgname=python-wxpython
_pkgname=wxPython
pkgver=4.2.1
_pkgver="${pkgver%.*}"
_post="${pkgver##*.}"
pkgrel=2
epoch=1
pkgdesc='Cross-platform GUI toolkit'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=('custom:wxWindows')
url='https://www.wxpython.org'
depends=('wxwidgets-gtk3' 'python-six')
optdepends=('python-pypubsub: Alternative to the deprecated wx.lib.pubsub API')
makedepends=('mesa' 'glu' 'webkit2gtk' 'python-requests' 'python-setuptools' 'sip' 'doxygen' 'waf')
checkdepends=('xorg-server-xvfb' 'python-pytest-forked' 'python-numpy')
source=("https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$pkgver.tar.gz"
wxpython-4.2.0-cython-3.patch
wxpython-4.2.1-argpase-python.patch
wxpython-doxygen-1.9.7.patch)
sha512sums=('ee9ab8effb3c71de004c3d61ec583b9980c6b75fe9bb04cf2c76025ea70afc206bc3073c44d1c83c7ba604afed9fd38c01b9ef506617ba279a4ac58e3cf34438'
'1f99e75cc2a50f2de54312cfd148095f89e9ae1b0d110e750a73887bc66982c569bc2cf3e6f0dff3a717f5bdbe20a883cbc2ae381589de116b6bf3d053b9ab08'
'afc8a9e68c1cb7795cbf9949c2395aec304c6467a7e1bfb78915f78f1ad1c785f91caae8f4ac7dca0df4c38be87d0289a67f9a6f9dd56db5beec0ae2c2601c51'
'5d9072ea0f7f2adfaa22c43fd218c1d132c57ba12c655742042a9dae6e77e6418d883fc102aeb0e5821eaa8067a5967c96eca9c2621f686b980192cb3c3bed64')
prepare() {
cd $_pkgname-$pkgver
patch -Np1 -i ${srcdir}/wxpython-4.2.0-cython-3.patch
patch -Np1 -i ${srcdir}/wxpython-4.2.1-argpase-python.patch
patch -Np1 -i ${srcdir}/wxpython-doxygen-1.9.7.patch
}
build() {
cd $_pkgname-$pkgver
# rm -r sip/{cpp,gen}/* # Recreate sip files with current wxWidgets - broken with doxygen 1.9.7 https://github.com/wxWidgets/Phoenix/issues/2414
SIP=/usr/bin/sip DOXYGEN=/usr/bin/doxygen WAF=/usr/bin/waf \
python build.py --nodoc sip build --use_syswx --release --python=/usr/bin/python
}
check() {
cd $_pkgname-$pkgver
# there are segfaulting tests so --forked ensures we get sensible results
PYTHONPATH=$PWD xvfb-run pytest --forked unittests || echo "==> WARNING: tests usually fail randomly"
}
package() {
cd $_pkgname-$pkgver
python build.py install --destdir="$pkgdir"
install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
find "$pkgdir/usr/lib" -type f | xargs chmod 644
}