Ticket #33887: go1.patch

File go1.patch, 3.6 KB (added by kbrint@…, 12 years ago)

Update go port to version 1.0.2

  • Portfile

    old new  
    55name                go
    66conflicts           go-devel
    77epoch               1
    8 version             60.3
    9 revision            1
     8version             1.0.2
    109categories          lang
    1110platforms           darwin freebsd linux
    1211license             BSD
     
    2726homepage            http://golang.org/
    2827fetch.type          hg
    2928hg.url              https://go.googlecode.com/hg/
    30 hg.tag              release.r${version}
     29hg.tag              go${version}
    3130
    3231depends_build       bin:bison:bison \
    3332                    bin:make:gmake \
     
    3534                    bin:ed:ed
    3635
    3736set GOROOT          ${worksrcpath}
    38 set GOBIN           ${workpath}/bin
     37set GODEST          ${prefix}/go
    3938
    4039switch ${build_arch} {
    4140    i386 {
    4241        set GOARCH 386
    43         set cmd_prefix 8
    4442    }
    4543    x86_64 {
    4644        set GOARCH amd64
    47         set cmd_prefix 6
    4845    }
    4946    default {
    5047        # unsupported arch, but GOARCH needs to be set to something to prevent errors
    5148        set GOARCH x
    52         set cmd_prefix 6
    5349    }
    5450}
    5551
     
    6359use_configure       no
    6460
    6561pre-build {
    66     xinstall -m 755 -d ${GOROOT} ${GOBIN}
     62    xinstall -m 755 -d ${GOROOT}
    6763}
    6864build.dir           ${worksrcpath}/src
    6965build.cmd           ./make.bash
    7066build.target   
    71 build.env           GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${GOARCH} \
    72                     GOROOT_FINAL=${prefix}
     67build.env           GOROOT=${GOROOT} GOBIN= GOARCH=${GOARCH} \
     68                    GOROOT_FINAL=${GODEST}
    7369use_parallel_build  no
    7470post-build {
    7571    # remove mercurial extras
     
    8379test.env            ${build.env}
    8480
    8581destroot {
    86     # bin files
    87     file delete ${destroot}${prefix}/bin
    88     file copy ${GOBIN} ${destroot}${prefix}
    89     # on Darwin, have to install and setgid; see ${GOROOT}/src/sudo.bash
    90     foreach i {prof cov} {
    91         xinstall -g procmod -m 2755 ${worksrcpath}/src/cmd/$i/${cmd_prefix}$i \
    92             ${destroot}${prefix}/bin
    93     }
    94        
    95     # lib files
    96     file delete -force ${destroot}${prefix}/lib
    97     file copy ${worksrcpath}/lib ${destroot}${prefix}
    98    
    99     # compiled packages: violates mtree
    100     file copy ${worksrcpath}/pkg ${destroot}${prefix}
    101 
    102     # do not install include files: see #30203
    103    
    104     # documentation
    105     xinstall -m 755 -d ${destroot}${prefix}/share/doc/
    106     file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
    107     xinstall -m 644 -W ${worksrcpath} favicon.ico \
    108         ${destroot}${prefix}/share/doc/${name}/${name}.ico
    109     # godoc command required documentation
    110     xinstall -m 755 -d ${destroot}${prefix}/src/go
    111     file copy ${worksrcpath} ${destroot}${prefix}/src/go
    112     system "cd ${destroot}${prefix}/src/${name}/${name}-${version}/src && ./clean.bash"
    113     file delete ${destroot}${prefix}/src/${name}/${name}-${version}/bin
    114     file delete ${destroot}${prefix}/src/${name}/${name}-${version}/pkg
    115     ln -s ${prefix}/src/${name}/${name}-${version}/src/pkg ${destroot}${prefix}/src/pkg
    116     # gomake command required makefiles
    117     foreach f [glob -tails -directory ${destroot}${prefix}/src/${name}/${name}-${version}/src/ Make.*] {
    118         ln -s ${name}/${name}-${version}/src/${f} ${destroot}${prefix}/src
     82    file copy ${worksrcpath}/ ${destroot}/${GODEST}
     83
     84    # bin symlinks
     85    foreach f {go godoc gofmt} {
     86        ln -s ${GODEST}/bin/$f ${destroot}/${prefix}/bin/$f
    11987    }
    12088
    12189    # bash completion
     
    155123
    156124livecheck.type      regex
    157125livecheck.url       http://code.google.com/p/go/source/browse
    158 livecheck.regex     {>release\.r([0-9.]+)<}
     126livecheck.regex     {>go([0-9.]+)<}