From d1c14e94a73fba924761cdad7298f3e48c6bc160 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 1 Jul 2024 08:00:51 +0100 Subject: gentoo auto-resync : 01:07:2024 - 08:00:50 --- net-im/Manifest.gz | Bin 9076 -> 9071 bytes net-im/discord/Manifest | 3 +- net-im/discord/discord-0.0.58-r2.ebuild | 141 ++++++++++++++++++++++++++++++++ net-im/discord/discord-0.0.58.ebuild | 141 -------------------------------- net-im/discord/files/launcher.sh | 17 ++++ 5 files changed, 160 insertions(+), 142 deletions(-) create mode 100644 net-im/discord/discord-0.0.58-r2.ebuild delete mode 100644 net-im/discord/discord-0.0.58.ebuild create mode 100644 net-im/discord/files/launcher.sh (limited to 'net-im') diff --git a/net-im/Manifest.gz b/net-im/Manifest.gz index a89fc3994791..b2342c3469d3 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 8f4a112f928a..405e61ab5a13 100644 --- a/net-im/discord/Manifest +++ b/net-im/discord/Manifest @@ -1,3 +1,4 @@ +AUX launcher.sh 356 BLAKE2B 8602814acb3c62bb04ed77050c1de8443db4cd03a5b213b882b5491f8df32a56b5d3091b573c9be09d3561c3ad8e88ae862aa0b0e098b15d6d46fc4f2bbb057d SHA512 dac1c622889630b5db7dd9d77684a0ad36e20796d6212bf89bdca69a51ea58f670b87a2f55c24c9f8f27aa04a50d0bcc868df3ec813b525f1c838b078fd30740 DIST discord-0.0.58.tar.gz 103212154 BLAKE2B 62b9d598c101c885cd87277020d1d1182fd288b4c3883f1f8b16f12fe62df81725dcc70167c644eb4195a0e6019004033f4775e37ae24382ff4eadddf0f0d465 SHA512 8efab6f4a476c05b620f3e95c082ae3f5423a2aaab310687f8b67711b0b34e7c82105e8c9ea5d4e0b92fc368443bc6a0e8970143d28ef7cb2d5f9e05f85b038d -EBUILD discord-0.0.58.ebuild 3721 BLAKE2B eb82434169d7778ddba7a810dd18938a0b59c78c96bc40f94d2cdb2e650c88cce36b522e5ee6b1305b4d84d39b33d4124b3957c8803f87365e5d6ce12ae7d448 SHA512 dd2bb48a78953299459f3f8e48ff6cc9eb55b975623d1662b00d1b07a66b3bae1291d4be5f8aa09dea3b7a132643c9c58c977b0c6f0b331b7869eaaf4cbf2432 +EBUILD discord-0.0.58-r2.ebuild 3772 BLAKE2B 21587307a6c3f5511a3666f81ebfb8a9169c58939895cc43fd86eb3e3e6c8dfae47886cfddc6b80a124c20ef07100243f8b1a8de33b3e8c96f8113cb533e9908 SHA512 77eb8d8e7d8661ff8a740c5038b9c68cfbd1ff2c00cdacb51371f969a54a4f6cabc6d09e7fbeb9fa627515feac4c5343d7c62793dbf4361e4a61591730effc26 MISC metadata.xml 506 BLAKE2B ff098a1c9341a94ebb21da57c3028d3d96e884e19e3adf2df8d50b694a1ca3eee61f5dfd90eaa557a0a0eee769fd11dfa7bbf63308386a11faa56d13687e33c3 SHA512 56baf0a5323057b4af83a7b7d760b2b1e071e15ca4eef6546eab4104fbdd026906f68d8023a3155f492d8d93cd7022c5d0017372cbaf2894b94bd253b2ce3665 diff --git a/net-im/discord/discord-0.0.58-r2.ebuild b/net-im/discord/discord-0.0.58-r2.ebuild new file mode 100644 index 000000000000..2f44019d1175 --- /dev/null +++ b/net-im/discord/discord-0.0.58-r2.ebuild @@ -0,0 +1,141 @@ +# 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 + app-crypt/libsecret + 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 '/^SECCOMP=/s/false/true/' \ + "${T}/launcher.sh" || die "sed failed for seccomp" + 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.58.ebuild b/net-im/discord/discord-0.0.58.ebuild deleted file mode 100644 index e7dde173394c..000000000000 --- a/net-im/discord/discord-0.0.58.ebuild +++ /dev/null @@ -1,141 +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://discordapp.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 - app-crypt/libsecret - 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 -i "/Exec/s:/usr/share/discord/Discord:${DESTDIR}/${MY_PN^}:" \ - "${MY_PN}.desktop" || - die "fixing of exec location on .desktop failed" - # USE wayland - if use wayland; then - sed -i '/Exec/s/Discord/Discord --enable-features=UseOzonePlatform --ozone-platform=wayland/' \ - "${MY_PN}.desktop" || - die "sed failed for wayland" - fi - # USE seccomp - if ! use seccomp; then - sed -i '/Exec/s/Discord/Discord --disable-seccomp-filter-sandbox/' \ - "${MY_PN}.desktop" || - die "sed failed for seccomp" - 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 - - dosym "${DESTDIR}/${MY_PN^}" "/usr/bin/${MY_PN}" - - # 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/files/launcher.sh b/net-im/discord/files/launcher.sh new file mode 100644 index 000000000000..032524ae68e9 --- /dev/null +++ b/net-im/discord/files/launcher.sh @@ -0,0 +1,17 @@ +#!/bin/env bash +# coding: UTF-8 + + +declare -a discord_parameters + +SECCOMP=false + +[[ ! "${SECCOMP}" ]] && discord_parameters+=( --disable-seccomp-filter-sandbox ) + +[[ -n "${WAYLAND_DISPLAY}" ]] && discord_parameters+=( + --enable-features=UseOzonePlatform + --ozone-platform=wayland + --enable-wayland-ime +) + +@@DESTDIR@@/Discord "${discord_parameters[@]}" "$@" -- cgit v1.2.3