diff options
author | Robert Seaton <seatonr@dupage.edu> | 2011-07-05 10:35:26 -0500 |
---|---|---|
committer | Robert Seaton <seatonr@dupage.edu> | 2011-07-05 10:35:26 -0500 |
commit | aa5a77fb44d7eab08c4d58935f9539c90f007128 (patch) | |
tree | 8737a2c6f59a6cf6c22a85ad5c1fced65338706e | |
parent | Updated plan9port. (diff) | |
download | glentoo-overlay-aa5a77fb44d7eab08c4d58935f9539c90f007128.tar.gz glentoo-overlay-aa5a77fb44d7eab08c4d58935f9539c90f007128.tar.bz2 glentoo-overlay-aa5a77fb44d7eab08c4d58935f9539c90f007128.zip |
Add golang ebuild.
-rw-r--r-- | dev-lang/golang-platform/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/golang-platform/golang-platform-9999.ebuild | 105 |
2 files changed, 106 insertions, 0 deletions
diff --git a/dev-lang/golang-platform/Manifest b/dev-lang/golang-platform/Manifest new file mode 100644 index 0000000..b194a15 --- /dev/null +++ b/dev-lang/golang-platform/Manifest @@ -0,0 +1 @@ +EBUILD golang-platform-9999.ebuild 1712 RMD160 21a45f639991e82b9325f206776ee6dabfac65bf SHA1 54303444ecae387e504d13649013c137e6a5800d SHA256 adcd590d63f2cf080295a9cdf7271898d3aa4658a06563250761b7e9af0e7074 diff --git a/dev-lang/golang-platform/golang-platform-9999.ebuild b/dev-lang/golang-platform/golang-platform-9999.ebuild new file mode 100644 index 0000000..cde9b85 --- /dev/null +++ b/dev-lang/golang-platform/golang-platform-9999.ebuild @@ -0,0 +1,105 @@ +# 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="weekly" + +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 + +case ${ARCH} in +x86) +GOARCH="386" +;; +*) +GOARCH="${ARCH}" +;; +esac + +case ${CHOST} in +*-darwin*) +GOOS="darwin" +;; +*) +GOOS="linux" +;; +esac +# *-nacl*) +# GOOS="nacl" +# ;; + +cat > "${ENVFILE}" <<EOF +GOROOT="/usr/$(get_libdir)/${PN}" +GOARCH="${GOARCH}" +GOOS="${GOOS}" +EOF +. "${ENVFILE}" + +export GOBIN GOROOT GOARCH GOOS +} + +src_compile() { +cd src +PATH="${GOBIN}:${PATH}" GOROOT="${S}" CC="$(tc-getCC)" ./make.bash || die +if use emacs ; then +elisp-compile "${S}"/misc/emacs/*.el || die +fi +} + +src_test() { +cd src +PATH="${GOBIN}:${PATH}" GOROOT="${S}" CC="$(tc-getCC)" ./run.bash || die +} + +src_install() { +dobin "${GOBIN}"/* || die + +insinto "${GOROOT}" +doins -r pkg || die + +insinto "${GOROOT}/src" +doins src/Make.* || die + +if use emacs ; then +elisp-install ${PN} "${S}"/misc/emacs/*.el* || die "elisp-install failed" +fi + +if use vim-syntax ; then +insinto /usr/share/vim/vimfiles/plugin +doins "${S}"/misc/vim/go.vim || die +fi + +doenvd "${ENVFILE}" || die + +dodoc AUTHORS CONTRIBUTORS README || die +dohtml -r doc/* || die +} + +pkg_postinst() { +elog "please don't forget to source /etc/profile" +}
\ No newline at end of file |