# Compiling Time: 9.22 SBU
# Maintainer: Marius Cirsta <mcirsta@frugalware.org>
# Contributor: Melko <melko@frugalware.org>

pkgname=pyqt5
pkgver=5.15.11
pkgrel=4
pkgdesc="PyQt5 is a set of Python 3.x bindings for the Qt5 toolkit."
url="http://www.riverbankcomputing.co.uk/"
depends=('qt5-base>=5.15.10' 'sip-python3-pyqt5')
makedepends+=('x11-protos' 'pyqt-builder' 'sip5' 'python3-setuptools' 'dbus-python3' \
	'qt5-connectivity' 'qt5-multimedia' 'qt5-tools' \
	'qt5-serialport' 'qt5-speech' 'qt5-svg' 'qt5-websockets' \
	'qt5-x11extras' 'qt5-networkauth' 'qt5-xmlpatterns' \
	'qt5-remoteobjects')
_F_pypi_name=PyQt5
Finclude pypi
license="GPL"
groups=('xlib-extra')
archs=('x86_64')
sha1sums=('50f4d8e8dd8dd49ba61f2de043496886864e63b9')

replaces=("pyqt4" "$pkgname-python3" "$pkgname-common" "pyqt4-python3" "pyqt4-common")
provides=("pyqt4" "$pkgname-python3" "$pkgname-common" "pyqt4-python3" "pyqt4-common")
conflicts=("pyqt4" "$pkgname-python3" "$pkgname-common" "pyqt4-python3" "pyqt4-common")

build()
{
	Fcd
	Fpatchall
	Fexec sip-build \
		--confirm-license \
		--pep484-pyi \
		--api-dir /usr/share/qt/qsci/api/python || Fdie
	cd build || Fdie
	Fmake
	Fmakeinstall  INSTALL_ROOT="$Fdestdir"

	# compile Python bytecode
	Fexec python3 -m compileall -d / "$Fdestdir"/usr/lib || Fdie
	Fexec python3 -O -m compileall -d / "$Fdestdir"/usr/lib || Fdie

}

# optimization OK
