qt5tools: new package
PATCH v2 1/2 qt5tools: new package
- host programs: lconvert, lrelease and lupdate
- target programs: pixeltool, qtdiag, qtpath and qtplugininfo
---
Changes v1 -> v2:
- add target programs, reword commit message
--- package/qt5/Config.in | 1 + package/qt5/qt5tools/Config.in | 41 ++++++++++++++ package/qt5/qt5tools/qt5tools.hash | 4 ++ package/qt5/qt5tools/qt5tools.mk | 106 +++++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 package/qt5/qt5tools/Config.in create mode 100644 package/qt5/qt5tools/qt5tools.hash create mode 100644 package/qt5/qt5tools/qt5tools.mk
package/qt5/Config.in +1 -0
@@ -42,6 +42,7 @@ source "package/qt5/qt5quickcontrols/Config.in" source "package/qt5/qt5sensors/Config.in" source "package/qt5/qt5serialport/Config.in" source "package/qt5/qt5svg/Config.in" +source "package/qt5/qt5tools/Config.in" source "package/qt5/qt5webchannel/Config.in" source "package/qt5/qt5websockets/Config.in" source "package/qt5/qt5x11extras/Config.in"
package/qt5/qt5tools/Config.in new file +41 -0
41 lines not on this page · raw message
package/qt5/qt5tools/qt5tools.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Hashes from: http://download.qt.io/official_releases/qt/5.5/5.5.0/submodules/qttools-opensource-src-5.5.0.tar.xz.mirrorlist +sha256 5b65147187fb7f4456c20ef263f1093709d728f737d6d871a9a5888132fac07d qttools-opensource-src-5.5.0.tar.xz +sha1 be69ccb338bcc7b397a8b31d7ba0a45fe677390e qttools-opensource-src-5.5.0.tar.xz +md5 2057ef2110b6a1aec260a69e2860a502 qttools-opensource-src-5.5.0.tar.xz
package/qt5/qt5tools/qt5tools.mk new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v2 1/2 qt5tools: new package
Dear Peter Seiderer,
Quoted 1 line · Peter Seiderer
- host programs: lconvert, lrelease and lupdate
Ok, so you say they are host programs, i.e built to be executed on the host. It is somewhat weird that they are built by a target package, but since it's already the case with the qt5base package providing qmake and other tools, I guess that's OK.
Quoted 18 lines
package/qt5/qt5tools/Config.in new file +12
-0@@ -0,0 +1,41 @@ +config BR2_PACKAGE_QT5TOOLS + bool "qt5tools" + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5tools module. + + http://qt.io + +if BR2_PACKAGE_QT5TOOLS +
package/qt5/qt5tools/Config.in line 22
Quoted 10 lines
package/qt5/qt5tools/Config.in new file +10
-0+config BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS + bool "Linguist host tools (lconvert, lrelease, lupdate)" + help + This option enables the linguist host tools + lconvert, lrelease and lupdate. + +config BR2_PACKAGE_QT5TOOLS_PIXELTOOL + bool "pixeltool" + select BR2_PACKAGE_QT5BASE_PNG + select BR2_PACKAGE_LIBPNG
This line is not properly indented and is not needed, since BR2_PACKAGE_QT5BASE_PNG already selects BR2_PACKAGE_LIBPNG.
It *may* be needed if pixeltool directly calls libpng functions, in order to make this dependency clear. But isn't pixeltool only using qt5base PNG functions ?
Quoted 13 lines
package/qt5/qt5tools/qt5tools.mk new file +7
-0@@ -0,0 +1,106 @@ +################################################################################ +# +# qt5tools +# +################################################################################ + +QT5TOOLS_VERSION = $(QT5_VERSION)
package/qt5/qt5tools/qt5tools.mk line 17
Quoted 10 lines
package/qt5/qt5tools/qt5tools.mk new file +10
-0+QT5TOOLS_SITE = $(QT5_SITE) +QT5TOOLS_SOURCE = qttools-opensource-src-$(QT5BASE_VERSION).tar.xz + +QT5TOOLS_DEPENDENCIES = qt5base +QT5TOOLS_INSTALL_STAGING = YES + +# linguist tools compile conditionally on qtHaveModule(qmldevtools-private) +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5TOOLS_DEPENDENCIES += qt5declarative +endif
linguist tools are built for the host according to what you're saying. So how can they use a target package ?
package/qt5/qt5tools/qt5tools.mk line 33
Quoted 3 lines
package/qt5/qt5tools/qt5tools.mk new file +3
-0+define QT5TOOLS_BUILD_CMDS_ALL + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-qmake_all
The line break is not really needed here.
package/qt5/qt5tools/qt5tools.mk line 45
Quoted 12 lines
package/qt5/qt5tools/qt5tools.mk new file +12
-0+endef + +ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y) +define QT5TOOLS_BUILD_CMDS_LINGUIST_TOOLS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lconvert + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lrelease + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lupdate +endef +define QT5TOOLS_INSTALL_STAGING_CMDS_LINGUIST_TOOLS + cp -dpf $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lrelease $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lupdate $(STAGING_DIR)/usr/bin
So they are host tools, but you install them in $(STAGING_DIR) where we install only target binaries ? This looks weird.
Also, the canonical way of installing binaries is:
$(INSTALL) -D -m0755 $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin/lconvert
package/qt5/qt5tools/qt5tools.mk line 50
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +5
-0+endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_PIXELTOOL),y) +QT5TOOLS_DEPENDENCIES += libpng
Really needed ?
Quoted 24 lines
package/qt5/qt5tools/qt5tools.mk new file +24
-0+define QT5TOOLS_BUILD_CMDS_PIXELTOOL + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/pixeltool +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_PIXELTOOL + cp -dpf $(@D)/bin/pixeltool $(TARGET_DIR)/usr/bin +endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTDIAG),y) +define QT5TOOLS_BUILD_CMDS_QTDIAG + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtdiag +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTDIAG + cp -dpf $(@D)/bin/qtdiag $(TARGET_DIR)/usr/bin +endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTPATHS),y) +define QT5TOOLS_BUILD_CMDS_QTPATHS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtpaths +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTPATHS + cp -dpf $(@D)/bin/qtpaths $(TARGET_DIR)/usr/bin +endef
package/qt5/qt5tools/qt5tools.mk line 84
Quoted 10 lines
package/qt5/qt5tools/qt5tools.mk new file +10
-0+endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO),y) +define QT5TOOLS_BUILD_CMDS_QTPLUGININFO + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtplugininfo +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTDIAG + cp -dpf $(@D)/bin/qtplugininfo $(TARGET_DIR)/usr/bin +endef +endif
All this logic looks fairly repetitive. What about instead:
QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \
linguist/lconvert linguist/lrelease linguist/lupdate
QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGINFO) += qtpluginfo
and then:
define QT5TOOLS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ sub-src-qmake_all $(foreach p,$(QT5TOOLS_TOOL_DIRS_y),\ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p)$(sep))
endef
And ditto for the installation.
You might need to do a special case for the linguist tools, though.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/2 qt5tools: new package
Hello Thomas,
Quoted 10 lines · Thomas Petazzoni
Dear Peter Seiderer,
Quoted 1 line · Peter Seiderer
- host programs: lconvert, lrelease and lupdate
Ok, so you say they are host programs, i.e built to be executed on the host. It is somewhat weird that they are built by a target package, but since it's already the case with the qt5base package providing qmake and other tools, I guess that's OK.
Not sure, but I think for a 'real' host-qt5tools package a host-qt5base package would be needed?
Quoted 22 lines
Quoted 22 lines
package/qt5/qt5tools/Config.in new file +16
-0@@ -0,0 +1,41 @@ +config BR2_PACKAGE_QT5TOOLS + bool "qt5tools" + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5tools module. + + http://qt.io + +if BR2_PACKAGE_QT5TOOLS + +config BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS + bool "Linguist host tools (lconvert, lrelease, lupdate)" + help + This option enables the linguist host tools
Quoted 8 lines
package/qt5/qt5tools/Config.in line 22
Quoted 6 lines
package/qt5/qt5tools/Config.in new file +6
-0+ lconvert, lrelease and lupdate. + +config BR2_PACKAGE_QT5TOOLS_PIXELTOOL + bool "pixeltool" + select BR2_PACKAGE_QT5BASE_PNG + select BR2_PACKAGE_LIBPNGThis line is not properly indented and is not needed, since
Sorry for the indent mismatch (still missing a good tab/space highlight config for vim...).
Quoted 1 line
BR2_PACKAGE_QT5BASE_PNGalready selectsBR2_PACKAGE_LIBPNG.
O.k., will drop the line...
Quoted 4 lines
It *may* be needed if pixeltool directly calls libpng functions, in order to make this dependency clear. But isn't pixeltool only using qt5base PNG functions ?
Pixeltools just saves images (hardcoded) as png files...
Quoted 19 lines
Quoted 19 lines
package/qt5/qt5tools/qt5tools.mk new file +12
-0@@ -0,0 +1,106 @@ +################################################################################ +# +# qt5tools +# +################################################################################ + +QT5TOOLS_VERSION = $(QT5_VERSION) +QT5TOOLS_SITE = $(QT5_SITE) +QT5TOOLS_SOURCE = qttools-opensource-src-$(QT5BASE_VERSION).tar.xz + +QT5TOOLS_DEPENDENCIES = qt5base +QT5TOOLS_INSTALL_STAGING = YES
Quoted 8 lines
package/qt5/qt5tools/qt5tools.mk line 17
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +5
-0+ +# linguist tools compile conditionally on qtHaveModule(qmldevtools-private) +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5TOOLS_DEPENDENCIES += qt5declarative +endiflinguist tools are built for the host according to what you're saying. So how can they use a target package ?
The condition qtHaveModule(qmldevtools-private) is only used to decide if lupdate will support parsing qml files (via setting QT_NO_QML define), no linking against target qt5 libs...
Quoted 6 lines
package/qt5/qt5tools/qt5tools.mk line 33
Quoted 4 lines
package/qt5/qt5tools/qt5tools.mk new file +3
-0+define QT5TOOLS_BUILD_CMDS_ALL + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-qmake_allThe line break is not really needed here.
O.k, will fix it....
Quoted 16 lines
package/qt5/qt5tools/qt5tools.mk line 45
Quoted 13 lines
package/qt5/qt5tools/qt5tools.mk new file +12
-0+endef + +ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y) +define QT5TOOLS_BUILD_CMDS_LINGUIST_TOOLS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lconvert + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lrelease + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lupdate +endef +define QT5TOOLS_INSTALL_STAGING_CMDS_LINGUIST_TOOLS + cp -dpf $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lrelease $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lupdate $(STAGING_DIR)/usr/binSo they are host tools, but you install them in $(STAGING_DIR) where we install only target binaries ? This looks weird.
Did first try to install to $(HOST_DIR)/usr/bin but this breaks my use case (from .pro file):
updateqm.input = TRANSLATIONS
updateqm.output = Languages/${QMAKE_FILE_BASE}.qm
updateqm.variable_out = PRE_TARGETDEPS
updateqm.commands = $$[QT_INSTALL_BINS]/lrelease -markuntranslated \"$$LITERAL_HASH\" -idbased ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqmwhich works with the prebuild qt5 packages for linux and windows, so I decided to install to the staging dir, maybe changing the QT_INSTALL_BINS path is better?
Quoted 5 lines
Also, the canonical way of installing binaries is:
$(INSTALL) -D -m0755 $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin/lconvert
O.k, will fix...
Quoted 7 lines
package/qt5/qt5tools/qt5tools.mk line 50
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +5
-0+endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_PIXELTOOL),y) +QT5TOOLS_DEPENDENCIES += libpngReally needed ?
O.k., will drop...
Quoted 47 lines
Quoted 25 lines
package/qt5/qt5tools/qt5tools.mk new file +24
-0+define QT5TOOLS_BUILD_CMDS_PIXELTOOL + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/pixeltool +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_PIXELTOOL + cp -dpf $(@D)/bin/pixeltool $(TARGET_DIR)/usr/bin +endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTDIAG),y) +define QT5TOOLS_BUILD_CMDS_QTDIAG + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtdiag +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTDIAG + cp -dpf $(@D)/bin/qtdiag $(TARGET_DIR)/usr/bin +endef +endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTPATHS),y) +define QT5TOOLS_BUILD_CMDS_QTPATHS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtpaths +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTPATHS + cp -dpf $(@D)/bin/qtpaths $(TARGET_DIR)/usr/bin +endefpackage/qt5/qt5tools/qt5tools.mk line 84
Quoted 10 lines
package/qt5/qt5tools/qt5tools.mk new file +10
-0+endif + +ifeq ($(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO),y) +define QT5TOOLS_BUILD_CMDS_QTPLUGININFO + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/qtplugininfo +endef +define QT5TOOLS_INSTALL_TARGET_CMDS_QTDIAG + cp -dpf $(@D)/bin/qtplugininfo $(TARGET_DIR)/usr/bin +endef +endifAll this logic looks fairly repetitive. What about instead:
QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \
linguist/lconvert linguist/lrelease linguist/lupdate
QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths QT5TOOLS_TOOL_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGINFO) += qtpluginfoand then:
Quoted 8 lines
define
QT5TOOLS_BUILD_CMDS$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ sub-src-qmake_all $(foreach p,$(QT5TOOLS_TOOL_DIRS_y),\ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p)$(sep))endef
And ditto for the installation.
O.k, looks much better, will do...
Quoted 3 lines
You might need to do a special case for the linguist tools, though.
Thanks for review...
Regards, Peter
Quoted 3 lines
Best regards,
Thomas
PATCH v2 1/2 qt5tools: new package
Hello Peter,
Quoted 7 lines · Peter Seiderer
Quoted 4 lines
Ok, so you say they are host programs, i.e built to be executed on the host. It is somewhat weird that they are built by a target package, but since it's already the case with the qt5base package providing qmake and other tools, I guess that's OK.
Not sure, but I think for a 'real' host-qt5tools package a host-qt5base package would be needed?
Yes, and we are not going to do that. If qt5tools by default already builds those linguist tools for the host machine, then that's fine, it's like qt5base that automatically builds qmake for the host, and the Qt libraries for the target.
Quoted 5 lines
Quoted 3 lines
It *may* be needed if pixeltool directly calls libpng functions, in order to make this dependency clear. But isn't pixeltool only using qt5base PNG functions ?
Pixeltools just saves images (hardcoded) as png files...
This does not really answer the question. The question is really whether pixeltools uses only the Qt5 PNG functions, or directly the libpng functions.
Quoted 11 lines
Quoted 7 lines
package/qt5/qt5tools/qt5tools.mk line 17
Quoted 4 lines
package/qt5/qt5tools/qt5tools.mk new file +4
-0+# linguist tools compile conditionally on qtHaveModule(qmldevtools-private) +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5TOOLS_DEPENDENCIES += qt5declarative +endiflinguist tools are built for the host according to what you're saying. So how can they use a target package ?
The condition qtHaveModule(qmldevtools-private) is only used to decide if lupdate will support parsing qml files (via setting
QT_NO_QMLdefine), no linking against target qt5 libs...
OK. Can you indicate this as a comment above this condition?
Quoted 24 lines
Quoted 5 lines
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +5
-0+ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y) +define QT5TOOLS_BUILD_CMDS_LINGUIST_TOOLS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lconvert + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lrelease + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lupdateQuoted 8 lines
package/qt5/qt5tools/qt5tools.mk line 45
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +5
-0+endef +define QT5TOOLS_INSTALL_STAGING_CMDS_LINGUIST_TOOLS + cp -dpf $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lrelease $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lupdate $(STAGING_DIR)/usr/binSo they are host tools, but you install them in $(STAGING_DIR) where we install only target binaries ? This looks weird.
Did first try to install to $(HOST_DIR)/usr/bin but this breaks my use case (from .pro file):
updateqm.input = TRANSLATIONS updateqm.output = Languages/${QMAKE_FILE_BASE}.qm updateqm.variable_out = PRE_TARGETDEPS updateqm.commands = $$[QT_INSTALL_BINS]/lrelease -markuntranslated \"$$LITERAL_HASH\" -idbased ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} updateqm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += updateqm
Quoted 3 lines
which works with the prebuild qt5 packages for linux and windows, so I decided to install to the staging dir, maybe changing the
QT_INSTALL_BINSpath is better?
Having host binaries in $(STAGING_DIR) is really not good. So yes, maybe QT_INSTALL_BINS should point to $(HOST_DIR)/usr/bin/.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/2 qt5tools: new package
Hello Thomas,
Quoted 9 lines · Thomas Petazzoni
Hello Peter,
Quoted 5 lines · Peter Seiderer
Quoted 4 lines
Ok, so you say they are host programs, i.e built to be executed on the host. It is somewhat weird that they are built by a target package, but since it's already the case with the qt5base package providing qmake and other tools, I guess that's OK.
Quoted 7 lines
Quoted 2 lines
Not sure, but I think for a 'real' host-qt5tools package a host-qt5base package would be needed?
Yes, and we are not going to do that. If qt5tools by default already builds those linguist tools for the host machine, then that's fine, it's like qt5base that automatically builds qmake for the host, and the Qt libraries for the target.
O.k, thanks for clarification...
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
It *may* be needed if pixeltool directly calls libpng functions, in order to make this dependency clear. But isn't pixeltool only using qt5base PNG functions ?
Pixeltools just saves images (hardcoded) as png files...
This does not really answer the question. The question is really whether pixeltools uses only the Qt5 PNG functions, or directly the libpng functions.
Sorry for not being precise here, pixeltools uses only Qt5 PNG functions (via QPixmap.save(name, "PNG"))...
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
package/qt5/qt5tools/qt5tools.mk line 17
Quoted 5 lines
package/qt5/qt5tools/qt5tools.mk new file +4
-0+# linguist tools compile conditionally on qtHaveModule(qmldevtools-private) +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5TOOLS_DEPENDENCIES += qt5declarative +endiflinguist tools are built for the host according to what you're saying. So how can they use a target package ?
Quoted 5 lines
Quoted 3 lines
The condition qtHaveModule(qmldevtools-private) is only used to decide if lupdate will support parsing qml files (via setting
QT_NO_QMLdefine), no linking against target qt5 libs...OK. Can you indicate this as a comment above this condition?
O.k., will do...
Quoted 25 lines
Quoted 25 lines
Quoted 14 lines
package/qt5/qt5tools/qt5tools.mk line 45
Quoted 11 lines
package/qt5/qt5tools/qt5tools.mk new file +10
-0+ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y) +define QT5TOOLS_BUILD_CMDS_LINGUIST_TOOLS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lconvert + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lrelease + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist/lupdate +endef +define QT5TOOLS_INSTALL_STAGING_CMDS_LINGUIST_TOOLS + cp -dpf $(@D)/bin/lconvert $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lrelease $(STAGING_DIR)/usr/bin + cp -dpf $(@D)/bin/lupdate $(STAGING_DIR)/usr/binSo they are host tools, but you install them in $(STAGING_DIR) where we install only target binaries ? This looks weird.
Did first try to install to $(HOST_DIR)/usr/bin but this breaks my use case (from .pro file):
updateqm.input = TRANSLATIONS updateqm.output = Languages/${QMAKE_FILE_BASE}.qm updateqm.variable_out = PRE_TARGETDEPS updateqm.commands = $$[QT_INSTALL_BINS]/lrelease -markuntranslated \"$$LITERAL_HASH\" -idbased ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} updateqm.CONFIG += no_link QMAKE_EXTRA_COMPILERS += updateqm
Quoted 6 lines
Quoted 3 lines
which works with the prebuild qt5 packages for linux and windows, so I decided to install to the staging dir, maybe changing the
QT_INSTALL_BINSpath is better?Having host binaries in $(STAGING_DIR) is really not good. So yes, maybe
QT_INSTALL_BINSshould point to $(HOST_DIR)/usr/bin/.
Will take a look and try to change QT_INSTALL_BINS, hope it breaks no other usage...
Regards,
Peter
Quoted 4 lines
Thanks a lot!
Thomas
PATCH v2 1/2 qt5tools: new package
Hello,
Quoted 6 lines · Peter Seiderer
Quoted 3 lines
This does not really answer the question. The question is really whether pixeltools uses only the Qt5 PNG functions, or directly the libpng functions.
Sorry for not being precise here, pixeltools uses only Qt5 PNG functions (via
QPixmap.save(name, "PNG"))...
OK, then the dependency on libpng is indeed not needed.
Quoted 5 lines
Quoted 2 lines
Having host binaries in $(STAGING_DIR) is really not good. So yes, maybe
QT_INSTALL_BINSshould point to $(HOST_DIR)/usr/bin/.Will take a look and try to change
QT_INSTALL_BINS, hope it breaks no other usage...
That's also what I'm a bit afraid of, but the only way to know is to actually test.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/2 qt5tools: new package
Hello Thomas,
Quoted 14 lines · Thomas Petazzoni
Hello,
Quoted 6 lines · Peter Seiderer
Quoted 3 lines
This does not really answer the question. The question is really whether pixeltools uses only the Qt5 PNG functions, or directly the libpng functions.
Sorry for not being precise here, pixeltools uses only Qt5 PNG functions (via
QPixmap.save(name, "PNG"))...OK, then the dependency on libpng is indeed not needed.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Having host binaries in $(STAGING_DIR) is really not good. So yes, maybe
QT_INSTALL_BINSshould point to $(HOST_DIR)/usr/bin/.Will take a look and try to change
QT_INSTALL_BINS, hope it breaks no other usage...That's also what I'm a bit afraid of, but the only way to know is to actually test.
Found a better way, simple use QT_HOST_BINS instead of QT_INSTALL_BINS in my example...will send an updated patch soon...
Regards,
Peter
Quoted 4 lines
Best regards,
Thomas