1 |
commit: f6962f3d6b96d6cb64bdb8ae0fd04658cefcdd73 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 2 00:32:17 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 2 00:43:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6962f3d |
7 |
|
8 |
net-im/telegram-desktop: bump to 2.1.1 |
9 |
|
10 |
add a warning about ccache not caching build by default |
11 |
use bundled ms-gsl for now, as we need version 3.0.1 in gentoo |
12 |
|
13 |
Bug: https://bugs.gentoo.org/715114 |
14 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
15 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
16 |
|
17 |
net-im/telegram-desktop/Manifest | 1 + |
18 |
.../telegram-desktop/telegram-desktop-2.1.1.ebuild | 145 +++++++++++++++++++++ |
19 |
2 files changed, 146 insertions(+) |
20 |
|
21 |
diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest |
22 |
index 027ce251088..6587a8402ed 100644 |
23 |
--- a/net-im/telegram-desktop/Manifest |
24 |
+++ b/net-im/telegram-desktop/Manifest |
25 |
@@ -1,2 +1,3 @@ |
26 |
DIST tdesktop-2.0.1-full.tar.gz 26106949 BLAKE2B 3975e7d42af8b323a86408e2301b292d94b308413bb92d135673fb12851cd6672156dcf9b631482fa9b8dc9361d9593dc1104c8c335e0c610706b308414db01b SHA512 99cd7c5ca1e9dd75ecd98d272522b0e4aab2d46525e3d0c306503b7a00c9d25c1646e9d7462182682a58947c7435864af805a3b6f85906d8b21e5675cc8383cb |
27 |
DIST tdesktop-2.1.0-full.tar.gz 26133964 BLAKE2B c5eb476ea3ed02c2618e5b770bdce365bcf0d6124f75558570189e07e9dcd9f6f3282d53fec621be736cbd1269a9dd820629d4d9a36167d8f71109bfcd5a52e2 SHA512 46f5453c64d1dbd4cf8adde73fcc48e6b6f795972ab0f6516cb55112f47d5af990a049da356bedb81e6d3f7103c14a7be45369ff9a5a1812c07a1bfcda70646d |
28 |
+DIST tdesktop-2.1.1-full.tar.gz 26178569 BLAKE2B 377820af9d2ceeab18fa1ca0458803770b9e1cf211ba9bac7f21ae75fcb8e59269ad742c9fc0acd1b6d484d36057c872146cfdba0653bd2461f3a585222cf0b0 SHA512 aa542c029ead2d1b6c398ecca949b86fae8f37094ceb462ace4628f8e53882faf35b3c2e4fe03dd2e4e17b07412896f7b05d6748b13c99a3bac117b7449d69a8 |
29 |
|
30 |
diff --git a/net-im/telegram-desktop/telegram-desktop-2.1.1.ebuild b/net-im/telegram-desktop/telegram-desktop-2.1.1.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..9dad2e7e8a3 |
33 |
--- /dev/null |
34 |
+++ b/net-im/telegram-desktop/telegram-desktop-2.1.1.ebuild |
35 |
@@ -0,0 +1,145 @@ |
36 |
+# Copyright 2020 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
42 |
+ |
43 |
+inherit cmake desktop flag-o-matic python-any-r1 xdg-utils |
44 |
+ |
45 |
+MY_P="tdesktop-${PV}-full" |
46 |
+ |
47 |
+DESCRIPTION="Official desktop client for Telegram" |
48 |
+HOMEPAGE="https://desktop.telegram.org" |
49 |
+SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" |
50 |
+ |
51 |
+LICENSE="GPL-3-with-openssl-exception" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64 ~ppc64" |
54 |
+IUSE="+alsa +dbus enchant +hunspell libressl pulseaudio +spell wayland +X" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ !net-im/telegram-desktop-bin |
58 |
+ app-arch/lz4:= |
59 |
+ app-arch/xz-utils |
60 |
+ !libressl? ( dev-libs/openssl:0= ) |
61 |
+ libressl? ( dev-libs/libressl:0= ) |
62 |
+ dev-cpp/range-v3 |
63 |
+ dev-libs/xxhash |
64 |
+ dev-qt/qtcore:5 |
65 |
+ dev-qt/qtgui:5[jpeg,png,wayland?,X(-)?] |
66 |
+ dev-qt/qtimageformats:5 |
67 |
+ dev-qt/qtnetwork:5 |
68 |
+ dev-qt/qtsvg:5 |
69 |
+ dev-qt/qtwidgets:5[png,X(-)?] |
70 |
+ media-fonts/open-sans |
71 |
+ media-libs/fontconfig:= |
72 |
+ >=media-libs/libtgvoip-2.4.4_p20200301[alsa?,pulseaudio?] |
73 |
+ media-libs/openal[alsa?,pulseaudio?] |
74 |
+ media-libs/opus:= |
75 |
+ media-video/ffmpeg:=[alsa?,opus,pulseaudio?] |
76 |
+ sys-libs/zlib[minizip] |
77 |
+ virtual/libiconv |
78 |
+ dbus? ( |
79 |
+ dev-qt/qtdbus:5 |
80 |
+ dev-libs/libdbusmenu-qt[qt5(+)] |
81 |
+ ) |
82 |
+ enchant? ( app-text/enchant:= ) |
83 |
+ hunspell? ( >=app-text/hunspell-1.7:= ) |
84 |
+ pulseaudio? ( media-sound/pulseaudio ) |
85 |
+" |
86 |
+ |
87 |
+DEPEND=" |
88 |
+ ${PYTHON_DEPS} |
89 |
+ ${RDEPEND} |
90 |
+" |
91 |
+ |
92 |
+BDEPEND=" |
93 |
+ >=dev-util/cmake-3.16 |
94 |
+ virtual/pkgconfig |
95 |
+" |
96 |
+ |
97 |
+REQUIRED_USE=" |
98 |
+ || ( alsa pulseaudio ) |
99 |
+ || ( X wayland ) |
100 |
+ spell? ( |
101 |
+ ^^ ( enchant hunspell ) |
102 |
+ ) |
103 |
+" |
104 |
+ |
105 |
+S="${WORKDIR}/${MY_P}" |
106 |
+ |
107 |
+pkg_pretend() { |
108 |
+ if has ccache ${FEATURES}; then |
109 |
+ ewarn |
110 |
+ ewarn "ccache does not work with ${PN} out of the box" |
111 |
+ ewarn "due to usage of precompiled headers" |
112 |
+ ewarn "check bug https://bugs.gentoo.org/715114 for more info" |
113 |
+ ewarn |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ local mycxxflags=( |
119 |
+ -Wno-deprecated-declarations |
120 |
+ -Wno-error=deprecated-declarations |
121 |
+ -Wno-switch |
122 |
+ ) |
123 |
+ |
124 |
+ append-cxxflags "${mycxxflags[@]}" |
125 |
+ |
126 |
+ # TODO: unbundle header-only libs, ofc telegram uses git versions... |
127 |
+ # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots |
128 |
+ # EXPECTED VARIANT |
129 |
+ # TODO: unbundle GSL, version 3.0.1 required and has nasty googletest dep |
130 |
+ local mycmakeargs=( |
131 |
+ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON |
132 |
+ -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF |
133 |
+ -DDESKTOP_APP_USE_PACKAGED=ON |
134 |
+ -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF |
135 |
+ -DDESKTOP_APP_USE_PACKAGED_GSL=OFF |
136 |
+ -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF |
137 |
+ -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF |
138 |
+ -DTDESKTOP_LAUNCHER_BASENAME="${PN}" |
139 |
+ -DDESKTOP_APP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)" |
140 |
+ -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" # enables hunspell (recommended) |
141 |
+ -DDESKTOP_APP_USE_ENCHANT="$(usex enchant ON OFF)" # enables enchant and disables hunspell |
142 |
+ ) |
143 |
+ |
144 |
+ if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then |
145 |
+ einfo "Found custom API credentials" |
146 |
+ mycmakeargs+=( |
147 |
+ -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" |
148 |
+ -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" |
149 |
+ ) |
150 |
+ else |
151 |
+ # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml |
152 |
+ # Building with snapcraft API credentials by default |
153 |
+ # Custom API credentials can be obtained here: |
154 |
+ # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md |
155 |
+ # After getting credentials you can export variables: |
156 |
+ # export MY_TDESKTOP_API_ID="17349"" |
157 |
+ # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" |
158 |
+ # and restart the build" |
159 |
+ # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop |
160 |
+ # portage will use custom variable every build automatically |
161 |
+ mycmakeargs+=( |
162 |
+ -DTDESKTOP_API_ID="611335" |
163 |
+ -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" |
164 |
+ ) |
165 |
+ fi |
166 |
+ |
167 |
+ cmake_src_configure |
168 |
+} |
169 |
+ |
170 |
+pkg_postinst() { |
171 |
+ xdg_desktop_database_update |
172 |
+ xdg_icon_cache_update |
173 |
+ xdg_mimeinfo_database_update |
174 |
+} |
175 |
+ |
176 |
+pkg_postrm() { |
177 |
+ xdg_desktop_database_update |
178 |
+ xdg_icon_cache_update |
179 |
+ xdg_mimeinfo_database_update |
180 |
+} |