Sunshine/Portfile
Anselm Busse 2b450839a1 Initial support for MacOS
This commit introduces initial support for MacOS as third major host platform.
It relies on the VideoToolbox framework for audio and video processing, which
enables hardware accelerated processing of the stream on most platforms.
Audio capturing requires third party tools as MacOS does not offer the
recording of the audio output like the other platforms do. The commit enables
most features offered by Sunshine for MacOS with the big exception of gamepad
support. The patch sets was tested by a few volunteers, which allowed to remove
some of the early bugs. However, several bugs especially regarding corner
cases have probably not surfaced yet.

Besides instructions how to build from source, the commit also adds a Portfile
that allows a more easy installation. After available on the release branch,
a pull request for the Portfile in the MacPorts project is planned.

Signed-off-by: Anselm Busse <anselm.busse@outlook.com>
2022-02-26 10:18:00 +01:00

49 lines
1.7 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup cmake 1.1
PortGroup github 1.0
PortGroup boost 1.0
github.setup abusse sunshine macos-dev
version 20220224
categories multimedia
platforms darwin
license GPL-2
maintainers {outlook.com:anselm.busse}
fetch.type git
post-fetch {
system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive"
}
description Sunshine is a Gamestream host for Moonlight
long_description Sunshine is a Gamestream host for Moonlight
homepage https://github.com/SunshineStream/Sunshine
depends_lib port:avahi port:ffmpeg port:libopus
boost.version 1.76
configure.args -DBOOST_ROOT=[boost::install_area] \
-DSUNSHINE_ASSETS_DIR=${prefix}/etc/sunshine
cmake.out_of_source yes
destroot {
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}
xinstall ${worksrcpath}/assets/apps_mac.json ${destroot}${prefix}/etc/${name}
xinstall ${worksrcpath}/assets/box.png ${destroot}${prefix}/etc/${name}
xinstall ${worksrcpath}/assets/sunshine.conf ${destroot}${prefix}/etc/${name}
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/web
xinstall {*}[glob ${worksrcpath}/assets/web/*.html] ${destroot}${prefix}/etc/${name}/web
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/web/third_party
xinstall {*}[glob ${worksrcpath}/assets/web/third_party/*] ${destroot}${prefix}/etc/${name}/web/third_party
xinstall ${workpath}/build/${name} ${destroot}${prefix}/bin
}