source: trunk/dports/lang/go/Portfile

Last change on this file was 154251, checked in by ciserlohn@…, 2 years ago

go: update to version 1.7.3; disable support for darwin versions not supported upstream

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
RevLine 
[99766]1# -*- 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
[65255]2# $Id: Portfile 154251 2016-10-25 12:31:12Z ciserlohn@macports.org $
3
4PortSystem          1.0
5
[75658]6name                go
[97891]7epoch               2
[154251]8version             1.7.3
[65255]9categories          lang
[65262]10platforms           darwin freebsd linux
[65255]11license             BSD
[106067]12maintainers         ciserlohn
[75658]13description         compiled, garbage-collected, concurrent programming \
14                    language developed by Google Inc.
[65255]15long_description    \
[75658]16    The Go programming language is an open source project to make programmers \
17    more productive. Go is expressive, concise, clean, and efficient. Its \
18    concurrency mechanisms make it easy to write programs that get the most \
19    out of multicore and networked machines, while its novel type system \
20    enables flexible and modular program construction. Go compiles quickly \
21    to machine code yet has the convenience of garbage collection and the \
22    power of run-time reflection. It's a fast, statically typed, compiled \
23    language that feels like a dynamically typed, interpreted language. Go \
24    is developed by Google Inc.
[65255]25
[134659]26homepage            https://golang.org/
[120281]27master_sites        https://storage.googleapis.com/golang/
[97891]28distfiles           ${name}${version}.src.tar.gz
29worksrcdir          ${name}
[65255]30
[154251]31checksums           rmd160  a1fbbf8e0805989e2ca74d66912c87e58328c6b5 \
32                    sha256  79430a0027a09b0b3ad57e214c4c1acfdd7af290961dd08d322818895af1ef44
[97891]33
[153179]34depends_build       port:go-1.4
[140801]35
[65255]36set GOROOT          ${worksrcpath}
[140801]37set GOROOT_FINAL    ${prefix}/lib/${name}
[65262]38
[140807]39supported_archs     i386 x86_64
40
[67164]41switch ${build_arch} {
42    i386 {
43        set GOARCH 386
[65262]44    }
[67164]45    x86_64 {
46        set GOARCH amd64
47    }
[140807]48    default {
49        set GOARCH {}
[65262]50    }
51}
52
53use_configure       no
54
55build.dir           ${worksrcpath}/src
56build.cmd           ./make.bash
[97891]57build.target
[140801]58build.env           GOROOT_BOOTSTRAP=${prefix}/lib/go-1.4 \
59                    GOROOT=${GOROOT} \
60                    GOARCH=${GOARCH} \
61                    GOOS=darwin \
[140815]62                    GOROOT_FINAL=${GOROOT_FINAL} \
[140822]63                    CC=${configure.cc}
[106067]64
[65255]65use_parallel_build  no
[140801]66
[78404]67post-build {
[140801]68    system "find ${worksrcpath} -type d -name .hg* -print0 | xargs -0 rm -rf"
69    delete ${worksrcpath}/pkg/bootstrap
[78404]70}
[65262]71
[65255]72destroot {
[97891]73
[140801]74    set grfdir ${destroot}${GOROOT_FINAL}
75    set docdir ${destroot}${prefix}/share/doc/${name}
76   
77    xinstall -d ${grfdir}
78    xinstall -d ${docdir}
79   
80    foreach f {api bin lib misc pkg src test} {
81        copy ${worksrcpath}/${f} ${grfdir}
[104469]82    }
83
[140801]84    foreach f {go gofmt} {
85        system -W ${destroot}${prefix}/bin/ "ln -s ../lib/${name}/bin/$f ./$f"
86    }
[65255]87
[140801]88    xinstall -m 644 -W ${worksrcpath} \
89        AUTHORS \
90        CONTRIBUTING.md \
91        CONTRIBUTORS \
92        LICENSE \
93        README.md \
94        PATENTS \
95        VERSION \
96        ${docdir}
97
98    copy {*}[glob -directory ${worksrcpath}/doc *] ${docdir}
[65255]99}
[83736]100
[154251]101if {${os.major} < 12} {
102    pre-fetch {
103        ui_error "${name} ${version} requires Mac OS X 10.8 or greater."
104        return -code error "incompatible Mac OS X version"
105    }
106}
107
[83736]108livecheck.type      regex
[134659]109livecheck.url       ${homepage}/dl/
110livecheck.regex     {go([0-9.]+).src.tar.gz}
Note: See TracBrowser for help on using the repository browser.