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: Tue, 28 Jan 2020 22:41:03
Message-Id: 1580251230.cb1d17dfaeaa03a5f5ccf8249f12af9172cffb47.gyakovlev@gentoo
1 commit: cb1d17dfaeaa03a5f5ccf8249f12af9172cffb47
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 28 22:39:47 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 28 22:40:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb1d17df
7
8 net-im/telegram-desktop: bump to 1.9.9
9
10 make installable with old QT
11
12 Package-Manager: Portage-2.3.84, Repoman-2.3.20
13 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
14
15 net-im/telegram-desktop/Manifest | 1 +
16 .../telegram-desktop/telegram-desktop-1.9.9.ebuild | 147 +++++++++++++++++++++
17 2 files changed, 148 insertions(+)
18
19 diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest
20 index 33d52dd8916..bc46d259999 100644
21 --- a/net-im/telegram-desktop/Manifest
22 +++ b/net-im/telegram-desktop/Manifest
23 @@ -1 +1,2 @@
24 DIST tdesktop-1.9.8-full.tar.gz 25225784 BLAKE2B d938dc5d82740f93c575f621697e4bae430dc045c18437957bead6cc949ad0643b0422d8fd2a1695af921ea7f259ca323094a4a7821855d842edfaf4f328c840 SHA512 5562eb99812a8faec74fe073323d6e04e36311c1e4ce984035212ecfed8bd5d12df92cd0f0022401201136315fb5556971b267b4bf47edf4eeddc9926c7969dc
25 +DIST tdesktop-1.9.9-full.tar.gz 25221934 BLAKE2B c8f6252fd6e72785a39c92f04e5dadf322775fc1a178f2c6dac9e38cb654b9eb924c16cffcf9dc47e2e309e4f27a13ea07235146e7d7960b6bd0a342a3645e03 SHA512 ba6400e6f5eec5bda6e8a54b43846e695b2cce731cb6b39f17407cc39e3e9b8078d977253d29962671f30e33dbe012f8e40f340f781fd8ca73487e5f2d42e3de
26
27 diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.9.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.9.ebuild
28 new file mode 100644
29 index 00000000000..df6aae21674
30 --- /dev/null
31 +++ b/net-im/telegram-desktop/telegram-desktop-1.9.9.ebuild
32 @@ -0,0 +1,147 @@
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} )
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 Unlicense"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~ppc64"
51 +IUSE="dbus gtk3 libressl spell"
52 +
53 +RDEPEND="!net-im/telegram-desktop-bin
54 + app-arch/lz4
55 + app-arch/xz-utils
56 + !libressl? ( dev-libs/openssl:0= )
57 + libressl? ( dev-libs/libressl:0= )
58 + dev-libs/range-v3
59 + dev-libs/xxhash
60 + dev-qt/qtcore:5
61 + dev-qt/qtimageformats:5
62 + dev-qt/qtnetwork:5
63 + media-libs/openal[pulseaudio]
64 + media-libs/opus
65 + media-sound/pulseaudio
66 + sys-libs/zlib[minizip]
67 + virtual/ffmpeg
68 + x11-libs/libva[X,drm]
69 + x11-libs/libX11
70 + || (
71 + dev-qt/qtgui:5[png,X(-)]
72 + dev-qt/qtgui:5[png,xcb(-)]
73 + )
74 + || (
75 + dev-qt/qtwidgets:5[png,X(-)]
76 + dev-qt/qtwidgets:5[png,xcb(-)]
77 + )
78 + dbus? ( dev-qt/qtdbus:5 )
79 + gtk3? (
80 + dev-libs/libappindicator:3
81 + x11-libs/gtk+:3
82 + )
83 + spell? ( app-text/enchant )
84 +"
85 +
86 +DEPEND="${RDEPEND}
87 + ${PYTHON_DEPS}"
88 +
89 +BDEPEND="
90 + >=dev-util/cmake-3.16
91 + virtual/pkgconfig
92 +"
93 +
94 +PATCHES=(
95 + "${FILESDIR}/0002-PPC-big-endian.patch"
96 + "${FILESDIR}/0003-PPC-config.patch"
97 + "${FILESDIR}/musl.patch"
98 +)
99 +
100 +S="${WORKDIR}/${MY_P}"
101 +
102 +src_configure() {
103 + local mycxxflags=(
104 + -Wno-deprecated-declarations
105 + -Wno-error=deprecated-declarations
106 + -Wno-switch
107 + )
108 +
109 + append-cxxflags "${mycxxflags[@]}"
110 +
111 + local mycmakeargs=(
112 + -Ddisable_autoupdate=1
113 + -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
114 + -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
115 + -DDESKTOP_APP_USE_PACKAGED=ON
116 + -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
117 + -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
118 + -DTDESKTOP_LAUNCHER_BASENAME="${PN}"
119 + -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF
120 + -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)"
121 + -DTDESKTOP_DISABLE_GTK_INTEGRATION="$(usex gtk3 OFF ON)"
122 + -DTDESKTOP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)"
123 + -DTDESKTOP_FORCE_GTK_FILE_DIALOG="$(usex gtk3)"
124 + )
125 +
126 + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then
127 + einfo "Found custom API credentials"
128 + mycmakeargs+=(
129 + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}"
130 + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}"
131 + )
132 + else
133 + mycmakeargs+=( -DTDESKTOP_API_TEST=ON )
134 + ewarn
135 + ewarn "Building ${PN} with test API credentials."
136 + ewarn "Connectivity to API servers will be throttled."
137 + ewarn "To build ${PN} custom API credentials cancel build now and obtain"
138 + ewarn "credentials here: https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md"
139 + ewarn "After getting credentials you can export variables:"
140 + ewarn "export MY_TDESKTOP_API_ID=\"17349\""
141 + ewarn "export MY_TDESKTOP_API_HASH=\"344583e45741c457fe1862106095a5eb\""
142 + ewarn "and restart the build"
143 + ewarn "you can save variables in /etc/portage/env/${CATEGORY}/${PN}"
144 + ewarn "portage will use the file every build automatically"
145 + ewarn
146 + fi
147 +
148 + cmake_src_configure
149 +}
150 +
151 +src_install() {
152 + dobin "${BUILD_DIR}/bin/${PN}"
153 +
154 + newmenu lib/xdg/telegramdesktop.desktop "${PN}.desktop"
155 +
156 + local icon_size
157 + for icon_size in 16 32 48 64 128 256 512
158 + do
159 + newicon -s ${icon_size} \
160 + Telegram/Resources/art/icon${icon_size}.png telegram.png
161 + done
162 +
163 + insinto /usr/share/appdata
164 + doins lib/xdg/telegramdesktop.appdata.xml
165 +
166 + einstalldocs
167 +}
168 +
169 +pkg_postinst() {
170 + xdg_desktop_database_update
171 + xdg_icon_cache_update
172 + xdg_mimeinfo_database_update
173 +}
174 +
175 +pkg_postrm() {
176 + xdg_desktop_database_update
177 + xdg_icon_cache_update
178 + xdg_mimeinfo_database_update
179 +}