diff options
| author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2020-01-07 11:00:16 +0100 |
|---|---|---|
| committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2020-01-27 22:39:56 +0000 |
| commit | 491eb18eaecfae83aae117bbe85de0f352ee2c0d (patch) | |
| tree | 9d09e3c5770037a44cf9f72b804c708bf533bec1 /build_scripts/platforms/linux.py | |
| parent | deeadb8e5d04975916e3949416d0308b080b389b (diff) | |
designer: patch rpath for unix
Designer is not statically compiled, so we need to add
a RUNPATH to use the Qt libraries we ship with the wheel.
Change-Id: I715fcd852b63da99104198be2a4587b042a1eab7
Fixes: PYSIDE-1165
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'build_scripts/platforms/linux.py')
| -rw-r--r-- | build_scripts/platforms/linux.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py index e1c2dd5a1..712739e05 100644 --- a/build_scripts/platforms/linux.py +++ b/build_scripts/platforms/linux.py @@ -37,7 +37,9 @@ ## ############################################################################# -from ..utils import copydir, copyfile, copy_icu_libs, find_files_using_glob +from ..utils import (copydir, copyfile, copy_icu_libs, find_files_using_glob, + linux_set_rpaths, linux_run_read_elf, linux_get_rpaths, + rpaths_has_origin) from ..config import config @@ -87,6 +89,15 @@ def prepare_standalone_package_linux(self, vars): if not maybe_icu_libs: copy_icu_libs(self._patchelf_path, resolved_destination_lib_dir) + # Patching designer to use the Qt libraries provided in the wheel + if config.is_internal_pyside_build(): + designer_path = "{st_build_dir}/{st_package_name}/designer".format(**vars) + rpaths = linux_get_rpaths(designer_path) + if not rpaths or not rpaths_has_origin(rpaths): + rpaths.insert(0, '$ORIGIN/../lib') + new_rpaths_string = ":".join(rpaths) + linux_set_rpaths(self._patchelf_path, designer_path, new_rpaths_string) + if self.is_webengine_built(built_modules): copydir("{qt_lib_execs_dir}", "{st_build_dir}/{st_package_name}/Qt/libexec", |
