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: Wed, 19 Feb 2020 07:59:53
Message-Id: 1582099180.5d06b7ab66d9967a13c8d1cd5278920275383150.gyakovlev@gentoo
1 commit: 5d06b7ab66d9967a13c8d1cd5278920275383150
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 19 07:59:24 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 19 07:59:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d06b7ab
7
8 net-im/telegram-desktop: bump to 1.9.14
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 net-im/telegram-desktop/Manifest | 1 +
14 .../telegram-desktop-1.9.14.ebuild | 136 +++++++++++++++++++++
15 2 files changed, 137 insertions(+)
16
17 diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
18 index 428d9676872..55bd06169ea 100644
19 --- a/net-im/telegram-desktop/Manifest
20 +++ b/net-im/telegram-desktop/Manifest
21 @@ -1 +1,2 @@
22 DIST tdesktop-1.9.13-full.tar.gz 25324119 BLAKE2B 70029ea0dd68fd4be3ba540831111b79d223e059f70551a970847190b00f2aaebc13319236b2c681b2a55ee99408d20e6feea3fc3ab2fb9c97d4740fd4c6a644 SHA512 995face8a2ffb54f9f31aaa8d5a26421f4915e73360945553b6fa4e4b02431ca83ec1e72d6d2ce77f5b9daa39892859c88f7ea53c3ddbeec2cb37f27451878d2
23 +DIST tdesktop-1.9.14-full.tar.gz 25324084 BLAKE2B 45c071aa573541b6e483d2ae712b7f3b672c1294e8e7e624d9292f7176482f4d68069c35541019dc27fdb1c66134c29fb4d3667f1197e7085e4f8a80c8ca603c SHA512 56efa64048d23b280782b51319c0071c6cef833cb7e2584e52c6e45488577755beb85185ec9187029c425cc8d4c9c1887142687c744697e7731a15abe2846056
24
25 diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.14.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.14.ebuild
26 new file mode 100644
27 index 00000000000..620b15ce23a
28 --- /dev/null
29 +++ b/net-im/telegram-desktop/telegram-desktop-1.9.14.ebuild
30 @@ -0,0 +1,136 @@
31 +# Copyright 2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{6,7} )
37 +
38 +inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
39 +
40 +MY_P="tdesktop-${PV}-full"
41 +
42 +DESCRIPTION="Official desktop client for Telegram"
43 +HOMEPAGE="https://desktop.telegram.org"
44 +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
45 +
46 +LICENSE="GPL-3-with-openssl-exception"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~ppc64"
49 +IUSE="+alsa dbus libressl pulseaudio spell"
50 +
51 +RDEPEND="
52 + !net-im/telegram-desktop-bin
53 + app-arch/lz4:=
54 + app-arch/xz-utils
55 + !libressl? ( dev-libs/openssl:0= )
56 + libressl? ( dev-libs/libressl:0= )
57 + >=dev-cpp/ms-gsl-2.1.0
58 + dev-cpp/range-v3
59 + dev-libs/libdbusmenu-qt[qt5(+)]
60 + dev-libs/xxhash
61 + dev-qt/qtcore:5
62 + dev-qt/qtdbus:5
63 + dev-qt/qtimageformats:5
64 + dev-qt/qtnetwork:5
65 + dev-qt/qtsvg:5
66 + media-libs/fontconfig:=
67 + >=media-libs/libtgvoip-2.4.4_p20200212[alsa?,pulseaudio?]
68 + media-libs/openal[alsa?,pulseaudio?]
69 + media-libs/opus:=
70 + media-video/ffmpeg:=[opus]
71 + sys-libs/zlib[minizip]
72 + virtual/libiconv
73 + x11-libs/libva:=[X,drm]
74 + x11-libs/libX11
75 + || (
76 + dev-qt/qtgui:5[jpeg,png,X(-)]
77 + dev-qt/qtgui:5[jpeg,png,xcb(-)]
78 + )
79 + || (
80 + dev-qt/qtwidgets:5[png,X(-)]
81 + dev-qt/qtwidgets:5[png,xcb(-)]
82 + )
83 + pulseaudio? ( media-sound/pulseaudio )
84 + spell? ( app-text/enchant:= )
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="|| ( alsa pulseaudio )"
98 +
99 +S="${WORKDIR}/${MY_P}"
100 +
101 +PATCHES=(
102 + "${FILESDIR}/0002-PPC-big-endian.patch"
103 +)
104 +
105 +src_configure() {
106 + local mycxxflags=(
107 + -Wno-deprecated-declarations
108 + -Wno-error=deprecated-declarations
109 + -Wno-switch
110 + )
111 +
112 + append-cxxflags "${mycxxflags[@]}"
113 +
114 + # TODO: unbundle header-only libs, ofc telegram uses git versions...
115 + # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
116 + # EXPECTED VARIANT
117 + local mycmakeargs=(
118 + -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
119 + -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
120 + -DDESKTOP_APP_USE_PACKAGED=ON
121 + -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
122 + -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
123 + -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
124 + -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
125 + -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
126 + -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)"
127 + -DTDESKTOP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
128 + )
129 +
130 + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
131 + einfo "Found custom API credentials"
132 + mycmakeargs+=(
133 + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
134 + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
135 + )
136 + else
137 + # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml
138 + # Building with snapcraft API credentials by default
139 + # Custom API credentials can be obtained here:
140 + # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md
141 + # After getting credentials you can export variables:
142 + # export MY_TDESKTOP_API_ID="17349""
143 + # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb"
144 + # and restart the build"
145 + # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop
146 + # portage will use custom variable every build automatically
147 + mycmakeargs+=(
148 + -DTDESKTOP_API_ID="611335"
149 + -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c"
150 + )
151 + fi
152 +
153 + cmake_src_configure
154 +}
155 +
156 +pkg_postinst() {
157 + xdg_desktop_database_update
158 + xdg_icon_cache_update
159 + xdg_mimeinfo_database_update
160 +}
161 +
162 +pkg_postrm() {
163 + xdg_desktop_database_update
164 + xdg_icon_cache_update
165 + xdg_mimeinfo_database_update
166 +}