Ticket #29321: Portfile-go.diff

File Portfile-go.diff, 1.3 KB (added by gaochangjian@…, 13 years ago)
  • Portfile

    old new  
    7878    # bin files
    7979    file delete ${destroot}${prefix}/bin
    8080    file copy ${GOBIN} ${destroot}${prefix}
     81    # on Darwin, have to install and setgid; see ${GOROOT}/src/sudo.bash
     82    foreach i {prof cov} {
     83        file copy ${worksrcpath}/src/cmd/$i/6$i ${destroot}${prefix}/bin
     84        chgrp procmod ${destroot}${prefix}/bin/6$i
     85        chmod g+s ${destroot}${prefix}/bin/6$i
     86    }
    8187       
    8288    # lib files
    8389    file delete -force ${destroot}${prefix}/lib
     
    94100    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
    95101    xinstall -m 644 -W ${worksrcpath} favicon.ico \
    96102        ${destroot}${prefix}/share/doc/${name}/${name}.ico
     103    # godoc command required documentation
     104    xinstall -m 755 -d ${destroot}${prefix}/src/go
     105    file copy ${worksrcpath} ${destroot}${prefix}/src/go
     106    ${destroot}${prefix}/src/go/clean.bash
     107    file delete ${destroot}${prefix}/src/go/bin
     108    file delete ${destroot}${prefix}/src/go/pkg
     109    ln -s ${destroot}${prefix}/src/go/src/pkg ${destroot}${prefix}/src/pkg
     110    # gomake command required makefiles
     111    ln -s ${destroot}${prefix}/src/go/src/Make.* ${destroot}${prefix}/src
    97112       
    98113    # bash completion
    99114    xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d