actions.py 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.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. pisitools.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. pisitools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  20. pisitools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  21. pisitools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  22. pisitools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  23. # pisitools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")
  24. # TODO: do we need that ?
  25. # pisitools.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-rubyinterp \
  35. --enable-gui=no \
  36. --with-tlib=ncurses \
  37. --prefix=/usr \
  38. --localstatedir=/var/lib/vim \
  39. --with-features=big \
  40. --disable-acl \
  41. --with-compiledby=PisiLinux \
  42. --enable-gpm \
  43. --enable-acl \
  44. --enable-cscope \
  45. --disable-netbeans \
  46. --disable-luainterp \
  47. --with-x=no \
  48. --with-modified-by=PisiLinux"
  49. if get.buildTYPE() == "gui":
  50. options += " --enable-gui=gtk2 \
  51. --with-vim-name=gvim \
  52. --with-view-name=gview \
  53. --with-x=yes"
  54. autotools.configure(options)
  55. def build():
  56. autotools.make()
  57. def install():
  58. autotools.rawInstall("VIMRCLOC=/etc/vim DESTDIR=%s" % get.installDIR())
  59. # enough for gui building, quit here
  60. if get.buildTYPE() == "gui":
  61. return
  62. # Vi != Vim, it's hard to break habbits
  63. pisitools.dosym("vim", "/usr/bin/vi")
  64. pisitools.dosym("/usr/bin/vim", "/bin/ex")