| 1 | defpkgbuild(vim, |
| 2 | #:pkgname, "vim", |
| 3 | #:pkgver, "9.2.1352", |
| 4 | #:pkgrel, 2, |
| 5 | #:pkgdesc, "Terminal Vim with its runtime, documentation and xxd", |
| 6 | #:arch, [#:x86-64, #:aarch64], |
| 7 | #:license, "Vim", |
| 8 | #:url, "https://www.vim.org/", |
| 9 | #:depends, ["musl", "ncurses"], |
| 10 | #:backup, ["etc/vim/vimrc"], |
| 11 | #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.24/vim-9.2.1352.tar.gz", "vimrc"], |
| 12 | #:sha256sums, ["f491db14f8ef04f474e57dd7759347601442843163a57604dacd9132475b34e2", |
| 13 | "8343cafcfc089392ffb5ac262a234663aaa5dfb650927313780644b47313eac2"], |
| 14 | #:build, fn() { |
| 15 | root := get-environment-variable("VPAC_MAKEPKG_ROOT") |
| 16 | run("test", "-e", string-append(root, "/usr/lib/libncursesw.so")) |
| 17 | run("env", "-C", "vim-9.2.1352", "CFLAGS=-O2", "vinix-configure", "./configure", |
| 18 | "--with-features=huge", "--with-tlib=ncursesw", "--without-x", |
| 19 | "--enable-gui=no", "--disable-nls", "--enable-multibyte", "--enable-terminal", |
| 20 | "--disable-pythoninterp", "--disable-python3interp", "--disable-rubyinterp", |
| 21 | "--disable-luainterp", "--disable-perlinterp", "--with-compiledby=Vinix") |
| 22 | run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "-C", "vim-9.2.1352") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("make", "-j1", "-C", "vim-9.2.1352", "CROSS_COMPILING=yes", string-append("DESTDIR=", pkgdir()), "install") |
| 26 | run("install", "-Dm644", "vimrc", string-append(pkgdir(), "/etc/vim/vimrc")) |
| 27 | run("ln", "-sf", "../../../etc/vim/vimrc", string-append(pkgdir(), "/usr/share/vim/vimrc")) |
| 28 | run("install", "-Dm644", "vim-9.2.1352/runtime/doc/uganda.txt", string-append(pkgdir(), "/usr/share/licenses/vim/LICENSE")) |
| 29 | run("vinix-run", string-append(pkgdir(), "/usr/bin/vim"), "--version") |
| 30 | }) |
| 31 | |