[MacPorts] #60402: 2048.cpp should not require user to launch binary from within /opt/local/bin

MacPorts noreply at macports.org
Mon Apr 27 02:32:35 UTC 2020


#60402: 2048.cpp should not require user to launch binary from within
/opt/local/bin
------------------------+----------------------
 Reporter:  ryandesign  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.2
 Keywords:              |       Port:  2048.cpp
------------------------+----------------------
 2048.cpp prints these notes:

 {{{
 $ port notes 2048.cpp
 2048.cpp has the following notes:
   If you run 2048 binary from a directory other than /opt/local/bin, it
   is likely that this game fails to save scores. It is expected, since
   upstream code takes a relative path. Wait for any upstream updates.
 }}}

 It is undesirable to force the user to do this. Wouldn't it be simple to
 create a wrapper script that solves this problem? For example, move the
 real binary from /opt/local/bin/2048 to /opt/local/libexec/2048.cpp/2048
 and put a new shell script at /opt/local/bin/2048 with the following
 contents:

 {{{
 #!/bin/sh
 cd "/opt/local/libexec/2048.cpp"
 exec ./2048 "$@"
 }}}

 and adjust the relative paths used in 2048 to have one extra `../`?

 If there is already an upstream bug report for this problem, it would be
 useful to include it as a comment in the Portfile above the notes. If
 there isn't already an upstream bug report, one should be created.

-- 
Ticket URL: <https://trac.macports.org/ticket/60402>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list