mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
pyqt6: new recipe
This commit is contained in:
181
dev-python/pyqt/pyqt6-6.8.0.recipe
Normal file
181
dev-python/pyqt/pyqt6-6.8.0.recipe
Normal file
@@ -0,0 +1,181 @@
|
||||
SUMMARY="Python v2 and v3 bindings for Qt application framework"
|
||||
DESCRIPTION="PyQt combines all the advantages of Qt and Python. A programmer \
|
||||
has all the power of Qt, but is able to exploit it with the \
|
||||
simplicity of Python."
|
||||
HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/"
|
||||
COPYRIGHT="2015-2023 Riverbank Computing Limited"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${portVersion/.dev/dev}.tar.gz"
|
||||
CHECKSUM_SHA256="6d8628de4c2a050f0b74462e4c9cb97f839bf6ffabbca91711722ffb281570d9"
|
||||
SOURCE_DIR="PyQt6-$portVersion"
|
||||
PYTHON3_VERSION="3.10"
|
||||
|
||||
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="6.7.2"
|
||||
|
||||
PROVIDES="
|
||||
pyqt6$secondaryArchSuffix = $portVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libQt6Bluetooth$secondaryArchSuffix
|
||||
lib:libQt6Core$secondaryArchSuffix
|
||||
lib:libQt6Designer$secondaryArchSuffix
|
||||
lib:libQt6DBus$secondaryArchSuffix
|
||||
lib:libQt6Gui$secondaryArchSuffix
|
||||
lib:libQt6Help$secondaryArchSuffix
|
||||
lib:libQt6Location$secondaryArchSuffix
|
||||
lib:libQt6Multimedia$secondaryArchSuffix
|
||||
lib:libQt6MultimediaWidgets$secondaryArchSuffix
|
||||
lib:libQt6Network$secondaryArchSuffix
|
||||
lib:libQt6Nfc$secondaryArchSuffix
|
||||
lib:libQt6OpenGL$secondaryArchSuffix
|
||||
lib:libQt6PrintSupport$secondaryArchSuffix
|
||||
lib:libQt6Positioning$secondaryArchSuffix
|
||||
lib:libQt6Qml$secondaryArchSuffix
|
||||
lib:libQt6Quick$secondaryArchSuffix
|
||||
lib:libQt6QuickWidgets$secondaryArchSuffix
|
||||
lib:libQt6Sensors$secondaryArchSuffix
|
||||
lib:libQt6SerialPort$secondaryArchSuffix
|
||||
lib:libQt6Sql$secondaryArchSuffix
|
||||
lib:libQt6Svg$secondaryArchSuffix
|
||||
lib:libQt6Test$secondaryArchSuffix
|
||||
lib:libQt6WebChannel$secondaryArchSuffix
|
||||
lib:libQt6WebSockets$secondaryArchSuffix
|
||||
lib:libQt6Widgets$secondaryArchSuffix
|
||||
lib:libQt6Xml$secondaryArchSuffix
|
||||
lib:libGL${secondaryArchSuffix}
|
||||
"
|
||||
REPLACES="
|
||||
pyqt$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_python310="
|
||||
pyqt6${secondaryArchSuffix}_python310 = $portVersionCompat
|
||||
cmd:pylupdate6$commandSuffix
|
||||
cmd:pyuic6$commandSuffix
|
||||
"
|
||||
REQUIRES_python310="
|
||||
haiku$secondaryArchSuffix
|
||||
pyqt6$secondaryArchSuffix == $portVersion base
|
||||
pyqt6_sip_python310
|
||||
cmd:python$PYTHON3_VERSION
|
||||
$REQUIRES
|
||||
"
|
||||
|
||||
if [ "$targetArchitecture" = "x86_gcc2" ]; then
|
||||
PROVIDES_python310+="
|
||||
pyqt6_python310 = $portVersionCompat
|
||||
"
|
||||
fi
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
pyqt_builder_python310
|
||||
setuptools_python310
|
||||
sip_python310 >= 6
|
||||
tomli_python310
|
||||
devel:libQt6Bluetooth$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Core$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Designer$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6DBus$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Gui$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Help$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Location$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Multimedia$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6MultimediaWidgets$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Network$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Nfc$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6OpenGL$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6PrintSupport$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Positioning$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Qml$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Quick$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6QuickWidgets$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Sensors$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6SerialPort$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Sql$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Svg$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Test$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6WebChannel$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6WebSockets$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Widgets$secondaryArchSuffix >= $qtVersion
|
||||
devel:libQt6Xml$secondaryArchSuffix >= $qtVersion
|
||||
devel:libGL${secondaryArchSuffix}
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python$PYTHON3_VERSION
|
||||
cmd:gcc${secondaryArchSuffix}
|
||||
cmd:make
|
||||
cmd:ld${secondaryArchSuffix}
|
||||
cmd:sip >= 6
|
||||
cmd:qmake6${secondaryArchSuffix} >= 6
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
OLDPYTHONPATH=$PYTHONPATH
|
||||
|
||||
local packageLinksDir=$(dirname $portPackageLinksDir)
|
||||
local python3PackageName="${portName}_python310-$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 -c4)
|
||||
installLocation=/lib/python$pythonVersion/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$OLDPYTHONPATH
|
||||
|
||||
sip-build \
|
||||
--confirm-license \
|
||||
--no-designer-plugin \
|
||||
--no-qml-plugin \
|
||||
--no-make \
|
||||
--qmake /bin/qmake6 \
|
||||
--target-dir=$installLocation \
|
||||
--api-dir=$dataDir/sip/PyQt6 \
|
||||
--pep484-pyi
|
||||
|
||||
cd build
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
OLDPYTHONPATH=$PYTHONPATH
|
||||
|
||||
local packageLinksDir=$(dirname $portPackageLinksDir)
|
||||
local python3PackageName="${portName}_python310-$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 -c4)
|
||||
installLocation=lib/python$pythonVersion/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$OLDPYTHONPATH
|
||||
|
||||
mkdir -p $installLocation
|
||||
cd build
|
||||
make install INSTALL_ROOT="$prefix"
|
||||
|
||||
$python -m compileall -d / $prefix/lib/python$pythonVersion
|
||||
$python -O -m compileall -d / $prefix/lib/python$pythonVersion
|
||||
|
||||
packageEntries python310 \
|
||||
$installLocation \
|
||||
$commandBinDir
|
||||
|
||||
rmdir $prefix/lib/python$pythonVersion
|
||||
|
||||
mkdir -p $dataDir
|
||||
mv $prefix/packages/pyqt6$secondaryArchSuffix-$portVersion-$REVISION/.self/data/sip $dataDir
|
||||
rm -r $prefix/packages
|
||||
}
|
||||
Reference in New Issue
Block a user