diff options
author | James Taliaferro <44253038+taliaferro@users.noreply.github.com> | 2024-05-10 13:32:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 14:32:57 -0600 |
commit | 56251c11f31dd0f3ff841400487c5f78a3c08559 (patch) | |
tree | f08fe5cf6c622e81c535d52bae5263708ee5d2ba | |
parent | 40bf9a179bd61c764f834bfd05d07fe348533a89 (diff) | |
download | spack-56251c11f31dd0f3ff841400487c5f78a3c08559.tar.gz spack-56251c11f31dd0f3ff841400487c5f78a3c08559.tar.bz2 spack-56251c11f31dd0f3ff841400487c5f78a3c08559.tar.xz spack-56251c11f31dd0f3ff841400487c5f78a3c08559.zip |
qpdf: new package (#44066)
* New package: qpdf
* Update var/spack/repos/builtin/packages/qpdf/package.py
Co-authored-by: Alec Scott <hi@alecbcs.com>
* Fix format of cmake_args
---------
Co-authored-by: Alec Scott <hi@alecbcs.com>
-rw-r--r-- | var/spack/repos/builtin/packages/qpdf/package.py | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qpdf/package.py b/var/spack/repos/builtin/packages/qpdf/package.py new file mode 100644 index 0000000000..6b297886b4 --- /dev/null +++ b/var/spack/repos/builtin/packages/qpdf/package.py @@ -0,0 +1,45 @@ +# Copyright 2013-2024 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 Qpdf(CMakePackage): + """ + QPDF is a command-line tool and C++ library that performs + content-preserving transformations on PDF files. + """ + + homepage = "https://qpdf.sourceforge.io/" + url = "https://github.com/qpdf/qpdf/releases/download/v11.9.0/qpdf-11.9.0.tar.gz" + + maintainers("taliaferro") + + license("Apache-2.0", checked_by="taliaferro") + + version("11.9.0", sha256="9f5d6335bb7292cc24a7194d281fc77be2bbf86873e8807b85aeccfbff66082f") + + variant( + "crypto", + values=["openssl", "gnutls", "native", "implicit"], + default="implicit", + multi=False, + description="Provider of cryptographic functions.", + ) + + depends_on("zlib-api") + depends_on("jpeg") + depends_on("openssl", when="crypto=openssl") + depends_on("gnutls", when="crypto=gnutls") + + def cmake_args(self): + args = [] + if not self.spec.satisfies("crypto=implicit"): + crypto_type = self.spec.variants["crypto"].value.upper() + args.append("USE_IMPLICIT_CRYPTO=0") + args.append(f"REQUIRE_CRYPTO_{crypto_type}=1") + + return args |