From 79b4b9f6fbaa14bfa2e15645132a4c8a0d5a0551 Mon Sep 17 00:00:00 2001 From: David Lane <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 19 Dec 2025 22:23:54 -0500 Subject: [PATCH] style(Homebrew): Update Homebrew formula dependencies and conflicts (#4484) --- .github/workflows/ci-copr.yml | 2 +- .github/workflows/ci-flatpak.yml | 2 +- .github/workflows/ci-homebrew.yml | 43 +++++++++++++++++++++---------- .github/workflows/ci-linux.yml | 2 +- .github/workflows/ci.yml | 8 +++--- packaging/sunshine.rb | 23 +++++++++++++---- 6 files changed, 54 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci-copr.yml b/.github/workflows/ci-copr.yml index c4b3a098e..2f49d801a 100644 --- a/.github/workflows/ci-copr.yml +++ b/.github/workflows/ci-copr.yml @@ -62,7 +62,7 @@ jobs: run: ls -l artifacts - name: Update GitHub Release - uses: LizardByte/actions/actions/release_create@v2025.1028.23217 + uses: LizardByte/actions/actions/release_create@v2025.1220.21713 with: allowUpdates: true body: ${{ github.event.release.body }} diff --git a/.github/workflows/ci-flatpak.yml b/.github/workflows/ci-flatpak.yml index 5bb3798fc..b3c0c9301 100644 --- a/.github/workflows/ci-flatpak.yml +++ b/.github/workflows/ci-flatpak.yml @@ -33,7 +33,7 @@ jobs: steps: - name: More space if: matrix.arch == 'x86_64' - uses: LizardByte/actions/actions/more_space@v2025.1028.23217 + uses: LizardByte/actions/actions/more_space@v2025.1220.21713 with: analyze-space-savings: true clean-all: true diff --git a/.github/workflows/ci-homebrew.yml b/.github/workflows/ci-homebrew.yml index f00b9ad79..78692696c 100644 --- a/.github/workflows/ci-homebrew.yml +++ b/.github/workflows/ci-homebrew.yml @@ -36,21 +36,21 @@ jobs: include: # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories # while GitHub has larger macOS runners, they are not available for our repos :( - - os_version: "14" - os_name: "macos" - - os_version: "15" - os_name: "macos" - - os_version: "26" - os_name: "macos" - - os_version: "latest" - os_name: "ubuntu" - - os_version: "latest" # this job will only configure the formula for release, no validation - os_name: "ubuntu" - release: true + - os_name: "macos" + os_version: "14" + - os_name: "macos" + os_version: "15" + - os_name: "macos" + os_version: "26" + - os_name: "ubuntu" + os_version: "22.04" + - os_name: "ubuntu" + os_version: "latest" + release: true # this job will only configure the formula for release, no validation steps: - name: More space if: runner.os == 'Linux' - uses: LizardByte/actions/actions/more_space@v2025.1028.23217 + uses: LizardByte/actions/actions/more_space@v2025.1220.21713 with: analyze-space-savings: true clean-all: true @@ -142,7 +142,7 @@ jobs: - name: Validate Homebrew Formula id: test if: matrix.release != true - uses: LizardByte/actions/actions/release_homebrew@v2025.1028.23217 + uses: LizardByte/actions/actions/release_homebrew@v2025.1220.21713 with: formula_file: ${{ github.workspace }}/homebrew/sunshine.rb git_email: ${{ secrets.GIT_EMAIL }} @@ -178,7 +178,22 @@ jobs: # update the formula sed -i 's/class Sunshine < Formula/class SunshineBeta < Formula/' $formula_file - sed -i 's/# conflicts_with/conflicts_with/' $formula_file + sed -i 's/conflicts_with "sunshine-beta"/conflicts_with "sunshine"/' $formula_file + sed -i '0,/^ version .*$/d' $formula_file + + # update livecheck to check for latest stable or pre-release + # shellcheck disable=SC1004 + sed -i '/strategy :github_latest do |json, regex|/,/^ end$/c\ + strategy :github_releases do |json, regex|\ + json.map do |release|\ + next if release["draft"]\ + \ + match = release["tag_name"]?\&.match(regex)\ + next if match.blank?\ + \ + match[1]\ + end\ + end' $formula_file # print new file echo "New formula:" diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index d0f678805..302f55a14 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -29,7 +29,7 @@ jobs: dist: 22.04 steps: - name: More space - uses: LizardByte/actions/actions/more_space@v2025.1028.23217 + uses: LizardByte/actions/actions/more_space@v2025.1220.21713 with: analyze-space-savings: true clean-all: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0e59fcbd..850e53b2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: Release Setup id: release-setup - uses: LizardByte/actions/actions/release_setup@v2025.1028.23217 + uses: LizardByte/actions/actions/release_setup@v2025.1220.21713 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -181,7 +181,7 @@ jobs: - name: Homebrew-macos-26 coverage: false pr: true - - name: Homebrew-ubuntu-latest + - name: Homebrew-ubuntu-22.04 coverage: true pr: true - name: Windows-AMD64 @@ -259,7 +259,7 @@ jobs: run: ls -l artifacts - name: Create/Update GitHub Release - uses: LizardByte/actions/actions/release_create@v2025.1028.23217 + uses: LizardByte/actions/actions/release_create@v2025.1220.21713 with: allowUpdates: false body: ${{ needs.release-setup.outputs.release_body }} @@ -288,7 +288,7 @@ jobs: path: homebrew - name: Upload Homebrew Beta Formula - uses: LizardByte/actions/actions/release_homebrew@v2025.1028.23217 + uses: LizardByte/actions/actions/release_homebrew@v2025.1220.21713 with: formula_file: ${{ github.workspace }}/homebrew/sunshine-beta.rb git_email: ${{ secrets.GH_BOT_EMAIL }} diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 9ac1253a6..7b314d590 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -5,7 +5,6 @@ class Sunshine < Formula GCC_FORMULA = "gcc@#{GCC_VERSION}".freeze IS_UPSTREAM_REPO = ENV.fetch("GITHUB_REPOSITORY", "") == "LizardByte/Sunshine" - # conflicts_with "sunshine", because: "sunshine and sunshine-beta cannot be installed at the same time" desc "@PROJECT_DESCRIPTION@" homepage "@PROJECT_HOMEPAGE_URL@" url "@GITHUB_CLONE_URL@", @@ -36,12 +35,12 @@ class Sunshine < Formula depends_on "node" => :build depends_on "pkgconf" => :build depends_on "gcovr" => :test + depends_on "boost" depends_on "curl" + depends_on "icu4c@78" depends_on "miniupnpc" - depends_on "openssl" + depends_on "openssl@3" depends_on "opus" - depends_on "boost" => :recommended - depends_on "icu4c" => :recommended on_macos do depends_on "llvm" => [:build, :test] @@ -49,16 +48,28 @@ class Sunshine < Formula on_linux do depends_on GCC_FORMULA => [:build, :test] + depends_on "at-spi2-core" depends_on "avahi" + depends_on "ayatana-ido" + depends_on "cairo" + depends_on "gdk-pixbuf" + depends_on "glib" depends_on "gnu-which" + depends_on "gtk+3" + depends_on "harfbuzz" depends_on "libayatana-appindicator" + depends_on "libayatana-indicator" depends_on "libcap" + depends_on "libdbusmenu" depends_on "libdrm" + depends_on "libice" depends_on "libnotify" + depends_on "libsm" depends_on "libva" depends_on "libx11" depends_on "libxcb" depends_on "libxcursor" + depends_on "libxext" depends_on "libxfixes" depends_on "libxi" depends_on "libxinerama" @@ -66,11 +77,13 @@ class Sunshine < Formula depends_on "libxtst" depends_on "mesa" depends_on "numactl" + depends_on "pango" depends_on "pulseaudio" depends_on "systemd" depends_on "wayland" end + conflicts_with "sunshine-beta", because: "sunshine and sunshine-beta cannot be installed at the same time" fails_with :clang do build 1400 cause "Requires C++23 support" @@ -194,7 +207,7 @@ class Sunshine < Formula # test that the binary runs at all system bin/"sunshine", "--version" - if IS_UPSTREAM_REPO + if IS_UPSTREAM_REPO && ENV.fetch("HOMEBREW_BOTTLE_BUILD", "false") != "true" # run the test suite system bin/"test_sunshine", "--gtest_color=yes", "--gtest_output=xml:tests/test_results.xml" assert_path_exists File.join(testpath, "tests", "test_results.xml")