diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/google-crc32c/package.py | 28 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-google-crc32c/package.py | 24 |
2 files changed, 52 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/google-crc32c/package.py b/var/spack/repos/builtin/packages/google-crc32c/package.py new file mode 100644 index 0000000000..5385a31035 --- /dev/null +++ b/var/spack/repos/builtin/packages/google-crc32c/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2021 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 GoogleCrc32c(CMakePackage): + """CRC32C implementation with support for CPU-specific acceleration instructions.""" + + homepage = "https://github.com/google/crc32c" + url = "https://github.com/google/crc32c/archive/refs/tags/1.1.2.tar.gz" + + maintainers = ['marcusboden'] + + version('1.1.2', 'ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56') + + depends_on('cmake@3.1:', type='build') + + def cmake_args(self): + args = [ + self.define('CRC32C_BUILD_TESTS', False), + self.define('CRC32C_BUILD_BENCHMARKS', False), + self.define('CRC32C_USE_GLOG', False), + self.define('BUILD_SHARED_LIBS', True), + ] + return args diff --git a/var/spack/repos/builtin/packages/py-google-crc32c/package.py b/var/spack/repos/builtin/packages/py-google-crc32c/package.py new file mode 100644 index 0000000000..65395657df --- /dev/null +++ b/var/spack/repos/builtin/packages/py-google-crc32c/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2021 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 PyGoogleCrc32c(PythonPackage): + """This package wraps the google/crc32c hardware-based implementation + of the CRC32C hashing algorithm.""" + + homepage = "https://github.com/googleapis/python-crc32c" + pypi = "google-crc32c/google-crc32c-1.3.0.tar.gz" + + maintainers = ['marcusboden'] + + version('1.3.0', '276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df') + + depends_on('py-setuptools', type='build') + depends_on('google-crc32c', type=('build', 'run')) + + def setup_build_environment(self, env): + env.set('CRC32C_INSTALL_PREFIX', self.spec['google-crc32c'].prefix) |