From 494ca58c9f5243dd4b56557aa8c41bce76e95ec3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 11 Dec 2024 02:01:11 +0000 Subject: gentoo auto-resync : 11:12:2024 - 02:01:11 --- net-im/Manifest.gz | Bin 8917 -> 8927 bytes net-im/discord/Manifest | 4 +- net-im/discord/discord-0.0.76.ebuild | 146 ------------ net-im/discord/discord-0.0.77.ebuild | 146 ++++++++++++ net-im/telegram-desktop-bin/Manifest | 6 +- .../telegram-desktop-bin-5.8.2.ebuild | 64 ----- .../telegram-desktop-bin-5.9.0.ebuild | 64 +++++ net-im/telegram-desktop/Manifest | 4 +- .../telegram-desktop/telegram-desktop-5.7.2.ebuild | 262 --------------------- .../telegram-desktop/telegram-desktop-5.9.0.ebuild | 242 +++++++++++++++++++ 10 files changed, 459 insertions(+), 479 deletions(-) delete mode 100644 net-im/discord/discord-0.0.76.ebuild create mode 100644 net-im/discord/discord-0.0.77.ebuild delete mode 100644 net-im/telegram-desktop-bin/telegram-desktop-bin-5.8.2.ebuild create mode 100644 net-im/telegram-desktop-bin/telegram-desktop-bin-5.9.0.ebuild delete mode 100644 net-im/telegram-desktop/telegram-desktop-5.7.2.ebuild create mode 100644 net-im/telegram-desktop/telegram-desktop-5.9.0.ebuild (limited to 'net-im') diff --git a/net-im/Manifest.gz b/net-im/Manifest.gz index 24c8f2493cb6..a1b64124defb 100644 Binary files a/net-im/Manifest.gz and b/net-im/Manifest.gz differ diff --git a/net-im/discord/Manifest b/net-im/discord/Manifest index 6050192f3c99..58919c6a484f 100644 --- a/net-im/discord/Manifest +++ b/net-im/discord/Manifest @@ -1,4 +1,4 @@ AUX launcher.sh 498 BLAKE2B a3437542111d896df3d7a699c43a1fdd7c7c28fbf364e404549dbe6d65336da4dd5a08c87a2bdede83ab719c971362032db26ff84d55cecdf49bcdd076948dfc SHA512 894a603040aa8f46026326d6488b73252589c0f69793131e8b00e7663c15e4d27d2c9a80f88b6b32f80e34039b7188a1efce0915da1e9f07e916c7b7b8594443 -DIST discord-0.0.76.tar.gz 102127793 BLAKE2B 9e88f7ceea3e469bbd2cdcab19e9163bca456036f60f745bbcce4a20af4a8b0bd5d493abccb4e0ddb3efcff744c3d007568d7bb292f28f559fb1876caae08cef SHA512 3a5bdd4ce366f142c40e6acc4ab9faf1f61480c8aaa984abb3c37755e586ee2143c083af561595ff18f6587d3bceffe9d27c9b1069134abd612f63e7db636ee6 -EBUILD discord-0.0.76.ebuild 3932 BLAKE2B f23fb91524730f3c3e350d26799e715c811a1fe6e33f07f608860ce57d565b3e3a667c3f6219da18a101eafabedbecfda505d2f560e7f78b97eb871c8744b468 SHA512 6f5828bcfa52b777e29b58b267d8be95fc2ddb83891779f390ebff203daacdde4faa95b796ec77b38ee66713f617dffaf90222f857dd4b065553205d7f405569 +DIST discord-0.0.77.tar.gz 101797215 BLAKE2B 3966807c981d51e199c42e6f7c909b6939e0126d4131cf909fee1faac6d3056cf4441082eed67bf6ce56d94c75af1d78308d7401575574ca741f2547af595761 SHA512 c7f5a2ffa5e748911ae672e5eb0cc8d805547e9da5474826838f4bb45328937b7d7fa56ba036598fea88bb2b60a1133c591eff731573ded2f574e2664bc69817 +EBUILD discord-0.0.77.ebuild 3932 BLAKE2B f23fb91524730f3c3e350d26799e715c811a1fe6e33f07f608860ce57d565b3e3a667c3f6219da18a101eafabedbecfda505d2f560e7f78b97eb871c8744b468 SHA512 6f5828bcfa52b777e29b58b267d8be95fc2ddb83891779f390ebff203daacdde4faa95b796ec77b38ee66713f617dffaf90222f857dd4b065553205d7f405569 MISC metadata.xml 506 BLAKE2B ff098a1c9341a94ebb21da57c3028d3d96e884e19e3adf2df8d50b694a1ca3eee61f5dfd90eaa557a0a0eee769fd11dfa7bbf63308386a11faa56d13687e33c3 SHA512 56baf0a5323057b4af83a7b7d760b2b1e071e15ca4eef6546eab4104fbdd026906f68d8023a3155f492d8d93cd7022c5d0017372cbaf2894b94bd253b2ce3665 diff --git a/net-im/discord/discord-0.0.76.ebuild b/net-im/discord/discord-0.0.76.ebuild deleted file mode 100644 index 1af370033bc8..000000000000 --- a/net-im/discord/discord-0.0.76.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MY_PN="${PN/-bin/}" -MY_PV="${PV/-r*/}" - -CHROMIUM_LANGS=" - af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi - hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv - sw ta te th tr uk ur vi zh-CN zh-TW -" - -inherit chromium-2 desktop linux-info optfeature unpacker xdg - -DESCRIPTION="All-in-one voice and text chat for gamers" -HOMEPAGE="https://discord.com/" -SRC_URI="https://dl.discordapp.net/apps/linux/${MY_PV}/${MY_PN}-${MY_PV}.tar.gz" -S="${WORKDIR}/${MY_PN^}" - -LICENSE="all-rights-reserved" -SLOT="0" -KEYWORDS="amd64" - -IUSE="appindicator +seccomp wayland" -RESTRICT="bindist mirror strip test" - -RDEPEND=" - >=app-accessibility/at-spi2-core-2.46.0:2 - dev-libs/expat - dev-libs/glib:2 - dev-libs/nspr - dev-libs/nss - media-libs/alsa-lib - media-libs/fontconfig - media-libs/mesa[gbm(+)] - net-print/cups - sys-apps/dbus - sys-apps/util-linux - sys-libs/glibc - x11-libs/cairo - x11-libs/libdrm - x11-libs/gdk-pixbuf:2 - x11-libs/gtk+:3 - x11-libs/libX11 - x11-libs/libXScrnSaver - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libxcb - x11-libs/libxkbcommon - x11-libs/libxshmfence - x11-libs/pango - appindicator? ( dev-libs/libayatana-appindicator ) -" - -DESTDIR="/opt/${MY_PN}" - -QA_PREBUILT="*" - -CONFIG_CHECK="~USER_NS" - -src_unpack() { - unpack ${MY_PN}-${MY_PV}.tar.gz -} - -src_configure() { - default - chromium_suid_sandbox_check_kernel_config -} - -src_prepare() { - default - # remove post-install script - rm postinst.sh || die "the removal of the unneeded post-install script failed" - # cleanup languages - pushd "locales/" >/dev/null || die "location change for language cleanup failed" - chromium_remove_language_paks - popd >/dev/null || die "location reset for language cleanup failed" - - # fix .desktop exec location - sed --in-place --expression "/^Exec=/s:/usr/share/discord/Discord:/usr/bin/${MY_PN}:" \ - "${MY_PN}.desktop" || - die "fixing of exec location on .desktop failed" - - # Update exec location in launcher - sed --expression "s:@@DESTDIR@@:${DESTDIR}:" \ - "${FILESDIR}/launcher.sh" > "${T}/launcher.sh" || die "updating of exec location in launcher failed" - - # USE seccomp in launcher - if use seccomp; then - sed --in-place --expression '/^EBUILD_SECCOMP=/s/false/true/' \ - "${T}/launcher.sh" || die "sed failed for seccomp" - fi - - # USE wayland in launcher - if use wayland; then - sed --in-place --expression '/^EBUILD_WAYLAND=/s/false/true/' \ - "${T}/launcher.sh" || die "sed failed for wayland" - fi -} - -src_install() { - doicon -s 256 "${MY_PN}.png" - - # install .desktop file - domenu "${MY_PN}.desktop" - - exeinto "${DESTDIR}" - - doexe "${MY_PN^}" chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so - - insinto "${DESTDIR}" - doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin - insopts -m0755 - doins -r locales resources - - # Chrome-sandbox requires the setuid bit to be specifically set. - # see https://github.com/electron/electron/issues/17972 - fowners root "${DESTDIR}/chrome-sandbox" - fperms 4711 "${DESTDIR}/chrome-sandbox" - - # Crashpad is included in the package once in a while and when it does, it must be installed. - # See #903616 and #890595 - [[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler - - exeinto "/usr/bin" - newexe "${T}/launcher.sh" "discord" || die "failing to install launcher" - - # https://bugs.gentoo.org/898912 - if use appindicator; then - dosym ../../usr/lib64/libayatana-appindicator3.so /opt/discord/libappindicator3.so - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - optfeature_header "Install the following packages for additional support:" - optfeature "sound support" \ - media-sound/pulseaudio media-sound/apulse[sdk] media-video/pipewire - optfeature "emoji support" media-fonts/noto-emoji -} diff --git a/net-im/discord/discord-0.0.77.ebuild b/net-im/discord/discord-0.0.77.ebuild new file mode 100644 index 000000000000..1af370033bc8 --- /dev/null +++ b/net-im/discord/discord-0.0.77.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="${PN/-bin/}" +MY_PV="${PV/-r*/}" + +CHROMIUM_LANGS=" + af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi + hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv + sw ta te th tr uk ur vi zh-CN zh-TW +" + +inherit chromium-2 desktop linux-info optfeature unpacker xdg + +DESCRIPTION="All-in-one voice and text chat for gamers" +HOMEPAGE="https://discord.com/" +SRC_URI="https://dl.discordapp.net/apps/linux/${MY_PV}/${MY_PN}-${MY_PV}.tar.gz" +S="${WORKDIR}/${MY_PN^}" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="amd64" + +IUSE="appindicator +seccomp wayland" +RESTRICT="bindist mirror strip test" + +RDEPEND=" + >=app-accessibility/at-spi2-core-2.46.0:2 + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/fontconfig + media-libs/mesa[gbm(+)] + net-print/cups + sys-apps/dbus + sys-apps/util-linux + sys-libs/glibc + x11-libs/cairo + x11-libs/libdrm + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libxcb + x11-libs/libxkbcommon + x11-libs/libxshmfence + x11-libs/pango + appindicator? ( dev-libs/libayatana-appindicator ) +" + +DESTDIR="/opt/${MY_PN}" + +QA_PREBUILT="*" + +CONFIG_CHECK="~USER_NS" + +src_unpack() { + unpack ${MY_PN}-${MY_PV}.tar.gz +} + +src_configure() { + default + chromium_suid_sandbox_check_kernel_config +} + +src_prepare() { + default + # remove post-install script + rm postinst.sh || die "the removal of the unneeded post-install script failed" + # cleanup languages + pushd "locales/" >/dev/null || die "location change for language cleanup failed" + chromium_remove_language_paks + popd >/dev/null || die "location reset for language cleanup failed" + + # fix .desktop exec location + sed --in-place --expression "/^Exec=/s:/usr/share/discord/Discord:/usr/bin/${MY_PN}:" \ + "${MY_PN}.desktop" || + die "fixing of exec location on .desktop failed" + + # Update exec location in launcher + sed --expression "s:@@DESTDIR@@:${DESTDIR}:" \ + "${FILESDIR}/launcher.sh" > "${T}/launcher.sh" || die "updating of exec location in launcher failed" + + # USE seccomp in launcher + if use seccomp; then + sed --in-place --expression '/^EBUILD_SECCOMP=/s/false/true/' \ + "${T}/launcher.sh" || die "sed failed for seccomp" + fi + + # USE wayland in launcher + if use wayland; then + sed --in-place --expression '/^EBUILD_WAYLAND=/s/false/true/' \ + "${T}/launcher.sh" || die "sed failed for wayland" + fi +} + +src_install() { + doicon -s 256 "${MY_PN}.png" + + # install .desktop file + domenu "${MY_PN}.desktop" + + exeinto "${DESTDIR}" + + doexe "${MY_PN^}" chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so + + insinto "${DESTDIR}" + doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin + insopts -m0755 + doins -r locales resources + + # Chrome-sandbox requires the setuid bit to be specifically set. + # see https://github.com/electron/electron/issues/17972 + fowners root "${DESTDIR}/chrome-sandbox" + fperms 4711 "${DESTDIR}/chrome-sandbox" + + # Crashpad is included in the package once in a while and when it does, it must be installed. + # See #903616 and #890595 + [[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler + + exeinto "/usr/bin" + newexe "${T}/launcher.sh" "discord" || die "failing to install launcher" + + # https://bugs.gentoo.org/898912 + if use appindicator; then + dosym ../../usr/lib64/libayatana-appindicator3.so /opt/discord/libappindicator3.so + fi +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature_header "Install the following packages for additional support:" + optfeature "sound support" \ + media-sound/pulseaudio media-sound/apulse[sdk] media-video/pipewire + optfeature "emoji support" media-fonts/noto-emoji +} diff --git a/net-im/telegram-desktop-bin/Manifest b/net-im/telegram-desktop-bin/Manifest index 03f519d9de88..c0d1f82ca3cf 100644 --- a/net-im/telegram-desktop-bin/Manifest +++ b/net-im/telegram-desktop-bin/Manifest @@ -1,7 +1,7 @@ -DIST tdesktop-5.8.2.tar.gz 20233957 BLAKE2B ebf29fbd0895c31c72ca8513383a66b2ff8f0bb6514eb6adea245855d242fb3bc775fff35bd99a27b0029875a5d6df4413cfcd39a23e485001cd79af03a60eb8 SHA512 c0ffd8778426ef92db67606b32c339f0d742950975735c345c9a1db06a88f7626e5dbc44b64efd5321dd016a6df54779e17d58ce95445001e8f7b194cc7d0fda DIST tdesktop-5.8.3.tar.gz 20240134 BLAKE2B 6d1d296e91820e458a332113fe825b80968d116f3f8573b361ffd133fc687edda31b907561fdbf4a319a008512aba93416449762b1339373e08f642628c1cd27 SHA512 c6e8dabaa3e11207b4c87e07d9b8afc1b77421d0b6aaa37dd07f3bca51d1c0ced61834ae044fe13096689de18366c380dd6dac839bce3f3ec0e88cc639f7e41f -DIST tsetup.5.8.2.tar.xz 57953228 BLAKE2B 4a9261d87f911454c6ec63cb2a6f8be0d7d843bbe8e27c0d83eea73c72471b81c063d3c5eb2413c6549038ecce660bbdd9e74de45c0959cc1804f7740e68e505 SHA512 927f5eeea79f8b8aafcf04513edd9c58c6ec0eb43f9d72534f015248ff2f17ddf0f6b5f593bdd556a4f2e7a2272cf24c164c0e838e2286557dc0acf6ea32d59e +DIST tdesktop-5.9.0.tar.gz 22241739 BLAKE2B c8e181a2b0f254ffb75f4b65bebb148d71a5687fac4b46d4d5c7e39df4093c1336417a34f859f0717067b64376093502aadf7e1568ab9a58523e13ac05673e5a SHA512 60444a9e01336923f494ba5400e7ed800dc62ccc28b8a6603eeda81e97debdfb7f2e2c725a96a6bfedd0aaaf3a5f73faabac60eee167ac8298ed497b5ebf038c DIST tsetup.5.8.3.tar.xz 57966620 BLAKE2B 0cf8e12457204d5aea06beda76de3b7e9f6b42d056dcd132affc129236b4597f200a157de875f3903d88d7b588169c8d596d562f83b3bc839806f7bb4c55e1af SHA512 9dfbe9a242415d632169d59711bb300589e39f0e646f93e5aa6571d694ec460992cd5e3024ec1d0f5be0fac0ae0f98829dd4063cfa6de3e5de63f7564281d324 -EBUILD telegram-desktop-bin-5.8.2.ebuild 1623 BLAKE2B 4e0ec6429b91f3b31f8b5f8fc46a2025a90fad67ec6d99f5177ef17c74ee3d7aece57be3a0e6dd03d32cdb6368bbb482c19ce9f41175a80f3fd402a6a9f16684 SHA512 5b60ef7442633f981d74851e835ae3a475bcef7ec411c7ebdf462f29d6c6429fe4dd0a260c75a52fbecbbe948566ee53265741e9dd7f5a3815a68d0c0e8c3253 +DIST tsetup.5.9.0.tar.xz 58297660 BLAKE2B c4a5336989a2192fd0f57190e79b28db352dcee4619803396f38148029d7b01935e73dec0692791bd3ece0db5684276e6fc4f9315be3bf4343274976d1545c43 SHA512 c45a4e0aef81dc1b6ccb18a2ff77c0e5c90c9be0e07407d0b888264a4d7e96eac8f44c3759064b9fb492546e89acbabbd281ced3d012efc869121e6c9419c6a3 EBUILD telegram-desktop-bin-5.8.3.ebuild 1623 BLAKE2B 4e0ec6429b91f3b31f8b5f8fc46a2025a90fad67ec6d99f5177ef17c74ee3d7aece57be3a0e6dd03d32cdb6368bbb482c19ce9f41175a80f3fd402a6a9f16684 SHA512 5b60ef7442633f981d74851e835ae3a475bcef7ec411c7ebdf462f29d6c6429fe4dd0a260c75a52fbecbbe948566ee53265741e9dd7f5a3815a68d0c0e8c3253 +EBUILD telegram-desktop-bin-5.9.0.ebuild 1623 BLAKE2B 4e0ec6429b91f3b31f8b5f8fc46a2025a90fad67ec6d99f5177ef17c74ee3d7aece57be3a0e6dd03d32cdb6368bbb482c19ce9f41175a80f3fd402a6a9f16684 SHA512 5b60ef7442633f981d74851e835ae3a475bcef7ec411c7ebdf462f29d6c6429fe4dd0a260c75a52fbecbbe948566ee53265741e9dd7f5a3815a68d0c0e8c3253 MISC metadata.xml 501 BLAKE2B 94aa66404772e94f51d8c59e36d19e6454f37173aaac352fe3539bcc09e72c267e69001c41f8356f19ca2830107164144d907865ad7fb3ad1def8771f5ef6d9a SHA512 3cd8e818062cd40787f12c9530ed202ea23c3f60a70f1ab50c95a7b3310197590be5a75378c598dabe5a1fce310fa8acf409a36e7446b66c2046a109d59a5ff8 diff --git a/net-im/telegram-desktop-bin/telegram-desktop-bin-5.8.2.ebuild b/net-im/telegram-desktop-bin/telegram-desktop-bin-5.8.2.ebuild deleted file mode 100644 index 24722ca70535..000000000000 --- a/net-im/telegram-desktop-bin/telegram-desktop-bin-5.8.2.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit desktop optfeature xdg - -DESCRIPTION="Official desktop client for Telegram (binary package)" -HOMEPAGE="https://desktop.telegram.org" -SRC_URI=" - https://github.com/telegramdesktop/tdesktop/archive/v${PV}.tar.gz -> tdesktop-${PV}.tar.gz - amd64? ( https://updates.tdesktop.com/tlinux/tsetup.${PV}.tar.xz ) -" - -S="${WORKDIR}/Telegram" - -LICENSE="GPL-3-with-openssl-exception" -SLOT="0" -KEYWORDS="-* ~amd64" - -QA_PREBUILT="usr/bin/telegram-desktop" - -RDEPEND=" - !net-im/telegram-desktop - sys-libs/glibc - dev-libs/glib:2 - >=media-libs/fontconfig-2.13 - media-libs/freetype:2 - virtual/opengl - x11-libs/gtk+:3[X,wayland] - x11-libs/libX11 - >=x11-libs/libxcb-1.10 -" - -src_prepare() { - default - - sed -i -e \ - 's/^Exec=@CMAKE_INSTALL_FULL_BINDIR@\/telegram-desktop/Exec=\/usr\/bin\/telegram-desktop/' \ - "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.service || die -} - -src_install() { - newbin Telegram telegram-desktop - - insinto /usr/share/TelegramDesktop/externalupdater.d/ - newins - externalupdater <<<"${EPREFIX}/usr/bin/telegram-desktop" - - local icon_size - for icon_size in 16 32 48 64 128 256 512; do - newicon -s "${icon_size}" \ - "${WORKDIR}/tdesktop-${PV}/Telegram/Resources/art/icon${icon_size}.png" \ - telegram.png - done - - domenu "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.desktop - insinto /usr/share/dbus-1/services - doins "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.service -} - -pkg_postinst() { - xdg_pkg_postinst - optfeature "spell checker support" app-text/enchant -} diff --git a/net-im/telegram-desktop-bin/telegram-desktop-bin-5.9.0.ebuild b/net-im/telegram-desktop-bin/telegram-desktop-bin-5.9.0.ebuild new file mode 100644 index 000000000000..24722ca70535 --- /dev/null +++ b/net-im/telegram-desktop-bin/telegram-desktop-bin-5.9.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop optfeature xdg + +DESCRIPTION="Official desktop client for Telegram (binary package)" +HOMEPAGE="https://desktop.telegram.org" +SRC_URI=" + https://github.com/telegramdesktop/tdesktop/archive/v${PV}.tar.gz -> tdesktop-${PV}.tar.gz + amd64? ( https://updates.tdesktop.com/tlinux/tsetup.${PV}.tar.xz ) +" + +S="${WORKDIR}/Telegram" + +LICENSE="GPL-3-with-openssl-exception" +SLOT="0" +KEYWORDS="-* ~amd64" + +QA_PREBUILT="usr/bin/telegram-desktop" + +RDEPEND=" + !net-im/telegram-desktop + sys-libs/glibc + dev-libs/glib:2 + >=media-libs/fontconfig-2.13 + media-libs/freetype:2 + virtual/opengl + x11-libs/gtk+:3[X,wayland] + x11-libs/libX11 + >=x11-libs/libxcb-1.10 +" + +src_prepare() { + default + + sed -i -e \ + 's/^Exec=@CMAKE_INSTALL_FULL_BINDIR@\/telegram-desktop/Exec=\/usr\/bin\/telegram-desktop/' \ + "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.service || die +} + +src_install() { + newbin Telegram telegram-desktop + + insinto /usr/share/TelegramDesktop/externalupdater.d/ + newins - externalupdater <<<"${EPREFIX}/usr/bin/telegram-desktop" + + local icon_size + for icon_size in 16 32 48 64 128 256 512; do + newicon -s "${icon_size}" \ + "${WORKDIR}/tdesktop-${PV}/Telegram/Resources/art/icon${icon_size}.png" \ + telegram.png + done + + domenu "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.desktop + insinto /usr/share/dbus-1/services + doins "${WORKDIR}/tdesktop-${PV}"/lib/xdg/org.telegram.desktop.service +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature "spell checker support" app-text/enchant +} diff --git a/net-im/telegram-desktop/Manifest b/net-im/telegram-desktop/Manifest index fd7bb72d0547..12a3160e064c 100644 --- a/net-im/telegram-desktop/Manifest +++ b/net-im/telegram-desktop/Manifest @@ -6,9 +6,9 @@ AUX tdesktop-5.7.2-cstring.patch 350 BLAKE2B f6a7922d7a4fc6c2230e82f8e31d69a456b AUX tdesktop-5.8.3-cstdint.patch 603 BLAKE2B 66ecbbaa7773661ed53d12482800771ea044cadc000f16eb530d107b005576b24c71bbb86d990c9eb36f16309f83380a01c1e940d957695892a97afef0a7107e SHA512 f7655b307d11e6b255f1262d636a79f75e176e0cba264a8c37b245a7702ad7ebaa46b63d834a7383cd2223fb4f465b02eaf1843f086ce9ef378ccadf16398168 AUX tdesktop-5.8.3-webkit-no-wayland.patch 547 BLAKE2B f1163a59d779d56c7e999f6fd451d7060c8c4087c55670321993d02f09e3a0e0688842b51bd6e9a50a459e4cf84e8e43ec530a977c900a32f6e5d8c19ef1b33e SHA512 4479315690d00480dc0005b6d198fca03e07935fb5231669b45d1f80ae4a4757e5ed9fdf855cc57ee01d1ad94e6b4447764500a74fe20f982afac65dde45d35f DIST tdesktop-5.5.5-full.tar.gz 70112426 BLAKE2B 21cdb01d66ea1d1b7479995d790fc44d65248c807dafb25d865970a0d619483ccccd99c8d64b6853d8aa29c78c73010f14e720bf707c918e7c3bb5cb2428dde5 SHA512 88cd526fb02b7b0459cb1bd1b0c57147b2261e57c392d2cb62964015ef6b26e202fba717b35d74201c41becf0a5d78ef4d9d593b5666b3f0a0db646e40bfd1fc -DIST tdesktop-5.7.2-full.tar.gz 70396886 BLAKE2B 5e592e06f5c85290d06deb1ecef8e18bdafd5de3205046ddf0ca2574d480e95d3c81db55c0955d05251d9df3cf558edec9681603cdb0e85f39e2dac44f1c53d0 SHA512 55fa4f20ceae71f2b869c00abdcf6a27f505156f7b254e38a68a97ea34b09e2e9deeef1fec6c5633e93043fb2e9e9ea72502ec9daeed319c8de65cbe825ca916 DIST tdesktop-5.8.3-full.tar.gz 70450970 BLAKE2B 475d70beaf08898d69888a7484409886f894f2327eaae3027b22d10bf0926369542141a959474f74c7a1bb7c50c8981f407a7695e363708dbdb32c4eed393d9a SHA512 272c677544fdca4e2a7e24a5821fb0e99f9caef4388d577c47442351ff1939837163fb2d83a2ec929b92c60197608ed968b5f98b180735218b6cf57cdd501327 +DIST tdesktop-5.9.0-full.tar.gz 72447849 BLAKE2B 269fbc9aea24291b8d9e16024a3e2af789d048ecdef22b301fff50684227c39e2f8589259963a194729c3afeb7d69e1241017991490d2370dc6be14a4c86eecc SHA512 378735399cfd3557d473723fcf35b52fccb17c96bc8ce8e3d54658e4d955c750743aa44e5b3fe905a01276030fe4df8618fe8647e71cd5100409b339482b73c2 EBUILD telegram-desktop-5.5.5.ebuild 8625 BLAKE2B 897d8c05f56262d293108c27f0e77b4caa77d8e572f7e93e035c0ebdf1077aec867dedd0362874eaddcea80da9ac631f3bba443eaa5bb4e93f89468a88128863 SHA512 278dca209afee79157ebb81aa772ceb31da88037c986c5370ec575e456247ef34bf1c9b7152ebbe46bd58d16b8742c9fea2a28518178a76056e37a4b394e903a -EBUILD telegram-desktop-5.7.2.ebuild 8674 BLAKE2B dfdf908bceb6f1b777e3d4eba6f7633548948a5eaf9e5336520482d0a69e2a2cc3c2bbfe7b840e54eb6806c51f15e3465c645bfbebe71e185a8354b803770d7c SHA512 a88799799cb507d6e8a45d45777bbe3f76c6782e6b1b919acbf67244112aa6fec3d75a0198c5b21f776b49e4230ae1883f657fca3f955ec18c721e7bf035cd16 EBUILD telegram-desktop-5.8.3-r1.ebuild 8324 BLAKE2B 489807c85e13da938ae175c98e407efcfa5b4b69d9c9e690c6817be8d54217b4ec280a322a2846fb62a5c842216dcb1d4905b6addc451eda5a41782094a77c06 SHA512 deb76ef0328ece6b361ce15a605c5093d5f7919732c8a6c5cbaa6586c20f0148e9a59a35f14add07d994574b126acdce75435418c65aab265e43a7f66237228d +EBUILD telegram-desktop-5.9.0.ebuild 8270 BLAKE2B dffb476868f808031ccd58d69354c7d3d73b8afe7c424e2f29c67c4bb69c90bbddeadf7074a4f5c154107b9a80f3a825ff0ddb79fa258b7be364346c9e9579cc SHA512 5d2493648b5d0b0abf4a391887b885fe6eca175f36238ae2497d4d1b3ebdf0c19243702302cfc632471d34512196e58d36456076e1b335503822c25b7e957eed MISC metadata.xml 1415 BLAKE2B ff67e288b209502228591761d9a7774a95b52cca610ddcfb4398b1aa6db264d84df36aec1f8f109679cd09d5858c8b8237bbf9fa0643fef4974864c5f9e1e192 SHA512 609618e13e7fd77b17797ca5f3fcd4a4a508f5f13a5a4c4a84e002f0634b44dd231b75a52635b65fbe76aad0e75fa6deb3b366dbff7e54316fe143367f6c0c89 diff --git a/net-im/telegram-desktop/telegram-desktop-5.7.2.ebuild b/net-im/telegram-desktop/telegram-desktop-5.7.2.ebuild deleted file mode 100644 index afecba739e38..000000000000 --- a/net-im/telegram-desktop/telegram-desktop-5.7.2.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 2020-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..13} ) - -inherit xdg cmake python-any-r1 optfeature flag-o-matic - -DESCRIPTION="Official desktop client for Telegram" -HOMEPAGE="https://desktop.telegram.org https://github.com/telegramdesktop/tdesktop" - -MY_P="tdesktop-${PV}-full" -SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" -S="${WORKDIR}/${MY_P}" - -LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~riscv" -IUSE="dbus enchant +fonts +jemalloc +libdispatch screencast qt6 qt6-imageformats wayland webkit +X" -REQUIRED_USE=" - qt6-imageformats? ( qt6 ) -" - -KIMAGEFORMATS_RDEPEND=" - media-libs/libavif:= - media-libs/libheif:= - >=media-libs/libjxl-0.8.0:= -" -CDEPEND=" - !net-im/telegram-desktop-bin - app-arch/lz4:= - dev-cpp/abseil-cpp:= - dev-cpp/ada:= - >=dev-cpp/glibmm-2.77:2.68 - dev-libs/glib:2 - dev-libs/openssl:= - dev-libs/protobuf - dev-libs/xxhash - media-libs/libjpeg-turbo:= - ~media-libs/libtgvoip-2.4.4_p20240706 - media-libs/openal - media-libs/opus - media-libs/rnnoise - ~media-libs/tg_owt-0_pre20240804:=[screencast=,X=] - media-video/ffmpeg:=[opus,vpx] - sys-libs/zlib:=[minizip] - !enchant? ( >=app-text/hunspell-1.7:= ) - enchant? ( app-text/enchant:= ) - jemalloc? ( dev-libs/jemalloc:= ) - libdispatch? ( dev-libs/libdispatch ) - !qt6? ( - >=dev-qt/qtcore-5.15:5= - >=dev-qt/qtgui-5.15:5=[dbus?,jpeg,png,wayland?,X?] - >=dev-qt/qtimageformats-5.15:5 - >=dev-qt/qtnetwork-5.15:5[ssl] - >=dev-qt/qtsvg-5.15:5 - >=dev-qt/qtwidgets-5.15:5[png,X?] - kde-frameworks/kcoreaddons:5 - webkit? ( - >=dev-qt/qtdeclarative-5.15:5 - >=dev-qt/qtwayland-5.15:5[compositor(+)] - ) - ) - qt6? ( - >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?] - >=dev-qt/qtimageformats-6.5:6 - >=dev-qt/qtsvg-6.5:6 - webkit? ( - >=dev-qt/qtdeclarative-6.5:6 - >=dev-qt/qtwayland-6.5:6[compositor,qml] - ) - qt6-imageformats? ( - >=dev-qt/qtimageformats-6.5:6= - ${KIMAGEFORMATS_RDEPEND} - ) - ) - X? ( - x11-libs/libxcb:= - x11-libs/xcb-util-keysyms - ) -" -RDEPEND="${CDEPEND} - webkit? ( || ( net-libs/webkit-gtk:4.1 net-libs/webkit-gtk:6 ) ) -" -DEPEND="${CDEPEND} - >=dev-cpp/cppgir-2.0_p20240315 - >=dev-cpp/ms-gsl-4.1.0 - dev-cpp/expected-lite - dev-cpp/range-v3 -" -BDEPEND=" - ${PYTHON_DEPS} - >=dev-build/cmake-3.16 - >=dev-cpp/cppgir-2.0_p20240315 - dev-util/gdbus-codegen - virtual/pkgconfig - wayland? ( dev-util/wayland-scanner ) -" - -PATCHES=( - "${FILESDIR}"/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch - "${FILESDIR}"/tdesktop-4.10.0-system-cppgir.patch - "${FILESDIR}"/tdesktop-5.2.2-qt6-no-wayland.patch - "${FILESDIR}"/tdesktop-5.2.2-libdispatch.patch - "${FILESDIR}"/tdesktop-5.7.2-cstring.patch -) - -pkg_pretend() { - if has ccache ${FEATURES}; then - ewarn "ccache does not work with ${PN} out of the box" - ewarn "due to usage of precompiled headers" - ewarn "check bug https://bugs.gentoo.org/715114 for more info" - ewarn - fi -} - -src_prepare() { - # Bundle kde-frameworks/kimageformats for qt6, since it's impossible to - # build in gentoo right now. - if use qt6-imageformats; then - sed -e 's/DESKTOP_APP_USE_PACKAGED_LAZY/TRUE/' -i \ - cmake/external/kimageformats/CMakeLists.txt || die - printf '%s\n' \ - 'Q_IMPORT_PLUGIN(QAVIFPlugin)' \ - 'Q_IMPORT_PLUGIN(HEIFPlugin)' \ - 'Q_IMPORT_PLUGIN(QJpegXLPlugin)' \ - >> cmake/external/qt/qt_static_plugins/qt_static_plugins.cpp || die - fi - # kde-frameworks/kcoreaddons is bundled when using qt6. - - # Happily fail if libraries aren't found... - find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \ - \! -path './Telegram/lib_webview/CMakeLists.txt' \ - \! -path './cmake/external/expected/CMakeLists.txt' \ - \! -path './cmake/external/kcoreaddons/CMakeLists.txt' \ - \! -path './cmake/external/qt/package.cmake' \ - -print0 | xargs -0 sed -i \ - -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \ - -e '/find_package(/s/)/ REQUIRED)/' || die - # Make sure to check the excluded files for new - # CMAKE_DISABLE_FIND_PACKAGE entries. - - # Control QtDBus dependency from here, to avoid messing with QtGui. - # QtGui will use find_package to find QtDbus as well, which - # conflicts with the -DCMAKE_DISABLE_FIND_PACKAGE method. - if ! use dbus; then - sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \ - -i cmake/external/qt/package.cmake || die - fi - - cmake_src_prepare -} - -src_configure() { - # Having user paths sneak into the build environment through the - # XDG_DATA_DIRS variable causes all sorts of weirdness with cppgir: - # - bug 909038: can't read from flatpak directories (fixed upstream) - # - bug 920819: system-wide directories ignored when variable is set - export XDG_DATA_DIRS="${EPREFIX}/usr/share" - - # Evil flag (bug #919201) - filter-flags -fno-delete-null-pointer-checks - - # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep - # the same state across both projects. - # See https://bugs.gentoo.org/866055 - append-cppflags '-DNDEBUG' - - # https://github.com/telegramdesktop/tdesktop/issues/17437#issuecomment-1001160398 - use !libdispatch && append-cppflags -DCRL_FORCE_QT - - local qt=$(usex qt6 6 5) - local mycmakeargs=( - -DQT_VERSION_MAJOR=${qt} - - # Override new cmake.eclass defaults (https://bugs.gentoo.org/921939) - # Upstream never tests this any other way - -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF - - # Control automagic dependencies on certain packages - ## Header-only lib, some git version. - -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON - -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=$(usex !webkit) - -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=$(usex !webkit) - -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland) - ## Only used in Telegram/lib_webview/CMakeLists.txt - -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit) - ## KF6CoreAddons is currently unavailable in ::gentoo - -DCMAKE_DISABLE_FIND_PACKAGE_KF${qt}CoreAddons=$(usex qt6) - - -DDESKTOP_APP_USE_LIBDISPATCH=$(usex libdispatch) - -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X) - -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland) - -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc) - ## Enables enchant and disables hunspell - -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) - ## Use system fonts instead of bundled ones - -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) - ) - - 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 - # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml - # Building with snapcraft API credentials by default - # Custom API credentials can be obtained here: - # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md - # After getting credentials you can export variables: - # export MY_TDESKTOP_API_ID="17349"" - # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" - # and restart the build" - # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop - # portage will use custom variable every build automatically - mycmakeargs+=( - -DTDESKTOP_API_ID="611335" - -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" - ) - fi - - cmake_src_configure -} - -pkg_postinst() { - xdg_pkg_postinst - if ! use X && ! use screencast; then - ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!" - ewarn - fi - if ! use jemalloc && use elibc_glibc; then - # https://github.com/telegramdesktop/tdesktop/issues/16084 - # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003 - ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!" - ewarn "Do NOT report issues about RAM usage without enabling this flag first." - ewarn - fi - if ! use libdispatch; then - ewarn "Disabling USE=libdispatch may cause performance degradation" - ewarn "due to fallback to poor QThreadPool! Please see" - ewarn "https://github.com/telegramdesktop/tdesktop/wiki/The-Packaged-Building-Mode" - ewarn - fi - if use wayland && ! use qt6; then - ewarn "Wayland-specific integrations have been deprecated with Qt5." - ewarn "The app will continue to function under wayland, but some" - ewarn "functionality may be reduced." - ewarn "These integrations are only supported when built with Qt6." - ewarn - fi - if use qt6 && ! use qt6-imageformats; then - elog "Enable USE=qt6-imageformats for AVIF, HEIF and JpegXL support" - elog - fi - optfeature_header - if ! use qt6; then - optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats[avif,heif,jpegxl] - fi -} diff --git a/net-im/telegram-desktop/telegram-desktop-5.9.0.ebuild b/net-im/telegram-desktop/telegram-desktop-5.9.0.ebuild new file mode 100644 index 000000000000..ba7ff8153a94 --- /dev/null +++ b/net-im/telegram-desktop/telegram-desktop-5.9.0.ebuild @@ -0,0 +1,242 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) + +inherit xdg cmake python-any-r1 optfeature flag-o-matic + +DESCRIPTION="Official desktop client for Telegram" +HOMEPAGE="https://desktop.telegram.org https://github.com/telegramdesktop/tdesktop" + +MY_P="tdesktop-${PV}-full" +SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv" +IUSE="dbus enchant +fonts +jemalloc +libdispatch screencast qt6 wayland webkit +X" + +CDEPEND=" + !net-im/telegram-desktop-bin + app-arch/lz4:= + dev-cpp/abseil-cpp:= + dev-cpp/ada:= + >=dev-cpp/glibmm-2.77:2.68 + dev-libs/glib:2 + dev-libs/openssl:= + >=dev-libs/protobuf-21.12 + dev-libs/xxhash + media-libs/libjpeg-turbo:= + ~media-libs/libtgvoip-2.4.4_p20240706 + media-libs/openal + media-libs/opus + media-libs/rnnoise + ~media-libs/tg_owt-0_pre20240804:=[screencast=,X=] + media-video/ffmpeg:=[opus,vpx] + sys-libs/zlib:=[minizip] + !enchant? ( >=app-text/hunspell-1.7:= ) + enchant? ( app-text/enchant:= ) + jemalloc? ( dev-libs/jemalloc:= ) + libdispatch? ( dev-libs/libdispatch ) + !qt6? ( + >=dev-qt/qtcore-5.15:5= + >=dev-qt/qtgui-5.15:5=[dbus?,jpeg,png,wayland?,X?] + >=dev-qt/qtimageformats-5.15:5 + >=dev-qt/qtnetwork-5.15:5[ssl] + >=dev-qt/qtsvg-5.15:5 + >=dev-qt/qtwidgets-5.15:5[png,X?] + kde-frameworks/kcoreaddons:5 + webkit? ( wayland? ( + >=dev-qt/qtdeclarative-5.15:5 + >=dev-qt/qtwayland-5.15:5[compositor(+)] + ) ) + ) + qt6? ( + >=dev-qt/qtbase-6.5:6=[dbus?,gui,network,opengl,wayland?,widgets,X?] + >=dev-qt/qtimageformats-6.5:6 + >=dev-qt/qtsvg-6.5:6 + webkit? ( wayland? ( + >=dev-qt/qtdeclarative-6.5:6 + >=dev-qt/qtwayland-6.5:6[compositor,qml] + ) ) + ) + X? ( + x11-libs/libxcb:= + x11-libs/xcb-util-keysyms + ) +" +RDEPEND="${CDEPEND} + webkit? ( || ( net-libs/webkit-gtk:4.1 net-libs/webkit-gtk:6 ) ) +" +DEPEND="${CDEPEND} + >=dev-cpp/cppgir-2.0_p20240315 + >=dev-cpp/ms-gsl-4.1.0 + dev-cpp/expected-lite + dev-cpp/range-v3 +" +BDEPEND=" + ${PYTHON_DEPS} + >=dev-build/cmake-3.16 + >=dev-cpp/cppgir-2.0_p20240315 + dev-util/gdbus-codegen + virtual/pkgconfig + wayland? ( dev-util/wayland-scanner ) +" + +PATCHES=( + "${FILESDIR}"/tdesktop-4.2.4-jemalloc-only-telegram-r1.patch + "${FILESDIR}"/tdesktop-4.10.0-system-cppgir.patch + "${FILESDIR}"/tdesktop-5.2.2-qt6-no-wayland.patch + "${FILESDIR}"/tdesktop-5.2.2-libdispatch.patch + "${FILESDIR}"/tdesktop-5.7.2-cstring.patch + "${FILESDIR}"/tdesktop-5.8.3-cstdint.patch +) + +pkg_pretend() { + if has ccache ${FEATURES}; then + ewarn "ccache does not work with ${PN} out of the box" + ewarn "due to usage of precompiled headers" + ewarn "check bug https://bugs.gentoo.org/715114 for more info" + ewarn + fi +} + +src_prepare() { + # Happily fail if libraries aren't found... + find -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \ + \! -path './Telegram/lib_webview/CMakeLists.txt' \ + \! -path './cmake/external/expected/CMakeLists.txt' \ + \! -path './cmake/external/kcoreaddons/CMakeLists.txt' \ + \! -path './cmake/external/qt/package.cmake' \ + -print0 | xargs -0 sed -i \ + -e '/pkg_check_modules(/s/[^ ]*)/REQUIRED &/' \ + -e '/find_package(/s/)/ REQUIRED)/' || die + # Make sure to check the excluded files for new + # CMAKE_DISABLE_FIND_PACKAGE entries. + + # Control QtDBus dependency from here, to avoid messing with QtGui. + # QtGui will use find_package to find QtDbus as well, which + # conflicts with the -DCMAKE_DISABLE_FIND_PACKAGE method. + if ! use dbus; then + sed -e '/find_package(Qt[^ ]* OPTIONAL_COMPONENTS/s/DBus *//' \ + -i cmake/external/qt/package.cmake || die + fi + + # Control automagic dep only needed when USE="webkit wayland" + if ! use webkit || ! use wayland; then + sed -e 's/QT_CONFIG(wayland_compositor_quick)/0/' \ + -i Telegram/Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.h + fi + + cmake_src_prepare +} + +src_configure() { + # Having user paths sneak into the build environment through the + # XDG_DATA_DIRS variable causes all sorts of weirdness with cppgir: + # - bug 909038: can't read from flatpak directories (fixed upstream) + # - bug 920819: system-wide directories ignored when variable is set + export XDG_DATA_DIRS="${EPREFIX}/usr/share" + + # Evil flag (bug #919201) + filter-flags -fno-delete-null-pointer-checks + + # The ABI of media-libs/tg_owt breaks if the -DNDEBUG flag doesn't keep + # the same state across both projects. + # See https://bugs.gentoo.org/866055 + append-cppflags -DNDEBUG + + # https://github.com/telegramdesktop/tdesktop/issues/17437#issuecomment-1001160398 + use !libdispatch && append-cppflags -DCRL_FORCE_QT + + local use_webkit_wayland=$(use webkit && use wayland && echo yes || echo no) + local qt=$(usex qt6 6 5) + local mycmakeargs=( + -DQT_VERSION_MAJOR=${qt} + + # Override new cmake.eclass defaults (https://bugs.gentoo.org/921939) + # Upstream never tests this any other way + -DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF + + # Control automagic dependencies on certain packages + ## Header-only lib, some git version. + -DCMAKE_DISABLE_FIND_PACKAGE_tl-expected=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}Quick=${use_webkit_wayland} + -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}QuickWidgets=${use_webkit_wayland} + -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland) + -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=${use_webkit_wayland} + ## KF6CoreAddons is currently unavailable in ::gentoo + -DCMAKE_DISABLE_FIND_PACKAGE_KF${qt}CoreAddons=$(usex qt6) + + -DDESKTOP_APP_USE_LIBDISPATCH=$(usex libdispatch) + -DDESKTOP_APP_DISABLE_X11_INTEGRATION=$(usex !X) + -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=$(usex !wayland) + -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex !jemalloc) + ## Enables enchant and disables hunspell + -DDESKTOP_APP_USE_ENCHANT=$(usex enchant) + ## Use system fonts instead of bundled ones + -DDESKTOP_APP_USE_PACKAGED_FONTS=$(usex !fonts) + ) + + 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 + # https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml + # Building with snapcraft API credentials by default + # Custom API credentials can be obtained here: + # https://github.com/telegramdesktop/tdesktop/blob/dev/docs/api_credentials.md + # After getting credentials you can export variables: + # export MY_TDESKTOP_API_ID="17349"" + # export MY_TDESKTOP_API_HASH="344583e45741c457fe1862106095a5eb" + # and restart the build" + # you can set above variables (without export) in /etc/portage/env/net-im/telegram-desktop + # portage will use custom variable every build automatically + mycmakeargs+=( + -DTDESKTOP_API_ID="611335" + -DTDESKTOP_API_HASH="d524b414d21f4d37f08684c1df41ac9c" + ) + fi + + cmake_src_configure +} + +pkg_postinst() { + xdg_pkg_postinst + if ! use X && ! use screencast; then + ewarn "both the 'X' and 'screencast' USE flags are disabled, screen sharing won't work!" + ewarn + fi + if ! use jemalloc && use elibc_glibc; then + # https://github.com/telegramdesktop/tdesktop/issues/16084 + # https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003 + ewarn "Disabling USE=jemalloc on glibc systems may cause very high RAM usage!" + ewarn "Do NOT report issues about RAM usage without enabling this flag first." + ewarn + fi + if ! use libdispatch; then + ewarn "Disabling USE=libdispatch may cause performance degradation" + ewarn "due to fallback to poor QThreadPool! Please see" + ewarn "https://github.com/telegramdesktop/tdesktop/wiki/The-Packaged-Building-Mode" + ewarn + fi + if use wayland && ! use qt6; then + ewarn "Wayland-specific integrations have been deprecated with Qt5." + ewarn "The app will continue to function under wayland, but some" + ewarn "functionality may be reduced." + ewarn "These integrations are only supported when built with Qt6." + ewarn + fi + optfeature_header + if ! use qt6; then + optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats:5[avif,heif,jpegxl] + else + optfeature "AVIF, HEIF and JpegXL image support" kde-frameworks/kimageformats:6[avif,heif,jpegxl] + fi +} -- cgit v1.2.3