zlib-api: new virtual with zlib/zlib-ng as providers (#37372)

Introduces a new virtual zlib-api, which replaces zlib in most packages.

This allows users to switch to zlib-ng by default for better performance.
This commit is contained in:
Harmen Stoppels 2023-08-09 15:22:58 +02:00 committed by GitHub
parent f9457fa80b
commit e51748ee8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
442 changed files with 840 additions and 549 deletions

View file

@ -60,6 +60,7 @@ packages:
xxd: [xxd-standalone, vim]
yacc: [bison, byacc]
ziglang: [zig]
zlib-api: [zlib, zlib-ng+compat]
permissions:
read: world
write: user

View file

@ -2243,7 +2243,7 @@ looks like this:
url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz"
version("1.0.1h", md5="8d6d684a9430d5cc98a62a5d8fbda8cf")
depends_on("zlib")
depends_on("zlib-api")
parallel = False

View file

@ -235,7 +235,7 @@ class Llvm(CMakePackage, CudaPackage):
depends_on("libffi", when="+cuda") # libomptarget
# llvm-config --system-libs libraries.
depends_on("zlib")
depends_on("zlib-api")
# lldb dependencies
depends_on("swig", when="+lldb")

View file

@ -50,7 +50,7 @@ class _3dtk(CMakePackage):
"boost@:1.75+serialization+graph+regex+filesystem+system+thread+date_time+program_options"
)
depends_on("suite-sparse")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libpng")
depends_on("eigen")
depends_on("cgal", when="+cgal")

View file

@ -65,7 +65,7 @@ class Adios(AutotoolsPackage):
depends_on("mpi", when="+mpi")
# optional transformations
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
depends_on("bzip2", when="+bzip2")
depends_on("szip", when="+szip")
depends_on("sz@:1.4.10", when="@:1.12.0 +sz")
@ -147,8 +147,13 @@ def configure_args(self):
extra_args += self.with_or_without("mpi", activation_value="prefix")
extra_args += self.with_or_without("infiniband")
if "+zlib" in spec:
extra_args.append("--with-zlib={0}".format(spec["zlib-api"].prefix))
else:
extra_args.append("--without-zlib")
# Transforms
variants = ["zlib", "bzip2", "szip"]
variants = ["bzip2", "szip"]
if spec.satisfies("@1.11.0:"):
variants += ["zfp"]
if spec.satisfies("@1.12.0:"):

View file

@ -23,4 +23,4 @@ class Advancecomp(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")

View file

@ -25,7 +25,7 @@ class Alembic(CMakePackage):
depends_on("openexr@2.2.0:")
depends_on("hdf5@1.8.9:", when="+hdf5")
depends_on("boost@1.55:")
depends_on("zlib")
depends_on("zlib-api")
depends_on("py-ilmbase", when="+python")
def cmake_args(self):

View file

@ -125,7 +125,7 @@ class Amber(Package, CudaPackage):
variant("x11", description="Build programs that require X11", default=False)
variant("update", description="Update the sources prior compilation", default=False)
depends_on("zlib")
depends_on("zlib-api")
depends_on("bzip2")
depends_on("flex", type="build")
depends_on("bison", type="build")

View file

@ -48,7 +48,7 @@ class Amp(CMakePackage):
depends_on("silo", when="+silo")
depends_on("sundials", when="+sundials")
depends_on("trilinos", when="+trilinos")
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
# MPI related dependencies
depends_on("mpi", when="+mpi")
@ -101,6 +101,10 @@ def cmake_args(self):
]
)
if "+zlib" in spec:
tpl_list.append("ZLIB")
options.append(self.define("TPL_ZLIB_INSTALL_DIR", spec["zlib-api"].prefix))
for vname in (
"boost",
"hdf5",
@ -110,7 +114,6 @@ def cmake_args(self):
"silo",
"sundials",
"trilinos",
"zlib",
):
if "+" + vname in spec:
tpl_list.append(vname.upper())

View file

@ -27,7 +27,7 @@ class Angsd(MakefilePackage):
depends_on("htslib")
conflicts("^htslib@1.6:", when="@0.919")
depends_on("zlib")
depends_on("zlib-api")
depends_on("lzma")
depends_on("curl")

View file

@ -25,7 +25,7 @@ class Ants(CMakePackage):
version("2.3.5", sha256="2fddfd5f274a47f1c383e734a7e763b627c4a8383d2d3b9971561f335016bb0a")
version("2.2.0", sha256="62f8f9ae141cb45025f4bb59277c053acf658d4a3ba868c9e0f609af72e66b4a")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
variant("minc", default=True, description="Build ITK with MINC support")

View file

@ -53,7 +53,7 @@ class Aocc(Package):
license_url = "https://www.amd.com/en/developer/aocc/aocc-compiler/eula.html"
depends_on("libxml2")
depends_on("zlib")
depends_on("zlib-api")
depends_on("ncurses")
depends_on("libtool")
depends_on("texinfo")

View file

@ -92,7 +92,7 @@ class Apex(CMakePackage):
variant("examples", default=False, description="Build Examples")
# Dependencies
depends_on("zlib")
depends_on("zlib-api")
depends_on("cmake@3.10.0:", type="build")
depends_on("binutils@2.33:+libiberty+headers", when="+binutils")
depends_on("gettext", when="+binutils ^binutils+nls")

View file

@ -20,6 +20,6 @@ class Aria2(AutotoolsPackage):
depends_on("libxml2")
depends_on("libssh2")
depends_on("libgcrypt")
depends_on("zlib")
depends_on("zlib-api")
depends_on("c-ares")
depends_on("sqlite")

View file

