python-PyQt5: various fixes

- require qt5 in hostmakedepends, otherwise it errors out with an ugly qmake cannot find qt5 error.
- hide 'error' message, which isn't really an error but looks ominous.
- fix xlint

Co-authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Close: #22109
This commit is contained in:
fosslinux 2020-05-19 13:15:20 +10:00 committed by Danh Doan
parent f0f8c11737
commit 84c132b15a

View file

@ -3,28 +3,27 @@ pkgname=python-PyQt5
version=5.13.2 version=5.13.2
revision=2 revision=2
_sipver=4.19.19 _sipver=4.19.19
lib32disabled=yes
wrksrc="PyQt5-${version}" wrksrc="PyQt5-${version}"
pycompile_module="PyQt5"
hostmakedepends="pkg-config hostmakedepends="pkg-config
python-devel python3-devel python-sip-devel python3-sip-devel python-dbus-devel python-devel python3-devel python-sip-devel python3-sip-devel python-dbus-devel qt5
qt5-tools-devel qt5-connectivity-devel qt5-declarative-devel qt5-location-devel qt5-devel qt5-tools-devel qt5-connectivity-devel qt5-declarative-devel qt5-location-devel
qt5-multimedia-devel qt5-sensors-devel qt5-serialport-devel qt5-svg-devel qt5-multimedia-devel qt5-qmake qt5-sensors-devel qt5-serialport-devel
qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel qt5-svg-devel qt5-webchannel-devel qt5-webkit-devel qt5-websockets-devel
qt5-x11extras-devel qt5-xmlpatterns-devel qt5-networkauth-devel pulseaudio-devel qt5-x11extras-devel qt5-xmlpatterns-devel qt5-networkauth-devel pulseaudio-devel
python-enum34" python-enum34"
makedepends="${hostmakedepends/pkg-config/}" makedepends="${hostmakedepends/pkg-config/}"
depends="python-sip-PyQt5>=${_sipver} python-enum34" depends="python-sip-PyQt5>=${_sipver} python-enum34"
short_desc="Python2 bindings for the Qt5 toolkit" short_desc="Python2 bindings for the Qt5 toolkit"
maintainer="Alessio Sergi <al3hex@gmail.com>" maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://riverbankcomputing.com/software/pyqt/intro"
license="GPL-3.0-only" license="GPL-3.0-only"
homepage="https://riverbankcomputing.com/software/pyqt/intro"
distfiles="https://www.riverbankcomputing.com/static/Downloads/PyQt5/${version}/PyQt5-${version}.tar.gz" distfiles="https://www.riverbankcomputing.com/static/Downloads/PyQt5/${version}/PyQt5-${version}.tar.gz"
checksum=adc17c077bf233987b8e43ada87d1e0deca9bd71a13e5fd5fc377482ed69c827 checksum=adc17c077bf233987b8e43ada87d1e0deca9bd71a13e5fd5fc377482ed69c827
lib32disabled=yes
pre_build() { pre_build() {
mkdir -p pyqt5-${py2_ver} mkdir -p pyqt5-${py2_ver}
mv * pyqt5-${py2_ver} || true mv * pyqt5-${py2_ver} 2>/dev/null || true
cp -a pyqt5-${py2_ver} pyqt5-${py3_ver} cp -a pyqt5-${py2_ver} pyqt5-${py3_ver}
rm -rf pyqt5-${py2_ver}/pyuic/uic/port_v3 rm -rf pyqt5-${py2_ver}/pyuic/uic/port_v3
rm -rf pyqt5-${py3_ver}/pyuic/uic/port_v2 rm -rf pyqt5-${py3_ver}/pyuic/uic/port_v2
@ -50,11 +49,11 @@ qt_shared = True
[Qt ${qt_version}] [Qt ${qt_version}]
# _QOpenGLFunctions_ES2 doesn't work # _QOpenGLFunctions_ES2 doesn't work
pyqt_modules = QtCore QtGui QtHelp QtMultimedia pyqt_modules = QtCore QtGui QtHelp QtMultimedia
QtMultimediaWidgets QtNetwork QtOpenGL QtPrintSupport QtQml QtQuick QtMultimediaWidgets QtNetwork QtOpenGL QtPrintSupport QtQml QtQuick
QtSql QtSvg QtTest QtWebKit QtWebKitWidgets QtWidgets QtXml QtSql QtSvg QtTest QtWebKit QtWebKitWidgets QtWidgets QtXml
QtXmlPatterns QtDesigner QtDBus QtSensors QtSerialPort QtXmlPatterns QtDesigner QtDBus QtSensors QtSerialPort
QtX11Extras QtBluetooth QtPositioning QtQuickWidgets QtWebSockets QtX11Extras QtBluetooth QtPositioning QtQuickWidgets QtWebSockets
QtWebChannel QtLocation QtNfc QtNetworkAuth QtWebChannel QtLocation QtNfc QtNetworkAuth
EOF EOF
_sysroot="--sysroot $XBPS_CROSS_BASE" _sysroot="--sysroot $XBPS_CROSS_BASE"
@ -97,7 +96,6 @@ python-PyQt5-devel-tools_package() {
pyqt5:pylupdate5:/usr/bin/python2-pylupdate5 pyqt5:pylupdate5:/usr/bin/python2-pylupdate5
pyqt5:pyrcc5:/usr/bin/python2-pyrcc5 pyqt5:pyrcc5:/usr/bin/python2-pyrcc5
pyqt5:pyuic5:/usr/bin/python2-pyuic5" pyqt5:pyuic5:/usr/bin/python2-pyuic5"
pycompile_module="PyQt5"
pkg_install() { pkg_install() {
vmove usr/bin/python2-* vmove usr/bin/python2-*
vmove ${py2_sitelib}/PyQt5/pylupdate.so vmove ${py2_sitelib}/PyQt5/pylupdate.so
@ -114,7 +112,6 @@ python3-PyQt5-devel-tools_package() {
pyqt5:pylupdate5:/usr/bin/python3-pylupdate5 pyqt5:pylupdate5:/usr/bin/python3-pylupdate5
pyqt5:pyrcc5:/usr/bin/python3-pyrcc5 pyqt5:pyrcc5:/usr/bin/python3-pyrcc5
pyqt5:pyuic5:/usr/bin/python3-pyuic5" pyqt5:pyuic5:/usr/bin/python3-pyuic5"
pycompile_module="PyQt5"
pkg_install() { pkg_install() {
vmove usr/bin/python3-* vmove usr/bin/python3-*
vmove ${py3_sitelib}/PyQt5/pylupdate.so vmove ${py3_sitelib}/PyQt5/pylupdate.so
@ -280,7 +277,6 @@ python-PyQt5-xmlpatterns_package() {
} }
python3-PyQt5_package() { python3-PyQt5_package() {
lib32disabled=yes lib32disabled=yes
pycompile_module="PyQt5"
depends="python3-sip-PyQt5>=${_sipver}" depends="python3-sip-PyQt5>=${_sipver}"
short_desc="${short_desc/Python2/Python3}" short_desc="${short_desc/Python2/Python3}"
pkg_install() { pkg_install() {