net-im/discord: add 1.0.144

Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
This commit is contained in:
Nick Sarnie
2026-06-23 16:40:29 +09:00
parent d3d06c89cd
commit 98a20d6b6d
2 changed files with 233 additions and 0 deletions

View File

@@ -19,4 +19,14 @@ DIST discord-1.0.143-discord_utils.distro 4597983 BLAKE2B ded0b0cc5e9aab46b41dba
DIST discord-1.0.143-discord_voice.distro 32670125 BLAKE2B 82cc83383feae8822cecb10de06b01ccc19bdc14a77ea5cc69cc6d86b027aff8318395f10f5ee03446575411f41f89d805a7d33038f7fc700f6b38065658b02c SHA512 45d4cd4f7ea8a7b8ba3f893cc4bfb1202223c84ecbb0f49ee3f0e78449c6e418a784ee57a2e0774f02f3596362d2088842c41f24448e896b16710dcba06ccfa6
DIST discord-1.0.143-discord_zstd.distro 328094 BLAKE2B 67900d71c8063fe951c9887ca3e8b4899515f61d4ad02378f52192a3a3be7faa53adfbb1944179f2e027a313c568c22ebab7d0f973d10c1184d9b3e879521e63 SHA512 a54bdd37e1a450641d5f2aea30fec8245ee967bf902449c7a6e8c2aedc3bf0f6cfca760b3fc6420f3b957466922e9835952c6681a95e6db6b27c2d4f834f68e4
DIST discord-1.0.143.distro 91196517 BLAKE2B 4897551fe2b71428697e0fc36f3b6d3931acdcff0e4b04f7640042153f9d40dea43f687cb7884a34444c1bb05f96d57f76fc7bb5dec5ddd2c77f30c130144977 SHA512 32568ff144259f0e76a47e631f6000dd30cf8c0d14d562145587cef57ce75f530afb73942b8761e3f0eead84a2feca3a659a34004ae331386c38fd05b260f559
DIST discord-1.0.144-discord_desktop_core.distro 523230 BLAKE2B ef3573dbd5734bf38d07a4c50fde69b66b012b69ede0bd6b89d48f8b2a69f71c0461a70717f552cf0febffdedadcd8fb1fe83ef31ebeeb282580d7c251404b39 SHA512 3d3ec8d9d7f9b75b948d9444eeceacfd56cb307dadb1d0c53fced219fd559f26e5ee542fb4073067d8ae4c481410da250ad264c86ad2a0c6f838253902e74b08
DIST discord-1.0.144-discord_erlpack.distro 2065589 BLAKE2B 0f9d0ba65427f35e7c67edde0bd4f96119bb70e85e5af653421d53ad135b0bf8768dc8d72b903e74d45ab004ee29cd4cf009234d7fcfe02c36dff5120b2b30ab SHA512 7b03cde71d8269a7e1165160979ffd3daaaef7bcff4d28adb01bd464b9566e76823fbe9182ae1bef719ce463ee350717d1aaae215db0c0a65ad046f22131fb9e
DIST discord-1.0.144-discord_game_utils.distro 3172504 BLAKE2B 57ea1d4931145781bba378172730b00679bf0acef6d086dff852100c614aafbc17a3a7f6f33f072c2f3ef7a69290ca3c1d99d8f5854ee8cc73d4f10aa7e22b3b SHA512 31ca37ccb7ed82313627992f68b6b22f7c000b1b3876a93531187e2859c1e80344ec08af841cf43119d710764f2a1587d6fe4abe48755c19d6ca31a386d58c2f
DIST discord-1.0.144-discord_krisp.distro 36158747 BLAKE2B f13be529d237ee16cd7af6f1866a886de347336a8cfd9b6df01b3cbc816bd9f165bea06be0bfef88f6f135afdbc2f4570f835be2f783df8129d28745dff4a5ed SHA512 fb6ececcbbae91727b836f956cca571fe5c8a79e3ecb04ccee3b93638188ff2db1d5552990930c110518074e857dbe12093e4214fc2d0f6a093cf0e249559282
DIST discord-1.0.144-discord_rpc.distro 30381 BLAKE2B ff78ee434efba00c5f42a1fa1d073cf0bcf81619749719a0207491de9918a41084b9fbdfb07e8d90cae1181353f89e7c8d2f37dad38118ac1e3c70a517f000e0 SHA512 83fe02eacebf5f7315ee15019b91cda39674240d0c411dfce31c534579a4fe3f848e5f39d3d94cfa3e8339440730f675a2c93163993e150c7cbcccf4a52651da
DIST discord-1.0.144-discord_spellcheck.distro 9889932 BLAKE2B e152bcd7c62e7e1fa943d571a6d3d6eadf1326ab28bcf773031ff0e0e403504bcdaca0e85797e5826dccb2b14566549bfb81e2cec367233ca5e5c66c3c9f8f66 SHA512 f64aae9bde31e01ccee20d31970173e96c43999086f87e4c4538f822f3c260d1ffb31c550589a2c00a8e19ec277ac54adea856f86108e75a04eea70f3eb07764
DIST discord-1.0.144-discord_utils.distro 4598171 BLAKE2B 1a220e9766723e6374607aa65797c41d03887ef1536b50c57afa4a64ca6bb6208dade10c5ca169a5b65dcfe3d34936c3d38ed5e47fe0f1a4c2d96d6282b8ae7e SHA512 0430481d59e9345088136114e8f81d0e9abcc0bbf65a0020a936105330f456f5ca829c7838d9d75613c7d201885dc9576d1da3109e96651e6953b761c6b653c9
DIST discord-1.0.144-discord_voice.distro 32744887 BLAKE2B 00c01152ce292277305a4afcd0ad3d9389ff92d58a080d0c165f8b817ed40245f8624102c8d755af53e697f9176d23eb9e254e45d62a9856e4a0aac741894e84 SHA512 acd37f8848a717043a558095d497234caac7500fb8b00030783ae5a5c51c3a5e3b352a7e289f55d244d566bb01c26e5afeeb7859a2be788ce1cc37efd1627be2
DIST discord-1.0.144-discord_zstd.distro 328106 BLAKE2B 0087528fde0e4e8bc7eae46f5edd2adfd570cd645071af243f68e9903a96bcbf53dd2f9262a194d035c39b650b7e9f12c168ff60abdccad248872425e9004461 SHA512 984d79f024094d4ac72df7ddf1e35eb67144afa7d80b4b10bf55d78232317dc290ecdaaf013643f2049d11f11fdef475309e5a6236e42d5baa2fdadff5545099
DIST discord-1.0.144.distro 91387526 BLAKE2B eadf6346baace6286a16d7cee6cc013128c91faead4dc1c91c043dfe4d6288ffc64315e873b81b3a237e61d92d979c923b9942158e044ee7d44d34bd8cb600b6 SHA512 58c24e26be0d0fb8cea968440772e276a01e98869a299f56d4b0ad8435fc8e31248f9181134cf2084f9b02fc5863e6f2e842770ccbbf5dfe4862c0638478d5b8
DIST discord-disable-breaking-updates-2f26748a667045d26bc19841f1a731b4be7a7514.py 1299 BLAKE2B b6c923c450a28405e2a439e0d1b8a83e01e0536c62095fafbae74612aa4e891df733aa13999ce6a8be3618fd14e154aec802aa4ee21aad1303b05626ffd23314 SHA512 a7ef493a216c71a5b02685cff6866bfc3940aaf9cdc73b58859c962d0d33b613349289ef7027359f184f42dddaed486b84f6d85b9023ab8530ab7ba66431c3c7

View File

@@ -0,0 +1,223 @@
# 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 <base app location>/resources/bootstrap.
# Some modules are installed at runtime, but we want to bootstrap those too,
# so we use a custom <base app location>/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 <base app location>/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
}