mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 11:17:21 -08:00
net-im/discord: add 1.0.150
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
This commit is contained in:
@@ -19,4 +19,14 @@ DIST discord-1.0.147-discord_utils.distro 4597800 BLAKE2B c23c6bf4be84ba72df81f8
|
||||
DIST discord-1.0.147-discord_voice.distro 32863361 BLAKE2B 0c9600f405401b0c7c1e718ce909fa1546456f7e1ec7032fdaad9c64b2126c93bfe09624120e959e0022c580253e77a6feb177f2a4f9e89026328dfd0905fbca SHA512 e561cf39de736024e9ada0f9a358b17b351e9a86fec023d08b7cef0b105739d33e040892127c25009f7ad27b14aaa4fcdc3b5866ef0b3ccd71d2b31c58dc63d4
|
||||
DIST discord-1.0.147-discord_zstd.distro 328096 BLAKE2B fee95e0e1b9041844024460ae6dba19f89f823bfc8edb42fe492c0cc9b377d5fd1bcde810a71f7170810dd63e5e33985eeb5b81542adb174e644c3c55980854a SHA512 ff520ab95719fafb3c38d7592152c2914ae8b20245ad3bf58a7fe4b2afa06c824f0948954581e02afd9569db6669a0d93f430a6032ca62d8e5e7dbb46cb3099c
|
||||
DIST discord-1.0.147.distro 91387601 BLAKE2B 3648418ca590cf5e3fe51ef06960e90eb69ac4c9530b8120a56111ec60629d1b619eddf705872b258ff65bd9ffb2c8a4c0511fc19bd635b01f927e8ffc2cb5f2 SHA512 434f927e1f259adebbf7988a4c42a7eb6b5a4a271f0fa30ee13eaf234f83ed655a92edf182a17d8684f28e3d57beafd9b4bdf1bcaa755811f304e4689e582f6a
|
||||
DIST discord-1.0.150-discord_desktop_core.distro 525281 BLAKE2B 82ea2921c9a64fd0aa7d80eca4208372598350a67ca0b38869c532d100d7cd5430a1c226c44c380f860ba3c50d631e01c71b1aaaa9527602ae4b6396653d260b SHA512 a96fbea3946631a63210812bb67e9921fdfc2c415e120e1919c1ec4880187b6cd9433668c5ca5fdbbfcc1c23c6a759995d734f0e9096baed4dea5da8eac9a536
|
||||
DIST discord-1.0.150-discord_erlpack.distro 2063817 BLAKE2B 75c0202bff58b42ed1f2a73d3b46433959f5251165362cf4819efe420ee098457a961fbc7d929842ceb42e4fb1e2b72ee1dbe6791bb8969c8d84c12bb09a58bf SHA512 621291c04f248d69e9ae0022d84e6903b375e75598ea3198f787c94fd4efe1b944df42a9b8a6974ef5cdc18de3f7db03da26c73a7bf176f2d3524d6a298e3ea9
|
||||
DIST discord-1.0.150-discord_game_utils.distro 3171493 BLAKE2B 8d04330ec0582c1e83524a47b55cccdc1a8de42d1c54b253da52590cf625a2768d9181e2f3d28a683127124330023aaf192bda495a796ce7cbf56da5e3d02eb8 SHA512 c92c12100a5181309503c1ba2ffd41a9e9287b21645d86119ef823f1192958ee6cfa6fcce657647b8cfdc65cad8b767cce53cb3300c996875343fe2c1d1faa14
|
||||
DIST discord-1.0.150-discord_krisp.distro 36151342 BLAKE2B 362c7bbc0c0328022494745125505e371faf848e143da18bee063211429428e7fb663251a97463974f350c91254efebd37be0a5d407b9c55c4485c04dd2cb876 SHA512 0464dada650407f44e7d3fd378e2fee36496dc898f25e2e486bb993d01afbc5233228b61ffa76a68ededba40887c91938d06c149280ca56e6c58790838d3a8e2
|
||||
DIST discord-1.0.150-discord_rpc.distro 30367 BLAKE2B 8dffdea4c750fb48611d5ac782bfd92795b040c5c1fdf6a350026dc5b46481f872cf9f5ad45613054c36c8799f703767f5dd1bb2dedb03e6e223e0aa985fde37 SHA512 75fb9521399db1ffac32b97baa6ed09055b243a83a2b83864f8ba52060cc204b308305b7d917d3e2c78f7aaeaeed2ea23b927cc34d973446907ed4f403dbd75f
|
||||
DIST discord-1.0.150-discord_spellcheck.distro 9902947 BLAKE2B c010f7e7e968be02deafcda3bcafd19336cedd2e88a23e8e3434d86bb053cf5238341439166d44574c587ac137b17f0467747f93a1445b46dea84c6cfcd1d936 SHA512 ce8bf2acba824bb3bd400b13744498b65e295fc4dd586a7306ddcd53e41c8b14435d4ca0319bc956868a1fbd6b7ecf062379ba925a2a0f356b7e13e11159a512
|
||||
DIST discord-1.0.150-discord_utils.distro 4597651 BLAKE2B f028824c2733562c5777bc4eccb2755fb31653c66d4a0966abcd4d8fe974bdf6db209a646a890af03daa7bd27eed9afe044d76956e977964d656b018d3880f6a SHA512 ceb6589cd74c06766d26311422d1522f88dbcb569d7c600c0d1e915404f19bf8d35c310d6c6aa1813477809e0de21c0fbc7a4a74eaafd31b2e50e16cded8fdb7
|
||||
DIST discord-1.0.150-discord_voice.distro 32831145 BLAKE2B 027f04683a1b5b07cca78eb07a35a41ef6c9df43b6c5c673a8bb6e15f8d22b2e774c65ef4d49d0e10ed682df6c6a3834514aa3ad9f3d057174634c9825bdd04c SHA512 afa90192782ff0f7a03d9b0f0e3a53258ef7bb632ec991513c349d6b859cf26264f6cd1b9d54a96e9bc91afe1669bd849752aec22b5010c92cda0ef59e513ddd
|
||||
DIST discord-1.0.150-discord_zstd.distro 328092 BLAKE2B 8c815df9894e10d2bd8ec7f4006a811d74fe863ffb02e2c5547e18d9fa1f47395b127ff5e1c9af81b384621459dcefb15eb0cab99671175e8ade9ff30a508b18 SHA512 a33345164429656bbcc28c48b6d82bf39ef622753686447199661ae2cb8a11780080db02a0a20d838a2dfb2625e4599478f8b16ea120c3ce250193f6133effd5
|
||||
DIST discord-1.0.150.distro 91367262 BLAKE2B 41a49c6b3df582e290a73ac71b5869caf1a75c8f9d4ec0e70b09445217c1aecec0cbf32b7955d2e781f7e2040414bee61215e99038f8c8d25a89223222e8f0a3 SHA512 f0a322304334265bc3ee1485eec718df70320a089992ac8c4c2802ce418e8d58d5b1fcf700ab98216f81512f5aeb4e29fedbf4dbddcc465ee90c9b815d4bc1e7
|
||||
DIST discord-disable-breaking-updates-2f26748a667045d26bc19841f1a731b4be7a7514.py 1299 BLAKE2B b6c923c450a28405e2a439e0d1b8a83e01e0536c62095fafbae74612aa4e891df733aa13999ce6a8be3618fd14e154aec802aa4ee21aad1303b05626ffd23314 SHA512 a7ef493a216c71a5b02685cff6866bfc3940aaf9cdc73b58859c962d0d33b613349289ef7027359f184f42dddaed486b84f6d85b9023ab8530ab7ba66431c3c7
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user