@ -56,8 +56,9 @@ class Arrow(CMakePackage, CudaPackage):
depends_on("utf8proc@2.7.0: +shared", when="+gandiva")
depends_on("utf8proc@2.7.0: +shared", when="+python")
depends_on("xsimd@8.1.0:", when="@9.0.0:")
depends_on("zlib+pic", when="+zlib @9:")
depends_on("zlib+pic", when="@:8")
depends_on("zlib-api", when="+zlib @9:")
depends_on("zlib-api", when="@:8")
conflicts("^zlib~pic")
depends_on("zstd", when="+zstd @9:")
depends_on("zstd", when="@:8")
@ -148,13 +149,17 @@ def cmake_args(self):
args.append(self.define_from_variant("ARROW_WITH_ZSTD", "zstd"))
with when("@:8"):
dep_list = ["flatbuffers", "rapidjson", "zlib", "zstd"]
args.extend(
[
self.define("FLATBUFFERS_HOME", self.spec["flatbuffers"].prefix),
self.define("RAPIDJSON_HOME", self.spec["rapidjson"].prefix),
self.define("ZSTD_HOME", self.spec["zstd"].prefix),
self.define("ZLIB_HOME", self.spec["zlib-api"].prefix),
self.define("ZLIB_LIBRARIES", self.spec["zlib-api"].libs),
]
)
if self.spec.satisfies("+snappy"):
dep_list.append("snappy")
for dep in dep_list:
args.append("-D{0}_HOME={1}".format(dep.upper(), self.spec[dep].prefix))
args.append("-DZLIB_LIBRARIES={0}".format(self.spec["zlib"].libs))
args.append(self.define("SNAPPY_HOME", self.spec["snappy"].prefix))
return args

View file

@ -47,4 +47,4 @@ class AsdfCxx(CMakePackage):
depends_on("swig @3.0.0:3", type="build")
# Neither earlier nor later versions of yaml-cpp work
depends_on("yaml-cpp @0.6.3")
depends_on("zlib")
depends_on("zlib-api")

View file

@ -36,7 +36,7 @@ class Assimp(CMakePackage):
variant("shared", default=True, description="Enables the build of shared libraries")
depends_on("pkgconfig", type="build")
depends_on("zlib")
depends_on("zlib-api")
def patch(self):
filter_file("-Werror", "", "code/CMakeLists.txt")

View file

@ -18,7 +18,7 @@ class Atop(Package):
version("2.2.6", sha256="d0386840ee4df36e5d0ad55f144661b434d9ad35d94deadc0405b514485db615")
version("2.2-3", sha256="c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d")
depends_on("zlib")
depends_on("zlib-api")
depends_on("ncurses")
def setup_build_environment(self, env):

View file

@ -45,7 +45,7 @@ class Augustus(MakefilePackage):
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
depends_on("zlib")
depends_on("zlib-api")
depends_on("htslib")
depends_on("bcftools")
depends_on("samtools")

View file

@ -22,7 +22,7 @@ class AwsSdkCpp(CMakePackage):
version("1.9.247", tag="1.9.247", submodules=True)
depends_on("cmake@3.1:", type="build")
depends_on("zlib")
depends_on("zlib-api")
depends_on("curl")
# https://github.com/aws/aws-sdk-cpp/issues/1816

View file

@ -44,7 +44,7 @@ class Axl(CMakePackage):
)
depends_on("kvtree")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("kvtree@main", when="@main")
depends_on("kvtree@:1.2.0", when="@:0.5.0")

View file

@ -14,7 +14,7 @@ class Bamdst(MakefilePackage):
version("master", git="https://github.com/shiquan/bamdst.git")
depends_on("zlib")
depends_on("zlib-api")
parallel = False

View file

@ -22,7 +22,7 @@ class Bamtools(CMakePackage):
version("2.3.0", sha256="288046e6d5d41afdc5fce8608c5641cf2b8e670644587c1315b90bbe92f039af")
version("2.2.3", sha256="92ddef44801a1f8f01ce1a397f83e0f8b5e1ae8ad92c620f2dafaaf8d54cf178")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("jsoncpp")
def cmake_args(self):

View file

@ -24,7 +24,7 @@ class Bamutil(MakefilePackage):
url="https://genome.sph.umich.edu/w/images/7/70/BamUtilLibStatGen.1.0.13.tgz",
)
depends_on("zlib")
depends_on("zlib-api")
depends_on("git", type="build", when="@1.0.15:")
patch("libstatgen-issue-9.patch", when="@1.0.13")

View file

@ -17,7 +17,7 @@ class Bbcp(Package):
# Stanford's git server does not support "smart https" shallow clones
version("master", branch="master", get_full_repo=True)
depends_on("zlib")
depends_on("zlib-api")
depends_on("openssl")
depends_on("libnsl")

View file

@ -41,7 +41,7 @@ class Bcl2fastq2(Package):
depends_on("libxml2@2.7.8")
depends_on("libxslt@1.1.26~crypto")
depends_on("libgcrypt")
depends_on("zlib")
depends_on("zlib-api")
# Their cmake macros don't set the flag when they find a library
# that makes them happy.

View file

@ -24,7 +24,7 @@ class Bedtools2(Package):
version("2.25.0", sha256="159122afb9978015f7ec85d7b17739b01415a5738086b20a48147eeefcf08cfb")
version("2.23.0", sha256="9dacaa561d11ce9835d1d51e5aeb092bcbe117b7119663ec9a671abac6a36056")
depends_on("zlib")
depends_on("zlib-api")
depends_on("bzip2", when="@2.29:")
depends_on("xz", when="@2.29:")
depends_on("python", type="build")

View file

