Ticket #29906: Portfile-go.2.diff
File Portfile-go.2.diff, 2.9 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 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/doc 91 86 92 # bin files 87 93 file delete ${destroot}${prefix}/bin 88 94 file copy ${GOBIN} ${destroot}${prefix} … … 91 97 xinstall -g procmod -m 2755 ${worksrcpath}/src/cmd/$i/${cmd_prefix}$i \ 92 98 ${destroot}${prefix}/bin 93 99 } 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 # include files 103 delete ${destroot}${prefix}/include 104 file copy ${worksrcpath}/include ${destroot}${prefix}/include 105 100 106 101 # documentation 107 102 xinstall -m 755 -d ${destroot}${prefix}/share/doc/ 108 103 file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} 109 xinstall -m 644 -W ${worksrcpath} favicon.ico \ 110 ${destroot}${prefix}/share/doc/${name}/${name}.ico 111 # godoc command required documentation 112 xinstall -m 755 -d ${destroot}${prefix}/src/go 113 file copy ${worksrcpath} ${destroot}${prefix}/src/go 114 system "cd ${destroot}${prefix}/src/${name}/${name}-${version}/src && ./clean.bash" 115 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/bin 116 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/pkg 117 ln -s ${prefix}/src/${name}/${name}-${version}/src/pkg ${destroot}${prefix}/src/pkg 118 # gomake command required makefiles 119 foreach f [glob -tails -directory ${destroot}${prefix}/src/${name}/${name}-${version}/src/ Make.*] { 120 ln -s ${name}/${name}-${version}/src/${f} ${destroot}${prefix}/src 121 } 104 ln -s ${prefix}/share/doc/${name} ${destroot}${prefix}/src/${name}/${name}-${version}/doc 122 105 123 106 # bash completion 124 107 xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d … … 140 123 xinstall -m 644 ${worksrcpath}/misc/vim/ftplugin/go/import.vim \ 141 124 ${vimdir}/ftplugin/go.vim 142 125 } 143 destroot.violate_mtree yes144 126 145 127 platform darwin { 146 128 build.env-append GOOS=darwin … … 154 136 build.env-append GOOS=linux 155 137 test.env-append GOOS=linux 156 138 } 139 140 notes " 141 You must set GOBIN environment variable to ${prefix}/bin in your shell\ 142 profile (~/.bashrc, ~/.profile, or equivalent). 143 "