mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-12-26 21:15:15 +00:00
builds(deps): use miniupnpc package instead of submodule (#1971)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
parent
a452402267
commit
c0164caaaa
@ -15,6 +15,7 @@ sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
|
12
.github/workflows/CI.yml
vendored
12
.github/workflows/CI.yml
vendored
@ -350,6 +350,7 @@ jobs:
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
@ -425,7 +426,9 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Set AppImage Version
|
||||
if: ${{ matrix.type == 'AppImage' && ( needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version ) }} # yamllint disable-line rule:line-length
|
||||
if: |
|
||||
matrix.type == 'AppImage' &&
|
||||
(needs.check_changelog.outputs.next_version_bare != needs.check_changelog.outputs.last_version)
|
||||
run: |
|
||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
@ -516,7 +519,7 @@ jobs:
|
||||
- name: Setup Dependencies MacOS
|
||||
run: |
|
||||
# install dependencies using homebrew
|
||||
brew install cmake curl node openssl opus pkg-config
|
||||
brew install cmake curl miniupnpc node openssl opus pkg-config
|
||||
|
||||
# fix openssl header not found
|
||||
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
||||
@ -530,6 +533,10 @@ jobs:
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \
|
||||
/usr/local/include/opus
|
||||
|
||||
# fix miniupnpc header not found
|
||||
ln -sf $(find /usr/local/Cellar -type d -name "miniupnpc" -path "*/miniupnpc/*/include" | head -n 1) \
|
||||
/usr/local/include/miniupnpc
|
||||
|
||||
- name: Install Boost
|
||||
# installing boost from homebrew takes 30 minutes in a GitHub runner
|
||||
run: |
|
||||
@ -757,6 +764,7 @@ jobs:
|
||||
mingw-w64-x86_64-boost
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-curl
|
||||
mingw-w64-x86_64-miniupnpc
|
||||
mingw-w64-x86_64-nodejs
|
||||
mingw-w64-x86_64-nsis
|
||||
mingw-w64-x86_64-onevpl
|
||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -10,10 +10,6 @@
|
||||
path = third-party/ViGEmClient
|
||||
url = https://github.com/nefarius/ViGEmClient
|
||||
branch = master
|
||||
[submodule "third-party/miniupnp"]
|
||||
path = third-party/miniupnp
|
||||
url = https://github.com/miniupnp/miniupnp
|
||||
branch = master
|
||||
[submodule "third-party/nv-codec-headers"]
|
||||
path = third-party/nv-codec-headers
|
||||
url = https://github.com/FFmpeg/nv-codec-headers
|
||||
|
@ -11,6 +11,9 @@ add_definitions(-DCURL_STATICLIB)
|
||||
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||
|
||||
# miniupnpc
|
||||
add_definitions(-DMINIUPNP_STATICLIB)
|
||||
|
||||
# extra tools/binaries for audio/display devices
|
||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||
|
||||
@ -70,6 +73,7 @@ list(PREPEND PLATFORM_LIBRARIES
|
||||
userenv
|
||||
synchronization.lib
|
||||
avrt
|
||||
iphlpapi
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
|
@ -16,26 +16,8 @@ find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# miniupnp
|
||||
if(SUNSHINE_SYSTEM_MINIUPNP)
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
|
||||
# Use includedir pkg-config variable rather than MINIUPNP_INCLUDE_DIRS
|
||||
# defined above. The latter may be blank, as pkg-config sometimes omits -I
|
||||
# flags for directories that are searched by default (e.g. /usr/include),
|
||||
# but we need a value to append /miniupnpc to. Normally source files would
|
||||
# prefix their #include directives with miniupnpc/, but this does not align
|
||||
# with the directory structure of the git submodule used below.
|
||||
pkg_get_variable(MINIUPNP_INCLUDE_DIR miniupnpc includedir)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIR}/miniupnpc)
|
||||
else()
|
||||
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
|
||||
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
|
||||
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
|
||||
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
|
||||
set(MINIUPNP_LIBRARIES libminiupnpc-static)
|
||||
add_subdirectory(third-party/miniupnp/miniupnpc)
|
||||
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
|
||||
endif()
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
||||
|
||||
# ffmpeg pre-compiled binaries
|
||||
if(WIN32)
|
||||
|
@ -4,7 +4,6 @@ option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
|
||||
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
|
||||
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
|
||||
|
||||
option(SUNSHINE_SYSTEM_MINIUPNP "Use system installation of MiniUPnP rather than the submodule." OFF)
|
||||
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||
|
||||
if(APPLE)
|
||||
|
@ -43,6 +43,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
|
@ -44,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
|
@ -52,6 +52,7 @@ dnf -y install \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
miniupnpc-devel \
|
||||
nodejs \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
|
@ -52,6 +52,7 @@ dnf -y install \
|
||||
libXrandr-devel \
|
||||
libXtst-devel \
|
||||
mesa-libGL-devel \
|
||||
miniupnpc-devel \
|
||||
nodejs \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
|
@ -45,6 +45,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
|
@ -44,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
libopus-dev \
|
||||
|
@ -25,6 +25,7 @@ Install Requirements
|
||||
libcurl4-openssl-dev \
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
@ -77,6 +78,7 @@ Install Requirements
|
||||
libXrandr-devel \ # X11
|
||||
libXtst-devel \ # X11
|
||||
mesa-libGL-devel \
|
||||
miniupnpc-devel \
|
||||
npm \
|
||||
numactl-devel \
|
||||
openssl-devel \
|
||||
@ -106,6 +108,7 @@ Install Requirements
|
||||
libcap-dev \ # KMS
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
@ -155,6 +158,7 @@ Install Requirements
|
||||
libcap-dev \ # KMS
|
||||
libdrm-dev \ # KMS
|
||||
libevdev-dev \
|
||||
libminiupnpc-dev \
|
||||
libmfx-dev \ # x86_64 only
|
||||
libnotify-dev \
|
||||
libnuma-dev \
|
||||
|
@ -12,14 +12,14 @@ MacPorts
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
|
||||
sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig
|
||||
sudo port install avahi boost180 cmake curl libopus miniupnpc npm9 pkgconfig
|
||||
|
||||
Homebrew
|
||||
""""""""
|
||||
Install Requirements
|
||||
.. code-block:: bash
|
||||
|
||||
brew install boost cmake node opus pkg-config
|
||||
brew install boost cmake miniupnpc node opus pkg-config
|
||||
# if there are issues with an SSL header that is not found:
|
||||
cd /usr/local/include
|
||||
ln -s ../opt/openssl/include/openssl .
|
||||
|
@ -14,10 +14,23 @@ Update all packages:
|
||||
Install dependencies:
|
||||
.. code-block:: bash
|
||||
|
||||
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \
|
||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-nodejs mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl \
|
||||
mingw-w64-x86_64-opus mingw-w64-x86_64-toolchain
|
||||
pacman -S \
|
||||
base-devel \
|
||||
cmake \
|
||||
diffutils \
|
||||
gcc \
|
||||
git \
|
||||
make \
|
||||
mingw-w64-x86_64-binutils \
|
||||
mingw-w64-x86_64-boost \
|
||||
mingw-w64-x86_64-cmake \
|
||||
mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-miniupnpc \
|
||||
mingw-w64-x86_64-nodejs \
|
||||
mingw-w64-x86_64-onevpl \
|
||||
mingw-w64-x86_64-openssl \
|
||||
mingw-w64-x86_64-opus \
|
||||
mingw-w64-x86_64-toolchain
|
||||
|
||||
Build
|
||||
-----
|
||||
|
@ -24,6 +24,7 @@ depends=('avahi'
|
||||
'libxfixes'
|
||||
'libxrandr'
|
||||
'libxtst'
|
||||
'miniupnpc'
|
||||
'numactl'
|
||||
'openssl'
|
||||
'opus'
|
||||
|
@ -253,6 +253,23 @@ modules:
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
|
||||
- name: miniupnpc
|
||||
buildsystem: cmake
|
||||
config-opts:
|
||||
- -DUPNPC_BUILD_SAMPLE=OFF
|
||||
- -DUPNPC_BUILD_SHARED=ON
|
||||
- -DUPNPC_BUILD_TESTS=OFF
|
||||
sources:
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/m/miniupnpc/miniupnpc_2.2.5.orig.tar.gz
|
||||
sha256: 38acd5f4602f7cf8bcdc1ec30b2d58db2e9912e5d9f5350dd99b06bfdffb517c
|
||||
- type: archive
|
||||
url: http://archive.ubuntu.com/ubuntu/pool/main/m/miniupnpc/miniupnpc_2.2.5-1.debian.tar.xz
|
||||
sha256: f6ab181f3c999ae0630508ea1e6c76ae302262414061acaab12bf8763431ffd1
|
||||
- type: shell
|
||||
commands:
|
||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
||||
|
||||
- name: numactl
|
||||
buildsystem: autotools
|
||||
make-args:
|
||||
|
@ -34,6 +34,7 @@ post-fetch {
|
||||
depends_lib port:avahi \
|
||||
port:curl \
|
||||
port:libopus \
|
||||
port:miniupnpc \
|
||||
port:npm9 \
|
||||
port:pkgconfig
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
* @file src/upnp.cpp
|
||||
* @brief todo
|
||||
*/
|
||||
#include <miniupnpc.h>
|
||||
#include <upnpcommands.h>
|
||||
#include <miniupnpc/miniupnpc.h>
|
||||
#include <miniupnpc/upnpcommands.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "confighttp.h"
|
||||
|
1
third-party/miniupnp
vendored
1
third-party/miniupnp
vendored
@ -1 +0,0 @@
|
||||
Subproject commit fb5c328a5e8fd57a3ec0f5d33915377a5d3581f3
|
Loading…
Reference in New Issue
Block a user