qt: fix plugin installation and change plugin path
Since the conversion of Qt to GENTARGETS in
421cda1fd078f5fa7902f05bd1d2021fd101d9ea, plugin installation could
break in some situations, for example if SQL support was enabled, but
without any SQL driver: the sql plugin directory doesn't exist, but
our qt.mk wanted to copy it.
This patches simplifies the plugin handling a bit, and basically
copies all Qt plugins installed in the $(STAGING_DIR) to the
$(TARGET_DIR), assuming Qt has only built and installed the needed
plugins.
Moreover, instead of installing plugins to usr/plugins, which is a odd
location, we install them in usr/lib/qt/plugins. This requires a small
patch to Qt ./configure script so that even when -hostprefix is used,
the -plugindir option is taken into account.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-04-03 17:19:00 +02:00
|
|
|
Fix -hostprefix behaviour
|
|
|
|
|
|
|
|
When -hostprefix ./configure option is used, Qt installs all its
|
|
|
|
headers, libraries and binaries inside the given host prefix, instead
|
|
|
|
of the prefix. This is used by Buildroot to make sure that all Qt
|
|
|
|
libraries and headers are installed in $(STAGING_DIR).
|
|
|
|
|
|
|
|
Qt ./configure script also allows to tune the installation location of
|
|
|
|
various elements, for examples the plugins through the -plugindir
|
|
|
|
option. Unfortunately, this option only impact the installation path
|
|
|
|
on the target, but not on the host when -hostprefix is used.
|
|
|
|
|
|
|
|
This patch modifies Qt ./configure script so that HOST_*PATH_STR
|
|
|
|
variables are composed of the host prefix concatenated with the path
|
|
|
|
of installation on the target. This way, the plugin installation local
|
|
|
|
in the $(STAGING_DIR) and on the target remains the same.
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
|
2012-04-04 20:53:26 +02:00
|
|
|
---
|
|
|
|
configure | 18 +++++++++---------
|
|
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
qt: fix plugin installation and change plugin path
Since the conversion of Qt to GENTARGETS in
421cda1fd078f5fa7902f05bd1d2021fd101d9ea, plugin installation could
break in some situations, for example if SQL support was enabled, but
without any SQL driver: the sql plugin directory doesn't exist, but
our qt.mk wanted to copy it.
This patches simplifies the plugin handling a bit, and basically
copies all Qt plugins installed in the $(STAGING_DIR) to the
$(TARGET_DIR), assuming Qt has only built and installed the needed
plugins.
Moreover, instead of installing plugins to usr/plugins, which is a odd
location, we install them in usr/lib/qt/plugins. This requires a small
patch to Qt ./configure script so that even when -hostprefix is used,
the -plugindir option is taken into account.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-04-03 17:19:00 +02:00
|
|
|
|
2012-04-04 20:53:26 +02:00
|
|
|
Index: qt-everywhere-opensource-src-4.8.1/configure
|
|
|
|
===================================================================
|
|
|
|
--- qt-everywhere-opensource-src-4.8.1.orig/configure
|
|
|
|
+++ qt-everywhere-opensource-src-4.8.1/configure
|
|
|
|
@@ -4661,15 +4661,15 @@
|
|
|
|
|
|
|
|
|
qt: fix plugin installation and change plugin path
Since the conversion of Qt to GENTARGETS in
421cda1fd078f5fa7902f05bd1d2021fd101d9ea, plugin installation could
break in some situations, for example if SQL support was enabled, but
without any SQL driver: the sql plugin directory doesn't exist, but
our qt.mk wanted to copy it.
This patches simplifies the plugin handling a bit, and basically
copies all Qt plugins installed in the $(STAGING_DIR) to the
$(TARGET_DIR), assuming Qt has only built and installed the needed
plugins.
Moreover, instead of installing plugins to usr/plugins, which is a odd
location, we install them in usr/lib/qt/plugins. This requires a small
patch to Qt ./configure script so that even when -hostprefix is used,
the -plugindir option is taken into account.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-04-03 17:19:00 +02:00
|
|
|
if [ ! -z "$QT_HOST_PREFIX" ]; then
|
|
|
|
- HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"`
|
|
|
|
- HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"`
|
|
|
|
- HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"`
|
|
|
|
- HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"`
|
|
|
|
- HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"`
|
|
|
|
- HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"`
|
|
|
|
- HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"`
|
|
|
|
- HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"`
|
|
|
|
- HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"`
|
|
|
|
+ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX/$QT_INSTALL_PREFIX"`
|
|
|
|
+ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/$QT_INSTALL_DOCS"`
|
|
|
|
+ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/$QT_INSTALL_HEADERS"`
|
|
|
|
+ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/$QT_INSTALL_LIBS"`
|
|
|
|
+ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/$QT_INSTALL_BINS"`
|
|
|
|
+ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/$QT_INSTALL_PLUGINS"`
|
|
|
|
+ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/$QT_INSTALL_IMPORTS"`
|
|
|
|
+ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX/$QT_INSTALL_DATA"`
|
|
|
|
+ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/$QT_INSTALL_TRANSLATIONS"`
|
|
|
|
HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"`
|
|
|
|
HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"`
|
|
|
|
HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"`
|