actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. def setup():
  11. shelltools.export("CC", get.CC())
  12. shelltools.export("CXX", get.CXX())
  13. shelltools.export("RANLIB", get.RANLIB())
  14. shelltools.export("AR", get.AR())
  15. # enable-debug is bogus, it should stay here
  16. options = "--with-x \
  17. --enable-opengl-player \
  18. --disable-gtk-player \
  19. --enable-mmx \
  20. --disable-assertions \
  21. --disable-static \
  22. --enable-debug"
  23. if get.buildTYPE() == "emul32":
  24. options += " --prefix=/emul32 \
  25. --libdir=/usr/lib32 \
  26. --bindir=/emul32/bin \
  27. --includedir=/emul32/include \
  28. --mandir=/emul32/man \
  29. --disable-sdltest \
  30. --disable-gtktest"
  31. shelltools.export("CC", "%s -m32" % get.CC())
  32. shelltools.export("CXX", "%s -m32" % get.CXX())
  33. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  34. shelltools.export("CXXFLAGS", "%s -m32" % get.CFLAGS())
  35. shelltools.system("rm -rf acinclude/lt*.m4 acinclude/libtool.m4")
  36. neededfilelist=["NEWS","ChangeLog","AUTHORS"]
  37. for i in neededfilelist:
  38. shelltools.touch(i)
  39. autotools.autoreconf("-fi -Iacinclude")
  40. autotools.configure(options)
  41. def build():
  42. autotools.make()
  43. def install():
  44. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  45. pisitools.dodoc("CHANGES", "README*", "TODO")