From 01159fe7e451ecb59871f0573b5cbbaf40134389 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 11 Mar 2010 08:34:24 +0100 Subject: [PATCH] =?utf8?q?Add=20hg-based=20ebuild=20for=20Google=E2=80=99s?= =?utf8?q?=20Go=20language.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- dev-lang/go/Manifest | 1 + dev-lang/go/go-9999.ebuild | 111 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 dev-lang/go/Manifest create mode 100644 dev-lang/go/go-9999.ebuild diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest new file mode 100644 index 0000000..a335a07 --- /dev/null +++ b/dev-lang/go/Manifest @@ -0,0 +1 @@ +EBUILD go-9999.ebuild 1905 RMD160 fd4ffa52adac3b987d384100666580704820ffdc SHA1 d31f6d4cc7b1936a594b104b720b9ccce579967a SHA256 a7868ea2fa2bb5f5502a2dd5dee94d0c0e18668db1270d06deb4f9369d837707 diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild new file mode 100644 index 0000000..7770651 --- /dev/null +++ b/dev-lang/go/go-9999.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit elisp-common eutils mercurial toolchain-funcs + +DESCRIPTION="The Go Programming Language" +HOMEPAGE="http://golang.org/" +SRC_URI="" +EHG_REPO_URI="https://go.googlecode.com/hg/" +EHG_REVISION="release" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="emacs vim-syntax" + +RESTRICT="test" + +RDEPEND="sys-devel/gcc" +DEPEND="${RDEPEND} + emacs? ( virtual/emacs ) + sys-devel/bison + sys-apps/ed" + +S="${WORKDIR}/hg" + +ENVFILE="${WORKDIR}/50${PN}" + +src_prepare() { + GOBIN="${WORKDIR}/bin" + mkdir -p "${GOBIN}" || die + + sed -i \ + -e "/^GOBIN=/s:=.*:=${GOBIN}:" \ + -e "/MAKEFLAGS=/s:=.*:=${MAKEOPTS}:" \ + src/make.bash || die + + sed -i \ + -e "/^CFLAGS=/s:-O2:${CFLAGS}:" \ + src/Make.conf || die + + case ${ARCH} in + x86) + GOARCH="386" + ;; + *) + GOARCH="${ARCH}" + ;; + esac + + case ${CHOST} in + *-darwin*) + GOOS="darwin" + ;; + *) + GOOS="linux" + ;; + esac +# *-nacl*) +# GOOS="nacl" +# ;; + + cat > "${ENVFILE}" <