actions.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from inary.actionsapi import autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. #WorkDir = "vim74"
  11. def setup():
  12. # TODO: do we need that ?
  13. shelltools.export("CXXFLAGS", get.CXXFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
  14. shelltools.export("CFLAGS", get.CFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
  15. inarytools.dosed("runtime/tools/mve.awk", "#!/usr/bin/nawk -f", "#!/usr/bin/awk -f")
  16. # define the place for the global (g)vimrc file (set to /etc/vim/vimrc)
  17. shelltools.echo("src/feature.h", "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"")
  18. # our binary ctags file is names as exuberant-ctags
  19. inarytools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  20. inarytools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  21. inarytools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  22. inarytools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  23. # inarytools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  24. # TODO: do we need that ?
  25. # inarytools.dosed("src/configure.in", r"libc\.h", "")
  26. # TODO: we could need that
  27. #autotools.make("-C src autoconf")
  28. # TODO: * We should use "big" feature instead of "huge".
  29. # * Investigate impacts on current use
  30. options ="--with-features=huge \
  31. --enable-multibyte \
  32. --enable-perlinterp \
  33. --enable-pythoninterp \
  34. --enable-python3interp \
  35. --with-python3-config-dir=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/ \
  36. --enable-rubyinterp \
  37. --enable-gui=no \
  38. --with-tlib=ncurses \
  39. --prefix=/usr \
  40. --localstatedir=/var/lib/vim \
  41. --with-features=big \
  42. --disable-acl \
  43. --with-compiledby=Sulin \
  44. --enable-gpm \
  45. --enable-acl \
  46. --enable-cscope \
  47. --disable-netbeans \
  48. --disable-luainterp \
  49. --with-x=no \
  50. --with-modified-by=Sulin"
  51. if get.buildTYPE() == "gui":
  52. options += " --enable-gui=gtk2 \
  53. --with-vim-name=gvim \
  54. --with-view-name=gview \
  55. --with-x=yes"
  56. autotools.configure(options)
  57. def build():
  58. autotools.make()
  59. def install():
  60. autotools.rawInstall("VIMRCLOC=/etc/vim DESTDIR=%s" % get.installDIR())
  61. # enough for gui building, quit here
  62. if get.buildTYPE() == "gui":
  63. return
  64. # Vi != Vim, it's hard to break habbits
  65. inarytools.dosym("vim", "/usr/bin/vi")
  66. inarytools.dosym("/usr/bin/vim", "/bin/ex")