Github messages for voidlinux
 help / color / mirror / Atom feed
From: myothk <myothk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: sunshine-0.23.1
Date: Fri, 11 Oct 2024 07:59:58 +0200	[thread overview]
Message-ID: <20241011055958.1A96E2A763@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51053@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

There is an updated pull request by myothk against master on the void-packages repository

https://github.com/myothk/void-packages sunshine
https://github.com/void-linux/void-packages/pull/51053

New package: sunshine-0.23.1

#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**



#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)



A patch file from https://github.com/void-linux/void-packages/pull/51053.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sunshine-51053.patch --]
[-- Type: text/x-diff, Size: 10925 bytes --]

From e01964746afe2d0ac92160c5a8f51bb67bf8a55b Mon Sep 17 00:00:00 2001
From: myothk <myoothkyaw@gmail.com>
Date: Mon, 1 Jul 2024 02:56:00 +0630
Subject: [PATCH] New package: sunshine-0.23.1

---
 srcpkgs/sunshine/files/sunshine/run           |   4 +
 .../patches/endianness-detection.patch        |  21 ++++
 srcpkgs/sunshine/patches/ffmpeg.patch         |  11 ++
 srcpkgs/sunshine/patches/fix-systemd.patch    |  30 ++++++
 srcpkgs/sunshine/template                     | 101 ++++++++++++++++++
 5 files changed, 167 insertions(+)
 create mode 100644 srcpkgs/sunshine/files/sunshine/run
 create mode 100644 srcpkgs/sunshine/patches/endianness-detection.patch
 create mode 100644 srcpkgs/sunshine/patches/ffmpeg.patch
 create mode 100644 srcpkgs/sunshine/patches/fix-systemd.patch
 create mode 100644 srcpkgs/sunshine/template

