python3-pyqt6: fix cross build

This commit is contained in:
Đoàn Trần Công Danh 2023-02-24 20:53:09 +07:00
parent ad152b5006
commit ab502d69a2

View file

@ -1,16 +1,14 @@
Index: PyQt6-6.1.0/project.py --- a/project.py
=================================================================== +++ b/project.py
--- PyQt6-6.1.0.orig/project.py @@ -54,6 +54,15 @@ class PyQt(PyQtProject):
+++ PyQt6-6.1.0/project.py QtSerialPort, QtWebChannel, QtWebSockets, QtBluetooth, QtNfc,
@@ -49,6 +49,15 @@ class PyQt(PyQtProject): QtPdf, QtPdfWidgets, QtTextToSpeech, QAxContainer]
# QtNfc, QtPositioning, QtLocation, QtRemoteObjects, QtSensors,
# QtSerialPort, QtTextToSpeech, QtWebChannel, QtWebSockets
+ def run_command(self, args, *, fatal=True): + def run_command(self, args, *, fatal=True):
+ """ Run a command and display the output if requested. """ + """ Run a command and display the output if requested. """
+ qemu_machine = os.environ.get("XBPS_TARGET_QEMU_MACHINE") + qemu_machine = os.environ.get("XBPS_TARGET_QEMU_MACHINE")
+ builddir = os.environ.get("XBPS_BUILDDIR") + builddir = os.environ.get("XBPS_BUILDDIR")
+ if qemu_machine and args[0].startswith(os.path.join(builddir, "PyQt6")): + if qemu_machine and args[0].startswith(os.path.join(builddir, "python3-pyqt6")):
+ qemu = "qemu-{}-static".format(qemu_machine) + qemu = "qemu-{}-static".format(qemu_machine)
+ args.insert(0, qemu) + args.insert(0, qemu)
+ super().run_command(args, fatal=fatal) + super().run_command(args, fatal=fatal)