actions.py 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/python
  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 pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  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. #pisitools.dosed("runtime/tools/mve.awk", "#!/usr/bin/nawk -f", "#!/usr/bin/awk -f")
  16. # shelltools.system("""sed -E 's|^.*(#define SYS_.*VIMRC_FILE.*").*$|\1|g' -i src/feature.h""")
  17. # shelltools.system("""sed -E 's|^.*(#define VIMRC_FILE.*").*$|\1|g' -i src/feature.h""")
  18. # define the place for the global (g)vimrc file (set to /etc/vim/vimrc)
  19. shelltools.echo("src/feature.h", "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"")
  20. shelltools.echo("src/feature.h", "#define VIMRC_FILE \"/etc/vim/vimrc\"")
  21. # our binary ctags file is names as exuberant-ctags
  22. pisitools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  23. pisitools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  24. pisitools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  25. pisitools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  26. #pisitools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  27. # TODO: do we need that ?
  28. #pisitools.dosed("src/configure.in", r"libc\.h", "")
  29. # TODO: we could need that
  30. #autotools.make("-C src autoconf")
  31. # TODO: * We should use "big" feature instead of "huge".
  32. # * Investigate impacts on current use
  33. options ="--with-features=huge \
  34. --enable-multibyte \
  35. --enable-perlinterp \
  36. --enable-pythoninterp \
  37. --enable-python3interp \
  38. --enable-rubyinterp \
  39. --enable-gui=no \
  40. --with-tlib=ncurses \
  41. --prefix=/usr \
  42. --localstatedir=/var/lib/vim \
  43. --with-features=big \
  44. --disable-acl \
  45. --with-compiledby=PisiLinux \
  46. --enable-gpm \
  47. --enable-acl \
  48. --enable-cscope \
  49. --disable-netbeans \
  50. --disable-luainterp \
  51. --with-x=no \
  52. --with-modified-by=PisiLinux"
  53. if get.buildTYPE() == "gui":
  54. options += " --enable-gui=gtk2 \
  55. --with-vim-name=gvim \
  56. --with-view-name=gview \
  57. --with-x=yes"
  58. autotools.configure(options)
  59. def build():
  60. autotools.make()
  61. def install():
  62. autotools.rawInstall("-j1 VIMRCLOC=/etc/vim DESTDIR=%s" % get.installDIR())
  63. # enough for gui building, quit here
  64. if get.buildTYPE() == "gui":
  65. return
  66. # Vi != Vim, it's hard to break habbits
  67. pisitools.dosym("vim", "/usr/bin/vi")
  68. pisitools.dosym("/usr/bin/vim", "/bin/ex")
  69. pisitools.remove("/usr/bin/ex")