@ -130,7 +130,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage):
# pkg-config is used to find zstd in gas/configure
depends_on("pkgconfig", type="build")
depends_on("zstd@1.4.0:", when="@2.40:")
depends_on("zlib")
depends_on("zlib-api")
depends_on("diffutils", type="build")
depends_on("gettext", when="+nls")

View file

@ -17,7 +17,7 @@ class Bioawk(MakefilePackage):
version("1.0", sha256="316a6561dda41e8327b85106db3704e94e23d7a89870392d19ef8559f7859e2d")
depends_on("zlib")
depends_on("zlib-api")
depends_on("bison", type=("build"))
parallel = False

View file

@ -19,7 +19,7 @@ class Biobloom(AutotoolsPackage):
depends_on("boost+exception+math+serialization+container")
depends_on("sdsl-lite")
depends_on("sparsehash")
depends_on("zlib")
depends_on("zlib-api")
def configure_args(self):
# newer versions of sdsl-lite introduce tolerable warnings

View file

@ -15,6 +15,6 @@ class BioconductorRsubread(RPackage):
bioc = "rsubread"
depends_on("r-matrix")
depends_on("zlib")
depends_on("zlib-api")
version("2.14.2", sha256="ac8be0fad0eb2743443e3a60a9a94eec78c746638aaccca70e7166d034dcebb5")

View file

@ -19,7 +19,7 @@ class Bitgroomingz(CMakePackage):
variant("shared", default=True, description="build shared libs")
depends_on("zlib")
depends_on("zlib-api")
def cmake_args(self):
args = []

View file

@ -69,7 +69,7 @@ def patch(self):
# depends_on('hdf5', when='+hdf5')
depends_on("gnutls", when="+gnutls")
depends_on("openssl", when="+openssl")
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
depends_on("bzip2", when="+bzip2")
depends_on("lzo", when="+lzo")
depends_on("pcre", when="+pcre")
@ -121,7 +121,7 @@ def configure_args(self):
# config_args.append('--without-hdf5')
if "+zlib" in spec:
config_args.append("--with-z={0}".format(self.spec["zlib"].prefix))
config_args.append("--with-z={0}".format(self.spec["zlib-api"].prefix))
else:
config_args.append("--without-z")

View file

@ -95,7 +95,7 @@ class Bohrium(CMakePackage, CudaPackage):
depends_on("py-pip", type="build", when="+python")
depends_on("py-wheel", type="build", when="+python")
depends_on("zlib", when="+proxy")
depends_on("zlib-api", when="+proxy")
depends_on("libsigsegv")

View file

@ -229,7 +229,7 @@ def libs(self):
depends_on("mpi", when="+mpi")
depends_on("bzip2", when="+iostreams")
depends_on("zlib", when="+iostreams")
depends_on("zlib-api", when="+iostreams")
depends_on("zstd", when="+iostreams")
depends_on("xz", when="+iostreams")
depends_on("py-numpy", when="+numpy", type=("build", "run"))
@ -526,9 +526,9 @@ def determine_b2_options(self, spec, options):
"-s",
"BZIP2_LIBPATH=%s" % spec["bzip2"].prefix.lib,
"-s",
"ZLIB_INCLUDE=%s" % spec["zlib"].prefix.include,
"ZLIB_INCLUDE=%s" % spec["zlib-api"].prefix.include,
"-s",
"ZLIB_LIBPATH=%s" % spec["zlib"].prefix.lib,
"ZLIB_LIBPATH=%s" % spec["zlib-api"].prefix.lib,
"-s",
"LZMA_INCLUDE=%s" % spec["xz"].prefix.include,
"-s",

View file

@ -48,7 +48,7 @@ class Bowtie(MakefilePackage):
variant("tbb", default=False, description="Use Intel thread building block")
depends_on("tbb", when="+tbb")
depends_on("zlib")
depends_on("zlib-api")
# See: https://github.com/BenLangmead/bowtie/issues/87, a
# different fix is in the FreeBSD ports/package tree

View file

@ -29,7 +29,7 @@ class Bowtie2(MakefilePackage):
depends_on("readline", when="@2.3.1:")
depends_on("perl", type="run")
depends_on("python", type="run")
depends_on("zlib", when="@2.3.1:")
depends_on("zlib-api", when="@2.3.1:")
depends_on("simde", when="@2.4.0: target=aarch64:", type="link")
depends_on("simde", when="@2.4.0: target=ppc64le:", type="link")

View file

@ -28,7 +28,7 @@ class Breakdancer(CMakePackage):
preferred=True,
)
depends_on("zlib")
depends_on("zlib-api")
depends_on("ncurses", type="link")

View file

@ -23,7 +23,7 @@ class Breseq(AutotoolsPackage):
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("bedtools2", type="run")
depends_on("r", type="run")
@ -32,5 +32,5 @@ class Breseq(AutotoolsPackage):
conflicts("%clang@:3.3")
def setup_build_environment(self, env):
env.set("LDFLAGS", "-L{0}".format(self.spec["zlib"].prefix.lib))
env.set("CFLAGS", "-I{0}".format(self.spec["zlib"].prefix.include))
env.set("LDFLAGS", "-L{0}".format(self.spec["zlib-api"].prefix.lib))
env.set("CFLAGS", "-I{0}".format(self.spec["zlib-api"].prefix.include))

View file

