diff options
author | wicast | 2015-08-20 18:28:04 +0800 |
---|---|---|
committer | wicast | 2015-08-20 19:38:57 +0800 |
commit | 881472d177eb28f83128a6fa6ab7739d410f1f99 (patch) | |
tree | b0b8c46730051fbebf06e7ab5393f7d394a3b2c3 | |
parent | 46639568b94b5c1fe9e17a6e8dd6cd94379eef3c (diff) | |
download | aur-881472d177eb28f83128a6fa6ab7739d410f1f99.tar.gz |
upgpkg: go 2:1.5-1
-rw-r--r-- | PKGBUILD | 61 |
1 files changed, 42 insertions, 19 deletions
@@ -13,20 +13,20 @@ pkgname=go-cross-all-platforms _gitname=go epoch=2 -pkgver=1.4.2 +pkgver=1.5 pkgrel=1 pkgdesc='Compiler and tools for the Go programming language from Google (all supported platform)' arch=('x86_64' 'i686') url='http://golang.org/doc/install/source#environment' license=('BSD') -makedepends=('inetutils' 'git' 'mercurial') +makedepends=('inetutils' 'git' 'mercurial' 'go>=1.4') options=('!strip' 'staticlibs') optdepends=('mercurial: for fetching sources from mercurial repositories' 'git: for fetching sources from git repositories' 'bzr: for fetching sources from bazaar repositories' 'subversion: for fetching sources from subversion repositories') conflicts=(go) -provides=(go) +provides=(go=1.5) install="$pkgname.install" #source=("$pkgname-$pkgver::git+https://go.googlesource.com/go#tag=$_gitname$pkgver") source=("$pkgname-$pkgver::git+https://github.com/golang/go.git#tag=$_gitname$pkgver") @@ -39,6 +39,7 @@ build() { export GOBIN="$GOROOT/bin" export GOPATH="$srcdir/" export GOROOT_FINAL=/usr/lib/go + export GOROOT_BOOTSTRAP="$GOROOT_FINAL" # # Arch Linux normally does not enable SSE2 for i686 because of older CPUs. @@ -56,8 +57,19 @@ build() { # export GO386=387 # + # Crosscompilation for darwin + for os in darwin ; do + for arch in arm amd64 386 ; do # arm64 seems have some problems,compile failed. + export GOOS="$os" + export GOARCH="$arch" + # export GOARM=7 + bash make.bash --no-clean + done + done + + # Crosscompilation for various platforms without arm - for os in darwin windows dragonfly openbsd plan9; do #darwin windows dragonfly openbsd plan9; do + for os in windows plan9; do #windows plan9; do for arch in amd64 386; do export GOOS="$os" export GOARCH="$arch" @@ -65,9 +77,9 @@ build() { done done - # Crosscompilation for various platforms with arm (including linux) - for os in freebsd netbsd linux; do #freebsd netbsd linux; do - for arch in amd64 386 arm; do + # Crosscompilation for linux + for os in linux; do + for arch in arm arm64 amd64 386 ppc64 ppc64le; do export GOOS="$os" export GOARCH="$arch" # export GOARM=7 @@ -75,11 +87,22 @@ build() { done done - # Crosscompilation for solaris only on amd64 - export GOOS=solaris - export GOARCH=amd64 - - bash make.bash --no-clean + # Crosscompilation for other platforms + for os in openbsd freebsd netbsd ; do + for arch in arm amd64 386 ; do + export GOOS="$os" + export GOARCH="$arch" + # export GOARM=7 + bash make.bash --no-clean + done + done + + # Crosscompilation for solaris and dragonfly only on amd64 + for os in dragonfly solaris ; do + export GOOS="$os" + export GOARCH=amd64 + bash make.bash --no-clean + done GOOS=linux @@ -136,9 +159,9 @@ package() { cp -a pkg "$pkgdir/usr/lib/go" cp -a "$GOROOT/src" "$pkgdir/usr/lib/go/" cp -a "$GOROOT/src/cmd" "$pkgdir/usr/lib/go/src/cmd" - cp -a "$GOROOT/src/lib9" "$pkgdir/usr/lib/go/src/" + #cp -a "$GOROOT/src/lib9" "$pkgdir/usr/lib/go/src/" cp -a "$GOROOT/lib" "$pkgdir/usr/lib/go/" - cp -a "$GOROOT/include" "$pkgdir/usr/lib/go/" + #cp -a "$GOROOT/include" "$pkgdir/usr/lib/go/" install -Dm644 src/Make.* "$pkgdir/usr/lib/go/src" @@ -151,11 +174,11 @@ package() { # Remove all executable source files find "$pkgdir/usr/lib/go/src" -type f -executable -delete - # Headers for C modules - install -Dm644 src/runtime/runtime.h \ - "$pkgdir/usr/lib/go/src/runtime/runtime.h" - install -Dm644 src/runtime/cgocall.h \ - "$pkgdir/usr/lib/go/src/runtime/cgocall.h" + ## Headers for C modules + #install -Dm644 src/runtime/runtime.h \ + # "$pkgdir/usr/lib/go/src/runtime/runtime.h" + #install -Dm644 src/runtime/cgocall.h \ + # "$pkgdir/usr/lib/go/src/runtime/cgocall.h" # This is to make go get code.google.com/p/go-tour/gotour and # then running the gotour executable work out of the box. |