[65255] trunk/dports/lang

singingwolfboy at macports.org singingwolfboy at macports.org
Wed Mar 24 13:09:47 PDT 2010


Revision: 65255
          http://trac.macports.org/changeset/65255
Author:   singingwolfboy at macports.org
Date:     2010-03-24 13:09:45 -0700 (Wed, 24 Mar 2010)
Log Message:
-----------
Added portfile for development version of Google Go programming language

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

Added: trunk/dports/lang/go-devel/Portfile
===================================================================
--- trunk/dports/lang/go-devel/Portfile	                        (rev 0)
+++ trunk/dports/lang/go-devel/Portfile	2010-03-24 20:09:45 UTC (rev 65255)
@@ -0,0 +1,124 @@
+# $Id$
+
+PortSystem          1.0
+
+name                go-devel
+set real_name       go
+version             0.0.1
+categories          lang
+platforms           darwin freebsd linux nacl
+license             BSD
+maintainers         singingwolfboy
+description         Systems programming language developed by Google (development version)
+long_description    \
+    A systems programming language developed by Google Inc. Go is similar to C, \
+    but with fast builds, clean syntax, garbage collection, methods for any \
+    type, and run-time reflection. Go promotes writing systems and servers as \
+    sets of lightweight communicating processes, called goroutines, with \
+    strong support from the language. It feels like a dynamic language but has \
+    the speed and safety of a static language. 
+
+homepage            http://golang.org/
+fetch.type          hg
+hg.url              https://go.googlecode.com/hg/
+hg.tag              release
+
+depends_build       bin:bison:bison \
+                    bin:make:gmake \
+                    bin:awk:gawk \
+                    bin:ed:ed
+
+set GOROOT          ${worksrcpath}
+set GOBIN           ${workpath}/bin
+pre-build {
+    xinstall -m 755 -d ${GOROOT} ${GOBIN}
+}
+
+use_configure       no
+build.cmd           cd src && ./make.bash
+build.target    
+build.env           GOROOT=${GOROOT} GOBIN=${GOBIN}
+use_parallel_build  no
+test.run            yes
+test.cmd            cd src && ./run.bash
+test.target 
+test.env            GOROOT=${GOROOT} GOBIN=${GOBIN}
+
+destroot {
+    # bin files
+    file delete ${destroot}${prefix}/bin
+    file copy ${workpath}/bin ${destroot}${prefix}
+        
+    # lib files
+    xinstall -m 644 -W ${worksrcpath}/lib lib9.a libbio.a libmach.a \
+        ${destroot}${prefix}/lib
+    
+    # include files
+    file copy ${worksrcpath}/include ${destroot}${prefix}/include/${real_name}
+}
+
+### PLATFORM VARIANTS ###
+variant darwin {
+    build.env-append GOOS=darwin
+    test.env-append GOOS=darwin
+}
+variant freebsd {
+    build.env-append GOOS=freebsd
+    test.env-append GOOS=freebsd
+}
+variant linux {
+    build.env-append GOOS=linux
+    test.env-append GOOS=linux
+}
+variant nacl description {Platform variant} {
+    build.env-append GOOS=nacl
+    test.env-append GOOS=nacl
+}
+variant i386 {
+    build.env-append GOARCH=386
+    test.env-append GOARCH=386
+}
+variant amd64 description {Platform variant} {
+    build.env-append GOARCH=amd64
+    test.env-append GOARCH=amd64
+}
+variant arm description {Platform variant} {
+    build.env-append GOARCH=arm
+    test.env-append GOARCH=arm
+}
+
+### OTHER VARIANTS ###
+variant docs description {Install Go documentation} {
+    post-destroot {
+        xinstall -m 755 -d ${destroot}${prefix}/share/doc/
+        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${real_name}
+        xinstall -m 644 -W ${worksrcpath} favicon.ico \
+            ${destroot}${prefix}/share/doc/${real_name}
+    }
+}
+variant bash_completion description {Install bash completion files for Go} {
+    depends_run-append      path:etc/bash_completion.d:bash-completion
+    post-destroot {
+        xinstall -m 755 -d ${destroot}${prefix}/etc/bash_completion.d
+        xinstall -m 644 -W ${worksrcpath}/misc/bash ${real_name} \
+            ${destroot}${prefix}/etc/bash_completion.d/${real_name}
+    }
+}
+variant emacs description {Install Go syntax highlighting for emacs} {
+    depends_run-append      bin:emacs:emacs
+    post-destroot {
+        xinstall -m 755 -d ${destroot}${prefix}/share/emacs/site-lisp/
+        eval xinstall -m 644 [glob ${worksrcpath}/misc/emacs/*.el] \
+            ${destroot}${prefix}/share/emacs/site-lisp/
+    }
+}
+variant vim description {Install Go syntax highlighting for vim} {
+    depends_run-append      bin:vim:vim
+    post-destroot {
+        xinstall -m 755 -d ${destroot}${prefix}/share/vim/vim72/syntax/
+        xinstall -m 644 ${worksrcpath}/misc/vim/${real_name}.vim \
+            ${destroot}${prefix}/share/vim/vim72/syntax/
+    }
+}
+
+default_variants +docs


Property changes on: trunk/dports/lang/go-devel/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100324/e88486e0/attachment.html>


More information about the macports-changes mailing list