[104469] trunk/dports/lang/go/Portfile
landonf at macports.org
landonf at macports.org
Mon Mar 25 17:45:00 PDT 2013
Revision: 104469
https://trac.macports.org/changeset/104469
Author: landonf at macports.org
Date: 2013-03-25 17:45:00 -0700 (Mon, 25 Mar 2013)
Log Message:
-----------
Fix the port layout issues described in:
https://groups.google.com/group/golang-nuts/browse_thread/thread/1656e95264600477
This matches the approach used in the FreeBSD port.
Modified Paths:
--------------
trunk/dports/lang/go/Portfile
Modified: trunk/dports/lang/go/Portfile
===================================================================
--- trunk/dports/lang/go/Portfile 2013-03-25 23:58:42 UTC (rev 104468)
+++ trunk/dports/lang/go/Portfile 2013-03-26 00:45:00 UTC (rev 104469)
@@ -6,6 +6,7 @@
name go
epoch 2
version 1.0.3
+revision 1
categories lang
platforms darwin freebsd linux
license BSD
@@ -34,13 +35,8 @@
checksums rmd160 233d4a5527d946934598aa570e583469daab1c9c \
sha256 7fba3533d172f13629d3d8a79e57c620632b0bd075abe11d7698b338be0ae3df
-depends_build bin:bison:bison \
- bin:make:gmake \
- bin:awk:gawk \
- bin:ed:ed
-
set GOROOT ${worksrcpath}
-set GOBIN ${workpath}/bin
+set GOROOT_FINAL ${prefix}/go
switch ${build_arch} {
i386 {
@@ -77,14 +73,11 @@
# attempting the build with clang fails on some go code
compiler.blacklist clang
-pre-build {
- xinstall -m 755 -d ${GOROOT} ${GOBIN}
-}
build.dir ${worksrcpath}/src
build.cmd ./make.bash
build.target
-build.env GOROOT=${GOROOT} GOBIN=${GOBIN} GOARCH=${GOARCH} \
- GOROOT_FINAL=${prefix} \
+build.env GOROOT=${GOROOT} GOBIN= GOARCH=${GOARCH} \
+ GOROOT_FINAL=${GOROOT_FINAL} \
CC=${configure.cc} \
GCC=${configure.cc} \
GO_GCFLAGS=${configure.cflags} \
@@ -102,36 +95,9 @@
test.env ${build.env}
destroot {
- # bin files
- file delete ${destroot}${prefix}/bin
- file copy ${GOBIN} ${destroot}${prefix}
+ # standard distribution
+ file copy ${worksrcpath} ${destroot}${GOROOT_FINAL}
- # lib files
- file delete -force ${destroot}${prefix}/lib
- file copy ${worksrcpath}/lib ${destroot}${prefix}
-
- # compiled packages: violates mtree
- file copy ${worksrcpath}/pkg ${destroot}${prefix}
-
- # do not install include files: see #30203
-
- # documentation
- xinstall -m 755 -d ${destroot}${prefix}/share/doc/
- file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
- xinstall -m 644 -W ${worksrcpath} favicon.ico \
- ${destroot}${prefix}/share/doc/${name}/${name}.ico
- # godoc command required documentation
- xinstall -m 755 -d ${destroot}${prefix}/src
- file copy ${worksrcpath} ${destroot}${prefix}/src/${name}-${version}
- #system "cd ${destroot}${prefix}/src/${name}-${version}/src && ./clean.bash"
- delete ${destroot}${prefix}/src/${name}-${version}/bin
- delete ${destroot}${prefix}/src/${name}-${version}/pkg
- ln -s ${prefix}/src/${name}-${version}/src/pkg ${destroot}${prefix}/src/pkg
- # gomake command required makefiles
- foreach f [glob -tails -directory ${destroot}${prefix}/src/${name}-${version}/src/ Make.*] {
- ln -s ${name}-${version}/src/${f} ${destroot}${prefix}/src
- }
-
# bash completion
xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d
xinstall -m 644 -W ${worksrcpath}/misc/bash ${name} \
@@ -151,7 +117,13 @@
${vimdir}/ftdetect/go.vim
xinstall -m 644 ${worksrcpath}/misc/vim/ftplugin/go/import.vim \
${vimdir}/ftplugin/go.vim
+
+ # binary symlinks
+ foreach f [list go godoc gofmt] {
+ system "cd ${destroot}${prefix}/bin/ && ln -s ../go/bin/$f ./$f"
+ }
}
+
destroot.violate_mtree yes
platform darwin {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130325/07c2d4cc/attachment-0001.html>
More information about the macports-changes
mailing list