@ -23,7 +23,7 @@ class Bwa(Package):
url="https://github.com/lh3/bwa/archive/0.7.12.tar.gz",
)
depends_on("zlib")
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
patch(
@ -33,7 +33,7 @@ class Bwa(Package):
)
def install(self, spec, prefix):
zlib_inc_path = spec["zlib"].prefix.include
zlib_inc_path = spec["zlib-api"].prefix.include
if platform.machine() == "aarch64":
sse2neon_inc_path = spec["sse2neon"].prefix.include
filter_file(
@ -43,7 +43,7 @@ def install(self, spec, prefix):
)
else:
filter_file(r"^INCLUDES=", "INCLUDES=-I%s" % zlib_inc_path, "Makefile")
filter_file(r"^LIBS=", "LIBS=-L%s " % spec["zlib"].prefix.lib, "Makefile")
filter_file(r"^LIBS=", "LIBS=-L%s " % spec["zlib-api"].prefix.lib, "Makefile")
# use spack C compiler
filter_file("^CC=.*", "CC={0}".format(spack_cc), "Makefile")
# fix gcc 10+ errors

View file

@ -34,7 +34,7 @@ class CBlosc(CMakePackage):
depends_on("cmake@2.8.10:", type="build")
depends_on("snappy")
depends_on("zlib")
depends_on("zlib-api")
depends_on("zstd")
depends_on("lz4")

View file

@ -40,7 +40,7 @@ class CBlosc2(CMakePackage):
depends_on("lizard", when="+lizard")
depends_on("lz4", when="+lz4")
depends_on("snappy", when="+snappy")
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
depends_on("zstd", when="+zstd")
def cmake_args(self):

View file

@ -34,7 +34,7 @@ class Capnproto(AutotoolsPackage):
version("0.5.1.1", sha256="caf308e92683b278bc6c568d4fb5558eca78180cac1eb4a3db15d435bf25116f")
version("0.4.1.2", sha256="6376c1910e9bc9d09dc46d53b063c5bdcb5cdf066a8210e9fffe299fb863f0d9")
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
depends_on("openssl", when="+tls")
depends_on("autoconf", type="build", when="build_system=autotools")

View file

@ -60,7 +60,7 @@ class Ccache(CMakePackage):
depends_on("gperf", when="@:3")
depends_on("libxslt", when="@:3")
depends_on("zlib", when="@:3")
depends_on("zlib-api", when="@:3")
depends_on("zstd", when="@4.0:")

View file

@ -39,7 +39,7 @@ class Cctools(AutotoolsPackage):
depends_on("gettext") # Corrects python linking of -lintl flag.
depends_on("swig")
# depends_on('xrootd')
depends_on("zlib")
depends_on("zlib-api")
patch("arm.patch", when="target=aarch64:")
patch("cctools_7.0.18.python.patch", when="@7.0.18")
patch("cctools_6.1.1.python.patch", when="@6.1.1")
@ -90,7 +90,9 @@ def configure_args(self):
args.append("--with-{0}-path=no".format(p))
# point these bits at the Spack installations
for p in ["openssl", "perl", "readline", "swig", "zlib"]:
for p in ["openssl", "perl", "readline", "swig"]:
args.append("--with-{0}-path={1}".format(p, self.spec[p].prefix))
args.append("--with-zlib-path={0}".format(self.spec["zlib-api"].prefix))
return args

View file

@ -14,7 +14,7 @@ class Cdbfasta(MakefilePackage):
version("2017-03-16", commit="b3e481fe02dfbc767a3842bcb1b687c60376a5e8")
depends_on("zlib")
depends_on("zlib-api")
def install(self, spec, prefix):
mkdirp(prefix.bin)

View file

@ -25,7 +25,7 @@ class Cdhit(MakefilePackage):
depends_on("perl", type=("build", "run"))
depends_on("perl-text-nsp", type="run")
depends_on("zlib", when="+zlib", type="link")
depends_on("zlib-api", when="+zlib", type="link")
def patch(self):
for f in glob("*.pl"):

View file

@ -60,7 +60,7 @@ class Cgal(CMakePackage):
# Required for CGAL_ImageIO
# depends_on('opengl', when='+imageio') # not yet in Spack
depends_on("zlib")
depends_on("zlib-api")
# Optional to build CGAL_Qt5 (demos)
# depends_on('opengl', when='+demos') # not yet in Spack

View file

@ -26,7 +26,7 @@ class Citcoms(AutotoolsPackage):
# Required dependencies
depends_on("mpi")
depends_on("zlib")
depends_on("zlib-api")
depends_on("automake", when="@master", type="build")
depends_on("autoconf", when="@master", type="build")
depends_on("libtool", when="@master", type="build")

View file

@ -20,7 +20,7 @@ class Clamav(AutotoolsPackage):
depends_on("openssl")
depends_on("pcre")
depends_on("yara")
depends_on("zlib")
depends_on("zlib-api")
depends_on("bzip2")
depends_on("curl", type="link")
@ -31,7 +31,7 @@ def configure_args(self):
"--with-libjson=%s" % spec["json-c"].prefix,
"--with-openssl=%s" % spec["openssl"].prefix,
"--with-pcre=%s" % spec["pcre"].prefix,
"--with-zlib=%s" % spec["zlib"].prefix,
"--with-zlib=%s" % spec["zlib-api"].prefix,
"--with-bzip2=%s" % spec["bzip2"].prefix,
]
return args

View file

@ -221,7 +221,7 @@ class Cmake(Package):
# When using curl, cmake defaults to using system zlib too, probably because
# curl already depends on zlib. Therefore, also unconditionaly depend on zlib.
depends_on("zlib")
depends_on("zlib-api")
with when("~ownlibs"):
depends_on("expat")

View file

@ -16,7 +16,7 @@ class Cnpy(CMakePackage):
version("master", branch="master")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
def cmake_args(self):
args = []

View file

