From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1018F138350 for ; Sat, 25 Jan 2020 10:32:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71F84E083D; Sat, 25 Jan 2020 10:32:56 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4DA16E083D for ; Sat, 25 Jan 2020 10:32:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B139534E348 for ; Sat, 25 Jan 2020 10:32:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 30F7C103 for ; Sat, 25 Jan 2020 10:32:52 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1579948328.4cf52650cf5f437a1c845283e1121a251b7083e4.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/, net-im/telegram-desktop/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/telegram-desktop/Manifest net-im/telegram-desktop/files/0002-PPC-big-endian.patch net-im/telegram-desktop/files/0003-PPC-config.patch net-im/telegram-desktop/files/musl.patch net-im/telegram-desktop/metadata.xml net-im/telegram-desktop/telegram-desktop-1.9.8.ebuild X-VCS-Directories: net-im/telegram-desktop/ net-im/telegram-desktop/files/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 4cf52650cf5f437a1c845283e1121a251b7083e4 X-VCS-Branch: master Date: Sat, 25 Jan 2020 10:32:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2c85512c-efc6-4400-862f-bd767d9d001c X-Archives-Hash: e34bf03104329d04fe3ad4cee80424e1 commit: 4cf52650cf5f437a1c845283e1121a251b7083e4 Author: Georgy Yakovlev gentoo org> AuthorDate: Sat Jan 25 10:05:41 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Sat Jan 25 10:32:08 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cf52650 net-im/telegram-desktop: new package, source version should work on musl as well Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Georgy Yakovlev gentoo.org> net-im/telegram-desktop/Manifest | 1 + .../files/0002-PPC-big-endian.patch | 25 ++++ .../telegram-desktop/files/0003-PPC-config.patch | 28 ++++ net-im/telegram-desktop/files/musl.patch | 12 ++ net-im/telegram-desktop/metadata.xml | 11 ++ .../telegram-desktop/telegram-desktop-1.9.8.ebuild | 142 +++++++++++++++++++++ 6 files changed, 219 insertions(+) diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest new file mode 100644 index 00000000000..33d52dd8916 --- /dev/null +++ b/net-im/telegram-desktop/Manifest @@ -0,0 +1 @@ +DIST tdesktop-1.9.8-full.tar.gz 25225784 BLAKE2B d938dc5d82740f93c575f621697e4bae430dc045c18437957bead6cc949ad0643b0422d8fd2a1695af921ea7f259ca323094a4a7821855d842edfaf4f328c840 SHA512 5562eb99812a8faec74fe073323d6e04e36311c1e4ce984035212ecfed8bd5d12df92cd0f0022401201136315fb5556971b267b4bf47edf4eeddc9926c7969dc diff --git a/net-im/telegram-desktop/files/0002-PPC-big-endian.patch b/net-im/telegram-desktop/files/0002-PPC-big-endian.patch new file mode 100644 index 00000000000..b1af3deb587 --- /dev/null +++ b/net-im/telegram-desktop/files/0002-PPC-big-endian.patch @@ -0,0 +1,25 @@ +From d4c11502175e2a7821dbd92e029a90d54498e3e8 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Thu, 2 Jan 2020 12:57:33 +0100 +Subject: [PATCH] PPC big endian + +--- + Telegram/SourceFiles/config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h +index fb7b54e4d..6a873fbd7 100644 +--- a/Telegram/SourceFiles/config.h ++++ b/Telegram/SourceFiles/config.h +@@ -177,7 +177,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb"; + #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH + + #if Q_BYTE_ORDER == Q_BIG_ENDIAN +-#error "Only little endian is supported!" ++#warning "Only little endian is supported!" + #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN + + #if (TDESKTOP_ALPHA_VERSION != 0) +-- +2.24.1 + diff --git a/net-im/telegram-desktop/files/0003-PPC-config.patch b/net-im/telegram-desktop/files/0003-PPC-config.patch new file mode 100644 index 00000000000..95b7b639d58 --- /dev/null +++ b/net-im/telegram-desktop/files/0003-PPC-config.patch @@ -0,0 +1,28 @@ +From af5f8d19f0fdded987beee4568f02cc8dcbd20f4 Mon Sep 17 00:00:00 2001 +From: John Zimmermann +Date: Thu, 2 Jan 2020 12:58:45 +0100 +Subject: [PATCH] PPC config + +--- + base/build_config.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git Telegram/lib_base/base/build_config.h Telegram/lib_base/base/build_config.h +index a02c9b0..b3f4860 100644 +--- a/Telegram/lib_base/base/build_config.h ++++ b/Telegram/lib_base/base/build_config.h +@@ -46,9 +46,9 @@ + #define ARCH_CPU_X86_FAMILY 1 + #define ARCH_CPU_X86 1 + #define ARCH_CPU_32_BITS 1 +-#elif defined(__aarch64__) ++#elif defined(__aarch64__) || defined(__powerpc64__) + #define ARCH_CPU_64_BITS 1 +-#elif defined(_M_ARM) || defined(__arm__) ++#elif defined(_M_ARM) || defined(__arm__) || defined(__powerpc__) + #define ARCH_CPU_32_BITS 1 + #else + #error Please add support for your architecture in base/build_config.h +-- +2.24.1 + diff --git a/net-im/telegram-desktop/files/musl.patch b/net-im/telegram-desktop/files/musl.patch new file mode 100644 index 00000000000..dece8ec216f --- /dev/null +++ b/net-im/telegram-desktop/files/musl.patch @@ -0,0 +1,12 @@ +Should send this one upstream; it would work with glibc as well. + +--- tdesktop-1.9.6-full/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp.old 2020-01-21 12:16:27.000000000 +0000 ++++ tdesktop-1.9.6-full/Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp 2020-01-22 17:44:42.185530350 +0000 +@@ -6,6 +6,7 @@ + + #include "AudioPulse.h" + #include ++#include + #include "../../logging.h" + + #define DECLARE_DL_FUNCTION(name) typeof(name)* AudioPulse::_import_##name=NULL diff --git a/net-im/telegram-desktop/metadata.xml b/net-im/telegram-desktop/metadata.xml new file mode 100644 index 00000000000..36b8a035d4c --- /dev/null +++ b/net-im/telegram-desktop/metadata.xml @@ -0,0 +1,11 @@ + + + + + gyakovlev@gentoo.org + Georgy Yakovlev + + + Enable GTK3 integration (tray, theme, filepicker, etc) + + diff --git a/net-im/telegram-desktop/telegram-desktop-1.9.8.ebuild b/net-im/telegram-desktop/telegram-desktop-1.9.8.ebuild new file mode 100644 index 00000000000..a5baf8e9c57 --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-1.9.8.ebuild @@ -0,0 +1,142 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +inherit cmake desktop flag-o-matic python-any-r1 xdg-utils + +MY_P="tdesktop-${PV}-full" + +DESCRIPTION="Official desktop client for Telegram" +HOMEPAGE="https://desktop.telegram.org" +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" + +LICENSE="GPL-3-with-openssl-exception Unlicense" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" +IUSE="dbus gtk3 spell" + +RDEPEND="!net-im/telegram-desktop-bin + app-arch/lz4 + app-arch/xz-utils + dev-libs/openssl:0 + dev-libs/xxhash + dev-qt/qtcore:5 + dev-qt/qtgui:5[png,X(-)] + dev-qt/qtimageformats:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5[png,X(-)] + media-libs/openal[pulseaudio] + media-libs/opus + media-sound/pulseaudio + sys-libs/zlib[minizip] + virtual/ffmpeg + x11-libs/libva[X,drm] + x11-libs/libX11 + dbus? ( dev-qt/qtdbus:5 ) + gtk3? ( + dev-libs/libappindicator:3 + x11-libs/gtk+:3 + ) + spell? ( app-text/enchant ) +" + +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +BDEPEND=" + >=dev-util/cmake-3.16 + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/0002-PPC-big-endian.patch" + "${FILESDIR}/0003-PPC-config.patch" + "${FILESDIR}/musl.patch" +) + +S="${WORKDIR}/${MY_P}" + +src_configure() { + local mycxxflags=( + -Wno-deprecated-declarations + -Wno-error=deprecated-declarations + -Wno-switch + ) + + append-cxxflags "${mycxxflags[@]}" + + local mycmakeargs=( + -Ddisable_autoupdate=1 + -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON + -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF + -DDESKTOP_APP_USE_PACKAGED=ON + -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF + -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON + -DTDESKTOP_LAUNCHER_BASENAME="${PN}" + -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF + -DDESKTOP_APP_DISABLE_SPELLCHECK="$(usex spell OFF ON)" + -DTDESKTOP_DISABLE_GTK_INTEGRATION="$(usex gtk3 OFF ON)" + -DTDESKTOP_DISABLE_DBUS_INTEGRATION="$(usex dbus OFF ON)" + -DTDESKTOP_FORCE_GTK_FILE_DIALOG="$(usex gtk3)" + ) + + if [[ -n ${MY_TDESKTOP_API_ID} && -n ${MY_TDESKTOP_API_HASH} ]]; then + einfo "Found custom API credentials" + mycmakeargs+=( + -DTDESKTOP_API_ID="${MY_TDESKTOP_API_ID}" + -DTDESKTOP_API_HASH="${MY_TDESKTOP_API_HASH}" + ) + else + mycmakeargs+=( -DTDESKTOP_API_TEST=ON ) + ewarn + ewarn "Building ${PN} with test API credentials." + ewarn "Connectivity to API servers will be throttled." + ewarn "To build ${PN} custom API credentials cancel build now and obtain" + ewarn "credentials here: https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md" + ewarn "After getting credentials you can export variables:" + ewarn "export MY_TDESKTOP_API_ID=\"17349\"" + ewarn "export MY_TDESKTOP_API_HASH=\"344583e45741c457fe1862106095a5eb\"" + ewarn "and restart the build" + ewarn "you can save variables in /etc/portage/env/${CATEGORY}/${PN}" + ewarn "portage will use the file every build automatically" + ewarn + fi + + cmake_src_configure +} + +src_install() { + dobin "${BUILD_DIR}/bin/${PN}" + + newmenu lib/xdg/telegramdesktop.desktop "${PN}.desktop" + + local icon_size + for icon_size in 16 32 48 64 128 256 512 + do + newicon -s ${icon_size} \ + Telegram/Resources/art/icon${icon_size}.png telegram.png + done + + insinto /usr/share/appdata + doins lib/xdg/telegramdesktop.appdata.xml + + insinto /usr/share/kservices5 + doins lib/xdg/tg.protocol + + einstalldocs +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +}