[v2] qt5virtualkeyboard: Install new library
diff mbox series

Message ID 4c8cb1db-58a9-5df0-25cd-538e76e8a7a7@starleaf.com
State Accepted
Headers show
Series
  • [v2] qt5virtualkeyboard: Install new library
Related show

Commit Message

Mark Thompson March 8, 2019, 6:33 p.m. UTC
Between Qt 5.11 and 5.12 the virtual keyboard package gained a new top-level
library, libQt5VirtualKeyboard.so, which is then used by all of the plugins
it installs.  This change makes Buildroot aware of the new library so that
we install it to the target filesystem.

Signed-off-by: Mark Thompson <mark.thompson@starleaf.com>
---
On 08/03/2019 18:07, Yann E. MORIN wrote:
>> +ifeq ($(BR2_STATIC_LIBS),)
>> +define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
>> +	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
>> +endef
>> +endif
> 
> You said that this new library was introduced with qt-5.12, but here you
> define it unconditionally...
> 
>>  ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
>>  define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
>>  	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick/Enterprise
>> @@ -97,6 +103,7 @@ define QT5VIRTUALKEYBOARD_INSTALL_TARGET_CMDS
>>  	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
>>  	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so \
>>  		$(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
>> +	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS)
> 
> ... and here you use it unconditionally, which means that, when qt-5.6
> is enabled, this code will still be used, and thus the copy will be
> attempted, but will fail as the library does not exist in before
> qt-5.12.

Good point, I was only considering the recent 5.11 -> 5.12 change and ignoring that it can still be built with 5.6.

New version enclosing.

Thanks,

- Mark


 package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Thomas Petazzoni March 14, 2019, 9:30 p.m. UTC | #1
Hello,

On Fri, 8 Mar 2019 18:33:39 +0000
Mark Thompson <mark.thompson@starleaf.com> wrote:

> Between Qt 5.11 and 5.12 the virtual keyboard package gained a new top-level
> library, libQt5VirtualKeyboard.so, which is then used by all of the plugins
> it installs.  This change makes Buildroot aware of the new library so that
> we install it to the target filesystem.
> 
> Signed-off-by: Mark Thompson <mark.thompson@starleaf.com>

Thanks, I've applied, with some change (see below).

> diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
> index 8ce3169774..ebe0f1e009 100644
> --- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
> +++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
> @@ -81,6 +81,11 @@ define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
>  	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Enterprise/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/Enterprise/
>  endef
>  else
> +ifeq ($(BR2_STATIC_LIBS),)
> +define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
> +	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
> +endef
> +endif

Instead of "hijacking" the condition used for the
QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML definition, I've created a
separate condition:

+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST):$(BR2_STATIC_LIBS),y:)
+define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
+       cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
+endef
+endif

Could you double check that the latest master works for you ?

Thanks!

Thomas Petazzoni
Mark Thompson March 15, 2019, 6:07 p.m. UTC | #2
On 14/03/2019 21:30, Thomas Petazzoni wrote:
> Hello,
> 
> On Fri, 8 Mar 2019 18:33:39 +0000
> Mark Thompson <mark.thompson@starleaf.com> wrote:
> 
>> Between Qt 5.11 and 5.12 the virtual keyboard package gained a new top-level
>> library, libQt5VirtualKeyboard.so, which is then used by all of the plugins
>> it installs.  This change makes Buildroot aware of the new library so that
>> we install it to the target filesystem.
>>
>> Signed-off-by: Mark Thompson <mark.thompson@starleaf.com>
> 
> Thanks, I've applied, with some change (see below).
> 
>> diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
>> index 8ce3169774..ebe0f1e009 100644
>> --- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
>> +++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
>> @@ -81,6 +81,11 @@ define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
>>  	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Enterprise/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/Enterprise/
>>  endef
>>  else
>> +ifeq ($(BR2_STATIC_LIBS),)
>> +define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
>> +	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
>> +endef
>> +endif
> 
> Instead of "hijacking" the condition used for the
> QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML definition, I've created a
> separate condition:
> 
> +ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST):$(BR2_STATIC_LIBS),y:)
> +define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
> +       cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
> +endef
> +endif
> 
> Could you double check that the latest master works for you ?

Yep, that works for me.

Thank you!

- Mark

Patch
diff mbox series

diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index 8ce3169774..ebe0f1e009 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -81,6 +81,11 @@  define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
 	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Enterprise/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/Enterprise/
 endef
 else
+ifeq ($(BR2_STATIC_LIBS),)
+define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
+endef
+endif
 define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
 	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick
 	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/
@@ -97,6 +102,7 @@  define QT5VIRTUALKEYBOARD_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
 	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so \
 		$(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
+	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS)
 	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML)
 	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS)
 	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_EXAMPLES)