diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2017-06-30 10:37:08 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-07-04 18:05:17 +0200 |
commit | a2efb84dec42608e46860a24c31db5a4588edd1e (patch) | |
tree | f06691ead5816f81f7ccb6b7bd06ab089f01bf42 | |
parent | 8ec29ef3e4eba720605487149d169df17d7dce5a (diff) | |
download | buildroot-a2efb84dec42608e46860a24c31db5a4588edd1e.tar.gz buildroot-a2efb84dec42608e46860a24c31db5a4588edd1e.zip |
package/qt5base: provide "qt.conf" to make "qmake" relocatable
The file "qt.conf" can be used to override the hard-coded paths that are
compiled into the Qt library. We need it to make "qmake" relocatable.
CC: Julien Corjon <corjon.j@ecagroup.com>
CC: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
[Thomas:
- use | instead of \ as sed separator, suggested by Arnout.
- fix indentation, suggested by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | package/qt5/qt5base/qt.conf.in | 6 | ||||
-rw-r--r-- | package/qt5/qt5base/qt5base.mk | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/package/qt5/qt5base/qt.conf.in b/package/qt5/qt5base/qt.conf.in new file mode 100644 index 0000000000..48e4b92bcd --- /dev/null +++ b/package/qt5/qt5base/qt.conf.in @@ -0,0 +1,6 @@ +[Paths] +Prefix=@@HOST_DIR@@/usr +Sysroot=@@STAGING_DIR@@ +Headers=/usr/include/qt5 +Plugins=/usr/lib/qt/plugins +Examples=/usr/lib/qt/examples diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 5fe8bb884b..3e55002264 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -258,9 +258,17 @@ define QT5BASE_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef +# The file "qt.conf" can be used to override the hard-coded paths that are +# compiled into the Qt library. We need it to make "qmake" relocatable. +define QT5BASE_INSTALL_QT_CONF + sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \ + $(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/usr/bin/qt.conf +endef + define QT5BASE_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(QT5_LA_PRL_FILES_FIXUP) + $(QT5BASE_INSTALL_QT_CONF) endef define QT5BASE_INSTALL_TARGET_LIBS |