From cedcfb3fe7b00de8c050015f52df425eae92d13f Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 21 Sep 2018 01:09:35 +0300 Subject: [PATCH] qt5-base: create symlink '$PREFIX/lib/fonts' --> '/system/fonts' if possible Quick fix for applications that require fonts. --- x11-packages/qt5-base/build.sh | 6 ++++++ x11-packages/qt5-base/postinst | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100755 x11-packages/qt5-base/postinst diff --git a/x11-packages/qt5-base/build.sh b/x11-packages/qt5-base/build.sh index e5c84facd..a46267e63 100644 --- a/x11-packages/qt5-base/build.sh +++ b/x11-packages/qt5-base/build.sh @@ -219,3 +219,9 @@ termux_step_make_install() { find "${TERMUX_PREFIX}/lib" -type f -name '*.prl' \ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \; } + +termux_step_create_debscripts() { + ## FIXME: Qt should be built with fontconfig somehow instead + ## of using direct path to fonts. + cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./ +} diff --git a/x11-packages/qt5-base/postinst b/x11-packages/qt5-base/postinst new file mode 100755 index 000000000..06b02c3fa --- /dev/null +++ b/x11-packages/qt5-base/postinst @@ -0,0 +1,7 @@ +#!/data/data/com.termux/files/usr/bin/sh + +if [ ! -e "/data/data/com.termux/files/usr/lib/fonts" ]; then + if [ -d "/system/fonts" ]; then + ln -sf /system/fonts /data/data/com.termux/files/usr/lib/fonts + fi +fi