2022-02-24 20:09:00 +00:00
|
|
|
# -*- 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
|
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
PortSystem 1.0
|
|
|
|
PortGroup cmake 1.1
|
|
|
|
PortGroup github 1.0
|
|
|
|
PortGroup boost 1.0
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
# bump revision when changes are made to this file
|
|
|
|
revision 1
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
github.setup @GITHUB_OWNER@ @GITHUB_REPO@ @GITHUB_BRANCH@
|
|
|
|
name @PROJECT_NAME@
|
|
|
|
version @PROJECT_VERSION@
|
|
|
|
categories multimedia emulators games
|
|
|
|
platforms darwin
|
|
|
|
license GPL-3
|
|
|
|
maintainers {@SunshineStream sunshinestream}
|
|
|
|
description @PROJECT_DESCRIPTION@
|
|
|
|
long_description {*}${description}
|
|
|
|
homepage @PROJECT_HOMEPAGE_URL@
|
|
|
|
master_sites https://github.com/@GITHUB_OWNER@/@GITHUB_REPO@/releases
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
fetch.type git
|
2022-02-24 20:09:00 +00:00
|
|
|
post-fetch {
|
|
|
|
system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive"
|
|
|
|
}
|
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
depends_lib port:avahi \
|
|
|
|
port:ffmpeg \
|
|
|
|
port:libopus
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
boost.version 1.76
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
configure.args -DBOOST_ROOT=[boost::install_area] \
|
|
|
|
-DSUNSHINE_ASSETS_DIR=${prefix}/etc/sunshine/assets \
|
|
|
|
-DSUNSHINE_CONFIG_DIR=${prefix}/etc/sunshine/config
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
cmake.out_of_source yes
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
startupitem.create yes
|
|
|
|
startupitem.executable "${prefix}/bin/{$name}"
|
|
|
|
startupitem.location LaunchDaemons
|
|
|
|
startupitem.name ${name}
|
|
|
|
startupitem.netchange yes
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-16 20:18:59 +00:00
|
|
|
platform darwin {
|
|
|
|
if { ${os.major} < 20 } {
|
|
|
|
# See: https://github.com/SunshineStream/Sunshine/discussions/117#discussioncomment-2513494
|
|
|
|
notes-append "Port is limited to software encoding, when used with macOS releases prior to Big Sur."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
# is this actually necessary? this should all be handled by CMakeLists
|
2022-02-24 20:09:00 +00:00
|
|
|
destroot {
|
2022-06-11 03:20:24 +00:00
|
|
|
# install assets
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/*.*] ${destroot}${prefix}/etc/${name}/assets
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/macos/assets/*.*] ${destroot}${prefix}/etc/${name}/assets
|
|
|
|
|
|
|
|
# install web assets
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/css
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/webfonts
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/*.*] ${destroot}${prefix}/etc/${name}/assets/web
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/css/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/css
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/fonts/fontawesome-free-web/webfonts/*.*] ${destroot}${prefix}/etc/${name}/assets/web/fonts/fontawesome-free-web/webfonts
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/images
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/assets/web/third_party
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/images/*.*] ${destroot}${prefix}/etc/${name}/assets/web/images
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/assets/web/third_party/*.*] ${destroot}${prefix}/etc/${name}/assets/web/third_party
|
|
|
|
|
|
|
|
xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/config
|
|
|
|
|
|
|
|
# install sunshine.conf
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/common/config/*.*] ${destroot}${prefix}/etc/${name}/config
|
2022-05-12 01:31:31 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
# install apps.json
|
|
|
|
xinstall {*}[glob ${worksrcpath}/src_assets/macos/config/*.*] ${destroot}${prefix}/etc/${name}/config
|
2022-02-24 20:09:00 +00:00
|
|
|
|
2022-06-11 03:20:24 +00:00
|
|
|
# install the binary
|
2022-02-24 20:09:00 +00:00
|
|
|
xinstall ${workpath}/build/${name} ${destroot}${prefix}/bin
|
|
|
|
}
|