Ticket #33887: go1.patch
File go1.patch, 3.6 KB (added by kbrint@…, 12 years ago) |
---|
-
Portfile
old new 5 5 name go 6 6 conflicts go-devel 7 7 epoch 1 8 version 60.3 9 revision 1 8 version 1.0.2 10 9 categories lang 11 10 platforms darwin freebsd linux 12 11 license BSD … … 27 26 homepage http://golang.org/ 28 27 fetch.type hg 29 28 hg.url https://go.googlecode.com/hg/ 30 hg.tag release.r${version}29 hg.tag go${version} 31 30 32 31 depends_build bin:bison:bison \ 33 32 bin:make:gmake \ … … 35 34 bin:ed:ed 36 35 37 36 set GOROOT ${worksrcpath} 38 set GO BIN ${workpath}/bin37 set GODEST ${prefix}/go 39 38 40 39 switch ${build_arch} { 41 40 i386 { 42 41 set GOARCH 386 43 set cmd_prefix 844 42 } 45 43 x86_64 { 46 44 set GOARCH amd64 47 set cmd_prefix 648 45 } 49 46 default { 50 47 # unsupported arch, but GOARCH needs to be set to something to prevent errors 51 48 set GOARCH x 52 set cmd_prefix 653 49 } 54 50 } 55 51 … … 63 59 use_configure no 64 60 65 61 pre-build { 66 xinstall -m 755 -d ${GOROOT} ${GOBIN}62 xinstall -m 755 -d ${GOROOT} 67 63 } 68 64 build.dir ${worksrcpath}/src 69 65 build.cmd ./make.bash 70 66 build.target 71 build.env GOROOT=${GOROOT} GOBIN= ${GOBIN}GOARCH=${GOARCH} \72 GOROOT_FINAL=${ prefix}67 build.env GOROOT=${GOROOT} GOBIN= GOARCH=${GOARCH} \ 68 GOROOT_FINAL=${GODEST} 73 69 use_parallel_build no 74 70 post-build { 75 71 # remove mercurial extras … … 83 79 test.env ${build.env} 84 80 85 81 destroot { 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 119 87 } 120 88 121 89 # bash completion … … 155 123 156 124 livecheck.type regex 157 125 livecheck.url http://code.google.com/p/go/source/browse 158 livecheck.regex {> release\.r([0-9.]+)<}126 livecheck.regex {>go([0-9.]+)<}