summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2016-05-16 09:30:37 -0700
committerTom Scogland <scogland1@llnl.gov>2016-05-16 09:30:37 -0700
commit62dd040a8fd7f6f8993640156049eeb061efe955 (patch)
treefb65c3b053c718deeb3a7d8b5ae17202496b95e4
parentdacedfcc0ebe2bdf15cc5bb5b49d5a61d6aca354 (diff)
downloadspack-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.py5
-rw-r--r--var/spack/repos/builtin/packages/go/package.py12
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)