From d67463ef0a246a0dad63ca42e12c37eabcf7cab9 Mon Sep 17 00:00:00 2001 From: myothk Date: Mon, 1 Jul 2024 02:56:00 +0630 Subject: [PATCH] New package: sunshine-0.23.1 --- .../patches/remove-missing-libs.patch | 42 ++++++++++ srcpkgs/sunshine/template | 82 +++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 srcpkgs/sunshine/patches/remove-missing-libs.patch create mode 100644 srcpkgs/sunshine/template diff --git a/srcpkgs/sunshine/patches/remove-missing-libs.patch b/srcpkgs/sunshine/patches/remove-missing-libs.patch new file mode 100644 index 00000000000000..b48db54889809c --- /dev/null +++ b/srcpkgs/sunshine/patches/remove-missing-libs.patch @@ -0,0 +1,42 @@ +--- a/cmake/packaging/linux.cmake ++++ b/cmake/packaging/linux.cmake +@@ -11,13 +11,10 @@ if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK}) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" + DESTINATION "${SUNSHINE_ASSETS_DIR}/systemd/user") + else() +- find_package(Systemd) + find_package(Udev) + + install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules" + DESTINATION "${UDEV_RULES_INSTALL_DIR}") +- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" +- DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}") + endif() + + # Post install + +--- a/cmake/dependencies/common.cmake ++++ b/cmake/dependencies/common.cmake +@@ -39,10 +39,7 @@ elseif(APPLE) + elseif(UNIX) + set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") +- list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx) + set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64") +- set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,") +- set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-aarch64") + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64") + +--- a/packaging/linux/sunshine.desktop ++++ b/packaging/linux/sunshine.desktop +@@ -1,7 +1,7 @@ + [Desktop Entry] + Type=Application + Name=@PROJECT_NAME@ +-Exec=/usr/bin/env systemctl start --u sunshine ++Exec=sunshine + Version=1.0 + Comment=@PROJECT_DESCRIPTION@ + Icon=sunshine diff --git a/srcpkgs/sunshine/template b/srcpkgs/sunshine/template new file mode 100644 index 00000000000000..ab27798c28e764 --- /dev/null +++ b/srcpkgs/sunshine/template @@ -0,0 +1,82 @@ +# Template file for 'sunshine' +pkgname=sunshine +version=0.23.1 +revision=1 +build_style=cmake +configure_args="-Wno-dev -DBUILD_TESTS=OFF -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine + -DSUNSHINE_ASSETS_DIR=/usr/share/sunshine" +hostmakedepends="boost cmake git make nodejs pkg-config" +makedepends="boost-devel doxygen graphviz libayatana-appindicator-devel libboost_filesystem + libboost_locale libboost_program_options libcap-devel libcurl-devel libdrm-devel libevdev-devel + libnuma-devel libnotify-devel libopusenc-devel libva-devel libvdpau-devel libX11-devel + libxcb-devel libXcursor-devel libXfixes-devel libXi-devel libXinerama-devel libXrandr-devel + libXtst-devel MesaLib-devel miniupnpc-devel nv-codec-headers opus-devel openssl-devel + pulseaudio-devel wayland-protocols" +short_desc="Self-hosted GameStream host for Moonlight" +maintainer="myothk " +license="GPL-3.0-only" +homepage="https://app.lizardbyte.dev" +distfiles="https://github.com/LizardByte/Sunshine/archive/refs/tags/v${version}.tar.gz>${pkgname}-${version}.tar.gz + https://github.com/michaeltyson/TPCircularBuffer/archive/8833b3a73fab6530cc51e2063a85cced01714cfb.tar.gz>TPCircularBuffer.tar.gz + https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client/archive/8d71f6740ffff4671cdadbca255ce528e3cd3fef.tar.gz>ViGEmClient.tar.gz + https://github.com/LizardByte/build-deps/archive/efd3a380113e8ae98ae68cc1d73fd7c4b54b03c6.tar.gz>build-deps.tar.gz + https://github.com/google/googletest/archive/f8d7d77c06936315286eb55f8de22cd23c188571.tar.gz>googletest.tar.gz + https://github.com/moonlight-stream/moonlight-common-c/archive/cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e.tar.gz>moonlight-common-c.tar.gz + https://github.com/sleepybishop/nanors/archive/e9e242e98e27037830490b2a752895ca68f75f8b.tar.gz>nanors.tar.gz + https://github.com/FFmpeg/nv-codec-headers/archive/22441b505d9d9afc1e3002290820909846c24bdc.tar.gz>nv-codec-headers.tar.gz + https://github.com/LizardByte/nvapi-open-source-sdk/archive/c0f5f7b64d2ef13b1155f078a2eec156611f2415.tar.gz>nvapi-open-source-sdk.tar.gz + https://github.com/LizardByte/tray/archive/4d8b798cafdd11285af9409c16b5f792968e0045.tar.gz>tray.tar.gz + https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/08d1c7276d41379acfea353b5c739b72d51827e2/wayland-protocols-08d1c7276d41379acfea353b5c739b72d51827e2.tar.gz>wayland-protocols.tar.gz + https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/archive/2b8d43325b7012cc3f9b55c08d26e50e42beac7d/wlr-protocols-2b8d43325b7012cc3f9b55c08d26e50e42beac7d.tar.gz>wlr-protocols.tar.gz + https://gitlab.com/eidheim/Simple-Web-Server/-/archive/27b41f5ee154cca0fce4fe2955dd886d04e3a4ed/Simple-Web-Server-27b41f5ee154cca0fce4fe2955dd886d04e3a4ed.tar.gz>Simple-Web-Server.tar.gz + https://github.com/cgutman/enet/archive/04e27590670a87a7cd40f5a05cda97467e4e25a3.zip>enet.tar.gz" +checksum="f811b07950a6bfd041e80cc424f95e29d4ba84a8bcdf2a61d5cdc751152c9927 + e7bf9d090be90e419860019e6ae125bb07b6aa4d67485e70c93e3e11d41938ee + 27907cba8c017de220b66e036ed04a39f5eacb9182846700047420aef2f5cd0e + c6d9343c8a6306e1b6025bf30893f555b1f1f1a3ffe75ddd3e2e67911adc7339 + 7ff5db23de232a39cbb5c9f5143c355885e30ac596161a6b9fc50c4538bfbf01 + 8390c3fc51796d228577c6887bfa7c3afda42cc18e5967187951c3e0ad343458 + fee62ecffef3b456e789852787cf534f4712e1a7973bcdd5763baad4b7d2e879 + dc28f764fbc72f6ac2a96fcace252e6ecc84b308b8d4400820203cc901bae596 + d97efcff3bb86472dd4f602044903a3527a2c850eeebfb9b039ab50d2a237223 + 298e90d80c146b07fd71040d08e5184b0baca362258bf26033d7c9b80cdac11f + d511c8e6ac8fa356cb327e800e7a1b37ecc50b11f74ae8adf0666313b9ad41e0 + 5bfcca71ba8548bb5d7fdb6ba0ec2c883bf79deca74282c4aba75978837ac000 + 6179016c556c630e2c1459b38f93db881955e191840e069dd4a98dd3dd1dc56e + bc2f1e6975aa5394683c1f82a53459cc45c3cd7a0f9c37b8afc8d77f8818fd58" +skip_extraction=" + ${pkgname}-${version}.tar.gz + Simple-Web-Server.tar.gz + TPCircularBuffer.tar.gz + ViGEmClient.tar.gz + build-deps.tar.gz + googletest.tar.gz + moonlight-common-c.tar.gz + nanors.tar.gz + nv-codec-headers.tar.gz + nvapi-open-source-sdk.tar.gz + tray.tar.gz + wayland-protocols.tar.gz + wlr-protocols.tar.gz + enet.tar.gz" +post_extract() { + vsrcextract ${pkgname}-${version}.tar.gz + vsrcextract -C third-party/Simple-Web-Server Simple-Web-Server.tar.gz + vsrcextract -C third-party/TPCircularBuffer TPCircularBuffer.tar.gz + vsrcextract -C third-party/ViGEmClient ViGEmClient.tar.gz + vsrcextract -C third-party/build-deps build-deps.tar.gz + vsrcextract -C third-party/googletest googletest.tar.gz + vsrcextract -C third-party/moonlight-common-c moonlight-common-c.tar.gz + vsrcextract -C third-party/moonlight-common-c/enet enet.tar.gz + vsrcextract -C third-party/nanors nanors.tar.gz + vsrcextract -C third-party/nv-codec-headers nv-codec-headers.tar.gz + vsrcextract -C third-party/nvapi-open-source-sdk nvapi-open-source-sdk.tar.gz + vsrcextract -C third-party/tray tray.tar.gz + vsrcextract -C third-party/wayland-protocols wayland-protocols.tar.gz + vsrcextract -C third-party/wlr-protocols wlr-protocols.tar.gz +} +pre_configure() { + export BRANCH=master + export BUILD_VERSION=${version} + export COMMIT=8b21db6 +}