소스 검색

qt: make installation of translation files optional

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>
Danomi Manchego 11 년 전
부모
커밋
2ff329412f
2개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      package/qt/Config.in
  2. 2 0
      package/qt/qt.mk

+ 7 - 0
package/qt/Config.in

@@ -28,6 +28,13 @@ config BR2_PACKAGE_QT_DEMOS
 	help
 	help
 	  If unsure, say N.
 	  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
 config BR2_PACKAGE_QT_EXAMPLES
 	bool "Compile and install Qt examples (with code)"
 	bool "Compile and install Qt examples (with code)"
 	select BR2_PACKAGE_QT_GUI_MODULE
 	select BR2_PACKAGE_QT_GUI_MODULE

+ 2 - 0
package/qt/qt.mk

@@ -670,12 +670,14 @@ define QT_INSTALL_TARGET_POWERVR
 endef
 endef
 endif
 endif
 
 
+ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES),y)
 define QT_INSTALL_TARGET_TRANSLATIONS
 define QT_INSTALL_TARGET_TRANSLATIONS
 	if [ -d $(STAGING_DIR)/usr/share/qt/translations/ ] ; then \
 	if [ -d $(STAGING_DIR)/usr/share/qt/translations/ ] ; then \
 		mkdir -p $(TARGET_DIR)/usr/share/qt/translations ; \
 		mkdir -p $(TARGET_DIR)/usr/share/qt/translations ; \
 		cp -dpfr $(STAGING_DIR)/usr/share/qt/translations/* $(TARGET_DIR)/usr/share/qt/translations ; \
 		cp -dpfr $(STAGING_DIR)/usr/share/qt/translations/* $(TARGET_DIR)/usr/share/qt/translations ; \
 	fi
 	fi
 endef
 endef
+endif
 
 
 define QT_INSTALL_TARGET_CMDS
 define QT_INSTALL_TARGET_CMDS
 	$(QT_INSTALL_TARGET_LIBS)
 	$(QT_INSTALL_TARGET_LIBS)