--- /usr/portage/net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild 2022-04-25 04:11:16.000000000 +0200 +++ /usr/local/portage/net-im/telegram-desktop/telegram-desktop-3.6.1-r2.ebuild 2022-04-27 01:02:35.145705644 +0200 @@ -1,6 +1,13 @@ # Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# re-enabling user choosen fonts is based on Arch's AUR +# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?... +# h=telegram-desktop-userfonts&... +# id=cf5f652b57bb2978e2761b6b6bbcb668ab0ff1c5 +# +# here we use the fontconfig use flag + EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) @@ -17,7 +24,7 @@ LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" SLOT="0" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" -IUSE="+dbus enchant +hunspell +jemalloc screencast +spell wayland +X" +IUSE="+dbus enchant +fontconfig +hunspell +jemalloc screencast +spell wayland +X" REQUIRED_USE=" spell? ( ^^ ( enchant hunspell ) @@ -98,6 +105,16 @@ sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \ cmake/external/rlottie/CMakeLists.txt || die + if use fontconfig; then + # all files within that dir are referenced somewhere, hence we must + # not delete them + local ttf + for ttf in Telegram/lib_ui/fonts/*.ttf; do + rm "$ttf" + touch "$ttf" + done + fi + cmake_src_prepare } @@ -117,6 +134,9 @@ # See files/tdesktop-*-jemalloc-optional.patch -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc) ) + if use fontconfig; then + mycmakeargs+=( -DDESKTOP_APP_USE_PACKAGED_FONTS=OFF ) + fi if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then einfo "Found custom API credentials"