[67125] trunk/dports/lang/go-devel/Portfile

Ryan Schmidt ryandesign at macports.org
Thu Apr 29 21:12:00 PDT 2010


On Apr 29, 2010, at 16:22, singingwolfboy at macports.org wrote:

> Revision: 67125
>          http://trac.macports.org/changeset/67125
> Author:   singingwolfboy at macports.org
> Date:     2010-04-29 14:22:18 -0700 (Thu, 29 Apr 2010)
> Log Message:
> -----------
> Updated to latest hg, added compiled packages to lib/gopkg, generated GOARCH by proc rather than switch


> -switch ${build_arch} {
> -    i386 {
> -        set GOARCH 386
> +# based on minivmac port
> +# converts normal arch names into Go arch names
> +proc my_arch_to_target {arch} {
> +    switch ${arch} {
> +        i386 {
> +            return 386
> +        }
> +        x86_64 {
> +            return amd64
> +        }
> +        arm {
> +            return arm
> +        }
> +        default {
> +            return -code error "unsupported architecture ${arch}"
> +        }
>     }
> -    x86_64 {
> -        set GOARCH amd64
> -    }
> -    default {
> -        # unsupported arch, but GOARCH needs to be set to something to prevent errors
> -        set GOARCH x
> -    }
> }
> +set GOARCH          [my_arch_to_target ${build_arch}]

This code was problematic for the reasons I explained in the Subversion log, which is why I changed it. You should restore the code to the way it was before this commit, or explain what you're trying to accomplish here that the previous code did not accomplish so we can reach a solution that meets those needs but does not cause the problems your code currently causes.


> +# based on wine port

Not really relevant...



More information about the macports-dev mailing list