builds(deps): use miniupnpc package instead of submodule (#1971)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ sudo apt-get install -y \
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libmfx-dev \
|
libmfx-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
|
|||||||
12
.github/workflows/CI.yml
vendored
12
.github/workflows/CI.yml
vendored
@@ -350,6 +350,7 @@ jobs:
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libmfx-dev \
|
libmfx-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
@@ -425,7 +426,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set AppImage Version
|
- 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: |
|
run: |
|
||||||
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
version=${{ needs.check_changelog.outputs.next_version_bare }}
|
||||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||||
@@ -516,7 +519,7 @@ jobs:
|
|||||||
- name: Setup Dependencies MacOS
|
- name: Setup Dependencies MacOS
|
||||||
run: |
|
run: |
|
||||||
# install dependencies using homebrew
|
# 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
|
# fix openssl header not found
|
||||||
# ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include/openssl
|
# 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) \
|
ln -sf $(find /usr/local/Cellar -type d -name "opus" -path "*/opus/*/include" | head -n 1) \
|
||||||
/usr/local/include/opus
|
/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
|
- name: Install Boost
|
||||||
# installing boost from homebrew takes 30 minutes in a GitHub runner
|
# installing boost from homebrew takes 30 minutes in a GitHub runner
|
||||||
run: |
|
run: |
|
||||||
@@ -757,6 +764,7 @@ jobs:
|
|||||||
mingw-w64-x86_64-boost
|
mingw-w64-x86_64-boost
|
||||||
mingw-w64-x86_64-cmake
|
mingw-w64-x86_64-cmake
|
||||||
mingw-w64-x86_64-curl
|
mingw-w64-x86_64-curl
|
||||||
|
mingw-w64-x86_64-miniupnpc
|
||||||
mingw-w64-x86_64-nodejs
|
mingw-w64-x86_64-nodejs
|
||||||
mingw-w64-x86_64-nsis
|
mingw-w64-x86_64-nsis
|
||||||
mingw-w64-x86_64-onevpl
|
mingw-w64-x86_64-onevpl
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -10,10 +10,6 @@
|
|||||||
path = third-party/ViGEmClient
|
path = third-party/ViGEmClient
|
||||||
url = https://github.com/nefarius/ViGEmClient
|
url = https://github.com/nefarius/ViGEmClient
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "third-party/miniupnp"]
|
|
||||||
path = third-party/miniupnp
|
|
||||||
url = https://github.com/miniupnp/miniupnp
|
|
||||||
branch = master
|
|
||||||
[submodule "third-party/nv-codec-headers"]
|
[submodule "third-party/nv-codec-headers"]
|
||||||
path = third-party/nv-codec-headers
|
path = third-party/nv-codec-headers
|
||||||
url = https://github.com/FFmpeg/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})
|
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
# miniupnpc
|
||||||
|
add_definitions(-DMINIUPNP_STATICLIB)
|
||||||
|
|
||||||
# extra tools/binaries for audio/display devices
|
# extra tools/binaries for audio/display devices
|
||||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||||
|
|
||||||
@@ -70,6 +73,7 @@ list(PREPEND PLATFORM_LIBRARIES
|
|||||||
userenv
|
userenv
|
||||||
synchronization.lib
|
synchronization.lib
|
||||||
avrt
|
avrt
|
||||||
|
iphlpapi
|
||||||
${CURL_STATIC_LIBRARIES})
|
${CURL_STATIC_LIBRARIES})
|
||||||
|
|
||||||
if(SUNSHINE_ENABLE_TRAY)
|
if(SUNSHINE_ENABLE_TRAY)
|
||||||
|
|||||||
@@ -16,26 +16,8 @@ find_package(Threads REQUIRED)
|
|||||||
pkg_check_modules(CURL REQUIRED libcurl)
|
pkg_check_modules(CURL REQUIRED libcurl)
|
||||||
|
|
||||||
# miniupnp
|
# miniupnp
|
||||||
if(SUNSHINE_SYSTEM_MINIUPNP)
|
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
||||||
|
|
||||||
# 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()
|
|
||||||
|
|
||||||
# ffmpeg pre-compiled binaries
|
# ffmpeg pre-compiled binaries
|
||||||
if(WIN32)
|
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_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_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)
|
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
libopus-dev \
|
libopus-dev \
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
libopus-dev \
|
libopus-dev \
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ dnf -y install \
|
|||||||
libXrandr-devel \
|
libXrandr-devel \
|
||||||
libXtst-devel \
|
libXtst-devel \
|
||||||
mesa-libGL-devel \
|
mesa-libGL-devel \
|
||||||
|
miniupnpc-devel \
|
||||||
nodejs \
|
nodejs \
|
||||||
numactl-devel \
|
numactl-devel \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ dnf -y install \
|
|||||||
libXrandr-devel \
|
libXrandr-devel \
|
||||||
libXtst-devel \
|
libXtst-devel \
|
||||||
mesa-libGL-devel \
|
mesa-libGL-devel \
|
||||||
|
miniupnpc-devel \
|
||||||
nodejs \
|
nodejs \
|
||||||
numactl-devel \
|
numactl-devel \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
libopus-dev \
|
libopus-dev \
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
libopus-dev \
|
libopus-dev \
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Install Requirements
|
|||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \ # KMS
|
libdrm-dev \ # KMS
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libmfx-dev \ # x86_64 only
|
libmfx-dev \ # x86_64 only
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
@@ -77,6 +78,7 @@ Install Requirements
|
|||||||
libXrandr-devel \ # X11
|
libXrandr-devel \ # X11
|
||||||
libXtst-devel \ # X11
|
libXtst-devel \ # X11
|
||||||
mesa-libGL-devel \
|
mesa-libGL-devel \
|
||||||
|
miniupnpc-devel \
|
||||||
npm \
|
npm \
|
||||||
numactl-devel \
|
numactl-devel \
|
||||||
openssl-devel \
|
openssl-devel \
|
||||||
@@ -106,6 +108,7 @@ Install Requirements
|
|||||||
libcap-dev \ # KMS
|
libcap-dev \ # KMS
|
||||||
libdrm-dev \ # KMS
|
libdrm-dev \ # KMS
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libmfx-dev \ # x86_64 only
|
libmfx-dev \ # x86_64 only
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
@@ -155,6 +158,7 @@ Install Requirements
|
|||||||
libcap-dev \ # KMS
|
libcap-dev \ # KMS
|
||||||
libdrm-dev \ # KMS
|
libdrm-dev \ # KMS
|
||||||
libevdev-dev \
|
libevdev-dev \
|
||||||
|
libminiupnpc-dev \
|
||||||
libmfx-dev \ # x86_64 only
|
libmfx-dev \ # x86_64 only
|
||||||
libnotify-dev \
|
libnotify-dev \
|
||||||
libnuma-dev \
|
libnuma-dev \
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ MacPorts
|
|||||||
Install Requirements
|
Install Requirements
|
||||||
.. code-block:: bash
|
.. 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
|
Homebrew
|
||||||
""""""""
|
""""""""
|
||||||
Install Requirements
|
Install Requirements
|
||||||
.. code-block:: bash
|
.. 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:
|
# if there are issues with an SSL header that is not found:
|
||||||
cd /usr/local/include
|
cd /usr/local/include
|
||||||
ln -s ../opt/openssl/include/openssl .
|
ln -s ../opt/openssl/include/openssl .
|
||||||
|
|||||||
@@ -14,10 +14,23 @@ Update all packages:
|
|||||||
Install dependencies:
|
Install dependencies:
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pacman -S base-devel cmake diffutils gcc git make mingw-w64-x86_64-binutils \
|
pacman -S \
|
||||||
mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-curl \
|
base-devel \
|
||||||
mingw-w64-x86_64-nodejs mingw-w64-x86_64-onevpl mingw-w64-x86_64-openssl \
|
cmake \
|
||||||
mingw-w64-x86_64-opus mingw-w64-x86_64-toolchain
|
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
|
Build
|
||||||
-----
|
-----
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ depends=('avahi'
|
|||||||
'libxfixes'
|
'libxfixes'
|
||||||
'libxrandr'
|
'libxrandr'
|
||||||
'libxtst'
|
'libxtst'
|
||||||
|
'miniupnpc'
|
||||||
'numactl'
|
'numactl'
|
||||||
'openssl'
|
'openssl'
|
||||||
'opus'
|
'opus'
|
||||||
|
|||||||
@@ -253,6 +253,23 @@ modules:
|
|||||||
commands:
|
commands:
|
||||||
- for n in $(cat patches/series); do if [[ $n != "#"* ]]; then patch -Np1 -i "patches/$n" -d .; fi; done
|
- 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
|
- name: numactl
|
||||||
buildsystem: autotools
|
buildsystem: autotools
|
||||||
make-args:
|
make-args:
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ post-fetch {
|
|||||||
depends_lib port:avahi \
|
depends_lib port:avahi \
|
||||||
port:curl \
|
port:curl \
|
||||||
port:libopus \
|
port:libopus \
|
||||||
|
port:miniupnpc \
|
||||||
port:npm9 \
|
port:npm9 \
|
||||||
port:pkgconfig
|
port:pkgconfig
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* @file src/upnp.cpp
|
* @file src/upnp.cpp
|
||||||
* @brief todo
|
* @brief todo
|
||||||
*/
|
*/
|
||||||
#include <miniupnpc.h>
|
#include <miniupnpc/miniupnpc.h>
|
||||||
#include <upnpcommands.h>
|
#include <miniupnpc/upnpcommands.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "confighttp.h"
|
#include "confighttp.h"
|
||||||
|
|||||||
1
third-party/miniupnp
vendored
1
third-party/miniupnp
vendored
Submodule third-party/miniupnp deleted from fb5c328a5e
Reference in New Issue
Block a user