Changeset 67125


Ignore:
Timestamp:
Apr 29, 2010, 9:22:18 PM (7 years ago)
Author:
singingwolfboy@…
Message:

Updated to latest hg, added compiled packages to lib/gopkg, generated GOARCH by proc rather than switch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/go-devel/Portfile

    r66322 r67125  
    66set real_name       go
    77version             0.0.1
    8 revision            2
     8revision            3
    99categories          lang
    1010platforms           darwin freebsd linux
     
    2424hg.url              https://go.googlecode.com/hg/
    2525#hg.tag              release
    26 hg.tag              9482fde11a02
     26hg.tag              7a932654bb51
    2727
    2828depends_build       bin:bison:bison \
     
    3434set GOBIN           ${workpath}/bin
    3535
    36 switch ${build_arch} {
    37     i386 {
    38         set GOARCH 386
    39     }
    40     x86_64 {
    41         set GOARCH amd64
    42     }
    43     default {
    44         # unsupported arch, but GOARCH needs to be set to something to prevent errors
    45         set GOARCH x
     36# based on minivmac port
     37# converts normal arch names into Go arch names
     38proc my_arch_to_target {arch} {
     39    switch ${arch} {
     40        i386 {
     41            return 386
     42        }
     43        x86_64 {
     44            return amd64
     45        }
     46        arm {
     47            return arm
     48        }
     49        default {
     50            return -code error "unsupported architecture ${arch}"
     51        }
    4652    }
    4753}
     54set GOARCH          [my_arch_to_target ${build_arch}]
    4855
     56# based on wine port
    4957pre-fetch {
    5058    if {"big" == ${os.endian}} {
     
    6977test.cmd            ./run.bash
    7078test.target
    71 test.env            GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${build_arch}
     79test.env            GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${GOARCH}
    7280
    7381destroot {
     
    8088    file copy ${worksrcpath}/lib ${destroot}${prefix}
    8189   
     90    # compiled packages (in lib dir)
     91    file delete ${worksrcpath}/pkg/~place-holder~
     92    eval file copy [glob ${worksrcpath}/pkg/*] ${destroot}${prefix}/lib/gopkg
     93
    8294    # include files
    8395    file copy ${worksrcpath}/include ${destroot}${prefix}/include/${real_name}
     
    118130}
    119131variant nacl description {Native Client platform} {
    120     build.env-delete GOOS
    121132    build.env-append GOOS=nacl
    122     test.env-delete GOOS
    123133    test.env-append GOOS=nacl
    124134}
Note: See TracChangeset for help on using the changeset viewer.