From 955c0fd8e799e025cd6e3b8c938fd73897c488ce Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:30:07 -0400 Subject: [PATCH] build(deps): pin boost to 1.87 (#3794) --- .codeql-prebuild-cpp-Windows.sh | 1 - .codeql-prebuild-cpp-macOS.sh | 1 - .github/workflows/CI.yml | 1 - cmake/dependencies/Boost_Sunshine.cmake | 31 ++++++++++++++-------- packaging/linux/flatpak/modules/boost.json | 4 +-- packaging/sunshine.rb | 1 - 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.codeql-prebuild-cpp-Windows.sh b/.codeql-prebuild-cpp-Windows.sh index 7bee4f65..e03f8740 100644 --- a/.codeql-prebuild-cpp-Windows.sh +++ b/.codeql-prebuild-cpp-Windows.sh @@ -7,7 +7,6 @@ pacman --noconfirm -Syu # install dependencies dependencies=( "git" - "mingw-w64-ucrt-x86_64-boost" "mingw-w64-ucrt-x86_64-cmake" "mingw-w64-ucrt-x86_64-cppwinrt" "mingw-w64-ucrt-x86_64-curl-winssl" diff --git a/.codeql-prebuild-cpp-macOS.sh b/.codeql-prebuild-cpp-macOS.sh index 1a6be508..a21a69c3 100644 --- a/.codeql-prebuild-cpp-macOS.sh +++ b/.codeql-prebuild-cpp-macOS.sh @@ -7,7 +7,6 @@ eval "$(/usr/local/bin/brew shellenv)" # install dependencies dependencies=( - "boost" "cmake" "miniupnpc" "ninja" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 061b03c5..f80092b7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -833,7 +833,6 @@ jobs: update: true install: >- git - mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-cppwinrt mingw-w64-ucrt-x86_64-curl-winssl diff --git a/cmake/dependencies/Boost_Sunshine.cmake b/cmake/dependencies/Boost_Sunshine.cmake index dc13bb0e..eb2ac409 100644 --- a/cmake/dependencies/Boost_Sunshine.cmake +++ b/cmake/dependencies/Boost_Sunshine.cmake @@ -3,13 +3,25 @@ # include_guard(GLOBAL) -set(BOOST_VERSION 1.86) +set(BOOST_VERSION "1.87.0") set(BOOST_COMPONENTS filesystem locale log program_options - system) # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience + system +) +# system is not used by Sunshine, but by Simple-Web-Server, added here for convenience + +# algorithm, preprocessor, scope, and uuid are not used by Sunshine, but by libdisplaydevice, added here for convenience +if(WIN32) + list(APPEND BOOST_COMPONENTS + algorithm + preprocessor + scope + uuid + ) +endif() if(BOOST_USE_STATIC) set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103 @@ -18,9 +30,9 @@ endif() if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.30") cmake_policy(SET CMP0167 NEW) # Get BoostConfig.cmake from upstream endif() -find_package(Boost CONFIG ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS}) +find_package(Boost CONFIG ${BOOST_VERSION} EXACT COMPONENTS ${BOOST_COMPONENTS}) if(NOT Boost_FOUND) - message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.") + message(STATUS "Boost v${BOOST_VERSION} package not found in the system. Falling back to FetchContent.") include(FetchContent) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") @@ -41,12 +53,9 @@ if(NOT Boost_FOUND) set(BOOST_ENABLE_CMAKE ON) # Limit boost to the required libraries only - set(BOOST_INCLUDE_LIBRARIES - ${BOOST_COMPONENTS}) - set(BOOST_URL - "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz") - set(BOOST_HASH - "MD5=D02759931CEDC02ADED80402906C5EB6") + set(BOOST_INCLUDE_LIBRARIES ${BOOST_COMPONENTS}) + set(BOOST_URL "https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz") # cmake-lint: disable=C0301 + set(BOOST_HASH "SHA256=7da75f171837577a52bbf217e17f8ea576c7c246e4594d617bfde7fafd408be5") if(CMAKE_VERSION VERSION_LESS "3.24.0") FetchContent_Declare( @@ -77,7 +86,7 @@ if(NOT Boost_FOUND) set(Boost_FOUND TRUE) # cmake-lint: disable=C0103 set(Boost_INCLUDE_DIRS # cmake-lint: disable=C0103 - "$;$") + "$") if(WIN32) # Windows build is failing to create .h file in this directory diff --git a/packaging/linux/flatpak/modules/boost.json b/packaging/linux/flatpak/modules/boost.json index da111f64..79eadba4 100644 --- a/packaging/linux/flatpak/modules/boost.json +++ b/packaging/linux/flatpak/modules/boost.json @@ -9,8 +9,8 @@ "sources": [ { "type": "archive", - "url": "https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.tar.xz", - "sha256": "2c5ec5edcdff47ff55e27ed9560b0a0b94b07bd07ed9928b476150e16b0efc57" + "url": "https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.tar.xz", + "sha256": "7da75f171837577a52bbf217e17f8ea576c7c246e4594d617bfde7fafd408be5" } ] } diff --git a/packaging/sunshine.rb b/packaging/sunshine.rb index 3b5be19f..dd96392a 100644 --- a/packaging/sunshine.rb +++ b/packaging/sunshine.rb @@ -35,7 +35,6 @@ class @PROJECT_NAME@ < Formula depends_on "miniupnpc" depends_on "openssl" depends_on "opus" - depends_on "boost" => :recommended depends_on "icu4c" => :recommended on_linux do