diff options
author | William Hubbs <williamh@gentoo.org> | 2012-08-07 19:04:32 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-08-07 19:04:32 +0000 |
commit | 020bb251bf9e406aeb3d344719d0ffa562f1609b (patch) | |
tree | 7b104e1ad91e04a7a0ac17fa56d597b28787d435 | |
parent | old (diff) | |
download | gentoo-2-020bb251bf9e406aeb3d344719d0ffa562f1609b.tar.gz gentoo-2-020bb251bf9e406aeb3d344719d0ffa562f1609b.tar.bz2 gentoo-2-020bb251bf9e406aeb3d344719d0ffa562f1609b.zip |
add CTARGET support for the arm architecture
(Portage version: 2.2.0_alpha120/cvs/Linux i686)
-rw-r--r-- | dev-lang/go/go-1.0.2.ebuild | 25 | ||||
-rw-r--r-- | dev-lang/go/go-9999.ebuild | 28 |
2 files changed, 32 insertions, 21 deletions
diff --git a/dev-lang/go/go-1.0.2.ebuild b/dev-lang/go/go-1.0.2.ebuild index 98173439404b..3073cb4c97c8 100644 --- a/dev-lang/go/go-1.0.2.ebuild +++ b/dev-lang/go/go-1.0.2.ebuild @@ -1,14 +1,16 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.2.ebuild,v 1.1 2012/07/30 18:49:38 williamh Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.2.ebuild,v 1.2 2012/08/07 19:04:32 williamh Exp $ EAPI=4 -EHG_REPO_URI="https://go.googlecode.com/hg" +export CTARGET=${CTARGET:-${CHOST}} -[[ ${PV} == 9999 ]] && vcs=mercurial - -inherit $vcs bash-completion-r1 elisp-common eutils +if [[ ${PV} = 9999 ]]; then + EHG_REPO_URI="https://go.googlecode.com/hg" + inherit mercurial +fi +inherit bash-completion-r1 elisp-common eutils if [[ ${PV} != 9999 ]]; then SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz" @@ -35,7 +37,9 @@ RDEPEND="bash-completion? ( app-shells/bash-completion ) # These are _NOT_ libraries, and should not be stripped. STRIP_MASK="/usr/lib/go/pkg/linux*/*.a" -[[ ${PV} == 9999 ]] || S="${WORKDIR}"/go +if [[ ${PV} != 9999 ]]; then + S="${WORKDIR}"/go +fi src_prepare() { @@ -47,11 +51,13 @@ src_prepare() src_compile() { - export HOST_EXTRA_CFLAGS="${CFLAGS}" - export HOST_EXTRA_LDFLAGS="${LDFLAGS}" export GOROOT_FINAL=/usr/lib/go export GOROOT="$(pwd)" export GOBIN="${GOROOT}/bin" + if [[ $CTARGET = arm5* ]] + then + export GOARM=5 + fi cd src ./make.bash || die "build failed" @@ -65,7 +71,8 @@ src_compile() src_test() { cd src - PATH="$GOBIN:${PATH}" ./run.bash --no-rebuild --banner || die "tests failed" + PATH="${GOBIN}:${PATH}" \ + ./run.bash --no-rebuild --banner || die "tests failed" } src_install() diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild index 46adc42870d9..991025d747d6 100644 --- a/dev-lang/go/go-9999.ebuild +++ b/dev-lang/go/go-9999.ebuild @@ -1,14 +1,16 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-9999.ebuild,v 1.5 2012/07/30 18:49:38 williamh Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-9999.ebuild,v 1.6 2012/08/07 19:04:32 williamh Exp $ EAPI=4 -EHG_REPO_URI="https://go.googlecode.com/hg" +export CTARGET=${CTARGET:-${CHOST}} -[[ ${PV} == 9999 ]] && vcs=mercurial - -inherit $vcs bash-completion-r1 elisp-common eutils +if [[ ${PV} = 9999 ]]; then + EHG_REPO_URI="https://go.googlecode.com/hg" + inherit mercurial +fi +inherit bash-completion-r1 elisp-common eutils if [[ ${PV} != 9999 ]]; then SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz" @@ -35,23 +37,24 @@ RDEPEND="bash-completion? ( app-shells/bash-completion ) # These are _NOT_ libraries, and should not be stripped. STRIP_MASK="/usr/lib/go/pkg/linux*/*.a" -[[ ${PV} == 9999 ]] || S="${WORKDIR}"/go +if [[ ${PV} != 9999 ]]; then + S="${WORKDIR}"/go +fi src_prepare() { - if [[ ${PV} != 9999 ]]; then - epatch "${FILESDIR}"/${P}-hardened.patch - fi epatch_user } src_compile() { - export HOST_EXTRA_CFLAGS="${CFLAGS}" - export HOST_EXTRA_LDFLAGS="${LDFLAGS}" export GOROOT_FINAL=/usr/lib/go export GOROOT="$(pwd)" export GOBIN="${GOROOT}/bin" + if [[ $CTARGET = arm5* ]] + then + export GOARM=5 + fi cd src ./make.bash || die "build failed" @@ -65,7 +68,8 @@ src_compile() src_test() { cd src - PATH="$GOBIN:${PATH}" ./run.bash --no-rebuild --banner || die "tests failed" + PATH="${GOBIN}:${PATH}" \ + ./run.bash --no-rebuild --banner || die "tests failed" } src_install() |