1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name go |
---|
6 | version 2009-12-22 |
---|
7 | |
---|
8 | categories lang go |
---|
9 | maintainers gmail.com:pbhogan |
---|
10 | |
---|
11 | description The Go Programming Language. |
---|
12 | long_description A systems programming language that is expressive, concurrent, garbage-collected. |
---|
13 | homepage http://golang.org/ |
---|
14 | |
---|
15 | platforms darwin |
---|
16 | |
---|
17 | fetch.type hg |
---|
18 | hg.url https://go.googlecode.com/hg/ |
---|
19 | hg.tag release.${version} |
---|
20 | |
---|
21 | livecheck.type regex |
---|
22 | livecheck.url https://go.googlecode.com/hg/.hgtags |
---|
23 | livecheck.regex release\.(.+) |
---|
24 | |
---|
25 | use_configure no |
---|
26 | |
---|
27 | use_parallel_build no |
---|
28 | build.env GOROOT=${worksrcpath} GOOS=darwin GOBIN=${destroot}${prefix}/bin PATH=${destroot}${prefix}/bin:/usr/bin:/bin |
---|
29 | build.cmd cd ${worksrcpath}/src && ./make.bash |
---|
30 | build.target |
---|
31 | |
---|
32 | pre-build { |
---|
33 | # create binaries directory in destroot |
---|
34 | xinstall -m 755 -d ${destroot}${prefix}/bin |
---|
35 | } |
---|
36 | |
---|
37 | destroot { |
---|
38 | delete "${worksrcpath}/pkg/~place-holder~" |
---|
39 | xinstall -m 755 -d ${destroot}${prefix}/lib/${name} |
---|
40 | eval copy ${worksrcpath}/pkg ${destroot}${prefix}/lib/${name}/pkg |
---|
41 | xinstall -m 755 -d ${destroot}${prefix}/share/doc |
---|
42 | eval copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} |
---|
43 | } |
---|
44 | |
---|
45 | post-activate { |
---|
46 | puts "*****************************************************************" |
---|
47 | puts "** IMPORTANT! **" |
---|
48 | puts "*****************************************************************" |
---|
49 | puts [format "Go is installed in %s" ${prefix}/lib/${name}] |
---|
50 | puts "You will need to add the following to your environment to use Go:" |
---|
51 | puts [format "export GOROOT=%s" ${prefix}/lib/${name}] |
---|
52 | puts [format "export GOBIN=%s" ${prefix}/bin] |
---|
53 | puts [format "export GOOS=%s" "darwin"] |
---|
54 | puts [format "export GOARCH=%s" ${goArch}] |
---|
55 | puts "*****************************************************************" |
---|
56 | } |
---|
57 | |
---|
58 | variant x86-64 conflicts x86-32 arm description "64-bit compiler. The most mature implementation." { |
---|
59 | global goArch |
---|
60 | set goArch "amd64" |
---|
61 | build.env-append GOARCH=amd64 |
---|
62 | } |
---|
63 | |
---|
64 | variant x86-32 conflicts x86-64 arm description "32-bit compiler. Comparable to the 64-bit compiler. Not as well soaked but should be nearly as solid." { |
---|
65 | global goArch |
---|
66 | set goArch "386" |
---|
67 | build.env-append GOARCH=386 |
---|
68 | } |
---|
69 | |
---|
70 | # Does not work on OS X quite yet |
---|
71 | # variant arm conflicts x86-64 x86-32 description "ARM compiler. Experimental." { |
---|
72 | # global goArch |
---|
73 | # set goArch "arm" |
---|
74 | # build.env-append GOARCH=arm |
---|
75 | # } |
---|
76 | |
---|
77 | default_variants +x86-64 |
---|