summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Valenzuela <aand.valenzuela@gmail.com>2022-05-04 22:03:50 +0200
committerGitHub <noreply@github.com>2022-05-04 13:03:50 -0700
commit5a434cb8400a97a6ae9eeb30b658dc262fa65433 (patch)
tree7d93bdaac736a707b3e912596439326eac4d4c73
parent0be5dea13f63b8a9c51a7dd68fb0146f711a38d9 (diff)
downloadspack-5a434cb8400a97a6ae9eeb30b658dc262fa65433.tar.gz
spack-5a434cb8400a97a6ae9eeb30b658dc262fa65433.tar.bz2
spack-5a434cb8400a97a6ae9eeb30b658dc262fa65433.tar.xz
spack-5a434cb8400a97a6ae9eeb30b658dc262fa65433.zip
Add scitokens-cpp recipe and also as a variant for xrootd (#30362)
* Add scitokens-cpp recipe * Add scitokens-cpp variant in xrootd * Fix typo * Fix flake8 style errors * Update license date Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/scitokens-cpp/package.py25
-rw-r--r--var/spack/repos/builtin/packages/xrootd/package.py8
2 files changed, 33 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scitokens-cpp/package.py b/var/spack/repos/builtin/packages/scitokens-cpp/package.py
new file mode 100644
index 0000000000..8057cbf562
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scitokens-cpp/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class ScitokensCpp(CMakePackage):
+ """ A C++ implementation of the SciTokens library with a C library interface.
+ SciTokens provide a token format for distributed authorization. """
+
+ homepage = "https://github.com/scitokens/scitokens-cpp"
+ url = "https://github.com/scitokens/scitokens-cpp/archive/refs/tags/v0.7.0.tar.gz"
+
+ version('0.7.0', sha256='72600cf32523b115ec7abf4ac33fa369e0a655b3d3b390e1f68363e6c4e961b6')
+
+ depends_on('sqlite')
+ depends_on('curl')
+ depends_on('uuid', type='build')
+
+ # https://github.com/scitokens/scitokens-cpp/issues/72
+ @when('^openssl@3:')
+ def patch(self):
+ filter_file(' -Werror', '', 'CMakeLists.txt')
diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py
index 1f3caa1ed6..7cefe530bd 100644
--- a/var/spack/repos/builtin/packages/xrootd/package.py
+++ b/var/spack/repos/builtin/packages/xrootd/package.py
@@ -60,6 +60,9 @@ class Xrootd(CMakePackage):
multi=False,
description='Use the specified C++ standard when building.')
+ variant('scitokens-cpp', default=False,
+ when='@5.1.0:', description='Enable support for SciTokens')
+
conflicts('cxxstd=98', when='@4.7.0:')
depends_on('bzip2')
@@ -74,6 +77,7 @@ class Xrootd(CMakePackage):
depends_on('curl')
depends_on('krb5', when='+krb5')
depends_on('json-c')
+ depends_on('scitokens-cpp', when='+scitokens-cpp')
extends('python', when='+python')
patch('python-support.patch', level=1, when='@:4.8+python')
@@ -105,6 +109,10 @@ class Xrootd(CMakePackage):
options.append('-DPYTHON_EXECUTABLE=%s' %
spec['python'].command.path)
+ if '+scitokens-cpp' in self.spec:
+ options.append('-DSCITOKENS_CPP_DIR=%s' %
+ spec['scitokens-cpp'].prefix)
+
return options
def setup_build_environment(self, env):