Ticket #33887: Portfile.diff
File Portfile.diff, 4.6 KB (added by slewsys (Andrew L. Moore), 12 years ago) |
---|
-
Portfile
old new 1 # $Id: Portfile 95777 2012-07-22 08:52:35Z ryandesign@macports.org $1 # $Id: Portfile 86679 2011-10-31 18:47:38Z singingwolfboy@macports.org $ 2 2 3 3 PortSystem 1.0 4 4 5 5 name go 6 epoch 1 7 version 60.3 8 revision 1 6 conflicts go-devel 7 epoch 2 8 version 1.0.2 9 9 categories lang 10 10 platforms darwin freebsd linux 11 11 license BSD … … 25 25 26 26 homepage http://golang.org/ 27 27 fetch.type hg 28 hg.url https:// go.googlecode.com/hg/29 hg.tag release.r${version}28 hg.url https://code.google.com/p/go 29 hg.tag ${name}${version} 30 30 31 31 depends_build bin:bison:bison \ 32 32 bin:make:gmake \ … … 34 34 bin:ed:ed 35 35 36 36 set GOROOT ${worksrcpath} 37 set GOBIN ${workpath}/bin 37 set GOBIN ${GOROOT}/bin 38 set GOSRCDIR lib/${name}${version} 38 39 39 40 switch ${build_arch} { 40 41 i386 { … … 68 69 build.cmd ./make.bash 69 70 build.target 70 71 build.env GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${GOARCH} \ 71 GOROOT_FINAL=${prefix} 72 GOROOT_FINAL=${prefix}/${GOSRCDIR} 72 73 use_parallel_build no 73 74 post-build { 74 75 # remove mercurial extras 75 system "find ${worksrcpath} -type d -name .hg -print0 | xargs -0 rm -rf"76 system "find ${worksrcpath} -type d -name '.hg*' -delete" 76 77 } 77 78 78 79 test.run yes 79 80 test.dir ${worksrcpath}/src 80 81 test.cmd ./run.bash 81 82 test.target 82 test.env ${build.env} 83 test.env ${build.env} \ 84 PATH=${GOBIN}:${prefix}/bin:/bin:/usr/bin 83 85 84 86 destroot { 85 # bin files 86 file delete ${destroot}${prefix}/bin 87 file copy ${GOBIN} ${destroot}${prefix} 88 # on Darwin, have to install and setgid; see ${GOROOT}/src/sudo.bash 89 foreach i {prof cov} { 90 xinstall -g procmod -m 2755 ${worksrcpath}/src/cmd/$i/${cmd_prefix}$i \ 91 ${destroot}${prefix}/bin 92 } 93 94 # lib files 95 file delete -force ${destroot}${prefix}/lib 96 file copy ${worksrcpath}/lib ${destroot}${prefix} 97 98 # compiled packages: violates mtree 99 file copy ${worksrcpath}/pkg ${destroot}${prefix} 87 # bin/pkg/src 88 file copy ${worksrcpath}/ ${destroot}${prefix}/${GOSRCDIR} 100 89 90 # bin symlinks 91 xinstall -m 755 -d ${destroot}${prefix}/bin 92 foreach f [glob -tails -directory ${destroot}${prefix}/${GOSRCDIR}/bin *] { 93 ln -s ../${GOSRCDIR}/bin/${f} ${destroot}${prefix}/bin 94 } 95 101 96 # do not install include files: see #30203 102 97 103 98 # documentation 104 xinstall -m 755 -d ${destroot}${prefix}/share/doc/ 105 file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} 99 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}${version} 100 file copy ${worksrcpath}/doc \ 101 ${destroot}${prefix}/share/doc/${name}${version} 106 102 xinstall -m 644 -W ${worksrcpath} favicon.ico \ 107 ${destroot}${prefix}/share/doc/${name}/${name}.ico 108 # godoc command required documentation 109 xinstall -m 755 -d ${destroot}${prefix}/src/go 110 file copy ${worksrcpath} ${destroot}${prefix}/src/go 111 system "cd ${destroot}${prefix}/src/${name}/${name}-${version}/src && ./clean.bash" 112 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/bin 113 file delete ${destroot}${prefix}/src/${name}/${name}-${version}/pkg 114 ln -s ${prefix}/src/${name}/${name}-${version}/src/pkg ${destroot}${prefix}/src/pkg 115 # gomake command required makefiles 116 foreach f [glob -tails -directory ${destroot}${prefix}/src/${name}/${name}-${version}/src/ Make.*] { 117 ln -s ${name}/${name}-${version}/src/${f} ${destroot}${prefix}/src 118 } 103 ${destroot}${prefix}/share/doc/${name}${version}/${name}.ico 104 105 # misc. 106 xinstall -m 755 -d ${destroot}${prefix}/share/${name}${version} 107 file copy ${worksrcpath}/misc ${destroot}${prefix}/share/${name}${version} 119 108 120 109 # bash completion 121 110 xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d … … 137 126 xinstall -m 644 ${worksrcpath}/misc/vim/ftplugin/go/import.vim \ 138 127 ${vimdir}/ftplugin/go.vim 139 128 } 140 destroot.violate_mtree yes141 129 142 130 platform darwin { 143 131 build.env-append GOOS=darwin … … 154 142 155 143 livecheck.type regex 156 144 livecheck.url http://code.google.com/p/go/source/browse 157 livecheck.regex {> release\.r([0-9.]+)<}145 livecheck.regex {>go(1\.[0-9.]+)<}