[MacPorts] #67183: Error while installing sunshine with local source

MacPorts noreply at macports.org
Sun Apr 2 23:48:19 UTC 2023


#67183: Error while installing sunshine with local source
---------------------------+--------------------
  Reporter:  andrygamer06  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.1
Resolution:                |   Keywords:
      Port:                |
---------------------------+--------------------
Changes (by ryandesign):

 * priority:  High => Normal
 * keywords:  Sunshine, Help, Local source =>
 * milestone:  MacPorts Future =>


Old description:

> To whom it may concern,
>
> I have been struggling in the last few hours with this and I am sorry if
> it's a dumb thing easy to solve. I have been following this guide:
> https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/installation.html
> to be able to get the software sunshine to work on my m1 MacBook. As
> stated in the guide I add the local source in the following file:
> /opt/local/etc/macports/sources.conf. After I add the source the file
> looks like this (I edited it with the terminal using this command: sudo
> nano /opt/local/etc/macports/sources.conf):
> #
> # To change how MacPorts fetches base, see rsync_server and rsync_dir in
> # macports.conf.
>
> # To add a local source, add a "file://" entry.
> #
> #   Example: file:///Users/landonf/misc/MacPorts/ports
> #
> # To prevent a source from synchronizing when `port sync` is used,
> # append "[nosync]" at the end.
> #
> #   Example: file:///Users/landonf/misc/MacPorts/ports [nosync]
> #
> # Note that MacPorts parses source URLs in order; when a port appears in
> # multiple sources, it installs the first occurrence. For local sources
> # to shadow remote ones, "file://" URLs must come before other URLs.
>
> # A list of rsync mirrors is available at
> # https://trac.macports.org/wiki/Mirrors#Portfiles.
> #
> # If an "rsync://" URL points to a .tar file, a signed .rmd160 file must
> # exist in the same directory on the server and will be used to verify
> # its integrity.
> #
> # For proper functionality of various resources (port groups, mirror
> # sites, etc.), the primary MacPorts source must always be tagged
> # "[default]", even if switched from the default "rsync://" URL.
>
> rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
>
> file:///Users/andrei******/ports (family name censored here)
>
> -----
> Everything works fine until I type the command sudo port install
> sunshine, which leads to the following error: Error: Port sunshine not
> found. I really do not know hoe to upload files here but this is the
> directory of the Portfile, maybe it helps:
> /Users/andrei*******/ports/multimedia/sunshine/Portfile
> -----
> This are the contents of the Portfile:
>
> # -*- 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
>
> # initial PR into macports: https://github.com/macports/macports-
> ports/pull/15143
>
> PortSystem               1.0
> PortGroup                cmake 1.1
> PortGroup                github 1.0
> PortGroup                boost 1.0
>
> name                     @PROJECT_NAME@
> version                  @PROJECT_VERSION@
> revision                 0
> categories               multimedia emulators games
> platforms                darwin
> license                  GPL-3
> maintainers              @LizardByte
> description              @PROJECT_DESCRIPTION@
>
> # long_description will not be split into multiple lines as it's
> configured by CMakeLists
> long_description         @PROJECT_LONG_DESCRIPTION@
> homepage                 @PROJECT_HOMEPAGE_URL@
> master_sites             https://github.com/lizardbyte/sunshine/releases
>
> compiler.cxx_standard    2017
> fetch.type               git
>
> git.url                  @GITHUB_CLONE_URL@
> git.branch               @GITHUB_COMMIT@
>
> post-fetch {
>     system -W ${worksrcpath} "${git.cmd} submodule update --init
> --recursive"
> }
>
> depends_lib              port:avahi \
>                          port:curl \
>                          port:libopus \
>                          port:npm9 \
>                          port:pkgconfig
>
> boost.version            1.80
>
> configure.args           -DCMAKE_INSTALL_PREFIX=${prefix} \
>                          -DSUNSHINE_ASSETS_DIR=etc/sunshine/assets
>
> startupitem.create       yes
> startupitem.executable   "${prefix}/bin/{$name}"
> startupitem.location     LaunchDaemons
> startupitem.name         ${name}
> startupitem.netchange    yes
>
> platform darwin {
>     if { ${os.major} < 20 } {
>         # See:
> https://github.com/LizardByte/Sunshine/discussions/117#discussioncomment-2513494
>         notes-append "Port is limited to software encoding, when used
> with macOS releases prior to Big Sur."
>     }
> }
>
> pre-build {
>     system -W ${worksrcpath} "npm install"
> }
>
> notes-append "Run @PROJECT_NAME@ by executing 'sunshine <path to user
> config>', e.g. 'sunshine ~/sunshine.conf' "
> notes-append "The config file will be created if it doesn't exist."
> notes-append "It is recommended to set a location for the apps file in
> the config."
> notes-append "See our documentation at
> 'https://docs.lizardbyte.dev/projects/sunshine/en/v@PROJECT_VERSION@/'
> for further info."
>
> ---
> If it is ok for you I can upload every screenshot on google drive (even
> as a pdf) so you can take a look at them,
>  I hope you can tell me how to fix this issue,
> Regards,
> Andrei

