[MacPorts] #62873: compiler_wrapper-1.0.tcl: spaces in arguments are lost

MacPorts noreply at macports.org
Wed May 12 01:03:48 UTC 2021


#62873: compiler_wrapper-1.0.tcl: spaces in arguments are lost
------------------------+----------------------------------
 Reporter:  ryandesign  |      Owner:  cjones051073,
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.4
 Keywords:              |       Port:  compiler_wrapper-1.0
------------------------+----------------------------------
 The compiler wrappers created by the compiler_wrapper-1.0.tcl portgroup do
 not preserve spaces in arguments passed to them nor in
 MACPORTS_LEGACY_SUPPORT_CPPFLAGS.

 Here is what a compiler wrapper currently looks like:

 {{{
 #!/bin/bash
 export CCACHE_DIR=/opt/local/var/macports/build/.ccache
 CMD="/opt/local/bin/ccache /usr/bin/clang
 ${MACPORTS_LEGACY_SUPPORT_CPPFLAGS} -pipe   ${@} "
 exec ${CMD}
 }}}

 To correct the problem, it needs to look like this:

 {{{
 #!/bin/bash
 export CCACHE_DIR=/opt/local/var/macports/build/.ccache
 exec /opt/local/bin/ccache /usr/bin/clang
 "$MACPORTS_LEGACY_SUPPORT_CPPFLAGS" -pipe "$@"
 }}}

 Preservation of spaces only occurs when the variable name is surrounded in
 quotation marks.

 `"$@"` is a special case. `$@` represents potentially multiple arguments
 and `"$@"` expands to each of the arguments individually surrounded with
 quotation marks.

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


More information about the macports-tickets mailing list