From 94e22fcd94f94697984263e2e5b018d05085f535 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Wed, 12 Apr 2017 15:30:43 +0300 Subject: [PATCH] Add preparing of qemu fontconfig to Ubuntu 16.04 provisioning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If normal fontconfig paths are used, qemu parses what ever files it finds from the toolchain sysroot and the rest from the system fonts. Fix by copying the system font configurations to a location which prefix that can't be found from the toolchain sysroot. Links must also be dereferenced or their targets remain pointing to the toolchain sysroot. Task-number: QTBUG-59966 Change-Id: I9710c9fdebe81114080f47f1f59b2a049f87c070 Reviewed-by: Simon Hausmann Reviewed-by: Tony Sarajärvi --- .../qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh index f978003b..9c906562 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/003-qemu.sh @@ -64,3 +64,15 @@ sudo update-binfmts --package qemu-arm --install arm \ # doesn't help since host version creates cache for a wrong architecture and running # armv7 fc-cache segfaults on QEMU. sudo DEBIAN_FRONTEND=noninteractive apt-get -y remove fonts-noto-cjk + +# If normal fontconfig paths are used, qemu parses what ever files it finds from +# the toolchain sysroot and the rest from the system fonts. Fix by copying the +# system font configurations to a location which prefix that can't be found from +# the toolchain sysroot. Links must also be dereferenced or their targets remain +# pointing to the toolchain sysroot. +QEMU_FONTCONFPATH=~/qemu_fonts +QEMU_FONTCONFFILE=$QEMU_FONTCONFPATH/fonts.qemu.conf +mkdir -p $QEMU_FONTCONFPATH +cp -Lr /etc/fonts/* $QEMU_FONTCONFPATH +sed $QEMU_FONTCONFPATH/fonts.conf -e "s:conf.d:$QEMU_FONTCONFPATH/conf.d:" > $QEMU_FONTCONFFILE +echo "export QEMU_SET_ENV=\"FONTCONFIG_FILE=$QEMU_FONTCONFFILE,FONTCONFIG_PATH=$QEMU_FONTCONFPATH\"" >> ~/.profile