summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMarcus Boden <mboden@gwdg.de>2022-01-10 15:58:02 +0100
committerGitHub <noreply@github.com>2022-01-10 08:58:02 -0600
commit5958306466d6831595cb4aadaab7920b71fc7a3e (patch)
tree81e3be2f7494830a7a38b023639f85b6bad16152 /var
parent464d294b63b38eaa78416a1e49910612e971fc70 (diff)
downloadspack-5958306466d6831595cb4aadaab7920b71fc7a3e.tar.gz
spack-5958306466d6831595cb4aadaab7920b71fc7a3e.tar.bz2
spack-5958306466d6831595cb4aadaab7920b71fc7a3e.tar.xz
spack-5958306466d6831595cb4aadaab7920b71fc7a3e.zip
New packages: google-crc32c and py-google-crc32c (#28293)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/google-crc32c/package.py28
-rw-r--r--var/spack/repos/builtin/packages/py-google-crc32c/package.py24
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)