Ticket #29906: Portfile-go.diff
File Portfile-go.diff, 2.8 KB (added by gaochangjian@…, 13 years ago) |
---|
-
Portfile
old new 69 69 build.cmd ./make.bash 70 70 build.target 71 71 build.env GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${GOARCH} \ 72 GOROOT_FINAL=${prefix} 72 GOROOT_FINAL=${prefix}/src/${name}/${name}-${version} 73 73 use_parallel_build no 74 74 post-build { 75 75 # remove mercurial extras … … 83 83 test.env ${build.env} 84 84 85 85 destroot { 86 # setup GOROOT 87 xinstall -m 755 -d ${destroot}${prefix}/src/go 88 file copy ${worksrcpath} ${destroot}${prefix}/src/go 89 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/bin 90 86 91 # bin files 87 92 file delete ${destroot}${prefix}/bin 88 93 file copy ${GOBIN} ${destroot}${prefix} … … 91 96 xinstall -g procmod -m 2755 ${worksrcpath}/src/cmd/$i/${cmd_prefix}$i \ 92 97 ${destroot}${prefix}/bin 93 98 } 94 95 # lib files96 file delete -force ${destroot}${prefix}/lib97 file copy ${worksrcpath}/lib ${destroot}${prefix}98 99 # compiled packages: violates mtree100 file copy ${worksrcpath}/pkg ${destroot}${prefix}101 102 # include files103 delete ${destroot}${prefix}/include104 file copy ${worksrcpath}/include ${destroot}${prefix}/include105 106 # documentation107 xinstall -m 755 -d ${destroot}${prefix}/share/doc/108 file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}109 xinstall -m 644 -W ${worksrcpath} favicon.ico \110 ${destroot}${prefix}/share/doc/${name}/${name}.ico111 # godoc command required documentation112 xinstall -m 755 -d ${destroot}${prefix}/src/go113 file copy ${worksrcpath} ${destroot}${prefix}/src/go114 system "cd ${destroot}${prefix}/src/${name}/${name}-${version}/src && ./clean.bash"115 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/bin116 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/pkg117 ln -s ${prefix}/src/${name}/${name}-${version}/src/pkg ${destroot}${prefix}/src/pkg118 # gomake command required makefiles119 foreach f [glob -tails -directory ${destroot}${prefix}/src/${name}/${name}-${version}/src/ Make.*] {120 ln -s ${name}/${name}-${version}/src/${f} ${destroot}${prefix}/src121 }122 99 123 100 # bash completion 124 101 xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d … … 140 117 xinstall -m 644 ${worksrcpath}/misc/vim/ftplugin/go/import.vim \ 141 118 ${vimdir}/ftplugin/go.vim 142 119 } 143 destroot.violate_mtree yes144 120 145 121 platform darwin { 146 122 build.env-append GOOS=darwin … … 154 130 build.env-append GOOS=linux 155 131 test.env-append GOOS=linux 156 132 } 133 134 notes " 135 You must set GOBIN environment variable to ${prefix}/bin in your shell\ 136 profile (~/.bashrc, ~/.profile, or equivalent). 137 "