Files
distro/recipes/zlib.py
T
2026-05-26 03:06:26 +02:00

37 lines
997 B
Python

version = "1.3.2"
revision = 1
description = "Lossless data-compression library"
license = "Zlib"
url = "https://zlib.net/"
source = tarball(
url=f"https://github.com/madler/zlib/releases/download/v{version}/zlib-{version}.tar.gz",
sha256="?",
)
host_deps = ["binutils", "gcc"]
deps = [profile["libc"]]
def configure(self):
# zlib ships its own ./configure; doesn't grok autoconf flags.
self.run(
self.source_dir / "configure",
f"--prefix={self.profile['prefix']}",
f"--libdir={self.profile['libdir']}",
f"--sharedlibdir={self.profile['libdir']}",
env={
"CC": f"{self.triple}-gcc",
"AR": f"{self.triple}-ar",
"RANLIB": f"{self.triple}-ranlib",
"CFLAGS": self.profile["cflags"],
"LDFLAGS": self.profile["ldflags"],
},
)
def build(self):
self.run("make", f"-j{self.jobs}")
def install(self):
self.run("make", "install", env={"DESTDIR": str(self.dest_dir)})