qt: make installation of translation files optional
authorDanomi Manchego <danomimanchego123@gmail.com>
Sat, 2 Aug 2014 03:08:56 +0000 (23:08 -0400)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 3 Aug 2014 08:27:06 +0000 (10:27 +0200)
Commit 93917b6980f7f2b51302e1a3fa451b07cf7d674e introduced the
installation of the binary .qm translation files, unconditionally.
This patch introduces an option to disable this behavior, saving
almost 8MB of space.

[Thomas: rename option to BR2_PACKAGE_QT_TRANSLATION_FILES instead of
BR2_PACKAGE_QT_INSTALL_TRANSLATION_FILES, and move its definition
around the installation of examples/demos rather than in the middle of
the options for the different modules.]

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/qt/Config.in
package/qt/qt.mk

index 0a21e93c13fee2d00b7ced0787278144df4f72f5..93751cd3a7cf2380bdfc20b7e7827bf28429dd21 100644 (file)
@@ -28,6 +28,13 @@ config BR2_PACKAGE_QT_DEMOS
        help
          If unsure, say N.
 
+config BR2_PACKAGE_QT_TRANSLATION_FILES
+       bool "Install translation files"
+       default y
+       help
+         Install binary .qm translation files.
+         If unsure, say y.
+
 config BR2_PACKAGE_QT_EXAMPLES
        bool "Compile and install Qt examples (with code)"
        select BR2_PACKAGE_QT_GUI_MODULE
index 82a55095d70bd7c089e8ec6fb51991f8f0c9986c..880e835a22d26a6a654dc5185b27dcc0e0c62ab9 100644 (file)
@@ -670,12 +670,14 @@ define QT_INSTALL_TARGET_POWERVR
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES),y)
 define QT_INSTALL_TARGET_TRANSLATIONS
        if [ -d $(STAGING_DIR)/usr/share/qt/translations/ ] ; then \
                mkdir -p $(TARGET_DIR)/usr/share/qt/translations ; \
                cp -dpfr $(STAGING_DIR)/usr/share/qt/translations/* $(TARGET_DIR)/usr/share/qt/translations ; \
        fi
 endef
+endif
 
 define QT_INSTALL_TARGET_CMDS
        $(QT_INSTALL_TARGET_LIBS)