[140801] trunk/dports/lang

ciserlohn at macports.org ciserlohn at macports.org
Sat Oct 3 02:04:55 PDT 2015


Revision: 140801
          https://trac.macports.org/changeset/140801
Author:   ciserlohn at macports.org
Date:     2015-10-03 02:04:55 -0700 (Sat, 03 Oct 2015)
Log Message:
-----------
go: update to version 1.5.1 (closes #48940)

Modified Paths:
--------------
    trunk/dports/lang/go/Portfile

Added Paths:
-----------
    trunk/dports/lang/go-1.4/
    trunk/dports/lang/go-1.4/Portfile

Modified: trunk/dports/lang/go/Portfile
===================================================================
--- trunk/dports/lang/go/Portfile	2015-10-03 08:57:52 UTC (rev 140800)
+++ trunk/dports/lang/go/Portfile	2015-10-03 09:04:55 UTC (rev 140801)
@@ -5,7 +5,7 @@
 
 name                go
 epoch               2
-version             1.4.2
+version             1.5.1
 categories          lang
 platforms           darwin freebsd linux
 license             BSD
@@ -28,26 +28,21 @@
 distfiles           ${name}${version}.src.tar.gz
 worksrcdir          ${name}
 
-checksums           rmd160  dea15b3b4c31554a47b40799f4b9a926ea760e70 \
-                    sha256  299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b
+checksums           rmd160  751d078789bcd6ec0d85e09f5f40d9959877e202 \
+                    sha256  a889873e98d9a72ae396a9b7dd597c29dcd709cafa9097d9c4ba04cff0ec436b
 
+depends_run         port:go-1.4
+
 set GOROOT          ${worksrcpath}
-set GOROOT_FINAL    ${prefix}/go
+set GOROOT_FINAL    ${prefix}/lib/${name}
 
 switch ${build_arch} {
     i386 {
         set GOARCH 386
-        set cmd_prefix 8
     }
     x86_64 {
         set GOARCH amd64
-        set cmd_prefix 6
     }
-    default {
-        # unsupported arch, but GOARCH needs to be set to something to prevent errors
-        set GOARCH x
-        set cmd_prefix 6
-    }
 }
 
 pre-fetch {
@@ -62,47 +57,48 @@
 build.dir           ${worksrcpath}/src
 build.cmd           ./make.bash
 build.target
-build.env           GOROOT=${GOROOT} GOBIN= GOARCH=${GOARCH} \
-                    GOROOT_FINAL=${GOROOT_FINAL} \
-                    CC=${configure.cc} \
-                    GCC=${configure.cc}
+build.env           GOROOT_BOOTSTRAP=${prefix}/lib/go-1.4 \
+                    GOROOT=${GOROOT} \
+                    GOARCH=${GOARCH} \
+                    GOOS=darwin \
+                    GOROOT_FINAL=${GOROOT_FINAL}
 
 use_parallel_build  no
+
 post-build {
-    # remove mercurial extras
-    system "find ${worksrcpath} -type d -name .hg -print0 | xargs -0 rm -rf"
+    system "find ${worksrcpath} -type d -name .hg* -print0 | xargs -0 rm -rf"
+    delete ${worksrcpath}/pkg/bootstrap
 }
 
-test.run            yes
-test.dir            ${worksrcpath}/src
-test.cmd            ./run.bash
-test.target
-test.env            ${build.env}
-
 destroot {
-    # standard distribution
-    file copy ${worksrcpath} ${destroot}${GOROOT_FINAL}
 
-    # binary symlinks
-    foreach f [list go gofmt] {
-        system "cd ${destroot}${prefix}/bin/ && ln -s ../go/bin/$f ./$f"
+    set grfdir ${destroot}${GOROOT_FINAL}
+    set docdir ${destroot}${prefix}/share/doc/${name}
+    
+    xinstall -d ${grfdir}
+    xinstall -d ${docdir}
+    
+    foreach f {api bin lib misc pkg src test} {
+        copy ${worksrcpath}/${f} ${grfdir}
     }
-}
 
-destroot.violate_mtree     yes
+    foreach f {go gofmt} {
+        system -W ${destroot}${prefix}/bin/ "ln -s ../lib/${name}/bin/$f ./$f"
+#        ln -s ${grfdir}/bin/${f} ${destroot}${prefix}/bin/${f}
+    }
 
-platform darwin {
-    build.env-append GOOS=darwin
-    test.env-append GOOS=darwin
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS \
+        CONTRIBUTING.md \
+        CONTRIBUTORS \
+        LICENSE \
+        README.md \
+        PATENTS \
+        VERSION \
+        ${docdir}
+
+    copy {*}[glob -directory ${worksrcpath}/doc *] ${docdir}
 }
-platform freebsd {
-    build.env-append GOOS=freebsd
-    test.env-append GOOS=freebsd
-}
-platform linux {
-    build.env-append GOOS=linux
-    test.env-append GOOS=linux
-}
 
 livecheck.type      regex
 livecheck.url       ${homepage}/dl/

Copied: trunk/dports/lang/go-1.4/Portfile (from rev 140772, trunk/dports/lang/go/Portfile)
===================================================================
--- trunk/dports/lang/go-1.4/Portfile	                        (rev 0)
+++ trunk/dports/lang/go-1.4/Portfile	2015-10-03 09:04:55 UTC (rev 140801)
@@ -0,0 +1,101 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+name                go-1.4
+
+version             1.4.3
+categories          lang
+platforms           darwin
+license             BSD
+maintainers         ciserlohn
+description         compiled, garbage-collected, concurrent programming \
+                    language developed by Google Inc.
+long_description    \
+    The Go programming language is an open source project to make programmers \
+    more productive. Go is expressive, concise, clean, and efficient. Its \
+    concurrency mechanisms make it easy to write programs that get the most \
+    out of multicore and networked machines, while its novel type system \
+    enables flexible and modular program construction. Go compiles quickly \
+    to machine code yet has the convenience of garbage collection and the \
+    power of run-time reflection. It's a fast, statically typed, compiled \
+    language that feels like a dynamically typed, interpreted language. Go \
+    is developed by Google Inc.
+
+homepage            https://golang.org/
+master_sites        https://storage.googleapis.com/golang/
+distfiles           go${version}.src.tar.gz
+worksrcdir          go
+
+checksums           rmd160  b1fbb2805a777c8107e7c946f36a881303ac5e35 \
+                    sha256  9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959
+
+set GOROOT          ${worksrcpath}
+set GOROOT_FINAL    ${prefix}/lib/${name}
+
+switch ${build_arch} {
+    i386 {
+        set GOARCH 386
+    }
+    x86_64 {
+        set GOARCH amd64
+    }
+}
+
+pre-fetch {
+    if {"big" == ${os.endian}} {
+        ui_error "${name} can only be used on an Intel Mac or other computer with a little-endian processor."
+        return -code error "incompatible processor"
+    }
+}
+
+use_configure       no
+
+build.dir           ${worksrcpath}/src
+build.cmd           ./make.bash
+build.target
+build.env           GOROOT=${GOROOT} \
+                    GOARCH=${GOARCH} \
+                    GOOS=darwin \
+                    GOROOT_FINAL=${GOROOT_FINAL} \
+                    CC=${configure.cc} \
+                    GCC=${configure.cc}
+
+use_parallel_build  no
+
+post-build {
+    system "find ${worksrcpath} -type d -name .hg* -print0 | xargs -0 rm -rf"
+}
+
+destroot {
+
+    set grfdir ${destroot}${GOROOT_FINAL}
+    set bindir ${grfdir}/bin
+    set docdir ${destroot}${prefix}/share/doc/${name}
+
+    xinstall -d ${grfdir}
+    xinstall -d ${bindir}
+    xinstall -d ${docdir}
+
+    xinstall -m 755 -W ${worksrcpath} \
+        bin/go \
+        ${bindir}
+
+    foreach f {pkg src} {
+        copy ${worksrcpath}/${f} ${grfdir}
+    }
+
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS \
+        CONTRIBUTORS \
+        LICENSE \
+        README \
+        PATENTS \
+        VERSION \
+        ${docdir}
+}
+
+livecheck.type      regex
+livecheck.url       ${homepage}/dl/
+livecheck.regex     {go(1\.4\.[0-9.]+).src.tar.gz}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151003/f419085d/attachment-0001.html>


More information about the macports-changes mailing list