@ -21,7 +21,7 @@ class Cnvnator(MakefilePackage):
depends_on("bzip2")
depends_on("curl")
depends_on("xz")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libdeflate")
depends_on("openssl")
@ -42,7 +42,7 @@ def edit(self, spec, prefix):
# Link more libs
ldflags = [
spec["zlib"].libs.ld_flags,
spec["zlib-api"].libs.ld_flags,
spec["bzip2"].libs.ld_flags,
spec["curl"].libs.ld_flags,
spec["xz"].libs.ld_flags,

View file

@ -110,7 +110,7 @@ class Comgr(CMakePackage):
depends_on("cmake@3.2.0:", type="build", when="@:3.8")
depends_on("cmake@3.13.4:", type="build", when="@3.9.0:")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("z3", type="link")
depends_on("ncurses", type="link")

View file

@ -532,9 +532,9 @@ def hostconfig(self):
if "+hdf5" in spec:
cfg.write(cmake_cache_entry("HDF5_DIR", spec["hdf5"].prefix))
if "zlib" in spec:
if "zlib-api" in spec:
# HDF5 depends on zlib
cfg.write(cmake_cache_entry("ZLIB_DIR", spec["zlib"].prefix))
cfg.write(cmake_cache_entry("ZLIB_DIR", spec["zlib-api"].prefix))
else:
cfg.write("# hdf5 not built by spack \n")

View file

@ -22,7 +22,7 @@ class Cracklib(AutotoolsPackage):
depends_on("python", type=("build", "run"))
depends_on("gettext")
depends_on("fmt")
depends_on("zlib")
depends_on("zlib-api")
configure_directory = "src"

View file

@ -29,4 +29,4 @@ class Creduce(CMakePackage):
depends_on("perl-getopt-tabular")
depends_on("perl-regexp-common")
depends_on("perl-termreadkey")
depends_on("zlib")
depends_on("zlib-api")

View file

@ -47,7 +47,7 @@ class Cube(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("dbus")
depends_on("zlib")
depends_on("zlib-api")
depends_on("qt@5:", when="@4.3.0: +gui")
depends_on("qt@4.8:", when="@4.2.0:4.2 +gui")

View file

@ -43,7 +43,7 @@ class Cubelib(AutotoolsPackage):
)
depends_on("pkgconfig", type="build")
depends_on("zlib")
depends_on("zlib-api")
def url_for_version(self, version):
url = "http://apps.fz-juelich.de/scalasca/releases/cube/{0}/dist/cubelib-{1}.tar.gz"
@ -52,7 +52,7 @@ def url_for_version(self, version):
def configure_args(self):
configure_args = ["--enable-shared"]
configure_args.append("--with-frontend-zlib=%s" % self.spec["zlib"].prefix.lib)
configure_args.append("--with-frontend-zlib=%s" % self.spec["zlib-api"].prefix.lib)
return configure_args
def install(self, spec, prefix):

View file

@ -43,7 +43,7 @@ class Cubew(AutotoolsPackage):
)
depends_on("pkgconfig", type="build")
depends_on("zlib")
depends_on("zlib-api")
def url_for_version(self, version):
url = "http://apps.fz-juelich.de/scalasca/releases/cube/{0}/dist/cubew-{1}.tar.gz"
@ -52,8 +52,8 @@ def url_for_version(self, version):
def configure_args(self):
configure_args = ["--enable-shared"]
configure_args.append("--with-frontend-zlib=%s" % self.spec["zlib"].prefix.lib)
configure_args.append("--with-backend-zlib=%s" % self.spec["zlib"].prefix.lib)
configure_args.append("--with-frontend-zlib=%s" % self.spec["zlib-api"].prefix.lib)
configure_args.append("--with-backend-zlib=%s" % self.spec["zlib-api"].prefix.lib)
return configure_args

View file

@ -286,7 +286,7 @@ class Curl(NMakePackage, AutotoolsPackage):
depends_on("openssl@:1", when="@:7.76")
depends_on("libidn2", when="+libidn2")
depends_on("zlib")
depends_on("zlib-api")
depends_on("nghttp2", when="+nghttp2")
depends_on("libssh2", when="+libssh2")
depends_on("libssh", when="+libssh")
@ -336,7 +336,7 @@ def configure_args(self):
spec = self.spec
args = [
"--with-zlib=" + spec["zlib"].prefix,
"--with-zlib=" + spec["zlib-api"].prefix,
# Prevent unintentional linking against system libraries: we could
# add variants for these in the future
"--without-brotli",
@ -425,7 +425,7 @@ def nmake_args(self):
mode = "dll" if "libs=dll" in self.spec else "static"
args.append("mode=%s" % mode)
args.append("WITH_ZLIB=%s" % mode)
args.append("ZLIB_PATH=%s" % self.spec["zlib"].prefix)
args.append("ZLIB_PATH=%s" % self.spec["zlib-api"].prefix)
if "+libssh" in self.spec:
args.append("WITH_SSH=%s" % mode)
if "+libssh2" in self.spec:

View file

@ -50,7 +50,7 @@ class DarshanRuntime(AutotoolsPackage):
version("3.0.0", sha256="95232710f5631bbf665964c0650df729c48104494e887442596128d189da43e0")
depends_on("mpi", when="+mpi")
depends_on("zlib")
depends_on("zlib-api")
depends_on("hdf5", when="+hdf5")
depends_on("parallel-netcdf", when="+parallel-netcdf")
depends_on("papi", when="+apxc")
@ -122,7 +122,7 @@ def configure_args(self):
extra_args.append("--with-mem-align=8")
extra_args.append("--with-log-path-by-env=DARSHAN_LOG_DIR_PATH")
extra_args.append("--with-jobid-env=%s" % job_id)
extra_args.append("--with-zlib=%s" % spec["zlib"].prefix)
extra_args.append("--with-zlib=%s" % spec["zlib-api"].prefix)
if "+mpi" in spec:
extra_args.append("CC=%s" % self.spec["mpi"].mpicc)

View file

@ -56,7 +56,7 @@ class DarshanUtil(AutotoolsPackage):
"apxc", default=False, description="Compile with AutoPerf XC module support", when="@3.3:"
)
depends_on("zlib")
depends_on("zlib-api")
depends_on("bzip2", when="+bzip2", type=("build", "link", "run"))
depends_on("autoconf", type="build", when="@main")
depends_on("automake", type="build", when="@main")
@ -78,7 +78,7 @@ def configure_args(self):
extra_args = []
extra_args.append("CC=%s" % self.compiler.cc)
extra_args.append("--with-zlib=%s" % spec["zlib"].prefix)
extra_args.append("--with-zlib=%s" % spec["zlib-api"].prefix)
if "+apmpi" in spec:
if self.version < Version("3.3.2"):
extra_args.append("--enable-autoperf-apmpi")

