From 129a79486a16bc55c2ad1cf8158ef24c59113d7d Mon Sep 17 00:00:00 2001 From: diviocity Date: Sun, 29 Nov 2026 23:11:11 +0100 Subject: [PATCH] zlib: build and check the shared compression library against Vinix musl --- zlib/PKGBUILD.vile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 zlib/PKGBUILD.vile diff --git a/zlib/PKGBUILD.vile b/zlib/PKGBUILD.vile new file mode 100644 index 0000000..c0f4b82 --- /dev/null +++ b/zlib/PKGBUILD.vile @@ -0,0 +1,28 @@ +defpkgbuild(zlib, + #:pkgname, "zlib", + #:pkgver, "1.4", + #:pkgrel, 1, + #:pkgdesc, "DEFLATE compression library and development headers", + #:arch, [#:x86-64], + #:license, "Zlib", + #:url, "https://zlib.net/", + #:depends, ["musl"], + #:source, ["https://zlib.net/fossils/zlib-1.4.tar.gz"], + #:sha256sums, ["02dd159783677a749c04adbdd02b55b8a2bcc7e054f51b76b549199a916ad584"], + + #:build, fn() { + root := get-environment-variable("VPAC_MAKEPKG_ROOT") + run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", + string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs"), + "CFLAGS=-O2", "CHOST=x86_64-linux-musl", "AR=ar", "RANLIB=ranlib", + "zlib-1.4/configure", "--prefix=/usr", "--shared", "--disable-crcvx") + run("make") + }, + #:check, fn() { + root := get-environment-variable("VPAC_MAKEPKG_ROOT") + run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".", "./examplesh") + }, + #:package, fn() { + run("make", "install", string-append("DESTDIR=", pkgdir())) + run("install", "-Dm644", "zlib-1.4/LICENSE", string-append(pkgdir(), "/usr/share/licenses/zlib/LICENSE")) + }) -- 2.56.1