1SUMMARY="Python bindings for the Qt WebEngine framework" 2DESCRIPTION="PyQtWebEngine is a set of Python bindings for The Qt Company's \ 3Qt WebEngine framework. The framework provides the ability to embed web \ 4content in applications and is based on the Chrome browser. The bindings sit \ 5on top of PyQt5 and are implemented as three separate modules corresponding \ 6to the different libraries that make up the framework." 7HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/" 8COPYRIGHT="2019-2021 Riverbank Computing Limited" 9LICENSE="GNU GPL v3" 10REVISION="2" 11SOURCE_URI="https://pypi.python.org/packages/source/P/PyQtWebEngine/PyQtWebEngine-$portVersion.tar.gz" 12CHECKSUM_SHA256="ae241ef2a61c782939c58b52c2aea53ad99b30f3934c8358d5e0a6ebb3fd0721" 13SOURCE_DIR="PyQtWebEngine-$portVersion" 14PYTHON3_VERSION="3.10" 15PATCHES="pyqtwebengine5-$portVersion.patchset" 16 17ARCHITECTURES="all !x86_gcc2" 18SECONDARY_ARCHITECTURES="!x86" 19 20commandSuffix=$secondaryArchSuffix 21commandBinDir=$binDir 22if [ "$targetArchitecture" = x86_gcc2 ]; then 23 commandSuffix= 24 commandBinDir=$prefix/bin 25fi 26 27portVersionCompat="$portVersion compat >= ${portVersion%%.*}" 28qtVersion="${portVersion%.*}" 29 30PROVIDES=" 31 pyqtwebengine5$secondaryArchSuffix = $portVersionCompat 32 " 33REQUIRES=" 34 haiku$secondaryArchSuffix 35 lib:libQt5Bluetooth$secondaryArchSuffix 36 lib:libQt5Core$secondaryArchSuffix 37 lib:libQt5Designer$secondaryArchSuffix 38 lib:libQt5DBus$secondaryArchSuffix 39 lib:libQt5Gui$secondaryArchSuffix 40 lib:libQt5Help$secondaryArchSuffix 41 lib:libQt5Location$secondaryArchSuffix 42 lib:libQt5Multimedia$secondaryArchSuffix 43 lib:libQt5MultimediaWidgets$secondaryArchSuffix 44 lib:libQt5Network$secondaryArchSuffix 45 lib:libQt5Nfc$secondaryArchSuffix 46 lib:libQt5OpenGL$secondaryArchSuffix 47 lib:libQt5PrintSupport$secondaryArchSuffix 48 lib:libQt5Positioning$secondaryArchSuffix 49 lib:libQt5Qml$secondaryArchSuffix 50 lib:libQt5Quick$secondaryArchSuffix 51 lib:libQt5QuickWidgets$secondaryArchSuffix 52 lib:libQt5Sensors$secondaryArchSuffix 53 lib:libQt5SerialPort$secondaryArchSuffix 54 lib:libQt5Sql$secondaryArchSuffix 55 lib:libQt5Svg$secondaryArchSuffix 56 lib:libQt5Test$secondaryArchSuffix 57 lib:libQt5WebChannel$secondaryArchSuffix 58 lib:libQt5WebEngine$secondaryArchSuffix 59 lib:libQt5WebEngineCore$secondaryArchSuffix 60 lib:libQt5WebEngineWidgets$secondaryArchSuffix 61 lib:libQt5WebSockets$secondaryArchSuffix 62 lib:libQt5Widgets$secondaryArchSuffix 63 lib:libQt5Xml$secondaryArchSuffix 64 lib:libQt5XmlPatterns$secondaryArchSuffix 65 lib:libGL${secondaryArchSuffix} 66 " 67PROVIDES_python310=" 68 pyqtwebengine5${secondaryArchSuffix}_python310 = $portVersionCompat 69 " 70REQUIRES_python310=" 71 haiku$secondaryArchSuffix 72 pyqtwebengine5$secondaryArchSuffix == $portVersion base 73 pyqt5_python310 74 pyqt5_sip_python310 75 cmd:python$PYTHON3_VERSION 76 $REQUIRES 77 " 78 79if [ "$targetArchitecture" = "x86_gcc2" ]; then 80 PROVIDES_python310+=" 81 pyqtwebengine5_python310 = $portVersionCompat 82 " 83fi 84 85BUILD_REQUIRES=" 86 haiku${secondaryArchSuffix}_devel 87 pyqt_builder_python310 88 pyqt5_python310 89 setuptools_python310 90 sip_python310 >= 6 91 tomli_python310 92 devel:libQt5Bluetooth$secondaryArchSuffix >= $qtVersion 93 devel:libQt5Core$secondaryArchSuffix >= $qtVersion 94 devel:libQt5Designer$secondaryArchSuffix >= $qtVersion 95 devel:libQt5DBus$secondaryArchSuffix >= $qtVersion 96 devel:libQt5Gui$secondaryArchSuffix >= $qtVersion 97 devel:libQt5Help$secondaryArchSuffix >= $qtVersion 98 devel:libQt5Location$secondaryArchSuffix >= $qtVersion 99 devel:libQt5Multimedia$secondaryArchSuffix >= $qtVersion 100 devel:libQt5MultimediaWidgets$secondaryArchSuffix >= $qtVersion 101 devel:libQt5Network$secondaryArchSuffix >= $qtVersion 102 devel:libQt5Nfc$secondaryArchSuffix >= $qtVersion 103 devel:libQt5OpenGL$secondaryArchSuffix >= $qtVersion 104 devel:libQt5PrintSupport$secondaryArchSuffix >= $qtVersion 105 devel:libQt5Positioning$secondaryArchSuffix >= $qtVersion 106 devel:libQt5Qml$secondaryArchSuffix >= $qtVersion 107 devel:libQt5Quick$secondaryArchSuffix >= $qtVersion 108 devel:libQt5QuickWidgets$secondaryArchSuffix >= $qtVersion 109 devel:libQt5Sensors$secondaryArchSuffix >= $qtVersion 110 devel:libQt5SerialPort$secondaryArchSuffix >= $qtVersion 111 devel:libQt5Sql$secondaryArchSuffix >= $qtVersion 112 devel:libQt5Svg$secondaryArchSuffix >= $qtVersion 113 devel:libQt5Test$secondaryArchSuffix >= $qtVersion 114 devel:libQt5WebChannel$secondaryArchSuffix >= $qtVersion 115 devel:libQt5WebEngine$secondaryArchSuffix >= $qtVersion 116 devel:libQt5WebEngineCore$secondaryArchSuffix >= $qtVersion 117 devel:libQt5WebEngineWidgets$secondaryArchSuffix >= $qtVersion 118 devel:libQt5WebSockets$secondaryArchSuffix >= $qtVersion 119 devel:libQt5Widgets$secondaryArchSuffix >= $qtVersion 120 devel:libQt5Xml$secondaryArchSuffix >= $qtVersion 121 devel:libQt5XmlPatterns$secondaryArchSuffix >= $qtVersion 122 devel:libGL${secondaryArchSuffix} 123 " 124BUILD_PREREQUIRES=" 125 cmd:python$PYTHON3_VERSION 126 cmd:gcc${secondaryArchSuffix} 127 cmd:make 128 cmd:ld${secondaryArchSuffix} 129 cmd:sed 130 cmd:sip >= 6 131 cmd:qmake${secondaryArchSuffix} >= 5 132 " 133 134BUILD() 135{ 136 OLDPYTHONPATH=$PYTHONPATH 137 138 local packageLinksDir=$(dirname $portPackageLinksDir) 139 local python3PackageName="${portName}_python310-$portFullVersion" 140 141 # GENERIC: all python_setuptools-based installs need this 142 python=$packageLinksDir/$python3PackageName/cmd~python$PYTHON3_VERSION/bin/python$PYTHON3_VERSION 143 pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c4) 144 installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ 145 export PYTHONPATH=$installLocation:$OLDPYTHONPATH 146 147 BINDINGS_DIR=$portPackageLinksDir/pyqt5_python310/lib/python$pythonVersion/vendor-packages/PyQt5/bindings/ 148 sed -i -e "s|BINDINGS_DIR|$BINDINGS_DIR|g" pyproject.toml 149 150 sip-build \ 151 --no-make \ 152 --target-dir=$installLocation \ 153 --api-dir=$dataDir/sip/PyQt5 154 155 cd build 156 157 ## BUILD HACK ## 158 for d in QtWebEngine QtWebEngineCore QtWebEngineWidgets ; do 159 for l in libQt5WebEngine libQt5WebEngineCore libQt5WebEngineWidgets ; do 160 sed -i "s|${l}.so|${l}.so.5|g" ${d}/Makefile 161 done 162 done 163 ## BUILD HACK ## 164 165 make $jobArgs 166} 167 168INSTALL() 169{ 170 OLDPYTHONPATH=$PYTHONPATH 171 172 local packageLinksDir=$(dirname $portPackageLinksDir) 173 local python3PackageName="${portName}_python310-$portFullVersion" 174 175 # GENERIC: all python_setuptools-based installs need this 176 python=$packageLinksDir/$python3PackageName/cmd~python$PYTHON3_VERSION/bin/python$PYTHON3_VERSION 177 pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c4) 178 installLocation=lib/python$pythonVersion/vendor-packages/ 179 export PYTHONPATH=$installLocation:$OLDPYTHONPATH 180 181 mkdir -p $installLocation 182 cd build 183 make install INSTALL_ROOT= 184 185 $python -m compileall -d / $prefix/lib/python$pythonVersion 186 $python -O -m compileall -d / $prefix/lib/python$pythonVersion 187 188 packageEntries python310 \ 189 $installLocation 190 191 rmdir $prefix/lib/python$pythonVersion 192 193 ### PACKAGING HACK ### 194 rm -rf $prefix/packages 195 ### PACKAGING HACK ### 196} 197