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: Fri, 07 Feb 2020 08:10:51
Message-Id: 1581063029.71652501044a0e11b2bb237c7c8981900ab8c14e.gyakovlev@gentoo
1 commit: 71652501044a0e11b2bb237c7c8981900ab8c14e
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 7 08:08:29 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 7 08:10:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71652501
7
8 net-im/telegram-desktop: bump to 1.9.10
9
10 Package-Manager: Portage-2.3.87, 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.10.ebuild | 154 +++++++++++++++++++++
15 2 files changed, 155 insertions(+)
16
17 diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
18 index bc46d259999..d6b9348a43c 100644
19 --- a/net-im/telegram-desktop/Manifest
20 +++ b/net-im/telegram-desktop/Manifest
21 @@ -1,2 +1,3 @@
22 +DIST tdesktop-1.9.10-full.tar.gz 25272713 BLAKE2B 26b2eb49b5b55dac21be46d37ff7ddd3b6ea4490e58d8a04aaada3237b81cfbb87f2422d179882407501db2a597718f4974629791c8d3f165673fe953bdecbf6 SHA512 128dc3fd42196ebf61853917914c3d33fb148d3e6b04847ffa6d4df5baa8d9e286e7d25317b0dd2a332f1475f60b5addd19bb6e25a0fa6bbca316c22235569c6
23 DIST tdesktop-1.9.8-full.tar.gz 25225784 BLAKE2B d938dc5d82740f93c575f621697e4bae430dc045c18437957bead6cc949ad0643b0422d8fd2a1695af921ea7f259ca323094a4a7821855d842edfaf4f328c840 SHA512 5562eb99812a8faec74fe073323d6e04e36311c1e4ce984035212ecfed8bd5d12df92cd0f0022401201136315fb5556971b267b4bf47edf4eeddc9926c7969dc
24 DIST tdesktop-1.9.9-full.tar.gz 25221934 BLAKE2B c8f6252fd6e72785a39c92f04e5dadf322775fc1a178f2c6dac9e38cb654b9eb924c16cffcf9dc47e2e309e4f27a13ea07235146e7d7960b6bd0a342a3645e03 SHA512 ba6400e6f5eec5bda6e8a54b43846e695b2cce731cb6b39f17407cc39e3e9b8078d977253d29962671f30e33dbe012f8e40f340f781fd8ca73487e5f2d42e3de
25
26 diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.10.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.10.ebuild
27 new file mode 100644
28 index 00000000000..d08b1979022
29 --- /dev/null
30 +++ b/net-im/telegram-desktop/telegram-desktop-1.9.10.ebuild
31 @@ -0,0 +1,154 @@
32 +# Copyright 2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{6,7} )
38 +
39 +inherit cmake desktop flag-o-matic python-any-r1 xdg-utils
40 +
41 +MY_P="tdesktop-${PV}-full"
42 +
43 +DESCRIPTION="Official desktop client for Telegram"
44 +HOMEPAGE="https://desktop.telegram.org"
45 +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz"
46 +
47 +LICENSE="GPL-3-with-openssl-exception Unlicense"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~ppc64"
50 +IUSE="dbus gtk3 libressl spell"
51 +
52 +RDEPEND="!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/xxhash
60 + dev-qt/qtcore:5
61 + dev-qt/qtimageformats:5
62 + dev-qt/qtnetwork:5
63 + media-libs/fontconfig:=
64 + media-libs/openal[pulseaudio]
65 + media-libs/opus
66 + media-sound/pulseaudio
67 + sys-libs/zlib[minizip]
68 + virtual/ffmpeg
69 + x11-libs/libva[X,drm]
70 + x11-libs/libX11
71 + || (
72 + dev-qt/qtgui:5[png,X(-)]
73 + dev-qt/qtgui:5[png,xcb(-)]
74 + )
75 + || (
76 + dev-qt/qtwidgets:5[png,X(-)]
77 + dev-qt/qtwidgets:5[png,xcb(-)]
78 + )
79 + dbus? ( dev-qt/qtdbus:5 )
80 + gtk3? (
81 + dev-libs/libappindicator:3
82 + x11-libs/gtk+:3
83 + sys-apps/xdg-desktop-portal
84 + )
85 + spell? ( app-text/enchant:= )
86 +"
87 +
88 +DEPEND="${RDEPEND}
89 + ${PYTHON_DEPS}"
90 +
91 +BDEPEND="
92 + >=dev-util/cmake-3.16
93 + virtual/pkgconfig
94 +"
95 +
96 +PATCHES=(
97 + "${FILESDIR}/0002-PPC-big-endian.patch"
98 + "${FILESDIR}/musl.patch"
99 +)
100 +
101 +S="${WORKDIR}/${MY_P}"
102 +
103 +src_configure() {
104 + local mycxxflags=(
105 + -Wno-deprecated-declarations
106 + -Wno-error=deprecated-declarations
107 + -Wno-switch
108 + )
109 +
110 + append-cxxflags "${mycxxflags[@]}"
111 +
112 + # TODO: unbundle header-only libs, ofc telegram uses git versions...
113 + # it fals with tl-expected-1.0.0, so we use bundled for now to avoid git rev snapshots
114 + # EXPECTED VARIANT
115 + local mycmakeargs=(
116 + -Ddisable_autoupdate=1
117 + -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
118 + -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
119 + -DDESKTOP_APP_USE_PACKAGED=ON
120 + -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF
121 + -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
122 + -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF
123 + -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
124 + -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
125 + -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF
126 + -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)"
127 + -DTDESKTOP_DISABLE_GTK_INTEGRATION="$(usex gtk3 OFF ON)"
128 + -DTDESKTOP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
129 + -DTDESKTOP_FORCE_GTK_FILE_DIALOG="$(usex gtk3)"
130 + )
131 +
132 + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
133 + einfo "Found custom API credentials"
134 + mycmakeargs+=(
135 + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
136 + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
137 + )
138 + else
139 + mycmakeargs+=( -DTDESKTOP_API_TEST=ON )
140 + ewarn
141 + ewarn "Building ${PN} with test API credentials."
142 + ewarn "Connectivity to API servers will be throttled."
143 + ewarn "To build ${PN} custom API credentials cancel build now and obtain"
144 + ewarn "credentials here: https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md"
145 + ewarn "After getting credentials you can export variables:"
146 + ewarn "export MY_TDESKTOP_API_ID=\"17349\""
147 + ewarn "export MY_TDESKTOP_API_HASH=\"344583e45741c457fe1862106095a5eb\""
148 + ewarn "and restart the build"
149 + ewarn "you can save variables in /etc/portage/env/${CATEGORY}/${PN}"
150 + ewarn "portage will use the file every build automatically"
151 + ewarn
152 + fi
153 +
154 + cmake_src_configure
155 +}
156 +
157 +src_install() {
158 + dobin "${BUILD_DIR}/bin/${PN}"
159 +
160 + newmenu lib/xdg/telegramdesktop.desktop "${PN}.desktop"
161 +
162 + local icon_size
163 + for icon_size in 16 32 48 64 128 256 512
164 + do
165 + newicon -s ${icon_size} \
166 + Telegram/Resources/art/icon${icon_size}.png telegram.png
167 + done
168 +
169 + insinto /usr/share/appdata
170 + doins lib/xdg/telegramdesktop.appdata.xml
171 +
172 + einstalldocs
173 +}
174 +
175 +pkg_postinst() {
176 + xdg_desktop_database_update
177 + xdg_icon_cache_update
178 + xdg_mimeinfo_database_update
179 +}
180 +
181 +pkg_postrm() {
182 + xdg_desktop_database_update
183 + xdg_icon_cache_update
184 + xdg_mimeinfo_database_update
185 +}