summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-05-06 18:12:40 -0500
committerGitHub <noreply@github.com>2020-05-06 18:12:40 -0500
commitb14befe61a848c20811aed24e9015277e64ebb30 (patch)
tree0b26a42cf7c3731d253a21445daac6f5865c44ca
parentd2709fd3766678961bc4d3a6728cc52448309b72 (diff)
downloadspack-b14befe61a848c20811aed24e9015277e64ebb30.tar.gz
spack-b14befe61a848c20811aed24e9015277e64ebb30.tar.bz2
spack-b14befe61a848c20811aed24e9015277e64ebb30.tar.xz
spack-b14befe61a848c20811aed24e9015277e64ebb30.zip
Bazel: add new versions (#16493)
-rw-r--r--var/spack/repos/builtin/packages/bazel/package.py12
-rw-r--r--var/spack/repos/builtin/packages/bazel/unix_cc_configure-3.0.patch19
2 files changed, 29 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py
index e9509e990b..abe427c960 100644
--- a/var/spack/repos/builtin/packages/bazel/package.py
+++ b/var/spack/repos/builtin/packages/bazel/package.py
@@ -15,10 +15,17 @@ class Bazel(Package):
numbers of users."""
homepage = "https://bazel.build/"
- url = "https://github.com/bazelbuild/bazel/releases/download/1.2.0/bazel-1.2.0-dist.zip"
+ url = "https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-dist.zip"
maintainers = ['adamjstewart']
+ version('3.1.0', sha256='d7f40d0cac95a06cea6cb5b7f7769085257caebc3ee84269dd9298da760d5615')
+ version('3.0.0', sha256='530f5132e0a50da7ebb0ed08d9b6f1ddfd0d7d9b5d0beb2df5d687a4c8daf6b3')
+ version('2.2.0', sha256='9379878a834d105a47a87d3d7b981852dd9f64bc16620eacd564b48533e169a7')
+ version('2.1.1', sha256='83f67f28f4e47ff69043307d1791c9bffe83949e84165d49058b84eded932647')
+ version('2.1.0', sha256='3371cd9050989173a3b27364668328653a65653a50a85c320adc53953b4d5f46')
+ version('2.0.1', sha256='a863ed9e6fc420fbd92e63a12fe1a5b9be1a7a36f11f61f1fdc582c813bbe543')
+ version('2.0.0', sha256='724da3c656f68e787a86ebb9844773aa1c2e3a873cc39462a8f1b336153d6cbb')
version('1.2.1', sha256='255da49d0f012bc4f2c1d6d3ccdbe578e22fe97b8d124e1629a486fe2a09d3e1')
version('1.2.0', sha256='9cb46b0a18b9166730307a0e82bf4c02281a1cc6da0fb11239e6fe4147bdee6e')
version('1.1.0', sha256='4b66a8c93af7832ed32e7236cf454a05f3aa06d25a8576fc3f83114f142f95ab')
@@ -104,7 +111,8 @@ class Bazel(Package):
patch('bazelconfiguration-0.3.patch', when='@:0.13')
# Inject include paths
- patch('unix_cc_configure-0.15.patch', when='@0.15:')
+ patch('unix_cc_configure-3.0.patch', when='@3:')
+ patch('unix_cc_configure-0.15.patch', when='@0.15:2')
patch('unix_cc_configure-0.10.patch', when='@0.10:0.14')
patch('unix_cc_configure-0.5.3.patch', when='@0.5.3:0.9')
patch('cc_configure-0.5.0.patch', when='@0.5.0:0.5.2')
diff --git a/var/spack/repos/builtin/packages/bazel/unix_cc_configure-3.0.patch b/var/spack/repos/builtin/packages/bazel/unix_cc_configure-3.0.patch
new file mode 100644
index 0000000000..1140b0c306
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bazel/unix_cc_configure-3.0.patch
@@ -0,0 +1,19 @@
+diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
+index 5feb10b76a..cde0b8f8f1 100644
+--- a/tools/cpp/unix_cc_configure.bzl
++++ b/tools/cpp/unix_cc_configure.bzl
+@@ -151,8 +151,14 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, lang_flag, additional_fl
+ ).stdout.strip() + "/share"
+ inc_directories.append(_prepare_include_path(repository_ctx, resource_dir))
+
++ env = repository_ctx.os.environ
++ if "SPACK_INCLUDE_DIRS" in env:
++ for path in env["SPACK_INCLUDE_DIRS"].split(":"):
++ inc_directories.append(path)
++
+ return inc_directories
+
++
+ def _is_compiler_option_supported(repository_ctx, cc, option):
+ """Checks that `option` is supported by the C compiler. Doesn't %-escape the option."""
+ result = repository_ctx.execute([