diff options
author | Johannes Obermayr <johannesobermayr@gmx.de> | 2015-09-22 08:56:57 +0200 |
---|---|---|
committer | Johannes Obermayr <johannesobermayr@gmx.de> | 2015-09-28 11:40:48 +0200 |
commit | c1a5e8568256e2c1d65412f8068ebb803aba1b6f (patch) | |
tree | c267bace038b7ba04615162873f3bb8e8bacac30 /build/mixxx.py | |
parent | 0d5753b7abafd0f54478df36b4cc2c44a876b618 (diff) |
Make Qt5 working on openSUSE.
Fixes:
ERROR:root:QT path does not exist or QT4 is not installed.
ERROR:root:Please specify your QT path by running 'scons qtdir=[path]'
/usr/include/qt5/QtCore/qglobal.h:1052:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
calling /usr/lib/rpm/brp-suse.d/brp-35-rpath
ERROR: RPATH "/usr/include/qt5/lib" on usr/lib/mixxx/plugins/vamp/libmixxxminimal.so is not allowed
ERROR: RPATH "/usr/include/qt5/lib" on usr/lib/mixxx/plugins/soundsource/libsoundsourcewv.so is not allowed
ERROR: RPATH "/usr/include/qt5/lib" on usr/lib/mixxx/plugins/soundsource/libsoundsourcem4a.so is not allowed
ERROR: RPATH "/usr/include/qt5/lib" on usr/bin/mixxx is not allowed
Diffstat (limited to 'build/mixxx.py')
-rw-r--r-- | build/mixxx.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/build/mixxx.py b/build/mixxx.py index 6c2cfbe250..d6bafb4857 100644 --- a/build/mixxx.py +++ b/build/mixxx.py @@ -147,12 +147,21 @@ class MixxxBuild(object): default_qtdir = depends.Qt.DEFAULT_QT4DIRS.get(self.platform, '') tools.append('protoc') + # Try fallback to pkg-config on Linux + if not os.path.isdir(default_qtdir) and self.platform == 'linux': + if any(os.access(os.path.join(path, 'pkg-config'), os.X_OK) for path in os.environ["PATH"].split(os.pathsep)): + import subprocess + try: + default_qtdir = subprocess.Popen(["pkg-config", "--variable=includedir", "Qt5Core"], stdout = subprocess.PIPE).communicate()[0].rstrip() + finally: + pass + # Ugly hack to check the qtdir argument qtdir = Script.ARGUMENTS.get('qtdir', os.environ.get('QTDIR', default_qtdir)) # Validate the specified qtdir exists - if not os.path.exists(qtdir): + if not os.path.isdir(qtdir): logging.error("QT path does not exist or QT4 is not installed.") logging.error( "Please specify your QT path by running 'scons qtdir=[path]'") |