37 lines
1.0 KiB
Python
37 lines
1.0 KiB
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="bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16",
|
|
)
|
|
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)})
|