-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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>
- Loading branch information
1 parent
40bf9a1
commit 56251c1
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |