summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Cessenat <cessenat@gmail.com>2022-08-12 15:06:59 +0200
committerGitHub <noreply@github.com>2022-08-12 15:06:59 +0200
commit30991ccee430a8dbf494928ba39ad8c8ccc8c6a6 (patch)
treebbbe79612ef55dc7fd0ab95fecbbb69bdb992de4
parent08e75f7a3e02ef697a5b38a692fb0c8282bd9e7d (diff)
downloadspack-30991ccee430a8dbf494928ba39ad8c8ccc8c6a6.tar.gz
spack-30991ccee430a8dbf494928ba39ad8c8ccc8c6a6.tar.bz2
spack-30991ccee430a8dbf494928ba39ad8c8ccc8c6a6.tar.xz
spack-30991ccee430a8dbf494928ba39ad8c8ccc8c6a6.zip
keepassxc: add 'docs' variant (#32049)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/keepassxc/package.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/keepassxc/package.py b/var/spack/repos/builtin/packages/keepassxc/package.py
index 5e8ed2b176..dac8e5c3d4 100644
--- a/var/spack/repos/builtin/packages/keepassxc/package.py
+++ b/var/spack/repos/builtin/packages/keepassxc/package.py
@@ -29,6 +29,7 @@ class Keepassxc(CMakePackage):
values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"),
)
variant("autotype", default=False, description="enable auto-type")
+ variant("docs", default=True, description="Build documentation")
# https://github.com/keepassxreboot/keepassxc/wiki/Building-KeePassXC
# https://github.com/keepassxreboot/keepassxc/wiki/Set-up-Build-Environment-on-Linux
@@ -50,7 +51,7 @@ class Keepassxc(CMakePackage):
# Had to add libqrencode
depends_on("libqrencode", type=("link", "build"))
# Has anyone done gem i bundler and gem i asciidoctor ? https://asciidoctor.org/
- depends_on("ruby-asciidoctor@2.0:", type=("build"))
+ depends_on("ruby-asciidoctor@2.0:", type=("build"), when="+docs")
# sudo apt install libxi-dev libxtst-dev libqt5x11extras5-dev libyubikey-dev \
# libykpers-1-dev libquazip5-dev libreadline-dev
# These are required to build Auto-Type, Yubikey and browser integration support.
@@ -64,10 +65,8 @@ class Keepassxc(CMakePackage):
"-DKEEPASSXC_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_DATADIR=%s" % join_path(spec.prefix, "share"),
]
- if "+autotype" in spec:
- args.append("-DWITH_XC_ALL=ON")
- else:
- args.append("-DWITH_XC_ALL=OFF")
+ args.append(self.define_from_variant("WITH_XC_ALL", "autotype"))
+ args.append(self.define_from_variant("WITH_XC_DOCS", "docs"))
if spec.satisfies("platform=darwin"):
args.append("-DCMAKE_OSX_ARCHITECTURES=x86_64")