New description:

 To whom it may concern,

 I have been struggling in the last few hours with this and I am sorry if
 it's a dumb thing easy to solve. I have been following this guide:
 https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/installation.html
 to be able to get the software sunshine to work on my m1 MacBook. As
 stated in the guide I add the local source in the following file:
 /opt/local/etc/macports/sources.conf. After I add the source the file
 looks like this (I edited it with the terminal using this command: `sudo
 nano /opt/local/etc/macports/sources.conf`):
 {{{
 #
 # To change how MacPorts fetches base, see rsync_server and rsync_dir in
 # macports.conf.

 # To add a local source, add a "file://" entry.
 #
 #   Example: file:///Users/landonf/misc/MacPorts/ports
 #
 # To prevent a source from synchronizing when `port sync` is used,
 # append "[nosync]" at the end.
 #
 #   Example: file:///Users/landonf/misc/MacPorts/ports [nosync]
 #
 # Note that MacPorts parses source URLs in order; when a port appears in
 # multiple sources, it installs the first occurrence. For local sources
 # to shadow remote ones, "file://" URLs must come before other URLs.

 # A list of rsync mirrors is available at
 # https://trac.macports.org/wiki/Mirrors#Portfiles.
 #
 # If an "rsync://" URL points to a .tar file, a signed .rmd160 file must
 # exist in the same directory on the server and will be used to verify
 # its integrity.
 #
 # For proper functionality of various resources (port groups, mirror
 # sites, etc.), the primary MacPorts source must always be tagged
 # "[default]", even if switched from the default "rsync://" URL.

 rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]

 file:///Users/andrei******/ports (family name censored here)
 }}}

 Everything works fine until I type the command `sudo port install
 sunshine`, which leads to the following error: `Error: Port sunshine not
 found`. I really do not know hoe to upload files here but this is the
 directory of the Portfile, maybe it helps:
 `/Users/andrei*******/ports/multimedia/sunshine/Portfile`

 This are the contents of the Portfile:

 {{{
 # -*- 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

 # initial PR into macports: https://github.com/macports/macports-
 ports/pull/15143

 PortSystem               1.0
 PortGroup                cmake 1.1
 PortGroup                github 1.0
 PortGroup                boost 1.0

 name                     @PROJECT_NAME@
 version                  @PROJECT_VERSION@
 revision                 0
 categories               multimedia emulators games
 platforms                darwin
 license                  GPL-3
 maintainers              @LizardByte
 description              @PROJECT_DESCRIPTION@

 # long_description will not be split into multiple lines as it's
 configured by CMakeLists
 long_description         @PROJECT_LONG_DESCRIPTION@
 homepage                 @PROJECT_HOMEPAGE_URL@
 master_sites             https://github.com/lizardbyte/sunshine/releases

 compiler.cxx_standard    2017
 fetch.type               git

 git.url                  @GITHUB_CLONE_URL@
 git.branch               @GITHUB_COMMIT@

 post-fetch {
     system -W ${worksrcpath} "${git.cmd} submodule update --init
 --recursive"
 }

 depends_lib              port:avahi \
                          port:curl \
                          port:libopus \
                          port:npm9 \
                          port:pkgconfig

 boost.version            1.80

 configure.args           -DCMAKE_INSTALL_PREFIX=${prefix} \
                          -DSUNSHINE_ASSETS_DIR=etc/sunshine/assets

 startupitem.create       yes
 startupitem.executable   "${prefix}/bin/{$name}"
 startupitem.location     LaunchDaemons
 startupitem.name         ${name}
 startupitem.netchange    yes

 platform darwin {
     if { ${os.major} < 20 } {
         # See:
 https://github.com/LizardByte/Sunshine/discussions/117#discussioncomment-2513494
         notes-append "Port is limited to software encoding, when used with
 macOS releases prior to Big Sur."
     }
 }

 pre-build {
     system -W ${worksrcpath} "npm install"
 }

 notes-append "Run @PROJECT_NAME@ by executing 'sunshine <path to user
 config>', e.g. 'sunshine ~/sunshine.conf' "
 notes-append "The config file will be created if it doesn't exist."
 notes-append "It is recommended to set a location for the apps file in the
 config."
 notes-append "See our documentation at
 'https://docs.lizardbyte.dev/projects/sunshine/en/v@PROJECT_VERSION@/' for
 further info."
 }}}

 If it is ok for you I can upload every screenshot on google drive (even as
 a pdf) so you can take a look at them,
  I hope you can tell me how to fix this issue, \\
 Regards, \\
 Andrei

--

Comment:

 This isn't really our bug since this port is not in the macports-ports
 repository.

 In the instructions you referred to, I don't see an explanation of where
 to get the Portfile from. It appears you used the copy of the Portfile
 available here:
 https://github.com/LizardByte/Sunshine/blob/master/packaging/macos/Portfile

 That won't work because it appears to be just a template. Note the
 placeholders like `@PROJECT_NAME@` and `@PROJECT_VERSION@`. Those would
 need to be replaced with real values. It appears that the sunshine cmake
 configuration process might do this for you, so try doing that. It
 probably won't replace the placeholders in the template; it will create a
 new Portfile somewhere else in which the placeholders have been filled in.
 That new file is the one you would put in your ~/ports/... directory.

 It is weird of them to have a Portfile in their repository. The correct
 thing to do is to submit the Portfile to the macports-ports repository,
 which is where it would be maintained from that point on. As noted in a
 comment in the Portfile text, they did do this in
 https://github.com/macports/macports-ports/pull/15143 but the request was
 closed without explanation.

-- 
Ticket URL: <https://trac.macports.org/ticket/67183#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list