diff --git a/net-im/discord/Manifest b/net-im/discord/Manifest
index f2dffbcf9fdcf..8bbdb01e5eb5f 100644
--- a/net-im/discord/Manifest
+++ b/net-im/discord/Manifest
@@ -1,23 +1,3 @@
-DIST discord-1.0.153-discord_desktop_core.distro 526887 BLAKE2B faf5fe334b7bf1ad60f938f3374449ff3fb3df79375047c3806fca54fee25a78cf579046683bbb9f7cbecf141848489ae7c35100e8d7072a415c8165e360d199 SHA512 798dd9e8c224c7891db660da06f55e9f6ce0697843befa635ee8cf7c133da38ffb1682f645072f25ed02e7d311355c26088097e9a0d3da60d4dda4c71f0b0447
-DIST discord-1.0.153-discord_erlpack.distro 2067986 BLAKE2B 8be3eb1ef88827f694c356b45b5fcc6bf6d4e31ac7cf658205d09c6fcbec3b4d21336265e49446852ce8b588214996d594105e02bc00d056fc2d4587d2d36a6c SHA512 20861bfdd2566f65cdfa0ddea559e2f33d592612256772c9d28b515ef5c0f144227689ca0f5bc31a3c9f744426d9cb475fb697552037931e0a7a6ca233b818c6
-DIST discord-1.0.153-discord_game_utils.distro 3173820 BLAKE2B 36611d847d877d205efee41c76a6048311eae116900da5786de57fdcdc16d16d63b0a29d80d898f98f1630f2ae54b8e46c08b65c1de4c4cde4ddfa1c44401ed9 SHA512 18cdde31f24c79eb73cd26dd08d6926062595da3e2f0bc65b60c32506725fcae1f416e84e5905e10a9494d81491e74fd0718a96902c09d6d9ca638577a89b94e
-DIST discord-1.0.153-discord_krisp.distro 36143425 BLAKE2B cd3dbd64fa5c4c670568368912856c3f69cd441e03b2d082e7cba81e95ee905bcfc5a2c40687c01ad323cd77df1b5a1155fbb8323d42ab2a4c648b7a49ecb5bd SHA512 2b8de3a2f83b9d290b6fea841371c4be1dbf76cf51d8316ad79e86d8de5710c8a62dad5367c831e005bdbfb85d9a03cb5d902e4ffd6e969d2e9bef456621e82a
-DIST discord-1.0.153-discord_rpc.distro 30366 BLAKE2B 05aaa4bb4fe857d3dda9319dce0717ad0954129ffb9be115917b8346cc7517083f1d2155e59278630dd769449eca8bb53af13da10a30e66a2fdd95535a7d5c25 SHA512 beb71f8fd2f03864f3d53e2e142e2f3d0f3f3aa54f95ef0a486e28a0bed1134789811f3243a55dfb72c5063d36ee30c9e617acb61d442bfb8c693615503d50ba
-DIST discord-1.0.153-discord_spellcheck.distro 9889982 BLAKE2B dff0ea45b99b55f57d49b704b33f5eaa74134bf0201c4a4d0a3da4831e0bbb2871c11c7c71c03219f745a7fc050c16c4a37c8aa982ff539ffab6ec1284e16b2c SHA512 5f8dd07c2e6982582f673bee94e3e8717167eb996768d0ee611eb4a1c9d8e2bd077ff91c414da8b14c754e8a5107232d334a0cecb11fb9daa7f5d902f8b11b63
-DIST discord-1.0.153-discord_utils.distro 4602447 BLAKE2B d9952756b9e0a03a49e49786f7a56c3a0e992ffc97e9bbdc74f79337f6c998a443bad3489199b6286e46b228ff48007a82b7b8d292a7b26e57e2d746e261ec3d SHA512 c4235fe1b0a3072386094bcd30abee81188fbbb1ed92640e67daacd4c521aa483b13193e9b57e1b1cf0fdbf9d16f9c63bba1ec4a7c4214e423632c49141c158f
-DIST discord-1.0.153-discord_voice.distro 32943662 BLAKE2B 8a7ec9da7e1324f21c902c2f20fad31fcc37bdcb7382dc6657d1932254bc8000f1dac705819bfe28c03e12801ea302156701184cb31095d512021450b4d1b220 SHA512 d5f8365dbfa29778ee44a181a0c04c757a27ba4b644bb1d9b8c1a27e20d9b6d1709dce978c3491d95b11c789054d0d9857956f894d7af517585b3e52c61e2a66
-DIST discord-1.0.153-discord_zstd.distro 328038 BLAKE2B d3646fd467196176732b7cf7897a8145a37eb7fb35288ed03c40ddae31f8d7499893190db39576be7640d9c6923f1a390bdb8923659e8eff4cca439b6b043f9d SHA512 4d083dbd969177af93c39255dcc31c5064f24cb28d0f5d5e298b5ccd2e65ec167ef123dbbc30d79cd373dbc488b09346c0310e73f8504573a2173b956c058b42
-DIST discord-1.0.153.distro 99523299 BLAKE2B a50eac27b358a43bf15942d6aaa1cfb68d48c55d9467b1ad9953396c0eda478490796d6a9130775e812c75879ffe49cd2cc1ba5a22f3969b622fd12af0cafe28 SHA512 f0361b667a29a2868ebb346c76b91e2be138375428521ab2e3df64e947cf239600acb3baae355bf72d3ff6a40f229c9216202c3a98846d273d3da7c3387f0a8d
-DIST discord-1.0.154-discord_desktop_core.distro 526945 BLAKE2B e043e36f901023b81779edf59972202ef3178edf24b7ffe1caa02a6e8a8d9580532b3ffeb5b957d06ca305310bdb165432331d5195ee1c013fbfa11953d8b5de SHA512 6c66898bf08c8d482432a4a018b749c23bede5fc3f81b2d4bd392465cfa2f1036b04be8fca8f1cfd4179893a2a126d36bc27a439d0e4265888708ce6c375f223
-DIST discord-1.0.154-discord_erlpack.distro 2066686 BLAKE2B f22d432a29f3b386cd1388635b9783e59135567e4f7537e0dfbb3af412cafd57ad5076e38badee48a71e3baf1a8c04bae311b3139b4a4f499bd27ac318825670 SHA512 66006ffa68f48a69f3d9afcd796d28a30b94c507f52b3450722c47de2f5c5bea0217f69d7a637337a29ab878ff0466cbcb6f43c73f103e87c5846e6d3aebb1c5
-DIST discord-1.0.154-discord_game_utils.distro 3173202 BLAKE2B 542c7c67d96dbb7d35f4fafe13d8311492ecfc61169a54891cdb3d37a4c63d2a5878435876d315e4b69af70e221e9a6c4c95144bb914a8507ef0e1a3333ed083 SHA512 cb2bf555df79450ff46908a71cd92e27c2c52d015e80c3cebbe59bf61a40fa3fabaffb227759d0d6fc8cf267e686a5a2e3dee162aa3b78d68f7090d0a4c2982e
-DIST discord-1.0.154-discord_krisp.distro 36143404 BLAKE2B d9fca2742d7591e7b452a1996baddfb9b8501e5e526fbc21bfe3d28592bbd0bc7450525c8ba41f8b34b474706bc0ee936404920654aa99ffdb04254a9291f2a3 SHA512 5b5813e1a1f620945f89d7e2009be7d95b23f833d573fc8d232502ff06f634e4a25b4b969162f05416130728b71ae7b59ad7f3d80933e287891ac15f9af632ed
-DIST discord-1.0.154-discord_rpc.distro 30349 BLAKE2B 4a59de78bd291f480b0757e2eed60aa63ace13b8d348a4f02bf18f181b6019a3965df14c7acc4669d562b6d208b3b7b5bc96c2347d6840eafbc186fa46c28882 SHA512 ec37798e43b2737c516508ed17b683d54b635f84d2dafce87b0283081e49cf285b0500d0b4373ea9c53f5689f74b553aac852eff19ebed666e151f31fdcd6c48
-DIST discord-1.0.154-discord_spellcheck.distro 9889280 BLAKE2B 6572dd6f41649cf85f179a4bd770435c44f5702056bdfb2ca4e420dce75acfb5e3dd6d3974f9f21098de72bfc1a1677f3204353a143e6223bdfa86fb14cd5f39 SHA512 82dff6dc4af0443a07c7a0449a4e4b1f5ce4b4a59deb45266f1b7f8eb04de75b641925e7ddca193f6056912e093c7b71937fed5d156f8c306d82ba1aae61d1d9
-DIST discord-1.0.154-discord_utils.distro 4603144 BLAKE2B a03fdd76b67c2966db9c90ec0e82cd7749bf59a6bd3f17b80ce32efef1a67ffc6bb63d5c3889d63dce82bb32baae21254e1dfb035d8307cd1aed3e87e4cd0e6e SHA512 2018f433557b33107bf7bb26d92c3d283727b979968393a280082ba542325625a3331247025c6cd0609c1b28b75326015386049530c2dec64d024cedac0de2a9
-DIST discord-1.0.154-discord_voice.distro 33780368 BLAKE2B 89c44693b86d90de419f3fe65ffa9db24cb3eebe24f857207b5a8b54edcd944253d8a84f17eea989ccb56a50ac664cbf9cf5ca359a7467d819495c3b22616608 SHA512 ec8a315c432e815e24d54ad9d83bb5b238aad23308af764646e90d7334e1d77fcd2aaff7036ea1e0ae8c8fe4b1404e7f3fc27baaa4cd3a8061dc9118012e45e1
-DIST discord-1.0.154-discord_zstd.distro 328062 BLAKE2B 0862f9921aaadac7834faac860e2bb7ed2e199347751346adf8c8826cede8d0491e8158bffdcb6aba3ab0d39a3a466cffe5b6a697c40fa5bb550c30fe7fc3e06 SHA512 f2172daaab92665c9cab4d8aae9bce54c4a29b3cd11caa2a1fb0dfaa3c228943b49da7a7e0b2fdde36e17f0b9fd11aa19c3637aa47baa98de283c38a19dbc957
-DIST discord-1.0.154.distro 99544579 BLAKE2B c1bb7757e02a7d444029b8ca02e5bb1f18ae7a24f14a363cd6ddd402e441aa9835f52b24895787a44996b0a29e0eb3deaebf7982a4d6593c31d90a233a056278 SHA512 e2428972ea2d93de6b49773606d2168c5b185fdd47dcc272578c4dc8d786b5b7013e5ac66d14d9e9c26631301d2de0c1ee7564162b9cc2dfe5fbaebc2eb56a02
DIST discord-1.0.159-discord_desktop_core.distro 506735 BLAKE2B f0793b02f19f5797b674af4edf0d7d80022bac9a7f8dc634658f9eef1b6962d88d256bc2c7ad5632f4b28d9653d18439db7821f62ee7cec227104e254c83dd71 SHA512 2317991821271cccd5ffd3650431f9cc59e7bd640fc682b87c9cee7f4dad944ab4e033075aaff421a15d4dc6994fe059155832a0fe56ef42731eb456694b5b07
DIST discord-1.0.159-discord_erlpack.distro 1820785 BLAKE2B 189abcc61b6b84607e87eec1d7cf34b562042e36aa3e31d67ee16f41d316a2c2848e23f5bef056c5bbf78524bf8e4f9ce353b657d473f855a501c7d61a6bfd04 SHA512 c5c77f907b86de877b3e03e8fe35031528e7b2f03554c84e2bff97d8e8d26b6a86611a0e393407bb1242aedbe4898f1d2c8233861bd07fa0ae2f0606c0c8feb7
DIST discord-1.0.159-discord_game_utils.distro 2815490 BLAKE2B 52fb3de1c4c9e4166dde3b361193e39f7a40ed3c2a1e5aae716baf162cb398310e958ca74e939ab4745fcdc694140dcfbaa77d10e4c633f58735f3ae5b6f8092 SHA512 417e5fdbf7341588abf135578e7f30bd4f08d97bc96bb3e64a8fee43ff908eaac11de5d78b85ad03366334833fe022db1fde914c655e4af816f24d41fd0de54c
diff --git a/net-im/discord/discord-1.0.153.ebuild b/net-im/discord/discord-1.0.153.ebuild
deleted file mode 100644
index a87d8bba19dd5..0000000000000
--- a/net-im/discord/discord-1.0.153.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2026 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
-"
-PYTHON_COMPAT=( python3_{11..15} )
-UPDATE_DISABLER_COMMIT="2f26748a667045d26bc19841f1a731b4be7a7514"
-
-inherit chromium-2 desktop linux-info optfeature python-single-r1 unpacker xdg
-
-DESCRIPTION="All-in-one voice and text chat for gamers"
-HOMEPAGE="https://discord.com/"
-
-SRC_URI="
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/full.distro -> ${P}.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_desktop_core/1/full.distro
- -> ${P}-${MY_PN}_desktop_core.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_erlpack/1/full.distro
- -> ${P}-${MY_PN}_erlpack.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_spellcheck/1/full.distro
- -> ${P}-${MY_PN}_spellcheck.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_utils/1/full.distro
- -> ${P}-${MY_PN}_utils.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_voice/1/full.distro
- -> ${P}-${MY_PN}_voice.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_zstd/1/full.distro
- -> ${P}-${MY_PN}_zstd.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_rpc/1/full.distro
- -> ${P}-${MY_PN}_rpc.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_game_utils/1/full.distro
- -> ${P}-${MY_PN}_game_utils.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_krisp/1/full.distro
- -> ${P}-${MY_PN}_krisp.distro
- https://github.com/flathub/com.discordapp.Discord/raw/${UPDATE_DISABLER_COMMIT}/disable-breaking-updates.py
- -> discord-disable-breaking-updates-${UPDATE_DISABLER_COMMIT}.py
-"
-S="${WORKDIR}/${MY_PN^}"
-
-LICENSE="all-rights-reserved"
-SLOT="0"
-KEYWORDS="amd64"
-
-IUSE="appindicator +seccomp wayland"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="bindist mirror strip test"
-BDEPEND="app-arch/brotli
- app-arch/zip"
-RDEPEND="
- ${PYTHON_DEPS}
- >=app-accessibility/at-spi2-core-2.46.0:2
- dev-libs/expat
- dev-libs/glib:2
- dev-libs/nspr
- dev-libs/nss
- dev-libs/wayland
- 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"
-
-repackage_node_modules() {
- brotli -d "${DISTDIR}/${P}"-$1.distro -o "${T}"/$1.tar 2>/dev/null || die
- unpack "${T}"/$1.tar || die
- pushd "${WORKDIR}"/files 2>/dev/null || die
- zip -rq "${WORKDIR}"/$1.zip . || die
- popd 2>/dev/null || die
- mv $1.zip "${S}"/resources/bootstrap/ || die
- rm -r "${WORKDIR}"/files || die
-}
-
-src_unpack() {
- # Upstream now only ships an autoupdater, where the binaries downloaded from the
- # upstream package do not contain the app, but instead contain software that
- # downloads and installs the app. To work around this, we manually download
- # the same Brotli-compressed tar archives that the autoupdater would, for both
- # the base app itself and the required Node modules. The Node modules need to be
- # unpacked and installed in ~/.config/discord/${PV}/modules, and luckily the base app
- # can automatically do this for us on the first launch if we package the Node
- # modules into a .zip and put them in /resources/bootstrap.
- # Some modules are installed at runtime, but we want to bootstrap those too,
- # so we use a custom /resources/bootstrap/manifest.json
- # copied over from $FILESDIR.
- brotli -d "${DISTDIR}/${P}".distro -o "${T}/${P}.tar" 2>/dev/null || die
- unpack "${T}/${P}.tar"
- mv "${WORKDIR}"/files "${S}" || die
- rm "${T}/${P}.tar" || die
- # For any new Node modules, add the Brotli-compressed archive to SRC_URI
- # following the same pattern, and then add a corressponding call to
- # repackage_node_modules here. You can find a list of required modules
- # at /resources/bootstrap/manifest.json, as well as
- # running the application and looking for lines in the output about "modules".
- # If checking manifest.json, make sure to check the one directly from upstream,
- # as the one installed on the system is copied over from $FILESDIR.
- repackage_node_modules "discord_desktop_core"
- repackage_node_modules "discord_erlpack"
- repackage_node_modules "discord_spellcheck"
- repackage_node_modules "discord_utils"
- repackage_node_modules "discord_voice"
- repackage_node_modules "discord_zstd"
- repackage_node_modules "discord_rpc"
- repackage_node_modules "discord_game_utils"
- repackage_node_modules "discord_krisp"
-}
-
-src_configure() {
- default
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_prepare() {
- default
- # 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"
-
- # Update exec location in launcher
- sed --expression "s:@@DESTDIR@@:${DESTDIR}:" \
- "${FILESDIR}/launcher-r1.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
- cp "${FILESDIR}/manifest.json" resources/bootstrap/manifest.json || die "Failed copying manifest.json"
-}
-
-src_install() {
- doicon -s 256 "${MY_PN}.png"
-
- # install .desktop file
- make_desktop_entry "${EPREFIX}/usr/bin/discord" Discord "${PN}" \
- "Network;InstantMessaging;" \
- "StartupWMClass=discord" \
- "Path=${EPREFIX}/usr/bin"
-
- 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
-
- # https://bugs.gentoo.org/905289
- newins "${DISTDIR}/discord-disable-breaking-updates-${UPDATE_DISABLER_COMMIT}.py" disable-breaking-updates.py
- python_fix_shebang "${ED}/${DESTDIR}/disable-breaking-updates.py"
-
- 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
- if has_version kde-plasma/kwin[-screencast] && use wayland; then
- einfo " "
- einfo "When using KWin on Wayland, the kde-plasma/kwin[screencast] USE flag"
- einfo "must be enabled for screensharing."
- einfo " "
- fi
-}
diff --git a/net-im/discord/discord-1.0.154.ebuild b/net-im/discord/discord-1.0.154.ebuild
deleted file mode 100644
index a87d8bba19dd5..0000000000000
--- a/net-im/discord/discord-1.0.154.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2026 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
-"
-PYTHON_COMPAT=( python3_{11..15} )
-UPDATE_DISABLER_COMMIT="2f26748a667045d26bc19841f1a731b4be7a7514"
-
-inherit chromium-2 desktop linux-info optfeature python-single-r1 unpacker xdg
-
-DESCRIPTION="All-in-one voice and text chat for gamers"
-HOMEPAGE="https://discord.com/"
-
-SRC_URI="
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/full.distro -> ${P}.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_desktop_core/1/full.distro
- -> ${P}-${MY_PN}_desktop_core.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_erlpack/1/full.distro
- -> ${P}-${MY_PN}_erlpack.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_spellcheck/1/full.distro
- -> ${P}-${MY_PN}_spellcheck.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_utils/1/full.distro
- -> ${P}-${MY_PN}_utils.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_voice/1/full.distro
- -> ${P}-${MY_PN}_voice.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_zstd/1/full.distro
- -> ${P}-${MY_PN}_zstd.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_rpc/1/full.distro
- -> ${P}-${MY_PN}_rpc.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_game_utils/1/full.distro
- -> ${P}-${MY_PN}_game_utils.distro
- https://stable.dl2.discordapp.net/distro/app/stable/linux/x64/${MY_PV}/discord_krisp/1/full.distro
- -> ${P}-${MY_PN}_krisp.distro
- https://github.com/flathub/com.discordapp.Discord/raw/${UPDATE_DISABLER_COMMIT}/disable-breaking-updates.py
- -> discord-disable-breaking-updates-${UPDATE_DISABLER_COMMIT}.py
-"
-S="${WORKDIR}/${MY_PN^}"
-
-LICENSE="all-rights-reserved"
-SLOT="0"
-KEYWORDS="amd64"
-
-IUSE="appindicator +seccomp wayland"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="bindist mirror strip test"
-BDEPEND="app-arch/brotli
- app-arch/zip"
-RDEPEND="
- ${PYTHON_DEPS}
- >=app-accessibility/at-spi2-core-2.46.0:2
- dev-libs/expat
- dev-libs/glib:2
- dev-libs/nspr
- dev-libs/nss
- dev-libs/wayland
- 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"
-
-repackage_node_modules() {
- brotli -d "${DISTDIR}/${P}"-$1.distro -o "${T}"/$1.tar 2>/dev/null || die
- unpack "${T}"/$1.tar || die
- pushd "${WORKDIR}"/files 2>/dev/null || die
- zip -rq "${WORKDIR}"/$1.zip . || die
- popd 2>/dev/null || die
- mv $1.zip "${S}"/resources/bootstrap/ || die
- rm -r "${WORKDIR}"/files || die
-}
-
-src_unpack() {
- # Upstream now only ships an autoupdater, where the binaries downloaded from the
- # upstream package do not contain the app, but instead contain software that
- # downloads and installs the app. To work around this, we manually download
- # the same Brotli-compressed tar archives that the autoupdater would, for both
- # the base app itself and the required Node modules. The Node modules need to be
- # unpacked and installed in ~/.config/discord/${PV}/modules, and luckily the base app
- # can automatically do this for us on the first launch if we package the Node
- # modules into a .zip and put them in /resources/bootstrap.
- # Some modules are installed at runtime, but we want to bootstrap those too,
- # so we use a custom /resources/bootstrap/manifest.json
- # copied over from $FILESDIR.
- brotli -d "${DISTDIR}/${P}".distro -o "${T}/${P}.tar" 2>/dev/null || die
- unpack "${T}/${P}.tar"
- mv "${WORKDIR}"/files "${S}" || die
- rm "${T}/${P}.tar" || die
- # For any new Node modules, add the Brotli-compressed archive to SRC_URI
- # following the same pattern, and then add a corressponding call to
- # repackage_node_modules here. You can find a list of required modules
- # at /resources/bootstrap/manifest.json, as well as
- # running the application and looking for lines in the output about "modules".
- # If checking manifest.json, make sure to check the one directly from upstream,
- # as the one installed on the system is copied over from $FILESDIR.
- repackage_node_modules "discord_desktop_core"
- repackage_node_modules "discord_erlpack"
- repackage_node_modules "discord_spellcheck"
- repackage_node_modules "discord_utils"
- repackage_node_modules "discord_voice"
- repackage_node_modules "discord_zstd"
- repackage_node_modules "discord_rpc"
- repackage_node_modules "discord_game_utils"
- repackage_node_modules "discord_krisp"
-}
-
-src_configure() {
- default
- chromium_suid_sandbox_check_kernel_config
-}
-
-src_prepare() {
- default
- # 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"
-
- # Update exec location in launcher
- sed --expression "s:@@DESTDIR@@:${DESTDIR}:" \
- "${FILESDIR}/launcher-r1.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
- cp "${FILESDIR}/manifest.json" resources/bootstrap/manifest.json || die "Failed copying manifest.json"
-}
-
-src_install() {
- doicon -s 256 "${MY_PN}.png"
-
- # install .desktop file
- make_desktop_entry "${EPREFIX}/usr/bin/discord" Discord "${PN}" \
- "Network;InstantMessaging;" \
- "StartupWMClass=discord" \
- "Path=${EPREFIX}/usr/bin"
-
- 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
-
- # https://bugs.gentoo.org/905289
- newins "${DISTDIR}/discord-disable-breaking-updates-${UPDATE_DISABLER_COMMIT}.py" disable-breaking-updates.py
- python_fix_shebang "${ED}/${DESTDIR}/disable-breaking-updates.py"
-
- 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
- if has_version kde-plasma/kwin[-screencast] && use wayland; then
- einfo " "
- einfo "When using KWin on Wayland, the kde-plasma/kwin[screencast] USE flag"
- einfo "must be enabled for screensharing."
- einfo " "
- fi
-}