# based on https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/sip pkgname=('python2-sip-pyqt4') pkgver=4.19.13 pkgrel=2 arch=('x86_64') url='https://www.riverbankcomputing.com/software/sip/intro' license=('custom:"sip"') makedepends=('python2') source=("https://www.riverbankcomputing.com/static/Downloads/sip/sip-$pkgver.tar.gz" sip-qt4.patch::"https://www.riverbankcomputing.com/hg/sip/raw-rev/7bd4d19479ad") sha256sums=('0ef3765dbcc3b8131f83e60239f49508f82205b33cae5408c405e2e2f2d0af87' '1454250769202ced369fcaed42f88b19392e83ced2e62fcd5bf32e64259374e3') prepare() { mkdir -p build-pyqt4-py2 cd sip-$pkgver patch -p1 -i ../sip-qt4.patch # Fix qt4 code generation } build() { cd "$srcdir"/build-pyqt4-py2 python2 ../sip-$pkgver/configure.py CFLAGS="$CFLAGS" LFLAGS="$LDFLAGS" --sip-module PyQt4.sip --no-tools make } package_python2-sip-pyqt4() { pkgdesc="Python 2.x SIP bindings for C and C++ libraries (PyQt4 version)" depends=('python2') cd build-pyqt4-py2 make DESTDIR="$pkgdir" install install -Dm644 ../sip-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE }