From d769a3f6ce0ad50db7480dc492e395a8e8a49743 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 00:30:06 +0100 Subject: [PATCH] Build Zsh for the selected musl target and exercise its modules --- zsh/PKGBUILD.vile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/zsh/PKGBUILD.vile b/zsh/PKGBUILD.vile index 063c3b2..4840d60 100644 --- a/zsh/PKGBUILD.vile +++ b/zsh/PKGBUILD.vile @@ -2,9 +2,9 @@ defpkgbuild(zsh, #:pkgname, "zsh", #:pkgver, "5.9.2", - #:pkgrel, 1, + #:pkgrel, 2, #:pkgdesc, "Interactive shell with line editing, completions and loadable modules", - #:arch, [#:x86-64], + #:arch, [#:x86-64, #:aarch64], #:url, "https://www.zsh.org/", #:license, "MIT-Modern-Variant AND GPL-2.0-only", #:depends, ["musl", "ncurses", "pcre2", "libcap"], @@ -17,33 +17,28 @@ defpkgbuild(zsh, "798b8e41ed0ed2ffdc4a2d6fabf3099063e40b74b51fe03631305edeb7607e07", "75fb7b825e3f7a3d63257c98ef5d55819179902585a3ec6459c2b4fbb20ed38f"], #:build, fn() { - root := get-environment-variable("VINIX_SYSROOT") + root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("test", "-e", string-append(root, "/usr/lib/libncursesw.so")) ; Define ELF symbol properties that configure cannot test by executing ; a target program on the build host. The package phase loads the modules. - run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", - "-C", "zsh-5.9.2", "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_SYSROOT_DIR=", root), - string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"), + run("env", "-C", "zsh-5.9.2", string-append("PCRE_CONFIG=", root, "/usr/bin/pcre2-config"), - "CC=vinix-cc", "CFLAGS=-O2", "zsh_cv_shared_environ=yes", "zsh_cv_shared_tgetent=yes", + "CFLAGS=-O2", "zsh_cv_shared_environ=yes", "zsh_cv_shared_tgetent=yes", "zsh_cv_shared_tigetstr=yes", "zsh_cv_sys_dynamic_execsyms=yes", "zsh_cv_sys_dynamic_rtld_global=yes", "zsh_cv_sys_dynamic_clash_ok=yes", - "./configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", - "--prefix=/usr", "--bindir=/bin", "--sysconfdir=/etc", "--enable-etcdir=/etc/zsh", + "vinix-configure", "./configure", "--bindir=/bin", "--enable-etcdir=/etc/zsh", "--with-term-lib=ncursesw", "--enable-multibyte", "--enable-function-subdirs", "--enable-pcre", "--enable-cap", "--enable-zsh-secure-free", "--with-tcsetpgrp") run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "-C", "zsh-5.9.2") }, #:package, fn() { - root := get-environment-variable("VINIX_SYSROOT") run("make", "-j1", "-C", "zsh-5.9.2", string-append("DESTDIR=", pkgdir()), "install") for-each(fn(file) { run("install", "-Dm644", file, string-append(pkgdir(), "/etc/zsh/", file)) }, list("zprofile", "zshenv", "zshrc")) run("install", "-d", string-append(pkgdir(), "/etc/zsh/zshrc.d"), string-append(pkgdir(), "/usr/share/zsh/plugins")) run("install", "-Dm644", "zsh-5.9.2/LICENCE", string-append(pkgdir(), "/usr/share/licenses/zsh/LICENCE")) - run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", - string-append(root, "/usr/lib:", root, "/lib"), string-append(pkgdir(), "/bin/zsh"), + run("vinix-run", string-append(pkgdir(), "/bin/zsh"), "-fc", "module_path=($1); zmodload zsh/zle && zmodload zsh/complete && zmodload zsh/terminfo && zmodload zsh/pcre && zmodload zsh/cap && setopt RE_MATCH_PCRE && [[ ab =~ '^(?=a)a' ]]", "zsh", string-append(pkgdir(), "/usr/lib/zsh/5.9.2")) }) -- 2.56.1