# Forked from Alpine to build with OpenGLES
pkgname=py3-qt5
pkgver=9999
_pkgver=5.14.1
pkgrel=0
pkgdesc="A set of Python 3 bindings for the Qt toolkit"
url="http://riverbankcomputing.co.uk/software/pyqt/intro"
arch="armv7 aarch64"
license="GPL-2.0-or-later"
depends="python3 py3-sip-pyqt5"
makedepends="python3-dev py3-dbus-dev py-sip-dev
	qt5-qtbase-dev libx11-dev qt5-qtsvg-dev qt5-qtwebsockets-dev
	py3-opengl qt5-qtconnectivity-dev qt5-qtmultimedia-dev qt5-qttools-dev
	qt5-qtserialport-dev qt5-qtx11extras-dev qt5-qtdeclarative-dev
	qt5-qtwebchannel-dev
	"
source="https://pypi.python.org/packages/source/P/PyQt5/PyQt5-$_pkgver.tar.gz"
builddir="$srcdir/PyQt5-$_pkgver"

prepare() {
	default_prepare
	sed -i '/target_config.dbus_inc_dirs = \[\]/d' configure.py
}

build() {
	python3 configure.py \
		--confirm-license \
		--qmake /usr/lib/qt5/bin/qmake \
		--sip /usr/bin/sip \
		--sipdir /usr/share/sip/PyQt5 \
		--qsci-api
	find . -name 'Makefile' -print0 | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" INSTALL_ROOT="$pkgdir" install
}

sha512sums="10b6abb6fdac64233041b0ee91c9f25cfd2a759ec5bde239c87ca9df8176cdd4fcabf6deb8db2dd9bbd911a040d5c476744f1b55aded9c66eb8b5182f99ddc86  PyQt5-5.14.1.tar.gz"