View file

@ -28,7 +28,7 @@ class Dcmtk(CMakePackage):
default=True,
description="Support 'Deflated Explicit VR Little Endian' Transfer Syntax",
)
depends_on("zlib", type=("build", "link"), when="+zlib")
depends_on("zlib-api", type=("build", "link"), when="+zlib")
variant("tiff", default=True, description="Support for TIFF output")
depends_on("libtiff", type=("build", "link"), when="+tiff")

View file

@ -152,7 +152,7 @@ class Dealii(CMakePackage, CudaPackage):
depends_on(Boost.with_default_variants)
depends_on("lapack")
depends_on("suite-sparse")
depends_on("zlib")
depends_on("zlib-api")
# Optional dependencies: Configuration
depends_on("cuda@8:", when="+cuda")
@ -412,7 +412,7 @@ def cmake_args(self):
self.define("LAPACK_INCLUDE_DIRS", ";".join(lapack_blas_headers.directories)),
self.define("LAPACK_LIBRARIES", lapack_blas_libs.joined(";")),
self.define("UMFPACK_DIR", spec["suite-sparse"].prefix),
self.define("ZLIB_DIR", spec["zlib"].prefix),
self.define("ZLIB_DIR", spec["zlib-api"].prefix),
self.define("DEAL_II_ALLOW_BUNDLED", False),
]
)

View file

@ -26,7 +26,7 @@ class Denovogear(CMakePackage):
)
depends_on("htslib@1.2:", type=("build"))
depends_on("eigen", type=("build"))
depends_on("zlib", type=("link"))
depends_on("zlib-api", type=("link"))
patch("stream-open.patch", when="@:1.1.1")
# fix: ordered comparison between pointer and zero.

View file

@ -32,7 +32,7 @@ class Diamond(CMakePackage):
version("0.8.38", sha256="582a7932f3aa73b0eac2275dd773818665f0b067b32a79ff5a13b0e3ca375f60")
version("0.8.26", sha256="00d2be32dad76511a767ab8e917962c0ecc572bc808080be60dec028df45439f")
depends_on("zlib")
depends_on("zlib-api")
conflicts("target=aarch64:", when="@:0.9.25")

View file

@ -17,7 +17,7 @@ class Digitrounding(CMakePackage):
version("master", branch="master")
version("2020-02-27", commit="7b18679aded7a85e6f221f7f5cd4f080f322bc33")
depends_on("zlib")
depends_on("zlib-api")
variant("shared", default=True, description="build shared libraries")

View file

@ -23,7 +23,7 @@ class Dire(Package):
version("2.004", sha256="8cc1213b58fec744fdaa50834560a14b141de99efb2c3e3d3d47f3d6d84b179f")
depends_on("zlib")
depends_on("zlib-api")
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')

View file

@ -23,7 +23,7 @@ class Dlib(CMakePackage):
variant("shared", default=True, description="build the shared libraries")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libpng")
depends_on("libjpeg")
depends_on("blas")

View file

@ -26,7 +26,7 @@ class EaUtils(MakefilePackage):
)
depends_on("sparsehash")
depends_on("zlib")
depends_on("zlib-api")
depends_on("gsl")
depends_on("bamtools")
depends_on("perl", type=["build", "run"])

View file

@ -17,7 +17,7 @@ class Eagle(MakefilePackage):
version("1.1.2", sha256="afe967560d1f8fdbd0caf4b93b5f2a86830e9e4d399fee4a526140431343045e")
depends_on("curl")
depends_on("zlib")
depends_on("zlib-api")
depends_on("lzma")
depends_on("htslib")

View file

@ -348,7 +348,7 @@ def cmake_args(self):
args.append(self.define("OPENJPEG_PATH", self.spec["openjpeg"].prefix))
if "+png" in self.spec:
args.append(self.define("ZLIB_ROOT", self.spec["zlib"].prefix))
args.append(self.define("ZLIB_ROOT", self.spec["zlib-api"].prefix))
if "+aec" in self.spec:
# Prevent overriding by environment variables AEC_DIR and AEC_PATH:

View file

@ -65,7 +65,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
depends_on("bzip2", type="link")
depends_on("xz", type="link")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("zstd", type="link", when="@0.182:")
depends_on("gettext", when="+nls")
@ -112,7 +112,7 @@ def configure_args(self):
args = [
"--with-bzlib=%s" % spec["bzip2"].prefix,
"--with-lzma=%s" % spec["xz"].prefix,
"--with-zlib=%s" % spec["zlib"].prefix,
"--with-zlib=%s" % spec["zlib-api"].prefix,
]
if "@0.182:" in spec:

View file

@ -48,7 +48,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
depends_on("ncurses")
depends_on("pcre")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libxml2")
depends_on("libtiff", when="+X")
depends_on("libpng", when="+X")

View file

