diff options
author | Tom Scogland <scogland1@llnl.gov> | 2016-05-16 09:30:37 -0700 |
---|---|---|
committer | Tom Scogland <scogland1@llnl.gov> | 2016-05-16 09:30:37 -0700 |
commit | 62dd040a8fd7f6f8993640156049eeb061efe955 (patch) | |
tree | fb65c3b053c718deeb3a7d8b5ae17202496b95e4 | |
parent | dacedfcc0ebe2bdf15cc5bb5b49d5a61d6aca354 (diff) | |
download | spack-62dd040a8fd7f6f8993640156049eeb061efe955.tar.gz spack-62dd040a8fd7f6f8993640156049eeb061efe955.tar.bz2 spack-62dd040a8fd7f6f8993640156049eeb061efe955.tar.xz spack-62dd040a8fd7f6f8993640156049eeb061efe955.zip |
add GOPATH support
Also fixes flex to depend on bison for its yacc implementation.
-rw-r--r-- | var/spack/repos/builtin/packages/flex/package.py | 5 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/go/package.py | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 926651010f..b778538606 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -24,15 +24,18 @@ ############################################################################## from spack import * + class Flex(Package): """Flex is a tool for generating scanners.""" homepage = "http://flex.sourceforge.net/" - url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') + depends_on("bison") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 90f34dcfc6..f1057e6bed 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -67,4 +67,14 @@ class Go(Package): if os.environ.get('GOROOT', False): tty.warn('GOROOT is set, this is not recommended') - spack_env.set('GOPATH', ext_spec.package.stage.source_path) + + # Set GOPATH to include paths of dependencies + for d in extension_spec.traverse(): + if d.package.extends(self.spec): + spack_env.prepend_path('GOPATH', d.prefix) + + # This *MUST* be first, this is where new code is installed + spack_env.prepend_path('GOPATH', ext_spec.package.stage.source_path) + + # Allow packages to find this when using module or dotkit + run_env.prepend_path('GOPATH', ext_spec.prefix) |