On Feb 18, 2013, at 7:28 PM, Jeremy Huddleston Sequoia <[email protected]> wrote:
> You'll get:
>
> ~/src/macports/dports/x11/xwininfo $ port lint
> Can't map the URL 'file://.' to a port description file ("can't use empty
> string as operand of "!"").
> Please verify that the directory and portfile syntax are correct.
> To use the current port, you must be in a port's directory.
I don't think return is behaving like you (or I) expect. compiler_is_port is
returning an empty string, which trips up this conditional in
add_automatic_compiler_dependencies:
> # The default value requires substitution before use.
> set compiler [subst ${configure.compiler}]
> if {![compiler_is_port $compiler]} {
> return
> }
You might have to use expr to force a valid boolean value. This fixed it for me.
> proc portconfigure::compiler_is_port {compiler} {
> - return [portconfigure::compiler_port_name ${compiler}] != ""
> + return [expr {[portconfigure::compiler_port_name ${compiler}] != ""}]
> }
For correctness (maybe), I made this change for arch_flag_supported also.
> # internal proc to determine if the compiler supports -arch
> proc portconfigure::arch_flag_supported {compiler} {
> - return [string first "macports-gcc" $compiler] != 0 &&
> - [string first "macports-dragonegg-" $compiler] != 0
> + return [expr {[string first "macports-gcc" $compiler] != 0 &&
> + [string first "macports-dragonegg-" $compiler] != 0}]
> }
vq
tcl-boolean-return-patch-with-expr.diff
Description: Binary data
_______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
