[57851] trunk/dports/math/atlas/Portfile

Ryan Schmidt ryandesign at macports.org
Thu Sep 17 08:03:00 PDT 2009


On Sep 17, 2009, at 09:54, jameskyle at macports.org wrote:

> Modified: trunk/dports/math/atlas/Portfile

> +if {${build_arch} == "x86_64" || ${build_arch} == "ppc64" } {
> +  set my_arch 64
> +} else {
> +  set my_arch 32
> +}

I would suggest using a variable name here that doesn't use the word  
"arch" since that's understood to mean the machine architecture, i.e.  
ppc, i386, ppc64 or x86_64. It's also confusing to have two variables,  
my_arch and myarch, which are different things.

>   if {[string equal "${os.arch}" "powerpc"]} {
> -    set myarch "ppc"
> -    } {
> -      set myarch "i386"
> +    if {${my_arch} == "64" } {
> +      set myarch "ppc64"
> +    } else {
> +      set myarch "ppc"
>     }
> +    } else {
> +      if {${my_arch} == "64" } {
> +        set myarch "x86_64"
> +      } else {
> +        set myarch "i386"
> +      }
> +    }

So isn't ${myarch} now the same thing as ${build_arch}, and couldn't  
you just use ${build_arch}?



More information about the macports-dev mailing list