actions.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 libtools
  10. from pisi.actionsapi import get
  11. WorkDir = "SDL2-%s" % get.srcVERSION()
  12. docdir = "%s/%s" % (get.docDIR(), get.srcNAME())
  13. def setup():
  14. shelltools.export("CFLAGS", "%s -fPIC -O3" % get.CFLAGS())
  15. shelltools.export("CXXFLAGS", "%s -fPIC -O3" % get.CXXFLAGS())
  16. # for libtool version matching
  17. #shelltools.copy("/usr/share/aclocal/ltversion.m4", "acinclude/")
  18. shelltools.system("./autogen.sh")
  19. #libtools.libtoolize("--force --copy")
  20. options = "--enable-sdl-dlopen \
  21. --disable-arts \
  22. --disable-esd \
  23. --disable-nas \
  24. --enable-pulseaudio-shared \
  25. --enable-alsa \
  26. --disable-rpath"
  27. if get.buildTYPE() == "emul32":
  28. options += " --libdir=/usr/lib32 \
  29. --bindir=/emul32/bin \
  30. --mandir=/emul32/man \
  31. "
  32. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  33. shelltools.export("CFLAGS", "%s -fPIC -O3 -m32" % get.CFLAGS())
  34. shelltools.export("CXXFLAGS", "%s -fPIC -O3 -m32" % get.CXXFLAGS())
  35. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  36. autotools.configure(options)
  37. def build():
  38. autotools.make()
  39. def install():
  40. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  41. libtools.preplib()
  42. pisitools.dodoc("BUGS.txt", "CREDITS.txt", "COPYING.txt", "README.txt", "README-SDL.txt", "TODO.txt", "WhatsNew.txt")