[108078] trunk/base/src/port1.0/portconfigure.tcl

Ryan Schmidt ryandesign at macports.org
Fri Jul 12 12:45:45 PDT 2013


On Jul 12, 2013, at 13:38, larryv at macports.org wrote:

> Revision: 108078
>          https://trac.macports.org/changeset/108078
> Author:   larryv at macports.org
> Date:     2013-07-12 11:38:30 -0700 (Fri, 12 Jul 2013)
> Log Message:
> -----------
> portconfigure.tcl: Make "eval" uses robust.

Now I'm curious! Why is this more robust?


> Modified Paths:
> --------------
>    trunk/base/src/port1.0/portconfigure.tcl
> 
> Modified: trunk/base/src/port1.0/portconfigure.tcl
> ===================================================================
> --- trunk/base/src/port1.0/portconfigure.tcl	2013-07-12 18:17:04 UTC (rev 108077)
> +++ trunk/base/src/port1.0/portconfigure.tcl	2013-07-12 18:38:30 UTC (rev 108078)
> @@ -77,7 +77,7 @@
>         ([info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == $option_defaults(${type}.cmd)) ||
>         (![info exists option_defaults(${type}.cmd)] && [set ${type}.cmd] == "${type}")
>         )} {
> -            eval depends_build-append $dep
> +            eval [linsert $dep 0 depends_build-append]
>     }
> }
> 
> @@ -97,14 +97,14 @@
>             autoreconf.cmd  -
>             automake.cmd    -
>             autoconf.cmd {
> -                eval depends_build-delete $configure_map(autoconf)
> +                eval [linsert $configure_map(autoconf) 0 depends_build-delete]
>             }
>             xmkmf.cmd {
> -                depends_build-delete $configure_map(xmkmf)
> +                eval [linsert $configure_map(xmkmf) 0 depends_build-delete]
>             }
>             use_xmkmf {
>                 if {[tbool args]} {
> -                    depends_build-append $configure_map(xmkmf)
> +                    eval [linsert $configure_map(xmkmf) 0 depends_build-append]
>                 }
>             }
>             default {
> @@ -765,7 +765,7 @@
>             append_list_to_environment_value configure "OBJCXXFLAGS" ${configure.universal_objcxxflags}
>             append_list_to_environment_value configure "CPPFLAGS" ${configure.universal_cppflags}
>             append_list_to_environment_value configure "LDFLAGS" ${configure.universal_ldflags}
> -            eval configure.pre_args-append ${configure.universal_args}
> +            eval [linsert ${configure.universal_args} 0 configure.pre_args-append]
>         } else {
>             foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS objcxx OBJCXXFLAGS f77 FFLAGS f90 F90FLAGS fc FCFLAGS ld LDFLAGS} {
>                 append_list_to_environment_value configure $flags [set configure.${tool}_archflags]




More information about the macports-dev mailing list