@ -29,7 +29,7 @@ class Er(CMakePackage):
depends_on("rankstr", when="@0.0.4:")
depends_on("redset")
depends_on("shuffile")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("kvtree@:1.2.0", when="@:0.1.0")
depends_on("kvtree@1.3.0", when="@0.2.0:0.3.0")

View file

@ -27,7 +27,7 @@ class Ethminer(CMakePackage):
depends_on(Boost.with_default_variants)
depends_on("json-c")
depends_on("curl")
depends_on("zlib")
depends_on("zlib-api")
depends_on("cuda", when="+cuda")
depends_on("mesa", when="+opencl")

View file

@ -20,7 +20,7 @@ class Exempi(AutotoolsPackage):
version("2.6.1", sha256="072451ac1e0dc97ed69a2e5bfc235fd94fe093d837f65584d0e3581af5db18cd")
version("2.5.2", sha256="52f54314aefd45945d47a6ecf4bd21f362e6467fa5d0538b0d45a06bc6eaaed5")
depends_on("zlib")
depends_on("zlib-api")
depends_on("iconv")
# needs +test variant to prevent following error:
# 118 checking for the Boost unit_test_framework library... no

View file

@ -20,5 +20,5 @@ class Exiv2(CMakePackage):
version("0.27.3", sha256="6398bc743c32b85b2cb2a604273b8c90aa4eb0fd7c1700bf66cbb2712b4f00c1")
version("0.27.2", sha256="3dbcaf01fbc5b98d42f091d1ff0d4b6cd9750dc724de3d9c0d113948570b2934")
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
depends_on("expat@2.2.6:", type="link")

View file

@ -28,7 +28,7 @@ class Express(CMakePackage):
"+atomic+container+math+thread+program_options"
)
depends_on("bamtools")
depends_on("zlib")
depends_on("zlib-api")
# patch from the debian package repo:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811859

View file

@ -26,7 +26,7 @@ class Fasta(MakefilePackage):
url="https://github.com/wrpearson/fasta36/archive/refs/tags/v36.3.8h_04-May-2020.tar.gz",
)
depends_on("zlib")
depends_on("zlib-api")
# The src tree includes a plethora of variant Makefiles and the
# builder is expected to choose one that's appropriate. This'll

View file

@ -25,4 +25,4 @@ class Fastani(CMakePackage, AutotoolsPackage):
depends_on("libtool", type="build", when="build_system=autotools")
depends_on("m4", type="build", when="build_system=autotools")
depends_on("gsl", type=("build", "link"))
depends_on("zlib", type=("build", "link"))
depends_on("zlib-api", type=("build", "link"))

View file

@ -14,4 +14,4 @@ class Fastjar(AutotoolsPackage):
version("0.98", sha256="f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145")
depends_on("zlib")
depends_on("zlib-api")

View file

@ -20,7 +20,7 @@ class Fastqvalidator(MakefilePackage):
commit="9db9c23e176a6ce6f421a3c21ccadedca892ac0c",
)
depends_on("zlib", type="link")
depends_on("zlib-api", type="link")
patch("chromosome.patch", when="@2017-01-10", working_dir="libStatGen")
@property

View file

@ -106,7 +106,7 @@ class Fenics(CMakePackage):
depends_on("python@3.5:", type=("build", "run"), when="+python")
depends_on("eigen@3.2.0:")
depends_on("pkgconfig", type="build")
depends_on("zlib", when="+zlib")
depends_on("zlib-api", when="+zlib")
depends_on("boost+filesystem+program_options+system+iostreams+timer+regex+chrono")
depends_on(

View file

@ -14,7 +14,7 @@ class Fermi(MakefilePackage):
version("1.1", sha256="f1351b52a4ff40e5d708899e90ecf747e7af8d4eac795f6968e5b58c2ba11a67")
depends_on("zlib")
depends_on("zlib-api")
depends_on("perl", type="run")
depends_on("sse2neon", when="target=aarch64:")

View file

@ -15,7 +15,7 @@ class Fermikit(MakefilePackage):
version("2017-11-7", commit="bf9c7112221577ba110665bddca8f1987250bdc7", submodules=True)
depends_on("zlib")
depends_on("zlib-api")
depends_on("sse2neon", when="target=aarch64:")
patch("ksw_for_aarch64.patch", when="target=aarch64:")

View file

@ -32,7 +32,7 @@ class Ferret(Package):
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("readline")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libx11")
depends_on("curl")
@ -66,7 +66,7 @@ def patch(self):
hdf5_prefix = spec["hdf5"].prefix
netcdff_prefix = spec["netcdf-fortran"].prefix
readline_prefix = spec["readline"].prefix
libz_prefix = spec["zlib"].prefix
libz_prefix = spec["zlib-api"].prefix
work_dir = "FERRET" if "@:7.2" in spec else "."
with working_dir(work_dir, create=False):

View file

@ -77,7 +77,7 @@ class Ffmpeg(AutotoolsPackage):
depends_on("alsa-lib", when="platform=linux")
depends_on("iconv")
depends_on("yasm@1.2.0:")
depends_on("zlib")
depends_on("zlib-api")
depends_on("aom", when="+libaom")
depends_on("bzip2", when="+bzlib")

View file

@ -32,7 +32,7 @@ class File(AutotoolsPackage):
depends_on("bzip2")
depends_on("xz", when="@5.38:")
depends_on("zlib")
depends_on("zlib-api")
depends_on("zstd", when="@5.44:")
@classmethod

View file

@ -16,7 +16,7 @@ class Filtlong(MakefilePackage):
version("0.2.0", sha256="a4afb925d7ced8d083be12ca58911bb16d5348754e7c2f6431127138338ee02a")
version("0.1.1", sha256="ddae7a5850efeb64424965a443540b1ced34286fbefad9230ab71f4af314081b")
depends_on("zlib")
depends_on("zlib-api")
def install(self, spec, prefix):
mkdir(prefix.bin)

View file

@ -16,7 +16,7 @@ class Flash(MakefilePackage):
version("1.2.11", sha256="685ca6f7fedda07434d8ee03c536f4763385671c4509c5bb48beb3055fd236ac")
depends_on("zlib")
depends_on("zlib-api")
def install(self, spec, prefix):
mkdirp(prefix.bin)

View file

@ -97,7 +97,7 @@ class Flexi(CMakePackage):
depends_on("hdf5+fortran+mpi", when="+mpi")
depends_on("hdf5+fortran~mpi", when="~mpi")
depends_on("lapack")
depends_on("zlib")
depends_on("zlib-api")
depends_on("fftw", when="+channel_fft")
def flag_handler(self, name, flags):

View file

@ -76,7 +76,7 @@ class FoamExtend(Package):
depends_on("mpi")
depends_on("python")
depends_on("zlib")
depends_on("zlib-api")
depends_on("flex", type="build")
depends_on("cmake", type="build")
@ -261,7 +261,7 @@ def configure(self, spec, prefix):
},
"flex": {"FLEX_SYSTEM": 1, "FLEX_DIR": spec["flex"].prefix},
"bison": {"BISON_SYSTEM": 1, "BISON_DIR": spec["flex"].prefix},
"zlib": {"ZLIB_SYSTEM": 1, "ZLIB_DIR": spec["zlib"].prefix},
"zlib": {"ZLIB_SYSTEM": 1, "ZLIB_DIR": spec["zlib-api"].prefix},
}
# Adjust configuration via prefs - sort second
self.etc_prefs["001"].update(self.foam_arch.foam_dict())

