summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qgis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qgis/pyqt5.patch25
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py
index af3fe5db3e..4a6d6a3583 100644
--- a/var/spack/repos/builtin/packages/qgis/package.py
+++ b/var/spack/repos/builtin/packages/qgis/package.py
@@ -114,6 +114,8 @@ class Qgis(CMakePackage):
depends_on('qtkeychain@:1.5.99', when='^qt@4')
depends_on('qt@:4', when='@2')
+ patch('pyqt5.patch', when='^qt@5')
+
def cmake_args(self):
spec = self.spec
args = []
diff --git a/var/spack/repos/builtin/packages/qgis/pyqt5.patch b/var/spack/repos/builtin/packages/qgis/pyqt5.patch
new file mode 100644
index 0000000000..1e6b7e6149
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qgis/pyqt5.patch
@@ -0,0 +1,25 @@
+diff --git a/cmake/FindPyQt5.py b/cmake/FindPyQt5.py
+index 6a55a0f801..d6eda1fa1e 100644
+--- a/cmake/FindPyQt5.py
++++ b/cmake/FindPyQt5.py
+@@ -40,6 +40,7 @@ except ImportError:
+ import sys
+ cfg = sipconfig.Configuration()
+ sip_dir = cfg.default_sip_dir
++ pyqt_prefix = os.sep.join(PyQt5.QtCore.__file__.split(os.sep)[0:-5])
+ if sys.platform.startswith('freebsd'):
+ py_version = str(sys.version_info.major) + str(sys.version_info.minor)
+ sip_dir = sip_dir.replace(py_version, '')
+@@ -53,9 +54,9 @@ except ImportError:
+ 'pyqt_version': PyQt5.QtCore.PYQT_VERSION,
+ 'pyqt_version_str': PyQt5.QtCore.PYQT_VERSION_STR,
+ 'pyqt_sip_flags': PyQt5.QtCore.PYQT_CONFIGURATION['sip_flags'],
+- 'pyqt_mod_dir': os.path.join(cfg.default_mod_dir, "PyQt5"),
+- 'pyqt_sip_dir': sip_dir,
+- 'pyqt_bin_dir': cfg.default_bin_dir,
++ 'pyqt_mod_dir': os.path.dirname(PyQt5.QtCore.__file__),
++ 'pyqt_sip_dir': os.path.join(pyqt_prefix,'share','sip','PyQt5'),
++ 'pyqt_bin_dir': os.path.join(pyqt_prefix,'bin'),
+ }
+ pyqtcfg = sipconfig.Configuration([cfg])
+