actions.py 2.8 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 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 = "SDL-%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-events \
  21. --enable-cpuinfo \
  22. --enable-cdrom \
  23. --enable-threads \
  24. --enable-timers \
  25. --enable-file \
  26. --enable-alsa \
  27. --enable-oss \
  28. --enable-nasm \
  29. --enable-video-aalib \
  30. --enable-video-caca \
  31. --enable-video-directfb \
  32. --enable-video-fbcon \
  33. --enable-video-dummy \
  34. --enable-video-opengl \
  35. --enable-video-x11 \
  36. --enable-video-x11-xv \
  37. --enable-video-x11-xinerama \
  38. --enable-video-x11-xrandr \
  39. --with-x \
  40. --disable-rpath \
  41. --disable-arts \
  42. --disable-dga \
  43. --disable-esd \
  44. --disable-nas \
  45. --disable-video-dga \
  46. --disable-video-ggi \
  47. --disable-video-svga \
  48. --disable-video-x11-xme \
  49. --disable-static"
  50. if get.buildTYPE() == "emul32":
  51. options += " --libdir=/usr/lib32 \
  52. --bindir=/emul32/bin \
  53. --mandir=/emul32/man \
  54. --disable-video-aalib \
  55. --disable-video-caca \
  56. --disable-video-directfb"
  57. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  58. shelltools.export("CFLAGS", "%s -fPIC -O3 -m32" % get.CFLAGS())
  59. shelltools.export("CXXFLAGS", "%s -fPIC -O3 -m32" % get.CXXFLAGS())
  60. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  61. autotools.configure(options)
  62. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  63. def build():
  64. autotools.make()
  65. def install():
  66. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  67. libtools.preplib()
  68. for i in ["html", "images", "index.html"]:
  69. pisitools.insinto(docdir, "docs/%s" % i)
  70. pisitools.dodoc("BUGS", "CREDITS", "README", "README-SDL.txt", "TODO", "WhatsNew")