View file

@ -23,7 +23,7 @@ class Form(AutotoolsPackage):
)
depends_on("gmp", type="link", when="+gmp")
depends_on("zlib", type="link", when="+zlib")
depends_on("zlib-api", type="link", when="+zlib")
depends_on("mpi", type="link", when="+parform")
variant("gmp", default=True, description="Use GMP for long integer arithmetic")
@ -35,7 +35,10 @@ class Form(AutotoolsPackage):
def configure_args(self):
args = []
args += self.with_or_without("gmp", "prefix")
args += self.with_or_without("zlib", "prefix")
if "+zlib" in self.spec:
args.append("--with-zlib=%s" % self.spec["zlib-api"].prefix)
else:
args.append("--without-zlib")
args += self.enable_or_disable("scalar")
args += self.enable_or_disable("threaded")
args += self.enable_or_disable("parform")

View file

@ -32,7 +32,7 @@ class Fox(AutotoolsPackage):
depends_on("jpeg")
depends_on("libpng")
depends_on("libtiff")
depends_on("zlib")
depends_on("zlib-api")
depends_on("libx11")
depends_on("libsm")
depends_on("libxft")

View file

@ -24,13 +24,13 @@ class Freebayes(MesonPackage):
)
depends_on("cmake", type="build")
depends_on("zlib")
depends_on("zlib-api")
# Deps for @1.3.5 and beyond
depends_on("ninja", type="build", when="@1.3.5:")
depends_on("pkgconfig", type="build", when="@1.3.5:")
depends_on("htslib", when="@1.3.5:")
depends_on("zlib", when="@1.3.5:")
depends_on("zlib-api", when="@1.3.5:")
depends_on("xz", when="@1.3.5:")
depends_on("parallel", when="@1.3.5:")
depends_on("vcftools", when="@1.3.5:")

View file

@ -23,7 +23,7 @@ class FrontierClient(MakefilePackage):
depends_on("pacparser")
depends_on("expat")
depends_on("openssl")
depends_on("zlib")
depends_on("zlib-api")
patch("frontier-client.patch", level=0)
@ -71,7 +71,7 @@ def build(self, spec, prefix):
"PACPARSER_DIR=" + self.spec["pacparser"].prefix,
"EXPAT_DIR=" + self.spec["expat"].prefix,
"OPENSSL_DIR=" + self.spec["openssl"].prefix,
"ZLIB_DIR=" + self.spec["zlib"].prefix,
"ZLIB_DIR=" + self.spec["zlib-api"].prefix,
)
def install(self, spec, prefix):

View file

@ -82,7 +82,7 @@ class Gaudi(CMakePackage):
depends_on("py-xenv@1:", when="@:34.9", type=("build", "run"))
depends_on("range-v3")
depends_on("root +python +root7 +ssl +tbb +threads")
depends_on("zlib")
depends_on("zlib-api")
# Testing dependencies
# Note: gaudi only builds examples when testing enabled

View file

@ -182,7 +182,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
depends_on("isl@0.15:0.20", when="@9:9.9")
depends_on("isl@0.15:", when="@10:")
depends_on("zlib", when="@6:")
depends_on("zlib-api", when="@6:")
depends_on("zstd", when="@10:")
depends_on("diffutils", type="build")
depends_on("iconv", when="platform=darwin")
@ -652,9 +652,11 @@ def patch(self):
# Use installed libz
if self.version >= Version("6"):
filter_file("@zlibdir@", "-L{0}".format(spec["zlib"].prefix.lib), "gcc/Makefile.in")
filter_file(
"@zlibinc@", "-I{0}".format(spec["zlib"].prefix.include), "gcc/Makefile.in"
"@zlibdir@", "-L{0}".format(spec["zlib-api"].prefix.lib), "gcc/Makefile.in"
)
filter_file(
"@zlibinc@", "-I{0}".format(spec["zlib-api"].prefix.include), "gcc/Makefile.in"
)
if spec.satisfies("+nvptx"):

Some files were not shown because too many files have changed in this diff Show more