| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
PYTHON_COMPAT=( python3_{11..14} )
|
|
6 |
PYTHON_COMPAT=( python3_{12..15} )
|
| 7 |
7 |
|
| 8 |
8 |
inherit xdg cmake python-any-r1 optfeature flag-o-matic
|
| 9 |
9 |
|
| ... | ... | |
| 16 |
16 |
|
| 17 |
17 |
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
|
| 18 |
18 |
SLOT="0"
|
| 19 |
|
KEYWORDS="amd64 ~loong"
|
| 20 |
|
IUSE="dbus enchant +fonts +libdispatch screencast wayland webkit +X"
|
|
19 |
KEYWORDS="~amd64"
|
|
20 |
IUSE="dbus enchant +fonts screencast wayland webkit +X"
|
| 21 |
21 |
|
| 22 |
22 |
CDEPEND="
|
| 23 |
23 |
!net-im/telegram-desktop-bin
|
| 24 |
24 |
app-arch/lz4:=
|
|
25 |
app-text/cmark-gfm:=
|
| 25 |
26 |
dev-cpp/abseil-cpp:=
|
| 26 |
27 |
dev-cpp/ada:=
|
| 27 |
28 |
dev-cpp/cld3:=
|
| 28 |
29 |
>=dev-cpp/glibmm-2.77:2.68
|
|
30 |
dev-cpp/toomanycooks
|
| 29 |
31 |
dev-libs/glib:2
|
| 30 |
32 |
dev-libs/openssl:=
|
| 31 |
33 |
>=dev-libs/protobuf-21.12
|
| ... | ... | |
| 34 |
36 |
>=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,ssl,wayland?,widgets,X?]
|
| 35 |
37 |
>=dev-qt/qtimageformats-6.5:6
|
| 36 |
38 |
>=dev-qt/qtsvg-6.5:6
|
|
39 |
kde-frameworks/kcoreaddons:6
|
| 37 |
40 |
media-libs/libjpeg-turbo:=
|
| 38 |
41 |
media-libs/openal
|
| 39 |
42 |
media-libs/opus
|
| ... | ... | |
| 41 |
44 |
>=media-libs/tg_owt-0_pre20241202:=[screencast=,X=]
|
| 42 |
45 |
>=media-video/ffmpeg-6:=[opus,vpx]
|
| 43 |
46 |
net-libs/tdlib:=[tde2e]
|
|
47 |
sys-apps/hwloc:=
|
| 44 |
48 |
virtual/minizip:=
|
| 45 |
|
kde-frameworks/kcoreaddons:6
|
| 46 |
49 |
!enchant? ( >=app-text/hunspell-1.7:= )
|
| 47 |
50 |
enchant? ( app-text/enchant:= )
|
| 48 |
|
libdispatch? ( dev-libs/libdispatch )
|
| 49 |
51 |
webkit? ( wayland? (
|
| 50 |
52 |
>=dev-qt/qtdeclarative-6.5:6
|
| 51 |
53 |
>=dev-qt/qtwayland-6.5:6[compositor(+),qml]
|
| ... | ... | |
| 60 |
62 |
"
|
| 61 |
63 |
DEPEND="${CDEPEND}
|
| 62 |
64 |
>=dev-cpp/cppgir-2.0_p20240315
|
| 63 |
|
>=dev-cpp/ms-gsl-4.1.0
|
| 64 |
65 |
dev-cpp/expected
|
| 65 |
66 |
dev-cpp/expected-lite
|
|
67 |
>=dev-cpp/ms-gsl-4.1.0
|
| 66 |
68 |
dev-cpp/range-v3
|
| 67 |
69 |
"
|
| 68 |
70 |
BDEPEND="
|
| ... | ... | |
| 70 |
72 |
>=dev-build/cmake-3.16
|
| 71 |
73 |
>=dev-cpp/cppgir-2.0_p20260226
|
| 72 |
74 |
>=dev-libs/gobject-introspection-1.82.0-r2
|
|
75 |
dev-qt/qtshadertools
|
| 73 |
76 |
>=dev-util/gdbus-codegen-2.80.5-r1
|
| 74 |
77 |
virtual/pkgconfig
|
| 75 |
78 |
wayland? ( dev-util/wayland-scanner )
|
| 76 |
79 |
"
|
| 77 |
80 |
# NOTE: dev-cpp/expected-lite used indirectly by a dev-cpp/cppgir header file
|
|
81 |
# NOTE: sys-apps/hwloc is depended upon by dev-cpp/toomanycooks, but needs to
|
|
82 |
# cause SLOT rebuilds here, as dev-cpp/toomanycooks is header-only
|
| 78 |
83 |
|
| 79 |
84 |
PATCHES=(
|
| 80 |
|
"${FILESDIR}"/tdesktop-6.6.2-qt6-no-wayland.patch
|
| 81 |
|
"${FILESDIR}"/tdesktop-5.2.2-libdispatch.patch
|
|
85 |
"${FILESDIR}"/tdesktop-6.9.3-no-dispatch.patch
|
|
86 |
"${FILESDIR}"/tdesktop-6.9.3-qt6-no-wayland.patch
|
| 82 |
87 |
"${FILESDIR}"/tdesktop-5.7.2-cstring.patch
|
| 83 |
88 |
"${FILESDIR}"/tdesktop-5.8.3-cstdint.patch
|
| 84 |
89 |
"${FILESDIR}"/tdesktop-5.14.3-system-cppgir.patch
|
| 85 |
|
"${FILESDIR}"/tdesktop-6.5.1-zlib-1.3.2.patch
|
|
90 |
"${FILESDIR}"/tdesktop-6.9.3-use-pkgconfig-for-cmark-gfm.patch
|
| 86 |
91 |
)
|
| 87 |
92 |
|
| 88 |
93 |
pkg_pretend() {
|
| ... | ... | |
| 111 |
116 |
sed -e '/find_package(lz4 /d' -i cmake/external/lz4/CMakeLists.txt || die
|
| 112 |
117 |
sed -e '/find_package(Opus /d' -i cmake/external/opus/CMakeLists.txt || die
|
| 113 |
118 |
sed -e '/find_package(xxHash /d' -i cmake/external/xxhash/CMakeLists.txt || die
|
|
119 |
sed -e '/find_package(cmark-gfm\(-extensions\)\? /d' \
|
|
120 |
-i cmake/external/cmark_gfm/CMakeLists.txt || die
|
|
121 |
|
|
122 |
# Temporary workaround for https://bugs.gentoo.org/977603
|
|
123 |
sed -e '/find_package(minizip /d' \
|
|
124 |
-i cmake/external/minizip/CMakeLists.txt || die
|
| 114 |
125 |
|
| 115 |
126 |
# Greedily remove ThirdParty directories, keep only ones that interest us
|
| 116 |
127 |
local keep=(
|
| ... | ... | |
| 118 |
129 |
libprisma # Telegram-specific library, no stable releases
|
| 119 |
130 |
tgcalls # Telegram-specific library, no stable releases
|
| 120 |
131 |
xdg-desktop-portal # Only a few xml files are used with gdbus-codegen
|
|
132 |
MicroTeX # Telegram-specific fork, no stable releases
|
| 121 |
133 |
)
|
| 122 |
134 |
for x in Telegram/ThirdParty/*; do
|
| 123 |
135 |
has "${x##*/}" "${keep[@]}" || rm -r "${x}" || die
|
| ... | ... | |
| 161 |
173 |
# See https://bugs.gentoo.org/866055
|
| 162 |
174 |
append-cppflags -DNDEBUG
|
| 163 |
175 |
|
| 164 |
|
# https://github.com/telegramdesktop/tdesktop/issues/17437#issuecomment-1001160398
|
| 165 |
|
use !libdispatch && append-cppflags -DCRL_FORCE_QT
|
| 166 |
|
|
| 167 |
176 |
local no_webkit_wayland=$(use webkit && use wayland && echo no || echo yes)
|
| 168 |
177 |
local use_webkit_wayland=$(use webkit && use wayland && echo yes || echo no)
|
| 169 |
178 |
local mycmakeargs=(
|
| ... | ... | |
| 194 |
203 |
-DDESKTOP_APP_USE_ENCHANT=$(usex enchant)
|
| 195 |
204 |
## Use system fonts instead of bundled ones
|
| 196 |
205 |
-DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts)
|
| 197 |
|
## See tdesktop-*-libdispatch.patch
|
| 198 |
|
-DDESKTOP_APP_USE_LIBDISPATCH=$(usex libdispatch)
|
| 199 |
206 |
)
|
| 200 |
207 |
|
| 201 |
208 |
if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
|
| ... | ... | |
| 242 |
249 |
ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!"
|
| 243 |
250 |
ewarn
|
| 244 |
251 |
fi
|
| 245 |
|
if ! use libdispatch; then
|
| 246 |
|
ewarn "Disabling USE=libdispatch may cause performance degradation"
|
| 247 |
|
ewarn "due to fallback to poor QThreadPool! Please see"
|
| 248 |
|
ewarn "https://github.com/telegramdesktop/tdesktop/wiki/The-Packaged-Building-Mode"
|
| 249 |
|
ewarn
|
| 250 |
|
fi
|
| 251 |
252 |
optfeature_header
|
| 252 |
253 |
optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats:6[avif,heif,jpegxl]
|
| 253 |
254 |
}
|