void-packages/srcpkgs/python3-pyqt5-qsci/patches/cross.patch

21 lines
947 B
Diff

Index: QScintilla_src-2.12.1/Python/project.py
===================================================================
--- QScintilla_src-2.12.1.orig/Python/project.py
+++ QScintilla_src-2.12.1/Python/project.py
@@ -41,6 +41,15 @@ class QScintilla(PyQtProject):
# static or dynamic).
self.qsci_external_lib = not os.path.isdir('src')
+ def run_command(self, args, *, fatal=True):
+ """ Run a command and display the output if requested. """
+ qemu_machine = os.environ.get("XBPS_TARGET_QEMU_MACHINE")
+ builddir = os.environ.get("XBPS_BUILDDIR")
+ if qemu_machine and args[0].startswith(os.path.join(builddir, "python3-pyqt5-qsci")):
+ qemu = "qemu-{}-static".format(qemu_machine)
+ args.insert(0, qemu)
+ super().run_command(args, fatal=fatal)
+
def apply_user_defaults(self, tool):
""" Set default values for user options that haven't been set yet. """