diff --git a/dev-python/pyqtwebengine/patches/pyqtwebengine5-5.15.5.patchset b/dev-python/pyqtwebengine/patches/pyqtwebengine5-5.15.5.patchset new file mode 100644 index 000000000..2b7f96d9c --- /dev/null +++ b/dev-python/pyqtwebengine/patches/pyqtwebengine5-5.15.5.patchset @@ -0,0 +1,26 @@ +From afdef0315214d8b659c62fe61245b9b8ceb98c02 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 21 Nov 2021 06:29:38 +0100 +Subject: SIP Dir location + + +diff --git a/pyproject.toml b/pyproject.toml +index fa3fdfc..9105d16 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -22,6 +22,7 @@ project-factory = "pyqtbuild:PyQtProject" + # Configure the project. + [tool.sip.project] + tag-prefix = "QtWebEngine" ++sip-include-dirs = ['BINDINGS_DIR'] + + # Define and configure each set of bindings. + [tool.sip.bindings.QtWebEngineCore] +@@ -32,3 +33,4 @@ qmake-QT = ["webengine"] + + [tool.sip.bindings.QtWebEngineWidgets] + qmake-QT = ["webenginewidgets"] ++ +-- +2.30.2 + diff --git a/dev-python/pyqtwebengine/pyqtwebengine5-5.15.5.recipe b/dev-python/pyqtwebengine/pyqtwebengine5-5.15.5.recipe new file mode 100644 index 000000000..7a6a96e1d --- /dev/null +++ b/dev-python/pyqtwebengine/pyqtwebengine5-5.15.5.recipe @@ -0,0 +1,195 @@ +SUMMARY="Python bindings for the Qt WebEngine framework" +DESCRIPTION="PyQtWebEngine is a set of Python bindings for The Qt Company's \ +Qt WebEngine framework. The framework provides the ability to embed web \ +content in applications and is based on the Chrome browser. The bindings sit \ +on top of PyQt5 and are implemented as three separate modules corresponding \ +to the different libraries that make up the framework." +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqtwebengine/" +COPYRIGHT="2019-2021 Riverbank Computing Limited" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://pypi.python.org/packages/source/P/PyQtWebEngine/PyQtWebEngine-$portVersion.tar.gz" +CHECKSUM_SHA256="ab47608dccf2b5e4b950d5a3cc704b17711af035024d07a9b71ad29fc103b941" +SOURCE_DIR="PyQtWebEngine-$portVersion" +PYTHON3_VERSION="3.8" +PATCHES="pyqtwebengine5-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="!x86" + +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +portVersionCompat="$portVersion compat >= ${portVersion%%.*}" +qtVersion="${portVersion%.*}" + +PROVIDES=" + pyqtwebengine5$secondaryArchSuffix = $portVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libQt5Bluetooth$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Designer$secondaryArchSuffix + lib:libQt5DBus$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Help$secondaryArchSuffix + lib:libQt5Location$secondaryArchSuffix + lib:libQt5Multimedia$secondaryArchSuffix + lib:libQt5MultimediaWidgets$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Nfc$secondaryArchSuffix + lib:libQt5OpenGL$secondaryArchSuffix + lib:libQt5PrintSupport$secondaryArchSuffix + lib:libQt5Positioning$secondaryArchSuffix + lib:libQt5Qml$secondaryArchSuffix + lib:libQt5Quick$secondaryArchSuffix + lib:libQt5QuickWidgets$secondaryArchSuffix + lib:libQt5Sensors$secondaryArchSuffix + lib:libQt5SerialPort$secondaryArchSuffix + lib:libQt5Sql$secondaryArchSuffix + lib:libQt5Svg$secondaryArchSuffix + lib:libQt5Test$secondaryArchSuffix + lib:libQt5WebChannel$secondaryArchSuffix + lib:libQt5WebEngine$secondaryArchSuffix + lib:libQt5WebEngineCore$secondaryArchSuffix + lib:libQt5WebEngineWidgets$secondaryArchSuffix + lib:libQt5WebSockets$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + lib:libQt5XmlPatterns$secondaryArchSuffix + lib:libGL${secondaryArchSuffix} + " +PROVIDES_python38=" + pyqtwebengine5${secondaryArchSuffix}_python38 = $portVersionCompat + " +REQUIRES_python38=" + haiku$secondaryArchSuffix + pyqtwebengine5$secondaryArchSuffix == $portVersion base + pyqt5_python38 + pyqt5_sip_python38 + cmd:python$PYTHON3_VERSION + $REQUIRES + " + +if [ "$targetArchitecture" = "x86_gcc2" ]; then + PROVIDES_python38+=" + pyqtwebengine5_python38 = $portVersionCompat + " +fi + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + pyqt_builder_python38 + pyqt5_python38 + setuptools_python38 + sip_python38 >= 6 + devel:libQt5Bluetooth$secondaryArchSuffix >= $qtVersion + devel:libQt5Core$secondaryArchSuffix >= $qtVersion + devel:libQt5Designer$secondaryArchSuffix >= $qtVersion + devel:libQt5DBus$secondaryArchSuffix >= $qtVersion + devel:libQt5Gui$secondaryArchSuffix >= $qtVersion + devel:libQt5Help$secondaryArchSuffix >= $qtVersion + devel:libQt5Location$secondaryArchSuffix >= $qtVersion + devel:libQt5Multimedia$secondaryArchSuffix >= $qtVersion + devel:libQt5MultimediaWidgets$secondaryArchSuffix >= $qtVersion + devel:libQt5Network$secondaryArchSuffix >= $qtVersion + devel:libQt5Nfc$secondaryArchSuffix >= $qtVersion + devel:libQt5OpenGL$secondaryArchSuffix >= $qtVersion + devel:libQt5PrintSupport$secondaryArchSuffix >= $qtVersion + devel:libQt5Positioning$secondaryArchSuffix >= $qtVersion + devel:libQt5Qml$secondaryArchSuffix >= $qtVersion + devel:libQt5Quick$secondaryArchSuffix >= $qtVersion + devel:libQt5QuickWidgets$secondaryArchSuffix >= $qtVersion + devel:libQt5Sensors$secondaryArchSuffix >= $qtVersion + devel:libQt5SerialPort$secondaryArchSuffix >= $qtVersion + devel:libQt5Sql$secondaryArchSuffix >= $qtVersion + devel:libQt5Svg$secondaryArchSuffix >= $qtVersion + devel:libQt5Test$secondaryArchSuffix >= $qtVersion + devel:libQt5WebChannel$secondaryArchSuffix >= $qtVersion + devel:libQt5WebEngine$secondaryArchSuffix >= $qtVersion + devel:libQt5WebEngineCore$secondaryArchSuffix >= $qtVersion + devel:libQt5WebEngineWidgets$secondaryArchSuffix >= $qtVersion + devel:libQt5WebSockets$secondaryArchSuffix >= $qtVersion + devel:libQt5Widgets$secondaryArchSuffix >= $qtVersion + devel:libQt5Xml$secondaryArchSuffix >= $qtVersion + devel:libQt5XmlPatterns$secondaryArchSuffix >= $qtVersion + devel:libGL${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + cmd:python$PYTHON3_VERSION + cmd:gcc${secondaryArchSuffix} + cmd:make + cmd:ld${secondaryArchSuffix} + cmd:sed + cmd:sip >= 6 + cmd:qmake${secondaryArchSuffix} >= 5 + " + +BUILD() +{ + OLDPYTHONPATH=$PYTHONPATH + + local packageLinksDir=$(dirname $portPackageLinksDir) + local python3PackageName="${portName}_python38-$portFullVersion" + + # GENERIC: all python_setuptools-based installs need this + python=$packageLinksDir/$python3PackageName/cmd~python$PYTHON3_VERSION/bin/python$PYTHON3_VERSION + pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$OLDPYTHONPATH + + BINDINGS_DIR=$portPackageLinksDir/pyqt5_python38/lib/python$pythonVersion/vendor-packages/PyQt5/bindings/ + sed -i -e "s|BINDINGS_DIR|$BINDINGS_DIR|g" pyproject.toml + + sip-build \ + --no-make \ + --target-dir=$installLocation \ + --api-dir=$dataDir/sip/PyQt5 + + cd build + + ## BUILD HACK ## + for d in QtWebEngine QtWebEngineCore QtWebEngineWidgets ; do + for l in libQt5WebEngine libQt5WebEngineCore libQt5WebEngineWidgets ; do + sed -i "s|${l}.so|${l}.so.5|g" ${d}/Makefile + done + done + ## BUILD HACK ## + + make $jobArgs +} + +INSTALL() +{ + OLDPYTHONPATH=$PYTHONPATH + + local packageLinksDir=$(dirname $portPackageLinksDir) + local python3PackageName="${portName}_python38-$portFullVersion" + + # GENERIC: all python_setuptools-based installs need this + python=$packageLinksDir/$python3PackageName/cmd~python$PYTHON3_VERSION/bin/python$PYTHON3_VERSION + pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$OLDPYTHONPATH + + mkdir -p $installLocation + cd build + make install INSTALL_ROOT= + + $python -m compileall -d / $prefix/lib/python$pythonVersion + $python -O -m compileall -d / $prefix/lib/python$pythonVersion + + packageEntries python38 \ + $installLocation + + rmdir $prefix/lib/python$pythonVersion + + ### PACKAGING HACK ### + rm -rf $prefix/packages + ### PACKAGING HACK ### +}