diff options
-rw-r--r-- | var/spack/repos/builtin/packages/scitokens-cpp/package.py | 25 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/xrootd/package.py | 8 |
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): |