me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Build Zsh for the selected musl target and exercise its modules

diviocity committed 6 days ago · d769a3f6ce0ad50db7480dc492e395a8e8a49743 View patch
Unverified signature 1 files changed +7 -12
zsh/PKGBUILD.vile +7 -12

@@ -2,9 +2,9 @@

22defpkgbuild(zsh,

33 #:pkgname, "zsh",

44 #:pkgver, "5.9.2",

5- #:pkgrel, 1,

5+ #:pkgrel, 2,

66 #:pkgdesc, "Interactive shell with line editing, completions and loadable modules",

7- #:arch, [#:x86-64],

7+ #:arch, [#:x86-64, #:aarch64],

88 #:url, "https://www.zsh.org/",

99 #:license, "MIT-Modern-Variant AND GPL-2.0-only",

1010 #:depends, ["musl", "ncurses", "pcre2", "libcap"],

@@ -17,33 +17,28 @@ defpkgbuild(zsh,

1717 "798b8e41ed0ed2ffdc4a2d6fabf3099063e40b74b51fe03631305edeb7607e07",

1818 "75fb7b825e3f7a3d63257c98ef5d55819179902585a3ec6459c2b4fbb20ed38f"],

1919 #:build, fn() {

20- root := get-environment-variable("VINIX_SYSROOT")

20+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")

2121 run("test", "-e", string-append(root, "/usr/lib/libncursesw.so"))

2222 ; Define ELF symbol properties that configure cannot test by executing

2323 ; a target program on the build host. The package phase loads the modules.

24- run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",

25- "-C", "zsh-5.9.2", "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_SYSROOT_DIR=", root),

26- string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"),

24+ run("env", "-C", "zsh-5.9.2",

2725 string-append("PCRE_CONFIG=", root, "/usr/bin/pcre2-config"),

28- "CC=vinix-cc", "CFLAGS=-O2", "zsh_cv_shared_environ=yes", "zsh_cv_shared_tgetent=yes",

26+ "CFLAGS=-O2", "zsh_cv_shared_environ=yes", "zsh_cv_shared_tgetent=yes",

2927 "zsh_cv_shared_tigetstr=yes", "zsh_cv_sys_dynamic_execsyms=yes",

3028 "zsh_cv_sys_dynamic_rtld_global=yes", "zsh_cv_sys_dynamic_clash_ok=yes",

31- "./configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

32- "--prefix=/usr", "--bindir=/bin", "--sysconfdir=/etc", "--enable-etcdir=/etc/zsh",

29+ "vinix-configure", "./configure", "--bindir=/bin", "--enable-etcdir=/etc/zsh",

3330 "--with-term-lib=ncursesw", "--enable-multibyte", "--enable-function-subdirs",

3431 "--enable-pcre", "--enable-cap", "--enable-zsh-secure-free", "--with-tcsetpgrp")

3532 run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "-C", "zsh-5.9.2")

3633 },

3734 #:package, fn() {

38- root := get-environment-variable("VINIX_SYSROOT")

3935 run("make", "-j1", "-C", "zsh-5.9.2", string-append("DESTDIR=", pkgdir()), "install")

4036 for-each(fn(file) {

4137 run("install", "-Dm644", file, string-append(pkgdir(), "/etc/zsh/", file))

4238 }, list("zprofile", "zshenv", "zshrc"))

4339 run("install", "-d", string-append(pkgdir(), "/etc/zsh/zshrc.d"), string-append(pkgdir(), "/usr/share/zsh/plugins"))

4440 run("install", "-Dm644", "zsh-5.9.2/LICENCE", string-append(pkgdir(), "/usr/share/licenses/zsh/LICENCE"))

45- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path",

46- string-append(root, "/usr/lib:", root, "/lib"), string-append(pkgdir(), "/bin/zsh"),

41+ run("vinix-run", string-append(pkgdir(), "/bin/zsh"),

4742 "-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' ]]",

4843 "zsh", string-append(pkgdir(), "/usr/lib/zsh/5.9.2"))

4944 })