diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2023-10-14 11:31:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 08:31:53 -0700 |
commit | a027adcaa2e3508204927836a3db0d1cfae47deb (patch) | |
tree | d2a8e77ea43a4e652c33405d9ea1268422300d31 | |
parent | 3783032d28539fac1dd316c98278f08513b04c26 (diff) | |
download | spack-a027adcaa2e3508204927836a3db0d1cfae47deb.tar.gz spack-a027adcaa2e3508204927836a3db0d1cfae47deb.tar.bz2 spack-a027adcaa2e3508204927836a3db0d1cfae47deb.tar.xz spack-a027adcaa2e3508204927836a3db0d1cfae47deb.zip |
cpr: new package (#40509)
* New package: cpr
* Support libcpr version 1.9
* Fix build phase for git
* Update var/spack/repos/builtin/packages/cpr/package.py
Co-authored-by: Alec Scott <alec@bcs.sh>
* [@spackbot] updating style on behalf of sethrj
---------
Co-authored-by: Alec Scott <alec@bcs.sh>
-rw-r--r-- | var/spack/repos/builtin/packages/cpr/package.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py new file mode 100644 index 0000000000..71e32d9960 --- /dev/null +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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.package import * + + +class Cpr(CMakePackage): + """C++ Requests: Curl for People, a spiritual port of Python Requests.""" + + homepage = "https://docs.libcpr.org/" + url = "https://github.com/libcpr/cpr/archive/refs/tags/1.10.4.tar.gz" + + maintainers("sethrj") + + version("1.10.4", sha256="88462d059cd3df22c4d39ae04483ed50dfd2c808b3effddb65ac3b9aa60b542d") + version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31") + + depends_on("curl") + depends_on("git", when="build") + + def cmake_args(self): + _force = "_FORCE" if self.spec.satisfies("@:1.9") else "" + + return [ + self.define("CPR_USE_SYSTEM_GTEST", True), + self.define(f"CPR{_force}_USE_SYSTEM_CURL", True), + self.define("CPR_ENABLE_SSL", True), + ] |