diff options
author | Teague Sterling <teaguesterling@users.noreply.github.com> | 2024-06-23 23:34:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 08:34:10 +0200 |
commit | cc6dcdcab9427b63eab81dfe6a61d8e368659d28 (patch) | |
tree | 25702ece9c27f2b27355909ca4a0b138de0d0ec2 | |
parent | 57b83e5fb29ae3c84cf81eb0ed89c83e49dd3217 (diff) | |
download | spack-cc6dcdcab9427b63eab81dfe6a61d8e368659d28.tar.gz spack-cc6dcdcab9427b63eab81dfe6a61d8e368659d28.tar.bz2 spack-cc6dcdcab9427b63eab81dfe6a61d8e368659d28.tar.xz spack-cc6dcdcab9427b63eab81dfe6a61d8e368659d28.zip |
htslib: add variants (#44501)
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/htslib/package.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py index 3b4b9fcf2d..a267809a4d 100644 --- a/var/spack/repos/builtin/packages/htslib/package.py +++ b/var/spack/repos/builtin/packages/htslib/package.py @@ -42,18 +42,23 @@ class Htslib(AutotoolsPackage): "libcurl", default=True, description="Enable libcurl-based support for http/https/etc URLs," - " for versions >= 1.3. This also enables S3 and GCS support.", + " for versions >= 1.3. This also enables S3 and GCS support by default.", ) variant( "libdeflate", default=True, description="use libdeflate for faster crc and deflate algorithms", ) + variant("gcs", default=True, description="enable gcs url support", when="@1.5:+libcurl") + variant("s3", default=True, description="enable s3 url support", when="@1.5:+libcurl") + variant("plugins", default=False, description="enable support for separately compiled plugins") + variant("pic", default=True, description="Compile with PIC support") depends_on("zlib-api") depends_on("bzip2", when="@1.4:") depends_on("xz", when="@1.4:") depends_on("curl", when="@1.3:+libcurl") + depends_on("openssl", when="+s3") depends_on("libdeflate", when="@1.8:+libdeflate") depends_on("m4", when="@1.2") @@ -76,6 +81,11 @@ class Htslib(AutotoolsPackage): url = "https://github.com/samtools/htslib/releases/download/{0}/htslib-{0}.tar.bz2" return url.format(version.dotted) + def flag_handler(self, name, flags): + if name == "cflags" and self.spec.satisfies("+pic"): + flags.append(self.compiler.cc_pic_flag) + return (flags, None, None) + def configure_args(self): spec = self.spec args = [] @@ -83,6 +93,11 @@ class Htslib(AutotoolsPackage): if spec.satisfies("@1.3:"): args.extend(self.enable_or_disable("libcurl")) + if spec.satisfies("@1.5:"): + args.extend(self.enable_or_disable("s3")) + args.extend(self.enable_or_disable("gcs")) + args.extend(self.enable_or_disable("plugins")) + if spec.satisfies("@1.8:"): args.extend(self.enable_or_disable("libdeflate")) |