Message ID | 1363721394-14973-9-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> From: Floris Bos <bos@je-eigen-domein.nl>
Thomas> If not using font-config, Qt 5 offers a set of standard fonts to
Thomas> use instead. Install these to target.
Should that then only happen if !BR2_PACKAGE_QT5BASE_FONTCONFIG?
On 03/19/2013 10:43 PM, Peter Korsgaard wrote: >>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Thomas> From: Floris Bos <bos@je-eigen-domein.nl> > Thomas> If not using font-config, Qt 5 offers a set of standard fonts to > Thomas> use instead. Install these to target. > > Should that then only happen if !BR2_PACKAGE_QT5BASE_FONTCONFIG? Could add a check to only execute QT5BASE_INSTALL_TARGET_FONTS if !BR2_PACKAGE_QT5BASE_FONTCONFIG, if that looks cleaner. But the standard Qt build script already causes that: == mkspecs/features/qpa/genericunixfontdatabase.prf CONFIG += qpa/basicunixfontdatabase contains(QT_CONFIG, fontconfig) { DEFINES += Q_FONTCONFIGDATABASE LIBS += -lfontconfig } else { fonts.path = $$[QT_INSTALL_LIBS]/fonts fonts.files = $$QT_SOURCE_TREE/lib/fonts/* INSTALLS += fonts } == If fonts are not installed to staging (by INSTALLS += fonts), they are not copied to target either.
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 3b4c007..83ce999 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -172,9 +172,17 @@ define QT5BASE_INSTALL_TARGET_PLUGINS fi endef +define QT5BASE_INSTALL_TARGET_FONTS + if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \ + fi +endef + define QT5BASE_INSTALL_TARGET_CMDS $(QT5BASE_INSTALL_TARGET_LIBS) $(QT5BASE_INSTALL_TARGET_PLUGINS) + $(QT5BASE_INSTALL_TARGET_FONTS) endef $(eval $(generic-package))