From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A20F1158090 for ; Thu, 19 May 2022 02:04:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1971E092D; Thu, 19 May 2022 02:03:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A3525E092D for ; Thu, 19 May 2022 02:03:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C511341750 for ; Thu, 19 May 2022 02:03:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 03CFC47E for ; Thu, 19 May 2022 02:03:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1652925533.a310b92544e1e20dfd9b66626fa796c4d522c788.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/discord-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/discord-bin/Manifest net-im/discord-bin/discord-bin-0.0.17-r1.ebuild X-VCS-Directories: net-im/discord-bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a310b92544e1e20dfd9b66626fa796c4d522c788 X-VCS-Branch: master Date: Thu, 19 May 2022 02:03:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 59940ec1-e627-4525-8e3b-4d4fbe8d6f31 X-Archives-Hash: d30eba24089a1331ad25224da7c7b1c1 commit: a310b92544e1e20dfd9b66626fa796c4d522c788 Author: Randall T. Vasquez icloud com> AuthorDate: Tue May 17 22:59:20 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu May 19 01:58:53 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a310b925 net-im/discord-bin: refactor the Discord ebuild This is a general refactor of the Discord ebuild. It cleans up several things and fixes permissions, mostly. It seems to improve performance greatly. Closes: https://bugs.gentoo.org/845219 Signed-off-by: Randall T. Vasquez icloud.com> Closes: https://github.com/gentoo/gentoo/pull/25542 Signed-off-by: Sam James gentoo.org> net-im/discord-bin/Manifest | 1 + net-im/discord-bin/discord-bin-0.0.17-r1.ebuild | 145 ++++++++++++++++++++++++ 2 files changed, 146 insertions(+) diff --git a/net-im/discord-bin/Manifest b/net-im/discord-bin/Manifest index b0968102aa90..83e85a4eaf0f 100644 --- a/net-im/discord-bin/Manifest +++ b/net-im/discord-bin/Manifest @@ -1 +1,2 @@ DIST discord-0.0.17.deb 77105376 BLAKE2B b11d9d6798beb3dbb36892c9c948535fee453c258a91f48b04a686813fb82dc43f7872fcb4e68d17e6fb366a84825aa0e7b4f1ad45ab4efec403a05fb88c4f2a SHA512 b51d8e019b9c8c365aedbc7c77e53febec95d0c0f1b773e008d4d72e3880303b6f2d3381f363eedc8e08492ee2d2e8ef6d65353e852a8db9d708a70caabbb3cb +DIST discord-0.0.17.tar.gz 77399242 BLAKE2B 0ed763947afd6478becff7c4f81fd805a681b77c48c52a958cc922242ab115b29f05cd2760dcb46d306aa5c1b39ac8ccb54d81e9c1d3b873cd01987d1a02ee2f SHA512 728c760f04770b197635d1fc1a2833c707ab462708cc0bf6fb165691c1375e14e3192f3806d3719325790459b39bd3425f5942d69a53019695f02c965214a5c9 diff --git a/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild b/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild new file mode 100644 index 000000000000..a818701fa4ed --- /dev/null +++ b/net-im/discord-bin/discord-bin-0.0.17-r1.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="${PN/-bin}" +MY_PV="${PV/-r*}" +MY_BIN="${MY_PN^}" + +CHROMIUM_LANGS=" + 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 vi zh-CN zh-TW +" + +inherit chromium-2 desktop linux-info optfeature pax-utils unpacker + +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" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64" + +# libXScrnSaver is used through dlopen (bug #825370) +RDEPEND=" + app-accessibility/at-spi2-atk:2 + app-accessibility/at-spi2-core:2 + dev-libs/atk + dev-libs/expat + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + media-libs/alsa-lib + media-libs/mesa[gbm(+)] + net-print/cups + sys-apps/dbus + sys-libs/glibc + x11-libs/cairo + 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/libdrm + x11-libs/libxcb + x11-libs/libxkbcommon + x11-libs/libxshmfence + x11-libs/pango +" + +RESTRICT="bindist mirror strip test" + +QA_PREBUILT=" + ${DESTDIR}/${MY_BIN} + ${DESTDIR}/chrome-sandbox + ${DESTDIR}/libffmpeg.so + ${DESTDIR}/libvk_swiftshader.so + ${DESTDIR}/libvulkan.so + ${DESTDIR}/libEGL.so + ${DESTDIR}/libGLESv2.so + ${DESTDIR}/libVkICD_mock_icd.so + ${DESTDIR}/swiftshader/libEGL.so + ${DESTDIR}/swiftshader/libGLESv2.so + ${DESTDIR}/swiftshader/libvk_swiftshader.so +" + +CONFIG_CHECK="~USER_NS" + +S="${WORKDIR}/${MY_BIN}" + +DESTDIR="/opt/${MY_BIN}" + +pkg_pretend() { + chromium_suid_sandbox_check_kernel_config +} + +src_unpack() { + unpack ${MY_PN}-${MY_PV}.tar.gz || die +} + +src_configure() { + chromium_suid_sandbox_check_kernel_config + default +} + +src_prepare() { + default + + rm postinst.sh + + pushd "locales/" || die + chromium_remove_language_paks + popd + + sed -i \ + -e "s:/usr/share/discord/Discord:${DESTDIR}/${MY_BIN}:" \ + ${MY_PN}.desktop || die +} + +src_install() { + doicon -s 256 ${MY_PN}.png + + # Install desktop file + domenu ${MY_PN}.desktop + + exeinto ${DESTDIR} + doexe ${MY_BIN} 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 swiftshader + + # chrome-sandbox requires the setuid bit to be specifically set. + # See https://github.com/electron/electron/issues/17972 + fperms 4755 ${DESTDIR}/chrome-sandbox || die + + pax-mark m ${DESTDIR}/${MY_BIN} || die "could not set proper PAX permissions" + + dosym ${DESTDIR}/${MY_BIN} /usr/bin/${MY_PN} || die + + dodir ${DESTDIR} +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update + + optfeature "sound support" \ + media-sound/pulseaudio media-sound/apulse[sdk] media-video/pipewire + optfeature "system tray support" dev-libs/libappindicator +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +}