build: optionally static link boost (#2628)

This commit is contained in:
ReenigneArcher 2024-06-14 17:37:46 -04:00 committed by GitHub
commit ebc41acf98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 194 additions and 134 deletions

View file

@ -24,10 +24,6 @@ sudo apt-get install -y \
g++-10 \ g++-10 \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libavdevice-dev \ libavdevice-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -19,7 +19,6 @@ pacman -Syu --noconfirm --ignore=mingw-w64-ucrt-x86_64-curl \
gcc \ gcc \
git \ git \
make \ make \
mingw-w64-ucrt-x86_64-boost \
mingw-w64-ucrt-x86_64-cmake \ mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-cppwinrt \ mingw-w64-ucrt-x86_64-cppwinrt \
mingw-w64-ucrt-x86_64-graphviz \ mingw-w64-ucrt-x86_64-graphviz \

View file

@ -13,7 +13,9 @@ brew install \
# build # build
mkdir -p build mkdir -p build
cd build || exit 1 cd build || exit 1
cmake -G "Unix Makefiles" .. cmake \
-DBOOST_USE_STATIC=OFF \
-G "Unix Makefiles" ..
make -j"$(sysctl -n hw.logicalcpu)" make -j"$(sysctl -n hw.logicalcpu)"
# skip autobuild # skip autobuild

View file

@ -255,10 +255,6 @@ jobs:
g++-10 \ g++-10 \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libavdevice-dev \ libavdevice-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \
@ -979,7 +975,6 @@ jobs:
pacman -Syu --noconfirm --ignore=mingw-w64-ucrt-x86_64-curl \ pacman -Syu --noconfirm --ignore=mingw-w64-ucrt-x86_64-curl \
doxygen \ doxygen \
git \ git \
mingw-w64-ucrt-x86_64-boost \
mingw-w64-ucrt-x86_64-cmake \ mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-cppwinrt \ mingw-w64-ucrt-x86_64-cppwinrt \
mingw-w64-ucrt-x86_64-graphviz \ mingw-w64-ucrt-x86_64-graphviz \

View file

@ -125,8 +125,8 @@ include_directories(
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include" "${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
"${CMAKE_SOURCE_DIR}/third-party/nanors" "${CMAKE_SOURCE_DIR}/third-party/nanors"
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl" "${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
${Boost_INCLUDE_DIRS}
${FFMPEG_INCLUDE_DIRS} ${FFMPEG_INCLUDE_DIRS}
${PLATFORM_INCLUDE_DIRS}
) )
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES list(APPEND SUNSHINE_EXTERNAL_LIBRARIES

View file

@ -117,43 +117,7 @@ elseif(NOT LIBDRM_FOUND)
endif() endif()
# evdev # evdev
pkg_check_modules(PC_EVDEV libevdev) include(dependencies/libevdev_Sunshine)
if(PC_EVDEV_FOUND)
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
find_library(EVDEV_LIBRARY
NAMES evdev libevdev)
else()
include(ExternalProject)
set(LIBEVDEV_VERSION libevdev-1.13.2)
ExternalProject_Add(libevdev
URL http://www.freedesktop.org/software/libevdev/${LIBEVDEV_VERSION}.tar.xz
PREFIX ${LIBEVDEV_VERSION}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
BUILD_COMMAND "make"
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(libevdev SOURCE_DIR)
message(STATUS "libevdev source dir: ${SOURCE_DIR}")
set(EVDEV_INCLUDE_DIR "${SOURCE_DIR}")
ExternalProject_Get_Property(libevdev BINARY_DIR)
message(STATUS "libevdev binary dir: ${BINARY_DIR}")
set(EVDEV_LIBRARY "${BINARY_DIR}/libevdev/.libs/libevdev.a")
# compile libevdev before sunshine
set(SUNSHINE_TARGET_DEPENDENCIES ${SUNSHINE_TARGET_DEPENDENCIES} libevdev)
endif()
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
else()
message(FATAL_ERROR "Couldn't find or fetch libevdev")
endif()
# vaapi # vaapi
if(${SUNSHINE_ENABLE_VAAPI}) if(${SUNSHINE_ENABLE_VAAPI})
@ -274,7 +238,6 @@ list(APPEND PLATFORM_TARGET_FILES
"${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h") "${CMAKE_SOURCE_DIR}/third-party/glad/include/glad/egl.h")
list(APPEND PLATFORM_LIBRARIES list(APPEND PLATFORM_LIBRARIES
Boost::dynamic_linking
dl dl
pulse pulse
pulse-simple) pulse-simple)

View file

@ -13,7 +13,9 @@ foreach(dir ${MACOS_LINK_DIRECTORIES})
endif() endif()
endforeach() endforeach()
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK) if(NOT BOOST_USE_STATIC AND NOT FETCH_CONTENT_BOOST_USED)
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
endif()
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${APP_KIT_LIBRARY} ${APP_KIT_LIBRARY}
@ -24,9 +26,6 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${FOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}
${VIDEO_TOOLBOX_LIBRARY}) ${VIDEO_TOOLBOX_LIBRARY})
set(PLATFORM_INCLUDE_DIRS
${Boost_INCLUDE_DIR})
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist") set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
# todo - tray is not working on macos # todo - tray is not working on macos

View file

@ -2,7 +2,6 @@
# put anything here that applies to both linux and macos # put anything here that applies to both linux and macos
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
Boost::log
${CURL_LIBRARIES}) ${CURL_LIBRARIES})
# add install prefix to assets path if not already there # add install prefix to assets path if not already there

View file

@ -0,0 +1,89 @@
#
# Loads the boost library giving the priority to the system package first, with a fallback to FetchContent.
#
include_guard(GLOBAL)
set(BOOST_VERSION 1.85)
set(BOOST_COMPONENTS
filesystem
locale
log
program_options
system) # system is not used by Sunshine, but by Simple-Web-Server, added here for convenience
if(BOOST_USE_STATIC)
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
endif()
find_package(Boost ${BOOST_VERSION} COMPONENTS ${BOOST_COMPONENTS})
if(NOT Boost_FOUND)
message(STATUS "Boost v${BOOST_VERSION}.x package not found in the system. Falling back to FetchContent.")
include(FetchContent)
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
# more components required for compiling boost targets
list(APPEND BOOST_COMPONENTS
asio
crc
format
process
property_tree)
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.85.0/boost-1.85.0-cmake.tar.xz")
set(BOOST_HASH
"MD5=BADEA970931766604D4D5F8F4090B176")
if(CMAKE_VERSION VERSION_LESS "3.24.0")
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
)
elseif(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0")
# add SYSTEM to FetchContent_Declare, this fails on debian bookworm
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
SYSTEM # requires CMake 3.25+
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
)
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
FetchContent_Declare(
Boost
URL ${BOOST_URL}
URL_HASH ${BOOST_HASH}
OVERRIDE_FIND_PACKAGE # requires CMake 3.24+, but we have a macro to handle it for other versions
)
endif()
FetchContent_MakeAvailable(Boost)
set(FETCH_CONTENT_BOOST_USED TRUE)
set(Boost_FOUND TRUE) # cmake-lint: disable=C0103
set(Boost_INCLUDE_DIRS # cmake-lint: disable=C0103
"$<BUILD_INTERFACE:${Boost_SOURCE_DIR}/libs/headers/include>;$<INSTALL_INTERFACE:include/boost-1_85>")
if(WIN32)
# Windows build is failing to create .h file in this directory
file(MAKE_DIRECTORY ${Boost_BINARY_DIR}/libs/log/src/windows)
endif()
set(Boost_LIBRARIES "") # cmake-lint: disable=C0103
foreach(component ${BOOST_COMPONENTS})
list(APPEND Boost_LIBRARIES "Boost::${component}")
endforeach()
endif()
message(STATUS "Boost include dirs: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries: ${Boost_LIBRARIES}")

View file

@ -1,9 +1,12 @@
# load common dependencies # load common dependencies
# this file will also load platform specific dependencies # this file will also load platform specific dependencies
# boost, this should be before Simple-Web-Server as it also depends on boost
include(dependencies/Boost_Sunshine)
# submodules # submodules
# moonlight common library # moonlight common library
set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for enet") set(ENET_NO_INSTALL ON CACHE BOOL "Don't install any libraries built for enet")
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet") add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
# web server # web server

View file

@ -0,0 +1,44 @@
#
# Loads the libevdev library giving the priority to the system package first, with a fallback to ExternalProject
#
include_guard(GLOBAL)
set(LIBEVDEV_VERSION libevdev-1.13.2)
pkg_check_modules(PC_EVDEV libevdev)
if(PC_EVDEV_FOUND)
find_path(EVDEV_INCLUDE_DIR libevdev/libevdev.h
HINTS ${PC_EVDEV_INCLUDE_DIRS} ${PC_EVDEV_INCLUDEDIR})
find_library(EVDEV_LIBRARY
NAMES evdev libevdev)
else()
include(ExternalProject)
ExternalProject_Add(libevdev
URL http://www.freedesktop.org/software/libevdev/${LIBEVDEV_VERSION}.tar.xz
PREFIX ${LIBEVDEV_VERSION}
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
BUILD_COMMAND "make"
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(libevdev SOURCE_DIR)
message(STATUS "libevdev source dir: ${SOURCE_DIR}")
set(EVDEV_INCLUDE_DIR "${SOURCE_DIR}")
ExternalProject_Get_Property(libevdev BINARY_DIR)
message(STATUS "libevdev binary dir: ${BINARY_DIR}")
set(EVDEV_LIBRARY "${BINARY_DIR}/libevdev/.libs/libevdev.a")
# compile libevdev before sunshine
set(SUNSHINE_TARGET_DEPENDENCIES ${SUNSHINE_TARGET_DEPENDENCIES} libevdev)
set(EXTERNAL_PROJECT_LIBEVDEV_USED TRUE)
endif()
if(EVDEV_INCLUDE_DIR AND EVDEV_LIBRARY)
include_directories(SYSTEM ${EVDEV_INCLUDE_DIR})
list(APPEND PLATFORM_LIBRARIES ${EVDEV_LIBRARY})
else()
message(FATAL_ERROR "Couldn't find or fetch libevdev")
endif()

View file

@ -1,4 +1,2 @@
# unix specific dependencies # unix specific dependencies
# put anything here that applies to both linux and macos # put anything here that applies to both linux and macos
find_package(Boost COMPONENTS locale log filesystem program_options REQUIRED)

View file

@ -1,7 +1,4 @@
# windows specific dependencies # windows specific dependencies
set(Boost_USE_STATIC_LIBS ON) # cmake-lint: disable=C0103
find_package(Boost 1.71.0 COMPONENTS locale log filesystem program_options REQUIRED)
# nlohmann_json # nlohmann_json
pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET) pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET)

View file

@ -13,3 +13,31 @@ elseif(UNIX)
include(${CMAKE_MODULE_PATH}/macros/linux.cmake) include(${CMAKE_MODULE_PATH}/macros/linux.cmake)
endif() endif()
endif() endif()
# override find_package function
macro(find_package) # cmake-lint: disable=C0103
string(TOLOWER "${ARGV0}" ARGV0_LOWER)
if(
(("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED FETCH_CONTENT_LIBEVDEV_USED)
)
# Do nothing, as the package has already been fetched
else()
# Call the original find_package function
_find_package(${ARGV})
endif()
endmacro()
# override pkg_check_modules function
macro(pkg_check_modules) # cmake-lint: disable=C0103
string(TOLOWER "${ARGV0}" ARGV0_LOWER)
if(
(("${ARGV0_LOWER}" STREQUAL "boost") AND DEFINED FETCH_CONTENT_BOOST_USED) OR
(("${ARGV0_LOWER}" STREQUAL "libevdev") AND DEFINED FETCH_CONTENT_LIBEVDEV_USED)
)
# Do nothing, as the package has already been fetched
else()
# Call the original pkg_check_modules function
_pkg_check_modules(${ARGV})
endif()
endmacro()

View file

@ -28,10 +28,6 @@ set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc
set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \ ${CPACK_DEB_PLATFORM_PACKAGE_DEPENDS} \
libboost-filesystem${Boost_VERSION}, \
libboost-locale${Boost_VERSION}, \
libboost-log${Boost_VERSION}, \
libboost-program-options${Boost_VERSION}, \
libcap2, \ libcap2, \
libcurl4, \ libcurl4, \
libdrm2, \ libdrm2, \
@ -48,10 +44,6 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
openssl | libssl3") openssl | libssl3")
set(CPACK_RPM_PACKAGE_REQUIRES "\ set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \ ${CPACK_RPM_PLATFORM_PACKAGE_REQUIRES} \
boost-filesystem >= ${Boost_VERSION}, \
boost-locale >= ${Boost_VERSION}, \
boost-log >= ${Boost_VERSION}, \
boost-program-options >= ${Boost_VERSION}, \
libcap >= 2.22, \ libcap >= 2.22, \
libcurl >= 7.0, \ libcurl >= 7.0, \
libdrm >= 2.4.97, \ libdrm >= 2.4.97, \
@ -66,6 +58,21 @@ set(CPACK_RPM_PACKAGE_REQUIRES "\
openssl >= 3.0.2, \ openssl >= 3.0.2, \
pulseaudio-libs >= 10.0") pulseaudio-libs >= 10.0")
if(NOT BOOST_USE_STATIC)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
libboost-filesystem${Boost_VERSION}, \
libboost-locale${Boost_VERSION}, \
libboost-log${Boost_VERSION}, \
libboost-program-options${Boost_VERSION}")
set(CPACK_RPM_PACKAGE_REQUIRES "\
${CPACK_RPM_PACKAGE_REQUIRES}, \
boost-filesystem >= ${Boost_VERSION}, \
boost-locale >= ${Boost_VERSION}, \
boost-log >= ${Boost_VERSION}, \
boost-program-options >= ${Boost_VERSION}")
endif()
# This should automatically figure out dependencies, doesn't work with the current config # This should automatically figure out dependencies, doesn't work with the current config
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)

View file

@ -15,6 +15,8 @@ option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray r
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF) option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
option(BOOST_USE_STATIC "Use static boost libraries." ON)
option(CUDA_INHERIT_COMPILE_OPTIONS option(CUDA_INHERIT_COMPILE_OPTIONS
"When building CUDA code, inherit compile options from the the main project. You may want to disable this if "When building CUDA code, inherit compile options from the the main project. You may want to disable this if
your IDE throws errors about unknown flags after running cmake." ON) your IDE throws errors about unknown flags after running cmake." ON)
@ -24,7 +26,7 @@ if(UNIX)
"Enable a Homebrew build." OFF) "Enable a Homebrew build." OFF)
option(SUNSHINE_CONFIGURE_HOMEBREW option(SUNSHINE_CONFIGURE_HOMEBREW
"Configure Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF) "Configure Homebrew formula. Recommended to use with SUNSHINE_CONFIGURE_ONLY" OFF)
endif () endif()
if(APPLE) if(APPLE)
option(SUNSHINE_CONFIGURE_PORTFILE option(SUNSHINE_CONFIGURE_PORTFILE

View file

@ -33,10 +33,6 @@ apt-get install -y --no-install-recommends \
git \ git \
graphviz \ graphviz \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
libboost-program-options-dev=1.74.* \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -36,10 +36,6 @@ apt-get install -y --no-install-recommends \
git \ git \
graphviz \ graphviz \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
libboost-program-options-dev=1.74.* \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -37,10 +37,6 @@ apt-get install -y --no-install-recommends \
git \ git \
graphviz \ graphviz \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
libboost-program-options-dev=1.74.* \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -30,7 +30,6 @@ set -e
dnf -y update dnf -y update
dnf -y group install "Development Tools" dnf -y group install "Development Tools"
dnf -y install \ dnf -y install \
boost-devel-1.81.0* \
cmake-3.27.* \ cmake-3.27.* \
doxygen \ doxygen \
gcc-13.2.* \ gcc-13.2.* \

View file

@ -30,7 +30,6 @@ set -e
dnf -y update dnf -y update
dnf -y group install "Development Tools" dnf -y group install "Development Tools"
dnf -y install \ dnf -y install \
boost-devel-1.83.0* \
cmake-3.28.* \ cmake-3.28.* \
doxygen \ doxygen \
gcc-14.1.* \ gcc-14.1.* \

View file

@ -37,10 +37,6 @@ apt-get install -y --no-install-recommends \
git \ git \
graphviz \ graphviz \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev=1.74.* \
libboost-locale-dev=1.74.* \
libboost-log-dev=1.74.* \
libboost-program-options-dev=1.74.* \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -39,10 +39,6 @@ apt-get install -y --no-install-recommends \
git \ git \
graphviz \ graphviz \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev=1.83.* \
libboost-locale-dev=1.83.* \
libboost-log-dev=1.83.* \
libboost-program-options-dev=1.83.* \
libcap-dev \ libcap-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ libdrm-dev \

View file

@ -16,10 +16,6 @@ Install Requirements
build-essential \ build-essential \
cmake \ cmake \
libayatana-appindicator3-dev \ libayatana-appindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS libcap-dev \ # KMS
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ # KMS libdrm-dev \ # KMS
@ -54,7 +50,6 @@ Install Requirements
sudo dnf update && \ sudo dnf update && \
sudo dnf group install "Development Tools" && \ sudo dnf group install "Development Tools" && \
sudo dnf install \ sudo dnf install \
boost-devel \
cmake \ cmake \
gcc \ gcc \
gcc-c++ \ gcc-c++ \
@ -95,10 +90,6 @@ Install Requirements
build-essential \ build-essential \
cmake \ cmake \
libappindicator3-dev \ libappindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS libcap-dev \ # KMS
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ # KMS libdrm-dev \ # KMS
@ -135,10 +126,6 @@ Install Requirements
gcc-11 \ gcc-11 \
g++-11 \ g++-11 \
libappindicator3-dev \ libappindicator3-dev \
libboost-filesystem-dev \
libboost-locale-dev \
libboost-log-dev \
libboost-program-options-dev \
libcap-dev \ # KMS libcap-dev \ # KMS
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libdrm-dev \ # KMS libdrm-dev \ # KMS

View file

@ -12,14 +12,14 @@ MacPorts
Install Requirements Install Requirements
.. code-block:: bash .. code-block:: bash
sudo port install avahi boost180 cmake curl doxygen graphviz libopus miniupnpc npm9 pkgconfig python311 py311-pip sudo port install avahi cmake curl doxygen graphviz libopus miniupnpc npm9 pkgconfig python311 py311-pip
Homebrew Homebrew
"""""""" """"""""
Install Requirements Install Requirements
.. code-block:: bash .. code-block:: bash
brew install boost cmake doxygen graphviz miniupnpc node opus pkg-config python@3.11 brew install cmake doxygen graphviz icu4c miniupnpc node openssl@3 opus pkg-config python@3.11
If there are issues with an SSL header that is not found: If there are issues with an SSL header that is not found:
.. tab:: Intel .. tab:: Intel

View file

@ -17,7 +17,6 @@ Install dependencies:
pacman -S \ pacman -S \
doxygen \ doxygen \
git \ git \
mingw-w64-ucrt-x86_64-boost \
mingw-w64-ucrt-x86_64-cmake \ mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-cppwinrt \ mingw-w64-ucrt-x86_64-cppwinrt \
mingw-w64-ucrt-x86_64-curl \ mingw-w64-ucrt-x86_64-curl \

View file

@ -13,7 +13,6 @@ install=sunshine.install
_gcc_version=13 _gcc_version=13
depends=('avahi' depends=('avahi'
'boost-libs'
'curl' 'curl'
'libayatana-appindicator' 'libayatana-appindicator'
'libcap' 'libcap'
@ -37,8 +36,7 @@ depends=('avahi'
'udev') 'udev')
checkdepends=('doxygen' checkdepends=('doxygen'
'graphviz') 'graphviz')
makedepends=('boost' makedepends=('cmake'
'cmake'
"gcc${_gcc_version}" "gcc${_gcc_version}"
'git' 'git'
'make' 'make'

View file

@ -36,25 +36,6 @@ build-options:
modules: modules:
- "org.flatpak.Builder.BaseApp/xvfb.json" - "org.flatpak.Builder.BaseApp/xvfb.json"
- name: boost
disabled: false
buildsystem: simple
build-commands:
- cd tools/build && bison -y -d -o src/engine/jamgram.cpp src/engine/jamgram.y
- ./bootstrap.sh --prefix=$FLATPAK_DEST --with-libraries=locale,log,program_options,system,thread
- ./b2 install variant=release link=shared runtime-link=shared cxxflags="$CXXFLAGS" linkflags="$LDFLAGS"
-j $FLATPAK_BUILDER_N_JOBS
sources:
- type: archive
url: http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/boost1.74_1.74.0.orig.tar.xz
sha256: 2467be4af625b5ae4b3c93fc7af196a09eba39c11a7338cd9e8b356fa44d2f45
- type: archive
url: http://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/boost1.74_1.74.0-18.1ubuntu3.debian.tar.xz
sha256: d5660bdce3ea4ac66194b0c4bc6dc3b9d43d41cc16af8bc6024980d965e40ae2
- type: shell
commands:
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
- name: avahi - name: avahi
disabled: false disabled: false
cleanup: cleanup:

View file

@ -5,7 +5,6 @@
PortSystem 1.0 PortSystem 1.0
PortGroup cmake 1.1 PortGroup cmake 1.1
PortGroup github 1.0 PortGroup github 1.0
PortGroup boost 1.0
name @PROJECT_NAME@ name @PROJECT_NAME@
version @PROJECT_VERSION@ version @PROJECT_VERSION@
@ -45,8 +44,6 @@ depends_lib port:avahi \
depends_test port:doxygen \ depends_test port:doxygen \
port:graphviz port:graphviz
boost.version 1.81
configure.args -DBUILD_WERROR=ON \ configure.args -DBUILD_WERROR=ON \
-DCMAKE_INSTALL_PREFIX=${prefix} \ -DCMAKE_INSTALL_PREFIX=${prefix} \
-DSUNSHINE_ASSETS_DIR=etc/sunshine/assets -DSUNSHINE_ASSETS_DIR=etc/sunshine/assets

View file

@ -21,7 +21,6 @@ class @PROJECT_NAME@ < Formula
end end
end end
depends_on "boost" => :build
depends_on "cmake" => :build depends_on "cmake" => :build
depends_on "node" => :build depends_on "node" => :build
depends_on "pkg-config" => :build depends_on "pkg-config" => :build