me

/

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

vim: package the terminal editor and its runtime

diviocity committed 6 days ago · 2d856cc9c28b1d1e79ca2d7e909722580d9ad564 View patch
Unverified signature 2 files changed +51 -0
vim/PKGBUILD.vile new file +33 -0

@@ -0,0 +1,33 @@

1+defpkgbuild(vim,

2+ #:pkgname, "vim",

3+ #:pkgver, "9.2.1352",

4+ #:pkgrel, 1,

5+ #:pkgdesc, "Terminal Vim with its runtime, documentation and xxd",

6+ #:arch, [#:x86-64],

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("VINIX_SYSROOT")

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

17+ run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",

18+ "-C", "vim-9.2.1352", "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_SYSROOT_DIR=", root),

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

20+ string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs"),

21+ "CFLAGS=-O2", "./configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

22+ "--prefix=/usr", "--with-features=huge", "--with-tlib=ncursesw", "--without-x",

23+ "--enable-gui=no", "--disable-nls", "--enable-multibyte", "--enable-terminal",

24+ "--disable-pythoninterp", "--disable-python3interp", "--disable-rubyinterp",

25+ "--disable-luainterp", "--disable-perlinterp", "--with-compiledby=Vinix")

26+ run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "-C", "vim-9.2.1352")

27+ },

28+ #:package, fn() {

29+ run("make", "-j1", "-C", "vim-9.2.1352", "CROSS_COMPILING=yes", string-append("DESTDIR=", pkgdir()), "install")

30+ run("install", "-Dm644", "vimrc", string-append(pkgdir(), "/etc/vim/vimrc"))

31+ run("ln", "-sf", "../../../etc/vim/vimrc", string-append(pkgdir(), "/usr/share/vim/vimrc"))

32+ run("install", "-Dm644", "vim-9.2.1352/runtime/doc/uganda.txt", string-append(pkgdir(), "/usr/share/licenses/vim/LICENSE"))

33+ })

vim/vimrc new file +18 -0

@@ -0,0 +1,18 @@

1+set nocompatible " Use Vim defaults (much better!)

2+set bs=2 " Allow backspacing over everything in insert mode

3+set ai " Always set auto-indenting on

4+set history=50 " keep 50 lines of command history

5+set ruler " Show the cursor position all the time

6+

7+" Don't use Ex mode, use Q for formatting

8+map Q gq

9+

10+" When doing tab completion, give the following files lower priority.

11+set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo

12+

13+set nomodeline

14+syntax on

15+

16+if filereadable("/etc/vim/vimrc.local")

17+ source /etc/vim/vimrc.local

18+endif