logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

vim-1.24-r1.ebuild (1210B)


  1. # Copyright 2019-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
  2. # Distributed under the terms of the GNU General Public License v2
  3. # vim-1.14 can also be found but the first version of vim to work on Unix
  4. # is version 1.22, which I didn’t found.
  5. EAPI=8
  6. DESCRIPTION="Vi IMitation"
  7. HOMEPAGE="https://www.vim.org/ https://ftp.nluug.nl/pub/vim/old/"
  8. SRC_URI="https://ftp.nluug.nl/pub/vim/old/${P}.tar.gz"
  9. S="${WORKDIR}/${P}/src"
  10. LICENSE="public-domain"
  11. SLOT="${PV}"
  12. KEYWORDS="~amd64 ~x86"
  13. src_prepare() {
  14. default
  15. ln makefile.unix makefile || die
  16. sed -r -i \
  17. -e 's/CC=/CC ?=/' \
  18. -e 's/^(DEFS = .*) -DTERMCAP(.*)/\1\2/' \
  19. -e 's/^(DEFS = .*) -DSOME_BUILTIN_TCAPS(.*)/\1\2/' \
  20. -e 's/LIBS = -ltermlib/LIBS =/' \
  21. -e '165s;mkcmdtab;./mkcmdtab;' \
  22. makefile || die
  23. sed -i '28s/#ifdef SYSV/#ifndef SYSV/' unix.c || die
  24. # Make VIMINIT default to empty string, somehow this avoids a segfault
  25. sed -i '62asetenv("VIMINIT", "", 0);' main.c || die
  26. # musl doesn't have obsolete <termio.h> nor unsafe getwd
  27. sed -i \
  28. -e 's/termio.h/termios.h/' \
  29. -e 's/struct termio/struct termios/' \
  30. -e 's/getwd(buf)/getcwd(buf,len)/' \
  31. unix.c || die
  32. }
  33. src_install() {
  34. cd ..
  35. newbin vim vim-${PV}
  36. }