# Template file for 'python-PyQt5-webengine' pkgname=python-PyQt5-webengine version=5.13.2 revision=5 wrksrc="PyQtWebEngine-${version}" hostmakedepends="pkg-config qt5-qmake python python-PyQt5 python3-PyQt5" makedepends="qt5-declarative-devel qt5-webchannel-devel qt5-location-devel qt5-webengine-devel python-devel python3-devel python-PyQt5-devel" depends="python-PyQt5>=${version}_1 python-PyQt5-webchannel>=${version}_1" short_desc="Python2 bindings for the Qt5 toolkit - webengine module" maintainer="Alessio Sergi " license="GPL-3.0-only" homepage="https://www.riverbankcomputing.com/software/pyqtwebengine/intro" distfiles="https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/${version}/PyQtWebEngine-${version}.tar.gz" checksum=4264911b5847c75721d8c9c30af92e58a216bd25ceef37f7abf921005c1d45a9 lib32disabled=yes nocross="configure script is broken for cross builds" case "$XBPS_TARGET_MACHINE" in ppc64le*) ;; ppc*) broken="no webengine for big endian ppc";; arm*) broken="depends on qt5-webengine";; esac pre_build() { mkdir -p pyqt5-${py2_ver} mv * pyqt5-${py2_ver} || true cp -a pyqt5-${py2_ver} pyqt5-${py3_ver} rm -rf pyqt5-${py2_ver}/pyuic/uic/port_v3 rm -rf pyqt5-${py3_ver}/pyuic/uic/port_v2 } do_build() { for pyver in $py2_ver $py3_ver; do cd $wrksrc/pyqt5-$pyver python${pyver} configure.py --no-dist-info \ QMAKE_CC="${CC}" QMAKE_CFLAGS="${CFLAGS}" \ QMAKE_CXX="${CXX}" QMAKE_CXXFLAGS="${CXXFLAGS}" \ QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" QMAKE_LFLAGS="${LDFLAGS}" QMAKE_STRIP="" make ${makejobs} done } do_install() { # install python-pyqt5 make -C pyqt5-${py2_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install # install python3-pyqt5 make -C pyqt5-${py3_ver} DESTDIR=${DESTDIR} INSTALL_ROOT=${DESTDIR} install # remove unneeded shared files rm -rf ${DESTDIR}/usr/share } python3-PyQt5-webengine_package() { lib32disabled=yes depends="python3-PyQt5>=${version}_1 python3-PyQt5-webchannel>=${version}_1" short_desc="${short_desc/Python2/Python3}" pkg_install() { vmove ${py3_sitelib}/PyQt5/QtWebEngine.pyi vmove ${py3_sitelib}/PyQt5/QtWebEngine.so vmove ${py3_sitelib}/PyQt5/QtWebEngineCore.pyi vmove ${py3_sitelib}/PyQt5/QtWebEngineCore.so vmove ${py3_sitelib}/PyQt5/QtWebEngineWidgets.pyi vmove ${py3_sitelib}/PyQt5/QtWebEngineWidgets.so } }