diff --git a/srcpkgs/sunshine/files/sunshine/run b/srcpkgs/sunshine/files/sunshine/run
new file mode 100644
index 00000000000000..cca2ef1d370783
--- /dev/null
+++ b/srcpkgs/sunshine/files/sunshine/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+sv check dbus > /dev/null || exit 1
+exec sunshine ${OPTS}
diff --git a/srcpkgs/sunshine/patches/endianness-detection.patch b/srcpkgs/sunshine/patches/endianness-detection.patch
new file mode 100644
index 00000000000000..255ada3b6cceef
--- /dev/null
+++ b/srcpkgs/sunshine/patches/endianness-detection.patch
@@ -0,0 +1,21 @@
+# makes both musl and glic detect endianness
+--- a/src/utility.h
++++ b/src/utility.h
+@@ -944,7 +944,7 @@
+     template <class T = void>
+     struct endianness {
+       enum : bool {
+-#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN || \
++#if defined(__BYTE_ORDER__) && __BYTE_ORDER == __BIG_ENDIAN || \
+   defined(__BIG_ENDIAN__) ||                                 \
+   defined(__ARMEB__) ||                                      \
+   defined(__THUMBEB__) ||                                    \
+@@ -952,7 +952,7 @@
+   defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__)
+         // It's a big-endian target architecture
+         little = false,
+-#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \
++#elif defined(__BYTE_ORDER__) && __BYTE_ORDER == __LITTLE_ENDIAN || \
+   defined(__LITTLE_ENDIAN__) ||                                   \
+   defined(__ARMEL__) ||                                           \
+   defined(__THUMBEL__) ||                                         \
diff --git a/srcpkgs/sunshine/patches/ffmpeg.patch b/srcpkgs/sunshine/patches/ffmpeg.patch
new file mode 100644
index 00000000000000..50a2f3850b82ec
--- /dev/null
+++ b/srcpkgs/sunshine/patches/ffmpeg.patch
@@ -0,0 +1,11 @@
+# remove mfx
+--- a/cmake/dependencies/common.cmake
++++ b/cmake/dependencies/common.cmake
+@@ -39,7 +39,6 @@
+ 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,")
diff --git a/srcpkgs/sunshine/patches/fix-systemd.patch b/srcpkgs/sunshine/patches/fix-systemd.patch
new file mode 100644
index 00000000000000..d14576d066fd3f
--- /dev/null
+++ b/srcpkgs/sunshine/patches/fix-systemd.patch
@@ -0,0 +1,30 @@
+# remove systemd requirement.
+--- 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
+
+# change .desktop file to not use systemctl.
+--- 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..4fea0f823bcdad
--- /dev/null
+++ b/srcpkgs/sunshine/template
@@ -0,0 +1,101 @@
+# Template file for 'sunshine'
+pkgname=sunshine
+version=0.23.1
+revision=1
+archs="x86_64* aarch64*"
+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 wayland-devel"
+makedepends="boost-devel doxygen ffmpeg-devel 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 libsvt-av1-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 x264-devel x265-devel wayland-protocols"
+short_desc="Self-hosted GameStream host for Moonlight"
+maintainer="myothk <myoothkyaw@gmail.com>"
+license="GPL-3.0-only"
+homepage="https://app.lizardbyte.dev/Sunshine"
+
+# sub modules
+_tpc_ver="1.6.2"
+_vgec_ver="8d71f6740ffff4671cdadbca255ce528e3cd3fef"
+_build_deps_ver="efd3a380113e8ae98ae68cc1d73fd7c4b54b03c6"
+_googletest_ver="1.14.0"
+_moonlight_commonc_ver="cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e"
+_nanors_ver="e9e242e98e27037830490b2a752895ca68f75f8b"
+_nvcodec_headers_ver="22441b505d9d9afc1e3002290820909846c24bdc"
+_nvapi_opensdk_ver="R535"
+_tray_ver="4d8b798cafdd11285af9409c16b5f792968e0045"
+_wayland_protocols_ver="1.35"
+_wlr_protocols_ver="2b8d43325b7012cc3f9b55c08d26e50e42beac7d"
+_simplewebserver_ver="27b41f5ee154cca0fce4fe2955dd886d04e3a4ed"
+_enet_ver="04e27590670a87a7cd40f5a05cda97467e4e25a3"
+distfiles="https://github.com/LizardByte/Sunshine/archive/refs/tags/v${version}.tar.gz
+ https://github.com/michaeltyson/TPCircularBuffer/archive/refs/tags/${_tpc_ver}.tar.gz>TPCircularBuffer-${_tpc_ver}.tar.gz
+ https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client/archive/${_vgec_ver}.tar.gz>ViGEmClient-${_vgec_ver}.tar.gz
+ https://github.com/LizardByte/build-deps/archive/${_build_deps_ver}.tar.gz>build-deps-${_build_deps_ver}.tar.gz
+ https://github.com/google/googletest/archive/refs/tags/v${_googletest_ver}.tar.gz>googletest-${_googletest_ver}.tar.gz
+ https://github.com/moonlight-stream/moonlight-common-c/archive/${_moonlight_commonc_ver}.tar.gz>moonlight-common-c-${_moonlight_commonc_ver}.tar.gz
+ https://github.com/sleepybishop/nanors/archive/${_nanors_ver}.tar.gz>nanors-${_nanors_ver}.tar.gz
+ https://github.com/FFmpeg/nv-codec-headers/archive/${_nvcodec_headers_ver}.tar.gz>nv-codec-headers-${_nvcodec_headers_ver}.tar.gz
+ https://github.com/LizardByte/nvapi-open-source-sdk/archive/refs/tags/${_nvapi_opensdk_ver}.tar.gz>nvapi-open-source-sdk-${_nvapi_opensdk_ver}.tar.gz
+ https://github.com/LizardByte/tray/archive/${_tray_ver}.tar.gz>tray-${_tray_ver}.tar.gz
+ https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${_wayland_protocols_ver}/wayland-protocols-${_wayland_protocols_ver}.tar.gz>wayland-protocols-${_wayland_protocols_ver}.tar.gz
+ https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/archive/${_wlr_protocols_ver}/wlr-protocols-${_wlr_protocols_ver}.tar.gz>wlr-protocols-${_wlr_protocols_ver}.tar.gz
+ https://gitlab.com/eidheim/Simple-Web-Server/-/archive/${_simplewebserver_ver}/Simple-Web-Server-${_simplewebserver_ver}.tar.gz>Simple-Web-Server-${_simplewebserver_ver}.tar.gz
+ https://github.com/cgutman/enet/archive/${_enet_ver}.zip>enet-${_enet_ver}.tar.gz"
+checksum="f811b07950a6bfd041e80cc424f95e29d4ba84a8bcdf2a61d5cdc751152c9927
+ 3741283950fb001de383478438fea8dd644bbf043cded1dfc70a4bd87b2bc964
+ 27907cba8c017de220b66e036ed04a39f5eacb9182846700047420aef2f5cd0e
+ c6d9343c8a6306e1b6025bf30893f555b1f1f1a3ffe75ddd3e2e67911adc7339
+ 8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7
+ 8390c3fc51796d228577c6887bfa7c3afda42cc18e5967187951c3e0ad343458
+ fee62ecffef3b456e789852787cf534f4712e1a7973bcdd5763baad4b7d2e879
+ dc28f764fbc72f6ac2a96fcace252e6ecc84b308b8d4400820203cc901bae596
+ 689c124192ea1e10dbc907d9d51bd0a30e4bbc1ed3a98a46db601ff8b9f84276
+ 298e90d80c146b07fd71040d08e5184b0baca362258bf26033d7c9b80cdac11f
+ 6e62dfa92ce82487d107b76064cfe2d7ca107c87c239ea9036a763d79c09105a
+ 5bfcca71ba8548bb5d7fdb6ba0ec2c883bf79deca74282c4aba75978837ac000
+ 6179016c556c630e2c1459b38f93db881955e191840e069dd4a98dd3dd1dc56e
+ bc2f1e6975aa5394683c1f82a53459cc45c3cd7a0f9c37b8afc8d77f8818fd58
+ "
+skip_extraction="
+ Simple-Web-Server-${_simplewebserver_ver}.tar.gz
+ TPCircularBuffer-${_tpc_ver}.tar.gz
+ ViGEmClient-${_vgec_ver}.tar.gz
+ build-deps-${_build_deps_ver}.tar.gz
+ googletest-${_googletest_ver}.tar.gz
+ moonlight-common-c-${_moonlight_commonc_ver}.tar.gz
+ nanors-${_nanors_ver}.tar.gz
+ nv-codec-headers-${_nvcodec_headers_ver}.tar.gz
+ nvapi-open-source-sdk-${_nvapi_opensdk_ver}.tar.gz
+ tray-${_tray_ver}.tar.gz
+ wayland-protocols-${_wayland_protocols_ver}.tar.gz
+ wlr-protocols-${_wlr_protocols_ver}.tar.gz
+ enet-${_enet_ver}.tar.gz"
+
+post_extract() {
+	vsrcextract -C third-party/Simple-Web-Server Simple-Web-Server-${_simplewebserver_ver}.tar.gz
+	vsrcextract -C third-party/TPCircularBuffer TPCircularBuffer-${_tpc_ver}.tar.gz
+	vsrcextract -C third-party/ViGEmClient ViGEmClient-${_vgec_ver}.tar.gz
+	vsrcextract -C third-party/build-deps build-deps-${_build_deps_ver}.tar.gz
+	vsrcextract -C third-party/googletest googletest-${_googletest_ver}.tar.gz
+	vsrcextract -C third-party/moonlight-common-c moonlight-common-c-${_moonlight_commonc_ver}.tar.gz
+	vsrcextract -C third-party/moonlight-common-c/enet enet-${_enet_ver}.tar.gz
+	vsrcextract -C third-party/nanors nanors-${_nanors_ver}.tar.gz
+	vsrcextract -C third-party/nv-codec-headers nv-codec-headers-${_nvcodec_headers_ver}.tar.gz
+	vsrcextract -C third-party/nvapi-open-source-sdk nvapi-open-source-sdk-${_nvapi_opensdk_ver}.tar.gz
+	vsrcextract -C third-party/tray tray-${_tray_ver}.tar.gz
+	vsrcextract -C third-party/wayland-protocols wayland-protocols-${_wayland_protocols_ver}.tar.gz
+	vsrcextract -C third-party/wlr-protocols wlr-protocols-${_wlr_protocols_ver}.tar.gz
+}
+pre_configure() {
+	export BRANCH=master
+	export BUILD_VERSION=${version}
+	export COMMIT=v${version}
+}
+post_install() {
+	vsv sunshine
+}

  parent reply	other threads:[~2024-10-11  5:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-30 20:37 [PR PATCH] " myothk
2024-07-01 12:10 ` [PR REVIEW] " classabbyamp
2024-07-01 18:51 ` [PR PATCH] [Updated] " myothk
2024-07-01 19:00 ` myothk
2024-07-01 19:02 ` myothk
2024-07-01 19:05 ` myothk
2024-07-01 19:35 ` [PR PATCH] [Updated] " myothk
2024-07-01 19:36 ` myothk
2024-07-01 20:00 ` myothk
2024-07-01 20:05 ` myothk
2024-07-01 20:06 ` myothk
2024-07-01 20:07 ` myothk
2024-07-02  0:27 ` [PR REVIEW] " classabbyamp
2024-07-02  0:27 ` classabbyamp
2024-07-02  0:27 ` classabbyamp
2024-07-02  0:27 ` classabbyamp
2024-07-07  3:45 ` [PR PATCH] [Updated] " myothk
2024-07-07  3:48 ` myothk
2024-09-21 11:01 ` airpods69
2024-09-24  7:24 ` myothk
2024-09-24  7:25 ` myothk
2024-09-24  7:26 ` [PR REVIEW] " classabbyamp
2024-09-24  7:29 ` myothk
2024-09-24  7:33 ` myothk
2024-09-24  7:34 ` myothk
2024-09-27  3:11 ` [PR PATCH] [Updated] " myothk
2024-09-27  8:46 ` myothk
2024-09-29 18:58 ` [PR REVIEW] " classabbyamp
2024-09-29 18:58 ` classabbyamp
2024-10-11  5:59 ` myothk [this message]
2024-10-11  6:54 ` classabbyamp
2025-01-10  2:01 ` github-actions
2025-01-25  1:54 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241011055958.1A96E2A763@inbox.vuxu.org \
    --to=myothk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).