From f4106f0cb3d17dc4c85cd4d45816e2c18a8d29e2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Mar 2024 01:00:14 +0000 Subject: gentoo auto-resync : 20:03:2024 - 01:00:13 --- net-misc/sunshine/Manifest | 10 +- net-misc/sunshine/sunshine-0.22.0.ebuild | 378 ------------------------------- net-misc/sunshine/sunshine-0.22.2.ebuild | 378 +++++++++++++++++++++++++++++++ net-misc/sunshine/sunshine-9999.ebuild | 2 +- 4 files changed, 384 insertions(+), 384 deletions(-) delete mode 100644 net-misc/sunshine/sunshine-0.22.0.ebuild create mode 100644 net-misc/sunshine/sunshine-0.22.2.ebuild (limited to 'net-misc/sunshine') diff --git a/net-misc/sunshine/Manifest b/net-misc/sunshine/Manifest index ad57e0de9742..5ef70ed6d838 100644 --- a/net-misc/sunshine/Manifest +++ b/net-misc/sunshine/Manifest @@ -2,15 +2,15 @@ AUX sunshine-0.22.0-nvcodec.patch 1009 BLAKE2B 4a2fd3dbd98b64fd6e259c94d218f9853 AUX sunshine-cross-cbs.patch 2020 BLAKE2B b57c6fe66707a86b35a70945ca9b9da9c4e8bb0bba8bd0d66e9ec9e3d15121cc4a193b56ea376ff3e244d652c18ac7504d687cefd54876afcf3cb54d8024c71b SHA512 95710af147509f8c93c875513c01a596fd62fe421495395dfeef41a6230d031e779277a9a2604c4d5dce788d6ecf77e667942d3ae2d6e675ef29db86e6519734 AUX sunshine-custom-ffmpeg.patch 7668 BLAKE2B 2fa8adf912791e8abf73f0ea173228318edb804584c1efbe15077d6b6e08f7e6cfaa4dacf5e02115325ebe9a0ef09b9e49d3e021d6220dff0b364c1bbcd0b7e4 SHA512 ace6b855edf21a91958d843bff730634c585a96c1f728c304e7b79ddacc96fdb767936fd5d8dd8f2df3347d12a25519e9d1511ada3828404b9440d8333bfc013 DIST LizardByte-build-deps-2aafe061cd52a944cb3b5f86d1f25e9ad2a19bec.tar.gz 24171 BLAKE2B bcc8f1829eae4ba85a9cbdaca7876a4a52c979f3b8ef0f0a56876fcb171025544bd1997455c2b8fff59564deca433366ae03f14cbb0929f78c87f991b269156f SHA512 892184ec0ff321b2b7e2000dc605d1162955cb04ff259f6032f124f1ff50a1fe485e2cf2c0b735788f8615c9aba87ca040205599cb4b91881daa462a53340bd7 -DIST LizardByte-tray-2bf1c610300b27f8d8ce87e2f13223fc83efeb42.tar.gz 1067540 BLAKE2B f832dc11398086236817f25e2343831bd7533737d851958df2bcc155a204f99bd0b491a5c259bf559d83108ec71afc3e85424d79040a641a4bcb832419120da6 SHA512 fa2bacc412268e82c03718e954914fc713d271398dfbef2a86c4da649f63233aff9bf6e99b08d6f3c8385d0c96f25d9d54b145d8d7422a82e80b5aa2e62de641 +DIST LizardByte-tray-4d8b798cafdd11285af9409c16b5f792968e0045.tar.gz 1068346 BLAKE2B 6da778c6dc1efb1147363de239a4170dad23288322285b847ed86837b316162bce861b848b8371ea8562efbfa0d36dc6921e8a36da0a05740e3f6aa1da29fae1 SHA512 9c6535a6a3ba4489b5af0821a8c42bbb706259c10d70237bd3d3b31283a7e8ad0e3c2326a34c229d899389156909c36252a931ea47eef8daeb8b7c54b26e92cb DIST Simple-Web-Server-27b41f5ee154cca0fce4fe2955dd886d04e3a4ed.tar.bz2 63258 BLAKE2B e80a6cd92825038ca75b973281b676584f9e488b45b1f9c6ed526236c0a7188b97ae2bba9d7b5557893452dd1ba8778faff2ade840cc169d20b4cf0e51fc8394 SHA512 2eba1d8bd53bb3e29e51a72000918b44730f73b4df26824f25cb6a4860dd21f8aaa7f77124fb500ffe9601ebeca66d1c21a06cad239ed27481e9cae088afbd44 DIST ffmpeg-6.1.1.tar.xz 10458600 BLAKE2B 77827ff92b47c773ed82e7b7793dbb135c370fe23501169cb1eab08ff5ede77cfd5b397e8fb1d38756812cc82277898fd5c74b7d8495842556570c0c5570daeb SHA512 fca3f8635f29182e3ae0fe843a8a53614e4b47e22c11508df3ff7cdbafbb4b5ee0d82d9b3332871f7c1032033b1cad2f67557d7c5f7f7d85e2adadca122965d5 DIST moonlight-common-c-cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e.tar.gz 148691 BLAKE2B 2650e48ef5d08b5e4a901e0b394364335503cd717ae75b4ecf5329395f39d3312a9bbfe08137d2b7697f7b1672749d148e100fbaa5c7f87d190ab8157f158639 SHA512 f1d7848138b85a88abf798774f12f6491e19ae5e7699715b0454bfccc184439fba0ebf7e05327fd649e320e5d1ad610c57fe71190f92cf2248c8f974f9d79aaf DIST moonlight-enet-04e27590670a87a7cd40f5a05cda97467e4e25a3.tar.gz 86434 BLAKE2B 8a5535843e4c650b945882abac1542bf8c79dc420607b88433d239aa5a17380f02e77bb8f1fcbe45dcb8ef894e6c9b4d940f4d3b34b956ce42d86f6a8ca5227a SHA512 6d2e9447e546489365b1fb563ed52664a91981717a3a3a9faa9600ab62be5ac09bd24ee9dd505833d31981ce6222f5ef430268a9f92aa83fa288b5b8d681e2aa DIST nanors-e9e242e98e27037830490b2a752895ca68f75f8b.tar.gz 194694 BLAKE2B 1effd7c0884ffd38b63d61a7872337797529ef2012f9de0950088a5004cb32a2fb2c14bcab2ec6719968864e5e6b9a67e96afa39466e2071bf4a0cd752ae4b29 SHA512 548be25650619a6c31944cd7a745fd40d5bc5008f2d7f91e0207a10b923764cb88fd2ddcb71eaed7c4863ec89b34d61011b666e292da071ac3b4429e4d7dd027 -DIST sunshine-0.22.0.tar.gz 24103053 BLAKE2B ddb8cfd8df6d5307f1008bfed28c10d05737cee70e8c33e18229e916f4e6aa415cf797bb16127f0e8076af4e9648baff6b0ec5775dd5cba1a9791b0d80f6d834 SHA512 b9b5bff58b4f69b49fe0b62b1cc9e00e1e7e923492d3475ff6cb93f9dbd233751497d62ea3c84100a2b153bcfa7ae84a1819dcebe9fa6816859779a96ca66754 -DIST sunshine-npm-cache-0.22.0.tar.xz 22447384 BLAKE2B 33ab2fd0fde252285bcacc231a32e50b486db7141d425850378c6633da3ba9652cc76a0ef95b6fb9307f9fe59677203a5d861ef143acf609b3b46e0c5727ac34 SHA512 8e5e05421533d467eeac55435de06dab5510993e4f3bb7fa081b80d478497dcc7575d656222178aa01a3f110a781cbd14bb94ca704ef61877b1a02d51960f09d +DIST sunshine-0.22.2.tar.gz 24109406 BLAKE2B b37ef02e33af7257a0173e11fcf230cb044ef641103ef82631bd4751e5a5fd8aa0e8dc64a7835789a6741951f19289cc11f819e2e580dc39681a10cf00a845f5 SHA512 0913571ace3aefe1db27b7b0612fdb97fa7b072543dadd08f6276c1c9cde9d1d3aa4cf2bf137a96c866da9915b72ccbbb9bda096dcd86d61034c67a58fac4bda +DIST sunshine-npm-cache-0.22.2.tar.xz 22457340 BLAKE2B e843ada90c183ab0d33182a419150e47e2ee8f348150082df2617416a80d636086a1f34231045800363cc97adc44cfab22a46d6700c330104fb33a9894a39ded SHA512 fb465b62dc8a064eda3bc811ff4acf9ac56a42bcb87e68bf63502ffeb087f12f26f60b37da76fc0eb4e83c328e0c9bc471f79d42cde932b8e43b8a1456ab7523 DIST wlr-protocols-4264185db3b7e961e7f157e1cc4fd0ab75137568.tar.bz2 19574 BLAKE2B 65666095f186857e3c5274b23d5c40b40b0ba5d945c7b34331a06320128cb69a36a76baf2381b635858736ca6ed438c2ed67c03fac1c20e1ec4d71de27037e42 SHA512 0e6afde055d9b76bcb8c717433b78814f2cf9338ead451d3119f62463198ef272029767898e8f7d32896f2732be3aaa2a0373c671d8196e745d62f6116cd1583 -EBUILD sunshine-0.22.0.ebuild 11903 BLAKE2B 9f6a1adc8d079f20441051056f05f7c405335980b24b8cb8ec47de2a740c03eab9c6ce78d794cfe98f0a8ab887db1ad94576b7c5ca9e5d937349356a0dc72c74 SHA512 e5ebddd20400cde78875882ccb18ea928e056592af2ac1f0faf58f8f804aff3bde6d2c53026a05f7b968f9c978a381544a906f739ee989a4c194c8b8fc6a9560 -EBUILD sunshine-9999.ebuild 11903 BLAKE2B 9f6a1adc8d079f20441051056f05f7c405335980b24b8cb8ec47de2a740c03eab9c6ce78d794cfe98f0a8ab887db1ad94576b7c5ca9e5d937349356a0dc72c74 SHA512 e5ebddd20400cde78875882ccb18ea928e056592af2ac1f0faf58f8f804aff3bde6d2c53026a05f7b968f9c978a381544a906f739ee989a4c194c8b8fc6a9560 +EBUILD sunshine-0.22.2.ebuild 11903 BLAKE2B 02c0191b9ba4550908cebf0d2da4f37fa37f0761f2e59d54c6e3a85c4381d1182bf0959185fecfa7f3d1a97df18b7d8b7735d71ce3a0746c854c9b4d8913365c SHA512 fac7f4cda4f110a90d0eeb0fb34b23aaea4b560e694255d3de95e0bd8559e346f69633d51bc3979c251254d7f0bc6de87bfeeec04ee5c17bb1eee733d502286a +EBUILD sunshine-9999.ebuild 11903 BLAKE2B 02c0191b9ba4550908cebf0d2da4f37fa37f0761f2e59d54c6e3a85c4381d1182bf0959185fecfa7f3d1a97df18b7d8b7735d71ce3a0746c854c9b4d8913365c SHA512 fac7f4cda4f110a90d0eeb0fb34b23aaea4b560e694255d3de95e0bd8559e346f69633d51bc3979c251254d7f0bc6de87bfeeec04ee5c17bb1eee733d502286a MISC metadata.xml 880 BLAKE2B 656a3a283ae7504498d1a67cc343cfa614e21e0422c1076781164822809079eafe8e514d01182e977f7add5a28c4e7e09db985c8e4ea551eef1a1f92609488d9 SHA512 679f3c676ce568e8c0a8b816463c66d69055d0dba740c9065ce8feb36335981df65fff9d47f35e93f6b60337cc59f3da6ec3b83f9bb01905c73f912b50a0366d diff --git a/net-misc/sunshine/sunshine-0.22.0.ebuild b/net-misc/sunshine/sunshine-0.22.0.ebuild deleted file mode 100644 index 87184bed9664..000000000000 --- a/net-misc/sunshine/sunshine-0.22.0.ebuild +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# These don't necessarily have to align with the upstream release. -BUILD_DEPS_COMMIT="2aafe061cd52a944cb3b5f86d1f25e9ad2a19bec" -ENET_COMMIT="04e27590670a87a7cd40f5a05cda97467e4e25a3" -MOONLIGHT_COMMIT="cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e" -NANORS_COMMIT="e9e242e98e27037830490b2a752895ca68f75f8b" -TRAY_COMMIT="2bf1c610300b27f8d8ce87e2f13223fc83efeb42" -SWS_COMMIT="27b41f5ee154cca0fce4fe2955dd886d04e3a4ed" -WLRP_COMMIT="4264185db3b7e961e7f157e1cc4fd0ab75137568" -FFMPEG_VERSION="6.1.1" - -# To make the node-modules tarball: -# PV= -# git fetch -# git checkout v$PV -# rm -rf node_modules npm_cache package-lock.json -# npm_config_cache="${PWD}"/npm_cache npm install --logs-max=0 --omit=optional -# XZ_OPT=-9 tar --xform="s:^:Sunshine-$PV/:" -Jcf /var/cache/distfiles/sunshine-npm-cache-$PV.tar.xz npm_cache package-lock.json - -if [[ ${PV} = 9999* ]]; then - inherit git-r3 -else - SRC_URI=" - https://github.com/LizardByte/Sunshine/archive/refs/tags/v${PV}.tar.gz - -> ${P}.tar.gz - https://github.com/LizardByte/build-deps/archive/${BUILD_DEPS_COMMIT}.tar.gz - -> LizardByte-build-deps-${BUILD_DEPS_COMMIT}.tar.gz - https://github.com/cgutman/enet/archive/${ENET_COMMIT}.tar.gz - -> moonlight-enet-${ENET_COMMIT}.tar.gz - https://github.com/moonlight-stream/moonlight-common-c/archive/${MOONLIGHT_COMMIT}.tar.gz - -> moonlight-common-c-${MOONLIGHT_COMMIT}.tar.gz - https://github.com/sleepybishop/nanors/archive/${NANORS_COMMIT}.tar.gz - -> nanors-${NANORS_COMMIT}.tar.gz - https://github.com/LizardByte/tray/archive/${TRAY_COMMIT}.tar.gz - -> LizardByte-tray-${TRAY_COMMIT}.tar.gz - https://gitlab.com/eidheim/Simple-Web-Server/-/archive/${SWS_COMMIT}/Simple-Web-Server-${SWS_COMMIT}.tar.bz2 - https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/archive/${WLRP_COMMIT}/wlr-protocols-${WLRP_COMMIT}.tar.bz2 - https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz - https://dev.gentoo.org/~chewi/distfiles/${PN}-npm-cache-${PV}.tar.xz - " - KEYWORDS="~amd64 ~arm64" - S="${WORKDIR}/Sunshine-${PV}" -fi - -inherit cmake fcaps flag-o-matic systemd toolchain-funcs udev xdg - -DESCRIPTION="Self-hosted game stream host for Moonlight" -HOMEPAGE="https://github.com/LizardByte/Sunshine" -LICENSE="GPL-3" -SLOT="0" -IUSE="cuda debug libdrm svt-av1 trayicon vaapi wayland X x264 x265" - -# Strings for CPU features in the useflag[:configure_option] form -# if :configure_option isn't set, it will use 'useflag' as configure option -ARM_CPU_FEATURES=( - cpu_flags_arm_thumb:armv5te - cpu_flags_arm_v6:armv6 - cpu_flags_arm_thumb2:armv6t2 - cpu_flags_arm_neon:neon - cpu_flags_arm_vfp:vfp - cpu_flags_arm_vfpv3:vfpv3 - cpu_flags_arm_v8:armv8 - cpu_flags_arm_asimddp:dotprod - cpu_flags_arm_i8mm:i8mm -) -ARM_CPU_REQUIRED_USE=" - arm64? ( cpu_flags_arm_v8 ) - cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) - cpu_flags_arm_neon? ( - cpu_flags_arm_vfp - arm? ( cpu_flags_arm_thumb2 ) - ) - cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) - cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) - cpu_flags_arm_v6? ( - arm? ( cpu_flags_arm_thumb ) - ) -" -PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) -PPC_CPU_REQUIRED_USE=" - cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) -" -X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx - mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) -X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) -X86_CPU_REQUIRED_USE=" - cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) - cpu_flags_x86_xop? ( cpu_flags_x86_avx ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) - cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) - cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) - cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) - cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) -" - -CPU_FEATURES_MAP=( - ${ARM_CPU_FEATURES[@]} - ${PPC_CPU_FEATURES[@]} - ${X86_CPU_FEATURES[@]} -) -IUSE="${IUSE} - ${CPU_FEATURES_MAP[@]%:*}" - -CPU_REQUIRED_USE=" - ${ARM_CPU_REQUIRED_USE} - ${PPC_CPU_REQUIRED_USE} - ${X86_CPU_REQUIRED_USE} -" - -REQUIRED_USE=" - ${CPU_REQUIRED_USE} - || ( cuda libdrm wayland X ) -" - -CDEPEND=" - dev-libs/boost:=[nls] - dev-libs/libevdev - dev-libs/openssl:= - media-libs/opus - net-libs/miniupnpc:= - net-misc/curl - || ( - media-libs/libpulse - media-sound/apulse[sdk] - ) - libdrm? ( - sys-libs/libcap - x11-libs/libdrm - ) - svt-av1? ( media-libs/svt-av1 ) - trayicon? ( - dev-libs/libayatana-appindicator - x11-libs/libnotify - ) - vaapi? ( media-libs/libva:=[wayland?,X?] ) - wayland? ( dev-libs/wayland ) - X? ( x11-libs/libX11 ) - x264? ( media-libs/x264:= ) - x265? ( media-libs/x265:= ) -" - -RDEPEND=" - ${CDEPEND} - media-libs/mesa[vaapi?] - X? ( - x11-libs/libxcb - x11-libs/libXfixes - x11-libs/libXrandr - x11-libs/libXtst - ) -" - -DEPEND=" - ${CDEPEND} - media-libs/amf-headers - =media-libs/nv-codec-headers-12* - wayland? ( dev-libs/wayland-protocols ) -" - -BDEPEND=" - net-libs/nodejs[npm] - virtual/pkgconfig - cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) - cuda? ( dev-util/nvidia-cuda-toolkit ) - wayland? ( dev-util/wayland-scanner ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-custom-ffmpeg.patch - "${FILESDIR}"/${PN}-0.22.0-nvcodec.patch -) - -# Make this mess a bit simpler. -CMAKE_IN_SOURCE_BUILD=1 - -# Make npm behave. -export npm_config_audit=false -export npm_config_cache="${S}"/npm_cache -export npm_config_color=false -export npm_config_foreground_scripts=true -export npm_config_loglevel=verbose -export npm_config_optional=false -export npm_config_progress=false -export npm_config_save=false - -src_unpack() { - if [[ ${PV} = 9999* ]]; then - local EGIT_REPO_URI="https://github.com/LizardByte/build-deps.git" - local EGIT_SUBMODULES=( '-*' ) - local EGIT_CHECKOUT_DIR=${WORKDIR}/build-deps - git-r3_src_unpack - - # Use upstream server like our ffmpeg package does, not GitHub. - local EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" - local EGIT_SUBMODULES=( '-*' ) - local EGIT_CHECKOUT_DIR=${EGIT_CHECKOUT_DIR}/ffmpeg_sources/ffmpeg - local EGIT_COMMIT=$(git --git-dir=build-deps/.git rev-parse HEAD:ffmpeg_sources/ffmpeg) - local EGIT_BRANCH=release/$(ver_cut 1-2 ${FFMPEG_VERSION}) - git-r3_src_unpack - - local EGIT_REPO_URI="https://github.com/LizardByte/Sunshine.git" - local EGIT_SUBMODULES=( - third-party/{moonlight-common-c{,/enet},nanors,tray,Simple-Web-Server,wlr-protocols} - ) - unset EGIT_CHECKOUT_DIR EGIT_COMMIT EGIT_BRANCH - git-r3_src_unpack - - # This downloads things so must go in src_unpack to avoid the sandbox. - cd "${S}" || die - npm install || die - else - default - ln -snf build-deps-${BUILD_DEPS_COMMIT} build-deps || die - find moonlight-common-c-${MOONLIGHT_COMMIT} "${S}"/third-party build-deps/ffmpeg_sources \ - -mindepth 1 -type d -empty -delete || die - ln -snf ../enet-${ENET_COMMIT} moonlight-common-c-${MOONLIGHT_COMMIT}/enet || die - ln -snf ../../moonlight-common-c-${MOONLIGHT_COMMIT} "${S}"/third-party/moonlight-common-c || die - ln -snf ../../nanors-${NANORS_COMMIT} "${S}"/third-party/nanors || die - ln -snf ../../tray-${TRAY_COMMIT} "${S}"/third-party/tray || die - ln -snf ../../Simple-Web-Server-${SWS_COMMIT} "${S}"/third-party/Simple-Web-Server || die - ln -snf ../../wlr-protocols-${WLRP_COMMIT} "${S}"/third-party/wlr-protocols || die - ln -snf ../../ffmpeg-${FFMPEG_VERSION} build-deps/ffmpeg_sources/ffmpeg || die - fi -} - -src_prepare() { - # Apply CBS patch. - cd "${WORKDIR}"/build-deps || die - eapply "${FILESDIR}"/${PN}-cross-cbs.patch - - # Apply general ffmpeg patches. - cd "${WORKDIR}"/build-deps/ffmpeg_sources/ffmpeg || die - eapply "${WORKDIR}"/build-deps/ffmpeg_patches/ffmpeg/*.patch - - # Copy ffmpeg sources because CBS build applies extra patches. - cp -a ./ "${WORKDIR}"/ffmpeg-build || die - - cd "${S}" || die - CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_prepare - default_src_prepare() { :; } # Hack to avoid double patching! :( - CMAKE_USE_DIR="${S}" cmake_src_prepare -} - -src_configure() { - local myconf=( - --prefix="${S}"/third-party/ffmpeg - --cc="$(tc-getCC)" - --cxx="$(tc-getCXX)" - --ar="$(tc-getAR)" - --nm="$(tc-getNM)" - --strip="$(tc-getSTRIP)" - --ranlib="$(tc-getRANLIB)" - --pkg-config="$(tc-getPKG_CONFIG)" - --optflags="${CFLAGS}" - --disable-all - --disable-autodetect - --disable-error-resilience - --disable-everything - --disable-faan - --disable-iconv - --disable-network - --disable-optimizations - --disable-stripping - --enable-amf - --enable-avcodec - --enable-ffnvcodec - --enable-gpl - --enable-nvenc - --enable-static - --enable-swscale - --enable-v4l2_m2m - $(use_enable cuda) - $(use_enable cuda cuda_llvm) - $(use_enable svt-av1 libsvtav1) - $(use_enable vaapi) - $(use_enable x264 libx264) - $(use_enable x265 libx265) - $(usex svt-av1 --enable-encoder=libsvtav1 "") - $(usex vaapi --enable-encoder=h264_vaapi,hevc_vaapi,av1_vaapi "") - $(usex x264 --enable-encoder=libx264 "") - $(usex x265 --enable-encoder=libx265 "") - --enable-encoder=h264_amf,hevc_amf,av1_amf - --enable-encoder=h264_nvenc,hevc_nvenc,av1_nvenc - --enable-encoder=h264_v4l2m2m,hevc_v4l2m2m - ) - - # CPU features - for i in "${CPU_FEATURES_MAP[@]}" ; do - use ${i%:*} || myconf+=( --disable-${i#*:} ) - done - - # Try to get cpu type based on CFLAGS. - # Bug #172723 - # We need to do this so that features of that CPU will be better used - # If they contain an unknown CPU it will not hurt since ffmpeg's configure - # will just ignore it. - for i in $(get-flag mcpu) $(get-flag march) ; do - [[ ${i} = native ]] && i="host" # bug #273421 - myconf+=( --cpu=${i} ) - break - done - - # cross compile support - if tc-is-cross-compiler ; then - myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) - case ${CHOST} in - *mingw32*) - myconf+=( --target-os=mingw32 ) - ;; - *linux*) - myconf+=( --target-os=linux ) - ;; - esac - fi - - cd "${WORKDIR}"/ffmpeg-build || die - echo ./configure "${myconf[@]}" - ./configure "${myconf[@]}" || die - - local mycmakeargs=( - -DBUILD_SHARED_LIBS=no - -DCMAKE_INSTALL_PREFIX="${S}"/third-party/ffmpeg - ) - CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_configure - - local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_Git=yes - -DFFMPEG_PLATFORM_LIBRARIES="$(usex svt-av1 SvtAv1Enc '');$(usex vaapi 'va;va-drm' '');$(usev x264);$(usev x265)" - -DFFMPEG_PREPARED_BINARIES="${S}"/third-party/ffmpeg - -DSUNSHINE_ASSETS_DIR=share/${PN} - -DSUNSHINE_ENABLE_CUDA=$(usex cuda) - -DSUNSHINE_ENABLE_DRM=$(usex libdrm) - -DSUNSHINE_ENABLE_VAAPI=$(usex vaapi) - -DSUNSHINE_ENABLE_WAYLAND=$(usex wayland) - -DSUNSHINE_ENABLE_X11=$(usex X) - -DSUNSHINE_ENABLE_TRAY=$(usex trayicon) - -DSUNSHINE_REQUIRE_TRAY=$(usex trayicon) - -DSUNSHINE_SYSTEM_WAYLAND_PROTOCOLS=yes - -DSYSTEMD_USER_UNIT_INSTALL_DIR=$(systemd_get_userunitdir) - -DUDEV_RULES_INSTALL_DIR=$(get_udevdir)/rules.d - ) - CMAKE_USE_DIR="${S}" cmake_src_configure -} - -src_compile() { - emake -C "${WORKDIR}"/ffmpeg-build V=1 - emake -C "${WORKDIR}"/ffmpeg-build V=1 install - CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_compile - CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_build install - CMAKE_USE_DIR="${S}" npm_config_offline=1 cmake_src_compile -} - -pkg_postinst() { - udev_reload - xdg_pkg_postinst - use libdrm && fcaps cap_sys_admin+p usr/bin/"$(readlink "${EROOT}"/usr/bin/${PN})" - - elog "At upstream's request, please report any issues to https://bugs.gentoo.org" - elog "rather than going directly to them." -} - -pkg_postrm() { - udev_reload - xdg_pkg_postrm -} diff --git a/net-misc/sunshine/sunshine-0.22.2.ebuild b/net-misc/sunshine/sunshine-0.22.2.ebuild new file mode 100644 index 000000000000..d4852f3d0dbe --- /dev/null +++ b/net-misc/sunshine/sunshine-0.22.2.ebuild @@ -0,0 +1,378 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# These don't necessarily have to align with the upstream release. +BUILD_DEPS_COMMIT="2aafe061cd52a944cb3b5f86d1f25e9ad2a19bec" +ENET_COMMIT="04e27590670a87a7cd40f5a05cda97467e4e25a3" +MOONLIGHT_COMMIT="cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e" +NANORS_COMMIT="e9e242e98e27037830490b2a752895ca68f75f8b" +TRAY_COMMIT="4d8b798cafdd11285af9409c16b5f792968e0045" +SWS_COMMIT="27b41f5ee154cca0fce4fe2955dd886d04e3a4ed" +WLRP_COMMIT="4264185db3b7e961e7f157e1cc4fd0ab75137568" +FFMPEG_VERSION="6.1.1" + +# To make the node-modules tarball: +# PV= +# git fetch +# git checkout v$PV +# rm -rf node_modules npm_cache package-lock.json +# npm_config_cache="${PWD}"/npm_cache npm install --logs-max=0 --omit=optional +# XZ_OPT=-9 tar --xform="s:^:Sunshine-$PV/:" -Jcf /var/cache/distfiles/sunshine-npm-cache-$PV.tar.xz npm_cache package-lock.json + +if [[ ${PV} = 9999* ]]; then + inherit git-r3 +else + SRC_URI=" + https://github.com/LizardByte/Sunshine/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz + https://github.com/LizardByte/build-deps/archive/${BUILD_DEPS_COMMIT}.tar.gz + -> LizardByte-build-deps-${BUILD_DEPS_COMMIT}.tar.gz + https://github.com/cgutman/enet/archive/${ENET_COMMIT}.tar.gz + -> moonlight-enet-${ENET_COMMIT}.tar.gz + https://github.com/moonlight-stream/moonlight-common-c/archive/${MOONLIGHT_COMMIT}.tar.gz + -> moonlight-common-c-${MOONLIGHT_COMMIT}.tar.gz + https://github.com/sleepybishop/nanors/archive/${NANORS_COMMIT}.tar.gz + -> nanors-${NANORS_COMMIT}.tar.gz + https://github.com/LizardByte/tray/archive/${TRAY_COMMIT}.tar.gz + -> LizardByte-tray-${TRAY_COMMIT}.tar.gz + https://gitlab.com/eidheim/Simple-Web-Server/-/archive/${SWS_COMMIT}/Simple-Web-Server-${SWS_COMMIT}.tar.bz2 + https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/archive/${WLRP_COMMIT}/wlr-protocols-${WLRP_COMMIT}.tar.bz2 + https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz + https://dev.gentoo.org/~chewi/distfiles/${PN}-npm-cache-${PV}.tar.xz + " + KEYWORDS="~amd64 ~arm64" + S="${WORKDIR}/Sunshine-${PV}" +fi + +inherit cmake fcaps flag-o-matic systemd toolchain-funcs udev xdg + +DESCRIPTION="Self-hosted game stream host for Moonlight" +HOMEPAGE="https://github.com/LizardByte/Sunshine" +LICENSE="GPL-3" +SLOT="0" +IUSE="cuda debug libdrm svt-av1 trayicon vaapi wayland X x264 x265" + +# Strings for CPU features in the useflag[:configure_option] form +# if :configure_option isn't set, it will use 'useflag' as configure option +ARM_CPU_FEATURES=( + cpu_flags_arm_thumb:armv5te + cpu_flags_arm_v6:armv6 + cpu_flags_arm_thumb2:armv6t2 + cpu_flags_arm_neon:neon + cpu_flags_arm_vfp:vfp + cpu_flags_arm_vfpv3:vfpv3 + cpu_flags_arm_v8:armv8 + cpu_flags_arm_asimddp:dotprod + cpu_flags_arm_i8mm:i8mm +) +ARM_CPU_REQUIRED_USE=" + arm64? ( cpu_flags_arm_v8 ) + cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) + cpu_flags_arm_neon? ( + cpu_flags_arm_vfp + arm? ( cpu_flags_arm_thumb2 ) + ) + cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) + cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) + cpu_flags_arm_v6? ( + arm? ( cpu_flags_arm_thumb ) + ) +" +PPC_CPU_FEATURES=( cpu_flags_ppc_altivec:altivec cpu_flags_ppc_vsx:vsx cpu_flags_ppc_vsx2:power8 ) +PPC_CPU_REQUIRED_USE=" + cpu_flags_ppc_vsx? ( cpu_flags_ppc_altivec ) + cpu_flags_ppc_vsx2? ( cpu_flags_ppc_vsx ) +" +X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx + mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) +X86_CPU_REQUIRED_USE=" + cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) + cpu_flags_x86_xop? ( cpu_flags_x86_avx ) + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) + cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) +" + +CPU_FEATURES_MAP=( + ${ARM_CPU_FEATURES[@]} + ${PPC_CPU_FEATURES[@]} + ${X86_CPU_FEATURES[@]} +) +IUSE="${IUSE} + ${CPU_FEATURES_MAP[@]%:*}" + +CPU_REQUIRED_USE=" + ${ARM_CPU_REQUIRED_USE} + ${PPC_CPU_REQUIRED_USE} + ${X86_CPU_REQUIRED_USE} +" + +REQUIRED_USE=" + ${CPU_REQUIRED_USE} + || ( cuda libdrm wayland X ) +" + +CDEPEND=" + dev-libs/boost:=[nls] + dev-libs/libevdev + dev-libs/openssl:= + media-libs/opus + net-libs/miniupnpc:= + net-misc/curl + || ( + media-libs/libpulse + media-sound/apulse[sdk] + ) + libdrm? ( + sys-libs/libcap + x11-libs/libdrm + ) + svt-av1? ( media-libs/svt-av1 ) + trayicon? ( + dev-libs/libayatana-appindicator + x11-libs/libnotify + ) + vaapi? ( media-libs/libva:=[wayland?,X?] ) + wayland? ( dev-libs/wayland ) + X? ( x11-libs/libX11 ) + x264? ( media-libs/x264:= ) + x265? ( media-libs/x265:= ) +" + +RDEPEND=" + ${CDEPEND} + media-libs/mesa[vaapi?] + X? ( + x11-libs/libxcb + x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libXtst + ) +" + +DEPEND=" + ${CDEPEND} + media-libs/amf-headers + =media-libs/nv-codec-headers-12* + wayland? ( dev-libs/wayland-protocols ) +" + +BDEPEND=" + net-libs/nodejs[npm] + virtual/pkgconfig + cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) + cuda? ( dev-util/nvidia-cuda-toolkit ) + wayland? ( dev-util/wayland-scanner ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-custom-ffmpeg.patch + "${FILESDIR}"/${PN}-0.22.0-nvcodec.patch +) + +# Make this mess a bit simpler. +CMAKE_IN_SOURCE_BUILD=1 + +# Make npm behave. +export npm_config_audit=false +export npm_config_cache="${S}"/npm_cache +export npm_config_color=false +export npm_config_foreground_scripts=true +export npm_config_loglevel=verbose +export npm_config_optional=false +export npm_config_progress=false +export npm_config_save=false + +src_unpack() { + if [[ ${PV} = 9999* ]]; then + local EGIT_REPO_URI="https://github.com/LizardByte/build-deps.git" + local EGIT_SUBMODULES=( '-*' ) + local EGIT_CHECKOUT_DIR=${WORKDIR}/build-deps + git-r3_src_unpack + + # Use upstream server like our ffmpeg package does, not GitHub. + local EGIT_REPO_URI="https://git.ffmpeg.org/ffmpeg.git" + local EGIT_SUBMODULES=( '-*' ) + local EGIT_CHECKOUT_DIR=${EGIT_CHECKOUT_DIR}/ffmpeg_sources/ffmpeg + local EGIT_COMMIT=$(git --git-dir=build-deps/.git rev-parse HEAD:ffmpeg_sources/ffmpeg) + local EGIT_BRANCH=release/$(ver_cut 1-2 ${FFMPEG_VERSION}) + git-r3_src_unpack + + local EGIT_REPO_URI="https://github.com/LizardByte/Sunshine.git" + local EGIT_SUBMODULES=( + third-party/{moonlight-common-c{,/enet},nanors,tray,Simple-Web-Server,wlr-protocols} + ) + unset EGIT_CHECKOUT_DIR EGIT_COMMIT EGIT_BRANCH + git-r3_src_unpack + + # This downloads things so must go in src_unpack to avoid the sandbox. + cd "${S}" || die + npm install || die + else + default + ln -snf build-deps-${BUILD_DEPS_COMMIT} build-deps || die + find moonlight-common-c-${MOONLIGHT_COMMIT} "${S}"/third-party build-deps/ffmpeg_sources \ + -mindepth 1 -type d -empty -delete || die + ln -snf ../enet-${ENET_COMMIT} moonlight-common-c-${MOONLIGHT_COMMIT}/enet || die + ln -snf ../../moonlight-common-c-${MOONLIGHT_COMMIT} "${S}"/third-party/moonlight-common-c || die + ln -snf ../../nanors-${NANORS_COMMIT} "${S}"/third-party/nanors || die + ln -snf ../../tray-${TRAY_COMMIT} "${S}"/third-party/tray || die + ln -snf ../../Simple-Web-Server-${SWS_COMMIT} "${S}"/third-party/Simple-Web-Server || die + ln -snf ../../wlr-protocols-${WLRP_COMMIT} "${S}"/third-party/wlr-protocols || die + ln -snf ../../ffmpeg-${FFMPEG_VERSION} build-deps/ffmpeg_sources/ffmpeg || die + fi +} + +src_prepare() { + # Apply CBS patch. + cd "${WORKDIR}"/build-deps || die + eapply "${FILESDIR}"/${PN}-cross-cbs.patch + + # Apply general ffmpeg patches. + cd "${WORKDIR}"/build-deps/ffmpeg_sources/ffmpeg || die + eapply "${WORKDIR}"/build-deps/ffmpeg_patches/ffmpeg/*.patch + + # Copy ffmpeg sources because CBS build applies extra patches. + cp -a ./ "${WORKDIR}"/ffmpeg-build || die + + cd "${S}" || die + CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_prepare + default_src_prepare() { :; } # Hack to avoid double patching! :( + CMAKE_USE_DIR="${S}" cmake_src_prepare +} + +src_configure() { + local myconf=( + --prefix="${S}"/third-party/ffmpeg + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --ar="$(tc-getAR)" + --nm="$(tc-getNM)" + --strip="$(tc-getSTRIP)" + --ranlib="$(tc-getRANLIB)" + --pkg-config="$(tc-getPKG_CONFIG)" + --optflags="${CFLAGS}" + --disable-all + --disable-autodetect + --disable-error-resilience + --disable-everything + --disable-faan + --disable-iconv + --disable-network + --disable-optimizations + --disable-stripping + --enable-amf + --enable-avcodec + --enable-ffnvcodec + --enable-gpl + --enable-nvenc + --enable-static + --enable-swscale + --enable-v4l2_m2m + $(use_enable cuda) + $(use_enable cuda cuda_llvm) + $(use_enable svt-av1 libsvtav1) + $(use_enable vaapi) + $(use_enable x264 libx264) + $(use_enable x265 libx265) + $(usex svt-av1 --enable-encoder=libsvtav1 "") + $(usex vaapi --enable-encoder=h264_vaapi,hevc_vaapi,av1_vaapi "") + $(usex x264 --enable-encoder=libx264 "") + $(usex x265 --enable-encoder=libx265 "") + --enable-encoder=h264_amf,hevc_amf,av1_amf + --enable-encoder=h264_nvenc,hevc_nvenc,av1_nvenc + --enable-encoder=h264_v4l2m2m,hevc_v4l2m2m + ) + + # CPU features + for i in "${CPU_FEATURES_MAP[@]}" ; do + use ${i%:*} || myconf+=( --disable-${i#*:} ) + done + + # Try to get cpu type based on CFLAGS. + # Bug #172723 + # We need to do this so that features of that CPU will be better used + # If they contain an unknown CPU it will not hurt since ffmpeg's configure + # will just ignore it. + for i in $(get-flag mcpu) $(get-flag march) ; do + [[ ${i} = native ]] && i="host" # bug #273421 + myconf+=( --cpu=${i} ) + break + done + + # cross compile support + if tc-is-cross-compiler ; then + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) + case ${CHOST} in + *mingw32*) + myconf+=( --target-os=mingw32 ) + ;; + *linux*) + myconf+=( --target-os=linux ) + ;; + esac + fi + + cd "${WORKDIR}"/ffmpeg-build || die + echo ./configure "${myconf[@]}" + ./configure "${myconf[@]}" || die + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=no + -DCMAKE_INSTALL_PREFIX="${S}"/third-party/ffmpeg + ) + CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_configure + + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_Git=yes + -DFFMPEG_PLATFORM_LIBRARIES="$(usex svt-av1 SvtAv1Enc '');$(usex vaapi 'va;va-drm' '');$(usev x264);$(usev x265)" + -DFFMPEG_PREPARED_BINARIES="${S}"/third-party/ffmpeg + -DSUNSHINE_ASSETS_DIR=share/${PN} + -DSUNSHINE_ENABLE_CUDA=$(usex cuda) + -DSUNSHINE_ENABLE_DRM=$(usex libdrm) + -DSUNSHINE_ENABLE_VAAPI=$(usex vaapi) + -DSUNSHINE_ENABLE_WAYLAND=$(usex wayland) + -DSUNSHINE_ENABLE_X11=$(usex X) + -DSUNSHINE_ENABLE_TRAY=$(usex trayicon) + -DSUNSHINE_REQUIRE_TRAY=$(usex trayicon) + -DSUNSHINE_SYSTEM_WAYLAND_PROTOCOLS=yes + -DSYSTEMD_USER_UNIT_INSTALL_DIR=$(systemd_get_userunitdir) + -DUDEV_RULES_INSTALL_DIR=$(get_udevdir)/rules.d + ) + CMAKE_USE_DIR="${S}" cmake_src_configure +} + +src_compile() { + emake -C "${WORKDIR}"/ffmpeg-build V=1 + emake -C "${WORKDIR}"/ffmpeg-build V=1 install + CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_src_compile + CMAKE_USE_DIR="${WORKDIR}/build-deps" cmake_build install + CMAKE_USE_DIR="${S}" npm_config_offline=1 cmake_src_compile +} + +pkg_postinst() { + udev_reload + xdg_pkg_postinst + use libdrm && fcaps cap_sys_admin+p usr/bin/"$(readlink "${EROOT}"/usr/bin/${PN})" + + elog "At upstream's request, please report any issues to https://bugs.gentoo.org" + elog "rather than going directly to them." +} + +pkg_postrm() { + udev_reload + xdg_pkg_postrm +} diff --git a/net-misc/sunshine/sunshine-9999.ebuild b/net-misc/sunshine/sunshine-9999.ebuild index 87184bed9664..d4852f3d0dbe 100644 --- a/net-misc/sunshine/sunshine-9999.ebuild +++ b/net-misc/sunshine/sunshine-9999.ebuild @@ -8,7 +8,7 @@ BUILD_DEPS_COMMIT="2aafe061cd52a944cb3b5f86d1f25e9ad2a19bec" ENET_COMMIT="04e27590670a87a7cd40f5a05cda97467e4e25a3" MOONLIGHT_COMMIT="cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e" NANORS_COMMIT="e9e242e98e27037830490b2a752895ca68f75f8b" -TRAY_COMMIT="2bf1c610300b27f8d8ce87e2f13223fc83efeb42" +TRAY_COMMIT="4d8b798cafdd11285af9409c16b5f792968e0045" SWS_COMMIT="27b41f5ee154cca0fce4fe2955dd886d04e3a4ed" WLRP_COMMIT="4264185db3b7e961e7f157e1cc4fd0ab75137568" FFMPEG_VERSION="6.1.1" -- cgit v1.2.3