Gentoo Archives: gentoo-commits

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