adding go_compiler providers

This commit is contained in:
Tom Scogland 2016-05-14 18:06:22 -07:00
parent 915f91a619
commit 0816e9554d
2 changed files with 7 additions and 2 deletions

View File

@ -62,6 +62,9 @@ class Gcc(Package):
depends_on("binutils~libiberty", when='+binutils ~gold')
depends_on("binutils~libiberty+gold", when='+binutils +gold')
if sys.platform != 'darwin':
provides('go_compiler' when='@4.7.1:')
# TODO: integrate these libraries.
#depends_on("ppl")
#depends_on("cloog")

View File

@ -12,12 +12,14 @@ class Go(Package):
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
version('1.5.0', git='https://go.googlesource.com/go', tag='go1.5.0')
provides('go_compiler')
# to-do, make non-c self-hosting compilers possible
depends_on('go@:1.4.2', when='@1.5:')
# should be go_compiler, but that creates an infinite loop
depends_on('gcc', when='@1.5:')
def install(self, spec, prefix):
os.environ['GOROOT'] = os.getcwd()
os.environ['GOBIN'] = join_path(os.getcwd(), 'bin')
os.environ['GOROOT_FINAL'] = prefix
bash = which('bash')
bash('-c', 'env')