summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch')
-rw-r--r--app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch
new file mode 100644
index 000000000000..56ae97159030
--- /dev/null
+++ b/app-editors/qhexedit2/files/qhexedit2-0.8.6-sip.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/820473
+From bdb22d3542099d7e1933aaffa80e044375466914 Mon Sep 17 00:00:00 2001
+From: Huang Rui <vowstar@gmail.com>
+Date: Sat, 7 May 2022 14:49:35 +0800
+Subject: [PATCH] setup.py: fix pyqt_sip_dir on modern Linux distributions
+
+QtCore/QtCoremod.sip may be installed to:
+/usr/lib/python3.9/site-packages/PyQt5/bindings/QtCore/QtCoremod.sip
+See also: https://github.com/qgis/QGIS/blob/master/cmake/FindPyQt5.py
+
+Closes: https://bugs.gentoo.org/820473
+Signed-off-by: Huang Rui <vowstar@gmail.com>
+---
+ setup.py | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 1a0d912..1906a07 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,6 +10,14 @@
+
+ cfg = sipconfig.Configuration()
+ pyqt_sip_dir = cfg.default_sip_dir
++for p in (os.path.join(pyqt_sip_dir, "PyQt5"),
++ os.path.join(pyqt_sip_dir, "PyQt5-3"),
++ os.path.join(pyqt_sip_dir, "PyQt4"),
++ pyqt_sip_dir,
++ os.path.join(cfg.default_mod_dir, "PyQt5", "bindings")):
++ if os.path.exists(os.path.join(p, "QtCore", "QtCoremod.sip")):
++ pyqt_sip_dir = p
++ break
+
+ try:
+ import PyQt5