[oe] [PATCH v2] qtbase: install and split package fonts

Eric Bénard eric at eukrea.com
Tue May 28 13:03:54 UTC 2013


- fonts were not installed (at least in qt 5.0.2) so install
them manually.
- split the font package in smaller package as done in qt4 to
save space on the target.

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
v2 : remove unecessary PACKAGES_DYNAMIC 

 recipes-qt/qt5/qtbase.inc |   29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
index f286274..b252e17 100644
--- a/recipes-qt/qt5/qtbase.inc
+++ b/recipes-qt/qt5/qtbase.inc
@@ -170,7 +170,32 @@ do_install_append() {
     # qemu built on host breaks do_package, remove it here (will be replaces with right qemu when do_compile is fixed
     # ERROR: objcopy failed with exit code 1 (cmd was 'arm-oe-linux-gnueabi-objcopy' --only-keep-debug '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/qmake' '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/.debug/qmake')
     rm -f ${D}/${bindir}/${QT_DIR_NAME}/qmake
+    # install fonts manually if they are missing
+    if [ ! -d ${D}/${libdir}/fonts ]; then
+        cp -a ${S}/lib/fonts ${D}/${libdir}
+    fi
 }
 
-PACKAGES =. "${PN}-fonts "
-FILES_${PN}-fonts = "${libdir}/${QT_DIR_NAME}/fonts ${libdir}/fonts"
+PACKAGES =. "${PN}-fonts \
+             ${PN}-fonts-ttf-vera \
+             ${PN}-fonts-ttf-dejavu \
+             ${PN}-fonts-pfa \
+             ${PN}-fonts-pfb \
+             ${PN}-fonts-qpf "
+
+RRECOMMENDS_${PN}-fonts = " \
+             ${PN}-fonts-ttf-vera \
+             ${PN}-fonts-ttf-dejavu \
+             ${PN}-fonts-pfa \
+             ${PN}-fonts-pfb \
+             ${PN}-fonts-qpf "
+
+ALLOW_EMPTY_${PN}-fonts = "1"
+
+FILES_${PN}-fonts-ttf-vera       = "${libdir}/${QT_DIR_NAME}/fonts/Vera*.ttf ${libdir}/fonts/Vera*.ttf"
+FILES_${PN}-fonts-ttf-dejavu     = "${libdir}/${QT_DIR_NAME}/fonts/DejaVu*.ttf ${libdir}/fonts/DejaVu*.ttf"
+FILES_${PN}-fonts-pfa            = "${libdir}/${QT_DIR_NAME}/fonts/*.pfa ${libdir}/fonts/*.pfa"
+FILES_${PN}-fonts-pfb            = "${libdir}/${QT_DIR_NAME}/fonts/*.pfb ${libdir}/fonts/*.pfb"
+FILES_${PN}-fonts-qpf            = "${libdir}/${QT_DIR_NAME}/fonts/*.qpf* ${libdir}/fonts/*.qpf*"
+FILES_${PN}-fonts                = "${libdir}/${QT_DIR_NAME}/fonts/README ${libdir}/fonts/README \
+                                    ${libdir}/${QT_DIR_NAME}/fonts/fontdir ${libdir}/fonts/fontdir"
-- 
1.7.10.4




More information about the Openembedded-devel mailing list